@makefully/notefully 0.2.12 → 0.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/notefully.css +1 -1
- package/dist/notefully.iife.js +37 -33
- package/dist/notefully.js +1551 -1283
- package/package.json +1 -1
package/dist/notefully.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const jt = {
|
|
2
2
|
"launcher.open": "Leave a note…",
|
|
3
3
|
"tool.crop": "Crop",
|
|
4
4
|
"tool.resetCrop": "Reset crop",
|
|
@@ -71,15 +71,15 @@ const At = {
|
|
|
71
71
|
"diag.timezone": "Timezone",
|
|
72
72
|
"diag.viewport": "Viewport",
|
|
73
73
|
"diag.user": "User"
|
|
74
|
-
},
|
|
75
|
-
"en-US":
|
|
76
|
-
},
|
|
74
|
+
}, Pt = {
|
|
75
|
+
"en-US": jt
|
|
76
|
+
}, _t = {
|
|
77
77
|
en: "en-US",
|
|
78
78
|
no: "nb",
|
|
79
79
|
tl: "fil",
|
|
80
80
|
"zh-Hans": "zh-CN",
|
|
81
81
|
"zh-Hant": "zh-TW"
|
|
82
|
-
},
|
|
82
|
+
}, Ha = {
|
|
83
83
|
"es-MX": ["es-419", "es"],
|
|
84
84
|
"es-AR": ["es-419", "es"],
|
|
85
85
|
"es-CL": ["es-419", "es"],
|
|
@@ -99,34 +99,34 @@ const At = {
|
|
|
99
99
|
"es-DO": ["es-419", "es"],
|
|
100
100
|
"es-PR": ["es-419", "es"],
|
|
101
101
|
"es-CU": ["es-419", "es"]
|
|
102
|
-
},
|
|
103
|
-
let
|
|
104
|
-
function
|
|
105
|
-
!t || !e || typeof e != "object" || (
|
|
102
|
+
}, _a = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
|
|
103
|
+
let yt = "en-US", Xe = {};
|
|
104
|
+
function w(t, e) {
|
|
105
|
+
!t || !e || typeof e != "object" || (Pt[String(t)] = e);
|
|
106
106
|
}
|
|
107
|
-
function
|
|
107
|
+
function pt(t) {
|
|
108
108
|
return String(t || "").trim().replace(/_/g, "-");
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
const e =
|
|
110
|
+
function Ga(t) {
|
|
111
|
+
const e = pt(t);
|
|
112
112
|
if (!e)
|
|
113
113
|
return ["en-US"];
|
|
114
|
-
const a = e, o =
|
|
114
|
+
const a = e, o = _t[a] || _t[a.toLowerCase()] || a, i = [], n = (l) => {
|
|
115
115
|
l && !i.includes(l) && i.push(l);
|
|
116
116
|
};
|
|
117
|
-
|
|
118
|
-
for (const [l,
|
|
119
|
-
l.toLowerCase() === o.toLowerCase() &&
|
|
120
|
-
const
|
|
121
|
-
for (let l =
|
|
122
|
-
s
|
|
123
|
-
return
|
|
124
|
-
}
|
|
125
|
-
function
|
|
126
|
-
for (const e of
|
|
127
|
-
if (
|
|
117
|
+
n(o);
|
|
118
|
+
for (const [l, c] of Object.entries(Ha))
|
|
119
|
+
l.toLowerCase() === o.toLowerCase() && c.forEach(n);
|
|
120
|
+
const s = o.split("-");
|
|
121
|
+
for (let l = s.length - 1; l >= 1; l -= 1)
|
|
122
|
+
n(s.slice(0, l).join("-"));
|
|
123
|
+
return n(_t[s[0]] || s[0]), n("en-US"), i;
|
|
124
|
+
}
|
|
125
|
+
function qa(t) {
|
|
126
|
+
for (const e of Ga(t)) {
|
|
127
|
+
if (Pt[e])
|
|
128
128
|
return e;
|
|
129
|
-
const a = Object.keys(
|
|
129
|
+
const a = Object.keys(Pt).find(
|
|
130
130
|
(o) => o.toLowerCase() === e.toLowerCase()
|
|
131
131
|
);
|
|
132
132
|
if (a)
|
|
@@ -134,36 +134,36 @@ function Ta(t) {
|
|
|
134
134
|
}
|
|
135
135
|
return "en-US";
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function Wa(t = {}) {
|
|
138
138
|
var e;
|
|
139
139
|
if (t.locale != null && String(t.locale).trim())
|
|
140
|
-
return
|
|
140
|
+
return pt(t.locale);
|
|
141
141
|
if (typeof document < "u") {
|
|
142
142
|
const a = (e = document.documentElement) == null ? void 0 : e.lang;
|
|
143
143
|
if (a && String(a).trim())
|
|
144
|
-
return
|
|
144
|
+
return pt(a);
|
|
145
145
|
}
|
|
146
|
-
return typeof navigator < "u" && navigator.language ?
|
|
146
|
+
return typeof navigator < "u" && navigator.language ? pt(navigator.language) : "en-US";
|
|
147
147
|
}
|
|
148
|
-
function
|
|
149
|
-
return t != null && (
|
|
148
|
+
function Za(t, e) {
|
|
149
|
+
return t != null && (yt = pt(t) || "en-US"), yt;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
|
|
151
|
+
function Ya(t) {
|
|
152
|
+
Xe = t && typeof t == "object" ? { ...t } : {};
|
|
153
153
|
}
|
|
154
|
-
function
|
|
155
|
-
return
|
|
154
|
+
function Lt() {
|
|
155
|
+
return yt;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
const e =
|
|
159
|
-
return
|
|
157
|
+
function Xa(t = yt) {
|
|
158
|
+
const e = pt(t).split("-")[0].toLowerCase();
|
|
159
|
+
return _a.has(e) ? "rtl" : "ltr";
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
const a = String(t || ""), o =
|
|
163
|
-
let
|
|
164
|
-
return e && typeof e == "object" && (
|
|
161
|
+
function g(t, e) {
|
|
162
|
+
const a = String(t || ""), o = qa(yt), i = Pt[o] || jt;
|
|
163
|
+
let n = Xe[a] ?? i[a] ?? jt[a] ?? a;
|
|
164
|
+
return e && typeof e == "object" && (n = String(n).replace(/\{(\w+)\}/g, (s, l) => e[l] == null ? `{${l}}` : String(e[l]))), String(n);
|
|
165
165
|
}
|
|
166
|
-
const
|
|
166
|
+
const Ja = {
|
|
167
167
|
"launcher.open": "Оставете бележка...",
|
|
168
168
|
"tool.crop": "Реколта",
|
|
169
169
|
"tool.resetCrop": "Нулиране на изрязването",
|
|
@@ -220,7 +220,7 @@ const Ia = {
|
|
|
220
220
|
"diag.timezone": "Часова зона",
|
|
221
221
|
"diag.viewport": "Изгледна плоча",
|
|
222
222
|
"diag.user": "Потребител"
|
|
223
|
-
},
|
|
223
|
+
}, Qa = {
|
|
224
224
|
"launcher.open": "Deixa una nota...",
|
|
225
225
|
"tool.crop": "Cultiu",
|
|
226
226
|
"tool.resetCrop": "Restablir el cultiu",
|
|
@@ -277,7 +277,7 @@ const Ia = {
|
|
|
277
277
|
"diag.timezone": "Zona horària",
|
|
278
278
|
"diag.viewport": "Porta de vista",
|
|
279
279
|
"diag.user": "Usuari"
|
|
280
|
-
},
|
|
280
|
+
}, to = {
|
|
281
281
|
"launcher.open": "Zanechte poznámku...",
|
|
282
282
|
"tool.crop": "Oříznout",
|
|
283
283
|
"tool.resetCrop": "Obnovit oříznutí",
|
|
@@ -334,7 +334,7 @@ const Ia = {
|
|
|
334
334
|
"diag.timezone": "Časové pásmo",
|
|
335
335
|
"diag.viewport": "Výřez",
|
|
336
336
|
"diag.user": "Uživatel"
|
|
337
|
-
},
|
|
337
|
+
}, eo = {
|
|
338
338
|
"launcher.open": "Efterlad en note...",
|
|
339
339
|
"tool.crop": "Afgrøde",
|
|
340
340
|
"tool.resetCrop": "Nulstil afgrøde",
|
|
@@ -391,7 +391,7 @@ const Ia = {
|
|
|
391
391
|
"diag.timezone": "Tidszone",
|
|
392
392
|
"diag.viewport": "Viewport",
|
|
393
393
|
"diag.user": "Bruger"
|
|
394
|
-
},
|
|
394
|
+
}, ao = {
|
|
395
395
|
"launcher.open": "Hinterlassen Sie eine Notiz...",
|
|
396
396
|
"tool.crop": "Ernte",
|
|
397
397
|
"tool.resetCrop": "Zuschnitt zurücksetzen",
|
|
@@ -448,7 +448,7 @@ const Ia = {
|
|
|
448
448
|
"diag.timezone": "Zeitzone",
|
|
449
449
|
"diag.viewport": "Sichtfenster",
|
|
450
450
|
"diag.user": "Nutzer"
|
|
451
|
-
},
|
|
451
|
+
}, oo = {
|
|
452
452
|
"launcher.open": "Αφήστε ένα σημείωμα...",
|
|
453
453
|
"tool.crop": "Καλλιέργεια",
|
|
454
454
|
"tool.resetCrop": "Επαναφορά της καλλιέργειας",
|
|
@@ -505,7 +505,7 @@ const Ia = {
|
|
|
505
505
|
"diag.timezone": "Ζώνη ώρας",
|
|
506
506
|
"diag.viewport": "Θύρα προβολής",
|
|
507
507
|
"diag.user": "Χρήστης"
|
|
508
|
-
},
|
|
508
|
+
}, io = {
|
|
509
509
|
"launcher.open": "Leave a note…",
|
|
510
510
|
"tool.crop": "Crop",
|
|
511
511
|
"tool.resetCrop": "Reset crop",
|
|
@@ -578,7 +578,7 @@ const Ia = {
|
|
|
578
578
|
"diag.timezone": "Timezone",
|
|
579
579
|
"diag.viewport": "Viewport",
|
|
580
580
|
"diag.user": "User"
|
|
581
|
-
},
|
|
581
|
+
}, no = {
|
|
582
582
|
"launcher.open": "Deja una nota...",
|
|
583
583
|
"tool.crop": "Cultivo",
|
|
584
584
|
"tool.resetCrop": "Restablecer cultivo",
|
|
@@ -635,7 +635,7 @@ const Ia = {
|
|
|
635
635
|
"diag.timezone": "Zona horaria",
|
|
636
636
|
"diag.viewport": "Ventana",
|
|
637
637
|
"diag.user": "Usuario"
|
|
638
|
-
},
|
|
638
|
+
}, ro = {
|
|
639
639
|
"launcher.open": "Deja una nota...",
|
|
640
640
|
"tool.crop": "Cultivo",
|
|
641
641
|
"tool.resetCrop": "Restablecer recorte",
|
|
@@ -692,7 +692,7 @@ const Ia = {
|
|
|
692
692
|
"diag.timezone": "Zona horaria",
|
|
693
693
|
"diag.viewport": "ViEWPORT",
|
|
694
694
|
"diag.user": "Usuario"
|
|
695
|
-
},
|
|
695
|
+
}, so = {
|
|
696
696
|
"launcher.open": "Jäta märkus...",
|
|
697
697
|
"tool.crop": "Põllukultuur",
|
|
698
698
|
"tool.resetCrop": "Lähtesta põllukultuur",
|
|
@@ -749,7 +749,7 @@ const Ia = {
|
|
|
749
749
|
"diag.timezone": "Ajavöönd",
|
|
750
750
|
"diag.viewport": "Vaatenurk",
|
|
751
751
|
"diag.user": "Kasutaja"
|
|
752
|
-
},
|
|
752
|
+
}, lo = {
|
|
753
753
|
"launcher.open": "Jätä muistiinpano...",
|
|
754
754
|
"tool.crop": "Viljely",
|
|
755
755
|
"tool.resetCrop": "Nollaa rajaus",
|
|
@@ -806,7 +806,7 @@ const Ia = {
|
|
|
806
806
|
"diag.timezone": "Aikavyöhyke",
|
|
807
807
|
"diag.viewport": "Näyttöikkuna",
|
|
808
808
|
"diag.user": "Käyttäjä"
|
|
809
|
-
},
|
|
809
|
+
}, co = {
|
|
810
810
|
"launcher.open": "Laissez un message...",
|
|
811
811
|
"tool.crop": "Récolte",
|
|
812
812
|
"tool.resetCrop": "Réinitialiser la récolte",
|
|
@@ -863,7 +863,7 @@ const Ia = {
|
|
|
863
863
|
"diag.timezone": "Fuseau horaire",
|
|
864
864
|
"diag.viewport": "Viewport",
|
|
865
865
|
"diag.user": "Utilisateur"
|
|
866
|
-
},
|
|
866
|
+
}, uo = {
|
|
867
867
|
"launcher.open": "एक नोट छोड़ें...",
|
|
868
868
|
"tool.crop": "क्रॉप",
|
|
869
869
|
"tool.resetCrop": "क्रॉप रीसेट करें",
|
|
@@ -920,7 +920,7 @@ const Ia = {
|
|
|
920
920
|
"diag.timezone": "टाइमज़ोन",
|
|
921
921
|
"diag.viewport": "व्यूपोर्ट",
|
|
922
922
|
"diag.user": "यूज़र"
|
|
923
|
-
},
|
|
923
|
+
}, po = {
|
|
924
924
|
"launcher.open": "Ostavite poruku...",
|
|
925
925
|
"tool.crop": "Usjev",
|
|
926
926
|
"tool.resetCrop": "Resetirajte obrezivanje",
|
|
@@ -977,7 +977,7 @@ const Ia = {
|
|
|
977
977
|
"diag.timezone": "Vremenska zona",
|
|
978
978
|
"diag.viewport": "Prikaznica",
|
|
979
979
|
"diag.user": "Korisnik"
|
|
980
|
-
},
|
|
980
|
+
}, go = {
|
|
981
981
|
"launcher.open": "Hagyjon egy jegyzetet...",
|
|
982
982
|
"tool.crop": "Termés",
|
|
983
983
|
"tool.resetCrop": "Vágás visszaállítása",
|
|
@@ -1034,7 +1034,7 @@ const Ia = {
|
|
|
1034
1034
|
"diag.timezone": "Időzóna",
|
|
1035
1035
|
"diag.viewport": "Nézetablak",
|
|
1036
1036
|
"diag.user": "Felhasználó"
|
|
1037
|
-
},
|
|
1037
|
+
}, mo = {
|
|
1038
1038
|
"launcher.open": "Tinggalkan catatan...",
|
|
1039
1039
|
"tool.crop": "Panas",
|
|
1040
1040
|
"tool.resetCrop": "Setel ulang tanaman",
|
|
@@ -1091,7 +1091,7 @@ const Ia = {
|
|
|
1091
1091
|
"diag.timezone": "Zona Waktu",
|
|
1092
1092
|
"diag.viewport": "Pintu pandang",
|
|
1093
1093
|
"diag.user": "Pengguna"
|
|
1094
|
-
},
|
|
1094
|
+
}, ho = {
|
|
1095
1095
|
"launcher.open": "Lascia una nota...",
|
|
1096
1096
|
"tool.crop": "Ritaglia",
|
|
1097
1097
|
"tool.resetCrop": "Reimposta il ritaglio",
|
|
@@ -1148,7 +1148,7 @@ const Ia = {
|
|
|
1148
1148
|
"diag.timezone": "Fuso orario",
|
|
1149
1149
|
"diag.viewport": "Viewport",
|
|
1150
1150
|
"diag.user": "Utente"
|
|
1151
|
-
},
|
|
1151
|
+
}, fo = {
|
|
1152
1152
|
"launcher.open": "メモを残してください...",
|
|
1153
1153
|
"tool.crop": "クロップ",
|
|
1154
1154
|
"tool.resetCrop": "トリミングをリセット",
|
|
@@ -1205,7 +1205,7 @@ const Ia = {
|
|
|
1205
1205
|
"diag.timezone": "タイムゾーン",
|
|
1206
1206
|
"diag.viewport": "ビューポート",
|
|
1207
1207
|
"diag.user": "ユーザ"
|
|
1208
|
-
},
|
|
1208
|
+
}, yo = {
|
|
1209
1209
|
"launcher.open": "메모 남기기...",
|
|
1210
1210
|
"tool.crop": "크롭",
|
|
1211
1211
|
"tool.resetCrop": "크롭 재설정",
|
|
@@ -1262,7 +1262,7 @@ const Ia = {
|
|
|
1262
1262
|
"diag.timezone": "타임존",
|
|
1263
1263
|
"diag.viewport": "뷰포트",
|
|
1264
1264
|
"diag.user": "사용자"
|
|
1265
|
-
},
|
|
1265
|
+
}, vo = {
|
|
1266
1266
|
"launcher.open": "Palikite pastabą...",
|
|
1267
1267
|
"tool.crop": "Apkarpyti",
|
|
1268
1268
|
"tool.resetCrop": "Iš naujo nustatyti apkarpymą",
|
|
@@ -1319,7 +1319,7 @@ const Ia = {
|
|
|
1319
1319
|
"diag.timezone": "Laiko juosta",
|
|
1320
1320
|
"diag.viewport": "Peržiūros sritis",
|
|
1321
1321
|
"diag.user": "Vartotojas"
|
|
1322
|
-
},
|
|
1322
|
+
}, ko = {
|
|
1323
1323
|
"launcher.open": "Atstājiet piezīmi...",
|
|
1324
1324
|
"tool.crop": "Kultūraugs",
|
|
1325
1325
|
"tool.resetCrop": "Atiestatīt apgriešanu",
|
|
@@ -1376,7 +1376,7 @@ const Ia = {
|
|
|
1376
1376
|
"diag.timezone": "Laika josla",
|
|
1377
1377
|
"diag.viewport": "Skatu laukums",
|
|
1378
1378
|
"diag.user": "Lietotājs"
|
|
1379
|
-
},
|
|
1379
|
+
}, bo = {
|
|
1380
1380
|
"launcher.open": "Legg igjen et notat...",
|
|
1381
1381
|
"tool.crop": "Beskjæring",
|
|
1382
1382
|
"tool.resetCrop": "Tilbakestill beskjæring",
|
|
@@ -1433,7 +1433,7 @@ const Ia = {
|
|
|
1433
1433
|
"diag.timezone": "Tidssone",
|
|
1434
1434
|
"diag.viewport": "Visningsport",
|
|
1435
1435
|
"diag.user": "Bruker"
|
|
1436
|
-
},
|
|
1436
|
+
}, wo = {
|
|
1437
1437
|
"launcher.open": "Laat een briefje achter...",
|
|
1438
1438
|
"tool.crop": "Gewas",
|
|
1439
1439
|
"tool.resetCrop": "Bijsnijden opnieuw instellen",
|
|
@@ -1490,7 +1490,7 @@ const Ia = {
|
|
|
1490
1490
|
"diag.timezone": "Tijdzone",
|
|
1491
1491
|
"diag.viewport": "Viewport",
|
|
1492
1492
|
"diag.user": "Gebruiker"
|
|
1493
|
-
},
|
|
1493
|
+
}, So = {
|
|
1494
1494
|
"launcher.open": "Zostaw notatkę...",
|
|
1495
1495
|
"tool.crop": "Uprawa",
|
|
1496
1496
|
"tool.resetCrop": "Resetuj kadrowanie",
|
|
@@ -1547,7 +1547,7 @@ const Ia = {
|
|
|
1547
1547
|
"diag.timezone": "Strefa czasowa",
|
|
1548
1548
|
"diag.viewport": "rzutnia",
|
|
1549
1549
|
"diag.user": "Użytkownik"
|
|
1550
|
-
},
|
|
1550
|
+
}, Ao = {
|
|
1551
1551
|
"launcher.open": "Deixe uma nota...",
|
|
1552
1552
|
"tool.crop": "Colheita",
|
|
1553
1553
|
"tool.resetCrop": "Redefinir o corte",
|
|
@@ -1604,7 +1604,7 @@ const Ia = {
|
|
|
1604
1604
|
"diag.timezone": "Fuso horário",
|
|
1605
1605
|
"diag.viewport": "Janela de visualização",
|
|
1606
1606
|
"diag.user": "Usuário"
|
|
1607
|
-
},
|
|
1607
|
+
}, Co = {
|
|
1608
1608
|
"launcher.open": "Deixe uma nota...",
|
|
1609
1609
|
"tool.crop": "Colheita",
|
|
1610
1610
|
"tool.resetCrop": "Redefinir o recorte",
|
|
@@ -1661,7 +1661,7 @@ const Ia = {
|
|
|
1661
1661
|
"diag.timezone": "Fuso horário",
|
|
1662
1662
|
"diag.viewport": "Viewport",
|
|
1663
1663
|
"diag.user": "Utilizador"
|
|
1664
|
-
},
|
|
1664
|
+
}, Eo = {
|
|
1665
1665
|
"launcher.open": "Lăsați o notă...",
|
|
1666
1666
|
"tool.crop": "Cultură",
|
|
1667
1667
|
"tool.resetCrop": "Resetați recolta",
|
|
@@ -1718,7 +1718,7 @@ const Ia = {
|
|
|
1718
1718
|
"diag.timezone": "Fus orar",
|
|
1719
1719
|
"diag.viewport": "Portul de vizualizare",
|
|
1720
1720
|
"diag.user": "Utilizator"
|
|
1721
|
-
},
|
|
1721
|
+
}, zo = {
|
|
1722
1722
|
"launcher.open": "Оставьте заметку...",
|
|
1723
1723
|
"tool.crop": "урожай",
|
|
1724
1724
|
"tool.resetCrop": "Сбросить урожай",
|
|
@@ -1775,7 +1775,7 @@ const Ia = {
|
|
|
1775
1775
|
"diag.timezone": "Часовой пояс",
|
|
1776
1776
|
"diag.viewport": "окно просмотра",
|
|
1777
1777
|
"diag.user": "Пользователь"
|
|
1778
|
-
},
|
|
1778
|
+
}, Ro = {
|
|
1779
1779
|
"launcher.open": "Zanechať poznámku...",
|
|
1780
1780
|
"tool.crop": "Oplodina",
|
|
1781
1781
|
"tool.resetCrop": "Obnoviť orezanie",
|
|
@@ -1832,7 +1832,7 @@ const Ia = {
|
|
|
1832
1832
|
"diag.timezone": "Časové pásmo",
|
|
1833
1833
|
"diag.viewport": "Zobrazenie",
|
|
1834
1834
|
"diag.user": "Používateľ"
|
|
1835
|
-
},
|
|
1835
|
+
}, jo = {
|
|
1836
1836
|
"launcher.open": "Pustite opombo...",
|
|
1837
1837
|
"tool.crop": "Pridelek",
|
|
1838
1838
|
"tool.resetCrop": "Ponastavi obrezovanje",
|
|
@@ -1889,7 +1889,7 @@ const Ia = {
|
|
|
1889
1889
|
"diag.timezone": "Časovni pas",
|
|
1890
1890
|
"diag.viewport": "Razgledna plošča",
|
|
1891
1891
|
"diag.user": "Uporabnik"
|
|
1892
|
-
},
|
|
1892
|
+
}, Po = {
|
|
1893
1893
|
"launcher.open": "Ostavite belešku...",
|
|
1894
1894
|
"tool.crop": "Usjev",
|
|
1895
1895
|
"tool.resetCrop": "Resetujte usev",
|
|
@@ -1946,7 +1946,7 @@ const Ia = {
|
|
|
1946
1946
|
"diag.timezone": "Vremenska zona",
|
|
1947
1947
|
"diag.viewport": "Viedport",
|
|
1948
1948
|
"diag.user": "Korisnik"
|
|
1949
|
-
},
|
|
1949
|
+
}, Lo = {
|
|
1950
1950
|
"launcher.open": "Lämna en anteckning...",
|
|
1951
1951
|
"tool.crop": "Skörda",
|
|
1952
1952
|
"tool.resetCrop": "Återställ beskärning",
|
|
@@ -2003,7 +2003,7 @@ const Ia = {
|
|
|
2003
2003
|
"diag.timezone": "Tidszon",
|
|
2004
2004
|
"diag.viewport": "Viewport",
|
|
2005
2005
|
"diag.user": "Användare"
|
|
2006
|
-
},
|
|
2006
|
+
}, xo = {
|
|
2007
2007
|
"launcher.open": "Mag-iwan ng tala...",
|
|
2008
2008
|
"tool.crop": "Pag-ani",
|
|
2009
2009
|
"tool.resetCrop": "I-reset ang panani",
|
|
@@ -2060,7 +2060,7 @@ const Ia = {
|
|
|
2060
2060
|
"diag.timezone": "Timesone",
|
|
2061
2061
|
"diag.viewport": "Viewport",
|
|
2062
2062
|
"diag.user": "Gumagamit"
|
|
2063
|
-
},
|
|
2063
|
+
}, Uo = {
|
|
2064
2064
|
"launcher.open": "ทิ้งหมายเหตุ...",
|
|
2065
2065
|
"tool.crop": "พืชผล",
|
|
2066
2066
|
"tool.resetCrop": "รีเซ็ตการตัดพืช",
|
|
@@ -2117,7 +2117,7 @@ const Ia = {
|
|
|
2117
2117
|
"diag.timezone": "เขตเวลา",
|
|
2118
2118
|
"diag.viewport": "พอร์ตมุมมอง",
|
|
2119
2119
|
"diag.user": "ผู้ใช้"
|
|
2120
|
-
},
|
|
2120
|
+
}, To = {
|
|
2121
2121
|
"launcher.open": "Bir not bırakın...",
|
|
2122
2122
|
"tool.crop": "Mahsul",
|
|
2123
2123
|
"tool.resetCrop": "Kırpmayı sıfırla",
|
|
@@ -2174,7 +2174,7 @@ const Ia = {
|
|
|
2174
2174
|
"diag.timezone": "Saat dilimi",
|
|
2175
2175
|
"diag.viewport": "Görünüm noktası",
|
|
2176
2176
|
"diag.user": "Kullanıcı"
|
|
2177
|
-
},
|
|
2177
|
+
}, Fo = {
|
|
2178
2178
|
"launcher.open": "Залиште записку...",
|
|
2179
2179
|
"tool.crop": "Урожай",
|
|
2180
2180
|
"tool.resetCrop": "Скинути обрізку",
|
|
@@ -2231,7 +2231,7 @@ const Ia = {
|
|
|
2231
2231
|
"diag.timezone": "Часовий пояс",
|
|
2232
2232
|
"diag.viewport": "Вигляд",
|
|
2233
2233
|
"diag.user": "Користувач"
|
|
2234
|
-
},
|
|
2234
|
+
}, Mo = {
|
|
2235
2235
|
"launcher.open": "Để lại một ghi chú...",
|
|
2236
2236
|
"tool.crop": "Cây trồng",
|
|
2237
2237
|
"tool.resetCrop": "Đặt lại cây trồng",
|
|
@@ -2288,7 +2288,7 @@ const Ia = {
|
|
|
2288
2288
|
"diag.timezone": "Múi giờ",
|
|
2289
2289
|
"diag.viewport": "Cổng quan sát",
|
|
2290
2290
|
"diag.user": "Người dùng"
|
|
2291
|
-
},
|
|
2291
|
+
}, Do = {
|
|
2292
2292
|
"launcher.open": "留个笔记...",
|
|
2293
2293
|
"tool.crop": "作物",
|
|
2294
2294
|
"tool.resetCrop": "重置裁剪",
|
|
@@ -2345,7 +2345,7 @@ const Ia = {
|
|
|
2345
2345
|
"diag.timezone": "时区",
|
|
2346
2346
|
"diag.viewport": "视口",
|
|
2347
2347
|
"diag.user": "用户"
|
|
2348
|
-
},
|
|
2348
|
+
}, Io = {
|
|
2349
2349
|
"launcher.open": "留下筆記...",
|
|
2350
2350
|
"tool.crop": "作物",
|
|
2351
2351
|
"tool.resetCrop": "重設裁切",
|
|
@@ -2403,47 +2403,47 @@ const Ia = {
|
|
|
2403
2403
|
"diag.viewport": "視埠",
|
|
2404
2404
|
"diag.user": "使用者"
|
|
2405
2405
|
};
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
function
|
|
2406
|
+
w("en-US", jt);
|
|
2407
|
+
w("bg", Ja);
|
|
2408
|
+
w("ca", Qa);
|
|
2409
|
+
w("cs", to);
|
|
2410
|
+
w("da", eo);
|
|
2411
|
+
w("de", ao);
|
|
2412
|
+
w("el", oo);
|
|
2413
|
+
w("en-GB", io);
|
|
2414
|
+
w("es", no);
|
|
2415
|
+
w("es-419", ro);
|
|
2416
|
+
w("et", so);
|
|
2417
|
+
w("fi", lo);
|
|
2418
|
+
w("fr", co);
|
|
2419
|
+
w("hi", uo);
|
|
2420
|
+
w("hr", po);
|
|
2421
|
+
w("hu", go);
|
|
2422
|
+
w("id", mo);
|
|
2423
|
+
w("it", ho);
|
|
2424
|
+
w("ja", fo);
|
|
2425
|
+
w("ko", yo);
|
|
2426
|
+
w("lt", vo);
|
|
2427
|
+
w("lv", ko);
|
|
2428
|
+
w("nb", bo);
|
|
2429
|
+
w("nl", wo);
|
|
2430
|
+
w("pl", So);
|
|
2431
|
+
w("pt-BR", Ao);
|
|
2432
|
+
w("pt-PT", Co);
|
|
2433
|
+
w("ro", Eo);
|
|
2434
|
+
w("ru", zo);
|
|
2435
|
+
w("sk", Ro);
|
|
2436
|
+
w("sl", jo);
|
|
2437
|
+
w("sr", Po);
|
|
2438
|
+
w("sv", Lo);
|
|
2439
|
+
w("fil", xo);
|
|
2440
|
+
w("th", Uo);
|
|
2441
|
+
w("tr", To);
|
|
2442
|
+
w("uk", Fo);
|
|
2443
|
+
w("vi", Mo);
|
|
2444
|
+
w("zh-CN", Do);
|
|
2445
|
+
w("zh-TW", Io);
|
|
2446
|
+
function Oo(t, e) {
|
|
2447
2447
|
if (t.match(/^[a-z]+:\/\//i))
|
|
2448
2448
|
return t;
|
|
2449
2449
|
if (t.match(/^\/\//))
|
|
@@ -2453,7 +2453,7 @@ function Ao(t, e) {
|
|
|
2453
2453
|
const a = document.implementation.createHTMLDocument(), o = a.createElement("base"), i = a.createElement("a");
|
|
2454
2454
|
return a.head.appendChild(o), a.body.appendChild(i), e && (o.href = e), i.href = t, i.href;
|
|
2455
2455
|
}
|
|
2456
|
-
const
|
|
2456
|
+
const $o = /* @__PURE__ */ (() => {
|
|
2457
2457
|
let t = 0;
|
|
2458
2458
|
const e = () => (
|
|
2459
2459
|
// eslint-disable-next-line no-bitwise
|
|
@@ -2461,33 +2461,33 @@ const zo = /* @__PURE__ */ (() => {
|
|
|
2461
2461
|
);
|
|
2462
2462
|
return () => (t += 1, `u${e()}${t}`);
|
|
2463
2463
|
})();
|
|
2464
|
-
function
|
|
2464
|
+
function et(t) {
|
|
2465
2465
|
const e = [];
|
|
2466
2466
|
for (let a = 0, o = t.length; a < o; a++)
|
|
2467
2467
|
e.push(t[a]);
|
|
2468
2468
|
return e;
|
|
2469
2469
|
}
|
|
2470
|
-
let
|
|
2471
|
-
function
|
|
2472
|
-
return
|
|
2470
|
+
let st = null;
|
|
2471
|
+
function Je(t = {}) {
|
|
2472
|
+
return st || (t.includeStyleProperties ? (st = t.includeStyleProperties, st) : (st = et(window.getComputedStyle(document.documentElement)), st));
|
|
2473
2473
|
}
|
|
2474
|
-
function
|
|
2474
|
+
function xt(t, e) {
|
|
2475
2475
|
const o = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
|
|
2476
2476
|
return o ? parseFloat(o.replace("px", "")) : 0;
|
|
2477
2477
|
}
|
|
2478
|
-
function
|
|
2479
|
-
const e =
|
|
2478
|
+
function Vo(t) {
|
|
2479
|
+
const e = xt(t, "border-left-width"), a = xt(t, "border-right-width");
|
|
2480
2480
|
return t.clientWidth + e + a;
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2483
|
-
const e =
|
|
2482
|
+
function Bo(t) {
|
|
2483
|
+
const e = xt(t, "border-top-width"), a = xt(t, "border-bottom-width");
|
|
2484
2484
|
return t.clientHeight + e + a;
|
|
2485
2485
|
}
|
|
2486
|
-
function
|
|
2487
|
-
const a = e.width ||
|
|
2486
|
+
function Qe(t, e = {}) {
|
|
2487
|
+
const a = e.width || Vo(t), o = e.height || Bo(t);
|
|
2488
2488
|
return { width: a, height: o };
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2490
|
+
function No() {
|
|
2491
2491
|
let t, e;
|
|
2492
2492
|
try {
|
|
2493
2493
|
e = process;
|
|
@@ -2496,11 +2496,11 @@ function jo() {
|
|
|
2496
2496
|
const a = e && e.env ? e.env.devicePixelRatio : null;
|
|
2497
2497
|
return a && (t = parseInt(a, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
|
|
2498
2498
|
}
|
|
2499
|
-
const
|
|
2500
|
-
function
|
|
2501
|
-
(t.width >
|
|
2499
|
+
const F = 16384;
|
|
2500
|
+
function Ko(t) {
|
|
2501
|
+
(t.width > F || t.height > F) && (t.width > F && t.height > F ? t.width > t.height ? (t.height *= F / t.width, t.width = F) : (t.width *= F / t.height, t.height = F) : t.width > F ? (t.height *= F / t.width, t.width = F) : (t.width *= F / t.height, t.height = F));
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2503
|
+
function Ut(t) {
|
|
2504
2504
|
return new Promise((e, a) => {
|
|
2505
2505
|
const o = new Image();
|
|
2506
2506
|
o.onload = () => {
|
|
@@ -2510,223 +2510,223 @@ function jt(t) {
|
|
|
2510
2510
|
}, o.onerror = a, o.crossOrigin = "anonymous", o.decoding = "async", o.src = t;
|
|
2511
2511
|
});
|
|
2512
2512
|
}
|
|
2513
|
-
async function
|
|
2513
|
+
async function Ho(t) {
|
|
2514
2514
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
2515
2515
|
}
|
|
2516
|
-
async function
|
|
2517
|
-
const o = "http://www.w3.org/2000/svg", i = document.createElementNS(o, "svg"),
|
|
2518
|
-
return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`),
|
|
2516
|
+
async function _o(t, e, a) {
|
|
2517
|
+
const o = "http://www.w3.org/2000/svg", i = document.createElementNS(o, "svg"), n = document.createElementNS(o, "foreignObject");
|
|
2518
|
+
return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`), n.setAttribute("width", "100%"), n.setAttribute("height", "100%"), n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("externalResourcesRequired", "true"), i.appendChild(n), n.appendChild(t), Ho(i);
|
|
2519
2519
|
}
|
|
2520
|
-
const
|
|
2520
|
+
const T = (t, e) => {
|
|
2521
2521
|
if (t instanceof e)
|
|
2522
2522
|
return !0;
|
|
2523
2523
|
const a = Object.getPrototypeOf(t);
|
|
2524
|
-
return a === null ? !1 : a.constructor.name === e.name ||
|
|
2524
|
+
return a === null ? !1 : a.constructor.name === e.name || T(a, e);
|
|
2525
2525
|
};
|
|
2526
|
-
function
|
|
2526
|
+
function Go(t) {
|
|
2527
2527
|
const e = t.getPropertyValue("content");
|
|
2528
2528
|
return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
|
|
2529
2529
|
}
|
|
2530
|
-
function
|
|
2531
|
-
return
|
|
2530
|
+
function qo(t, e) {
|
|
2531
|
+
return Je(e).map((a) => {
|
|
2532
2532
|
const o = t.getPropertyValue(a), i = t.getPropertyPriority(a);
|
|
2533
2533
|
return `${a}: ${o}${i ? " !important" : ""};`;
|
|
2534
2534
|
}).join(" ");
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2537
|
-
const i = `.${t}:${e}`,
|
|
2538
|
-
return document.createTextNode(`${i}{${
|
|
2536
|
+
function Wo(t, e, a, o) {
|
|
2537
|
+
const i = `.${t}:${e}`, n = a.cssText ? Go(a) : qo(a, o);
|
|
2538
|
+
return document.createTextNode(`${i}{${n}}`);
|
|
2539
2539
|
}
|
|
2540
|
-
function
|
|
2541
|
-
const i = window.getComputedStyle(t, a),
|
|
2542
|
-
if (
|
|
2540
|
+
function we(t, e, a, o) {
|
|
2541
|
+
const i = window.getComputedStyle(t, a), n = i.getPropertyValue("content");
|
|
2542
|
+
if (n === "" || n === "none")
|
|
2543
2543
|
return;
|
|
2544
|
-
const
|
|
2544
|
+
const s = $o();
|
|
2545
2545
|
try {
|
|
2546
|
-
e.className = `${e.className} ${
|
|
2546
|
+
e.className = `${e.className} ${s}`;
|
|
2547
2547
|
} catch {
|
|
2548
2548
|
return;
|
|
2549
2549
|
}
|
|
2550
2550
|
const l = document.createElement("style");
|
|
2551
|
-
l.appendChild(
|
|
2551
|
+
l.appendChild(Wo(s, a, i, o)), e.appendChild(l);
|
|
2552
2552
|
}
|
|
2553
|
-
function
|
|
2554
|
-
|
|
2553
|
+
function Zo(t, e, a) {
|
|
2554
|
+
we(t, e, ":before", a), we(t, e, ":after", a);
|
|
2555
2555
|
}
|
|
2556
|
-
const
|
|
2557
|
-
woff:
|
|
2558
|
-
woff2:
|
|
2556
|
+
const Se = "application/font-woff", Ae = "image/jpeg", Yo = {
|
|
2557
|
+
woff: Se,
|
|
2558
|
+
woff2: Se,
|
|
2559
2559
|
ttf: "application/font-truetype",
|
|
2560
2560
|
eot: "application/vnd.ms-fontobject",
|
|
2561
2561
|
png: "image/png",
|
|
2562
|
-
jpg:
|
|
2563
|
-
jpeg:
|
|
2562
|
+
jpg: Ae,
|
|
2563
|
+
jpeg: Ae,
|
|
2564
2564
|
gif: "image/gif",
|
|
2565
2565
|
tiff: "image/tiff",
|
|
2566
2566
|
svg: "image/svg+xml",
|
|
2567
2567
|
webp: "image/webp"
|
|
2568
2568
|
};
|
|
2569
|
-
function
|
|
2569
|
+
function Xo(t) {
|
|
2570
2570
|
const e = /\.([^./]*?)$/g.exec(t);
|
|
2571
2571
|
return e ? e[1] : "";
|
|
2572
2572
|
}
|
|
2573
|
-
function
|
|
2574
|
-
const e =
|
|
2575
|
-
return
|
|
2573
|
+
function re(t) {
|
|
2574
|
+
const e = Xo(t).toLowerCase();
|
|
2575
|
+
return Yo[e] || "";
|
|
2576
2576
|
}
|
|
2577
|
-
function
|
|
2577
|
+
function Jo(t) {
|
|
2578
2578
|
return t.split(/,/)[1];
|
|
2579
2579
|
}
|
|
2580
|
-
function
|
|
2580
|
+
function Xt(t) {
|
|
2581
2581
|
return t.search(/^(data:)/) !== -1;
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function Qo(t, e) {
|
|
2584
2584
|
return `data:${e};base64,${t}`;
|
|
2585
2585
|
}
|
|
2586
|
-
async function
|
|
2586
|
+
async function ta(t, e, a) {
|
|
2587
2587
|
const o = await fetch(t, e);
|
|
2588
2588
|
if (o.status === 404)
|
|
2589
2589
|
throw new Error(`Resource "${o.url}" not found`);
|
|
2590
2590
|
const i = await o.blob();
|
|
2591
|
-
return new Promise((
|
|
2591
|
+
return new Promise((n, s) => {
|
|
2592
2592
|
const l = new FileReader();
|
|
2593
|
-
l.onerror =
|
|
2593
|
+
l.onerror = s, l.onloadend = () => {
|
|
2594
2594
|
try {
|
|
2595
|
-
|
|
2596
|
-
} catch (
|
|
2597
|
-
|
|
2595
|
+
n(a({ res: o, result: l.result }));
|
|
2596
|
+
} catch (c) {
|
|
2597
|
+
s(c);
|
|
2598
2598
|
}
|
|
2599
2599
|
}, l.readAsDataURL(i);
|
|
2600
2600
|
});
|
|
2601
2601
|
}
|
|
2602
|
-
const
|
|
2603
|
-
function
|
|
2602
|
+
const Gt = {};
|
|
2603
|
+
function ti(t, e, a) {
|
|
2604
2604
|
let o = t.replace(/\?.*/, "");
|
|
2605
2605
|
return a && (o = t), /ttf|otf|eot|woff2?/i.test(o) && (o = o.replace(/.*\//, "")), e ? `[${e}]${o}` : o;
|
|
2606
2606
|
}
|
|
2607
|
-
async function
|
|
2608
|
-
const o =
|
|
2609
|
-
if (
|
|
2610
|
-
return
|
|
2607
|
+
async function se(t, e, a) {
|
|
2608
|
+
const o = ti(t, e, a.includeQueryParams);
|
|
2609
|
+
if (Gt[o] != null)
|
|
2610
|
+
return Gt[o];
|
|
2611
2611
|
a.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
2612
2612
|
let i;
|
|
2613
2613
|
try {
|
|
2614
|
-
const
|
|
2615
|
-
i =
|
|
2616
|
-
} catch (
|
|
2614
|
+
const n = await ta(t, a.fetchRequestInit, ({ res: s, result: l }) => (e || (e = s.headers.get("Content-Type") || ""), Jo(l)));
|
|
2615
|
+
i = Qo(n, e);
|
|
2616
|
+
} catch (n) {
|
|
2617
2617
|
i = a.imagePlaceholder || "";
|
|
2618
|
-
let
|
|
2619
|
-
|
|
2618
|
+
let s = `Failed to fetch resource: ${t}`;
|
|
2619
|
+
n && (s = typeof n == "string" ? n : n.message), s && console.warn(s);
|
|
2620
2620
|
}
|
|
2621
|
-
return
|
|
2621
|
+
return Gt[o] = i, i;
|
|
2622
2622
|
}
|
|
2623
|
-
async function
|
|
2623
|
+
async function ei(t) {
|
|
2624
2624
|
const e = t.toDataURL();
|
|
2625
|
-
return e === "data:," ? t.cloneNode(!1) :
|
|
2625
|
+
return e === "data:," ? t.cloneNode(!1) : Ut(e);
|
|
2626
2626
|
}
|
|
2627
|
-
async function
|
|
2627
|
+
async function ai(t, e) {
|
|
2628
2628
|
if (t.currentSrc) {
|
|
2629
|
-
const
|
|
2630
|
-
|
|
2631
|
-
const l =
|
|
2632
|
-
return
|
|
2629
|
+
const n = document.createElement("canvas"), s = n.getContext("2d");
|
|
2630
|
+
n.width = t.clientWidth, n.height = t.clientHeight, s == null || s.drawImage(t, 0, 0, n.width, n.height);
|
|
2631
|
+
const l = n.toDataURL();
|
|
2632
|
+
return Ut(l);
|
|
2633
2633
|
}
|
|
2634
|
-
const a = t.poster, o =
|
|
2635
|
-
return
|
|
2634
|
+
const a = t.poster, o = re(a), i = await se(a, o, e);
|
|
2635
|
+
return Ut(i);
|
|
2636
2636
|
}
|
|
2637
|
-
async function
|
|
2637
|
+
async function oi(t, e) {
|
|
2638
2638
|
var a;
|
|
2639
2639
|
try {
|
|
2640
2640
|
if (!((a = t == null ? void 0 : t.contentDocument) === null || a === void 0) && a.body)
|
|
2641
|
-
return await
|
|
2641
|
+
return await Bt(t.contentDocument.body, e, !0);
|
|
2642
2642
|
} catch {
|
|
2643
2643
|
}
|
|
2644
2644
|
return t.cloneNode(!1);
|
|
2645
2645
|
}
|
|
2646
|
-
async function
|
|
2647
|
-
return
|
|
2646
|
+
async function ii(t, e) {
|
|
2647
|
+
return T(t, HTMLCanvasElement) ? ei(t) : T(t, HTMLVideoElement) ? ai(t, e) : T(t, HTMLIFrameElement) ? oi(t, e) : t.cloneNode(ea(t));
|
|
2648
2648
|
}
|
|
2649
|
-
const
|
|
2650
|
-
async function
|
|
2649
|
+
const ni = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", ea = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
|
|
2650
|
+
async function ri(t, e, a) {
|
|
2651
2651
|
var o, i;
|
|
2652
|
-
if (
|
|
2652
|
+
if (ea(e))
|
|
2653
2653
|
return e;
|
|
2654
|
-
let
|
|
2655
|
-
return
|
|
2656
|
-
|
|
2654
|
+
let n = [];
|
|
2655
|
+
return ni(t) && t.assignedNodes ? n = et(t.assignedNodes()) : T(t, HTMLIFrameElement) && (!((o = t.contentDocument) === null || o === void 0) && o.body) ? n = et(t.contentDocument.body.childNodes) : n = et(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), n.length === 0 || T(t, HTMLVideoElement) || await n.reduce((s, l) => s.then(() => Bt(l, a)).then((c) => {
|
|
2656
|
+
c && e.appendChild(c);
|
|
2657
2657
|
}), Promise.resolve()), e;
|
|
2658
2658
|
}
|
|
2659
|
-
function
|
|
2659
|
+
function si(t, e, a) {
|
|
2660
2660
|
const o = e.style;
|
|
2661
2661
|
if (!o)
|
|
2662
2662
|
return;
|
|
2663
2663
|
const i = window.getComputedStyle(t);
|
|
2664
|
-
i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) :
|
|
2665
|
-
let
|
|
2666
|
-
|
|
2664
|
+
i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) : Je(a).forEach((n) => {
|
|
2665
|
+
let s = i.getPropertyValue(n);
|
|
2666
|
+
n === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - 0.1}px`), T(t, HTMLIFrameElement) && n === "display" && s === "inline" && (s = "block"), n === "d" && e.getAttribute("d") && (s = `path(${e.getAttribute("d")})`), o.setProperty(n, s, i.getPropertyPriority(n));
|
|
2667
2667
|
});
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2670
|
-
|
|
2669
|
+
function li(t, e) {
|
|
2670
|
+
T(t, HTMLTextAreaElement) && (e.innerHTML = t.value), T(t, HTMLInputElement) && e.setAttribute("value", t.value);
|
|
2671
2671
|
}
|
|
2672
|
-
function
|
|
2673
|
-
if (
|
|
2672
|
+
function ci(t, e) {
|
|
2673
|
+
if (T(t, HTMLSelectElement)) {
|
|
2674
2674
|
const o = Array.from(e.children).find((i) => t.value === i.getAttribute("value"));
|
|
2675
2675
|
o && o.setAttribute("selected", "");
|
|
2676
2676
|
}
|
|
2677
2677
|
}
|
|
2678
|
-
function
|
|
2679
|
-
return
|
|
2678
|
+
function ui(t, e, a) {
|
|
2679
|
+
return T(e, Element) && (si(t, e, a), Zo(t, e, a), li(t, e), ci(t, e)), e;
|
|
2680
2680
|
}
|
|
2681
|
-
async function
|
|
2681
|
+
async function di(t, e) {
|
|
2682
2682
|
const a = t.querySelectorAll ? t.querySelectorAll("use") : [];
|
|
2683
2683
|
if (a.length === 0)
|
|
2684
2684
|
return t;
|
|
2685
2685
|
const o = {};
|
|
2686
|
-
for (let
|
|
2687
|
-
const l = a[
|
|
2686
|
+
for (let n = 0; n < a.length; n++) {
|
|
2687
|
+
const l = a[n].getAttribute("xlink:href");
|
|
2688
2688
|
if (l) {
|
|
2689
|
-
const
|
|
2690
|
-
!
|
|
2689
|
+
const c = t.querySelector(l), d = document.querySelector(l);
|
|
2690
|
+
!c && d && !o[l] && (o[l] = await Bt(d, e, !0));
|
|
2691
2691
|
}
|
|
2692
2692
|
}
|
|
2693
2693
|
const i = Object.values(o);
|
|
2694
2694
|
if (i.length) {
|
|
2695
|
-
const
|
|
2696
|
-
|
|
2697
|
-
const l = document.createElementNS(
|
|
2698
|
-
|
|
2699
|
-
for (let
|
|
2700
|
-
l.appendChild(i[
|
|
2701
|
-
t.appendChild(
|
|
2695
|
+
const n = "http://www.w3.org/1999/xhtml", s = document.createElementNS(n, "svg");
|
|
2696
|
+
s.setAttribute("xmlns", n), s.style.position = "absolute", s.style.width = "0", s.style.height = "0", s.style.overflow = "hidden", s.style.display = "none";
|
|
2697
|
+
const l = document.createElementNS(n, "defs");
|
|
2698
|
+
s.appendChild(l);
|
|
2699
|
+
for (let c = 0; c < i.length; c++)
|
|
2700
|
+
l.appendChild(i[c]);
|
|
2701
|
+
t.appendChild(s);
|
|
2702
2702
|
}
|
|
2703
2703
|
return t;
|
|
2704
2704
|
}
|
|
2705
|
-
async function
|
|
2706
|
-
return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) =>
|
|
2705
|
+
async function Bt(t, e, a) {
|
|
2706
|
+
return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) => ii(o, e)).then((o) => ri(t, o, e)).then((o) => ui(t, o, e)).then((o) => di(o, e));
|
|
2707
2707
|
}
|
|
2708
|
-
const
|
|
2709
|
-
function
|
|
2708
|
+
const aa = /url\((['"]?)([^'"]+?)\1\)/g, pi = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, gi = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
2709
|
+
function mi(t) {
|
|
2710
2710
|
const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
2711
2711
|
return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
|
|
2712
2712
|
}
|
|
2713
|
-
function
|
|
2713
|
+
function hi(t) {
|
|
2714
2714
|
const e = [];
|
|
2715
|
-
return t.replace(
|
|
2715
|
+
return t.replace(aa, (a, o, i) => (e.push(i), a)), e.filter((a) => !Xt(a));
|
|
2716
2716
|
}
|
|
2717
|
-
async function
|
|
2717
|
+
async function fi(t, e, a, o, i) {
|
|
2718
2718
|
try {
|
|
2719
|
-
const
|
|
2719
|
+
const n = a ? Oo(e, a) : e, s = re(e);
|
|
2720
2720
|
let l;
|
|
2721
|
-
return i || (l = await
|
|
2721
|
+
return i || (l = await se(n, s, o)), t.replace(mi(e), `$1${l}$3`);
|
|
2722
2722
|
} catch {
|
|
2723
2723
|
}
|
|
2724
2724
|
return t;
|
|
2725
2725
|
}
|
|
2726
|
-
function
|
|
2727
|
-
return e ? t.replace(
|
|
2726
|
+
function yi(t, { preferredFontFormat: e }) {
|
|
2727
|
+
return e ? t.replace(gi, (a) => {
|
|
2728
2728
|
for (; ; ) {
|
|
2729
|
-
const [o, , i] =
|
|
2729
|
+
const [o, , i] = pi.exec(a) || [];
|
|
2730
2730
|
if (!i)
|
|
2731
2731
|
return "";
|
|
2732
2732
|
if (i === e)
|
|
@@ -2734,52 +2734,52 @@ function oi(t, { preferredFontFormat: e }) {
|
|
|
2734
2734
|
}
|
|
2735
2735
|
}) : t;
|
|
2736
2736
|
}
|
|
2737
|
-
function
|
|
2738
|
-
return t.search(
|
|
2737
|
+
function oa(t) {
|
|
2738
|
+
return t.search(aa) !== -1;
|
|
2739
2739
|
}
|
|
2740
|
-
async function
|
|
2741
|
-
if (!
|
|
2740
|
+
async function ia(t, e, a) {
|
|
2741
|
+
if (!oa(t))
|
|
2742
2742
|
return t;
|
|
2743
|
-
const o =
|
|
2744
|
-
return
|
|
2743
|
+
const o = yi(t, a);
|
|
2744
|
+
return hi(o).reduce((n, s) => n.then((l) => fi(l, s, e, a)), Promise.resolve(o));
|
|
2745
2745
|
}
|
|
2746
|
-
async function
|
|
2746
|
+
async function lt(t, e, a) {
|
|
2747
2747
|
var o;
|
|
2748
2748
|
const i = (o = e.style) === null || o === void 0 ? void 0 : o.getPropertyValue(t);
|
|
2749
2749
|
if (i) {
|
|
2750
|
-
const
|
|
2751
|
-
return e.style.setProperty(t,
|
|
2750
|
+
const n = await ia(i, null, a);
|
|
2751
|
+
return e.style.setProperty(t, n, e.style.getPropertyPriority(t)), !0;
|
|
2752
2752
|
}
|
|
2753
2753
|
return !1;
|
|
2754
2754
|
}
|
|
2755
|
-
async function
|
|
2756
|
-
await
|
|
2755
|
+
async function vi(t, e) {
|
|
2756
|
+
await lt("background", t, e) || await lt("background-image", t, e), await lt("mask", t, e) || await lt("-webkit-mask", t, e) || await lt("mask-image", t, e) || await lt("-webkit-mask-image", t, e);
|
|
2757
2757
|
}
|
|
2758
|
-
async function
|
|
2759
|
-
const a =
|
|
2760
|
-
if (!(a && !
|
|
2758
|
+
async function ki(t, e) {
|
|
2759
|
+
const a = T(t, HTMLImageElement);
|
|
2760
|
+
if (!(a && !Xt(t.src)) && !(T(t, SVGImageElement) && !Xt(t.href.baseVal)))
|
|
2761
2761
|
return;
|
|
2762
|
-
const o = a ? t.src : t.href.baseVal, i = await
|
|
2763
|
-
await new Promise((
|
|
2764
|
-
t.onload =
|
|
2762
|
+
const o = a ? t.src : t.href.baseVal, i = await se(o, re(o), e);
|
|
2763
|
+
await new Promise((n, s) => {
|
|
2764
|
+
t.onload = n, t.onerror = e.onImageErrorHandler ? (...c) => {
|
|
2765
2765
|
try {
|
|
2766
|
-
|
|
2766
|
+
n(e.onImageErrorHandler(...c));
|
|
2767
2767
|
} catch (d) {
|
|
2768
|
-
|
|
2768
|
+
s(d);
|
|
2769
2769
|
}
|
|
2770
|
-
} :
|
|
2770
|
+
} : s;
|
|
2771
2771
|
const l = t;
|
|
2772
|
-
l.decode && (l.decode =
|
|
2772
|
+
l.decode && (l.decode = n), l.loading === "lazy" && (l.loading = "eager"), a ? (t.srcset = "", t.src = i) : t.href.baseVal = i;
|
|
2773
2773
|
});
|
|
2774
2774
|
}
|
|
2775
|
-
async function
|
|
2776
|
-
const o =
|
|
2775
|
+
async function bi(t, e) {
|
|
2776
|
+
const o = et(t.childNodes).map((i) => na(i, e));
|
|
2777
2777
|
await Promise.all(o).then(() => t);
|
|
2778
2778
|
}
|
|
2779
|
-
async function
|
|
2780
|
-
|
|
2779
|
+
async function na(t, e) {
|
|
2780
|
+
T(t, Element) && (await vi(t, e), await ki(t, e), await bi(t, e));
|
|
2781
2781
|
}
|
|
2782
|
-
function
|
|
2782
|
+
function wi(t, e) {
|
|
2783
2783
|
const { style: a } = t;
|
|
2784
2784
|
e.backgroundColor && (a.backgroundColor = e.backgroundColor), e.width && (a.width = `${e.width}px`), e.height && (a.height = `${e.height}px`);
|
|
2785
2785
|
const o = e.style;
|
|
@@ -2787,144 +2787,144 @@ function ri(t, e) {
|
|
|
2787
2787
|
a[i] = o[i];
|
|
2788
2788
|
}), t;
|
|
2789
2789
|
}
|
|
2790
|
-
const
|
|
2791
|
-
async function
|
|
2792
|
-
let e =
|
|
2790
|
+
const Ce = {};
|
|
2791
|
+
async function Ee(t) {
|
|
2792
|
+
let e = Ce[t];
|
|
2793
2793
|
if (e != null)
|
|
2794
2794
|
return e;
|
|
2795
2795
|
const o = await (await fetch(t)).text();
|
|
2796
|
-
return e = { url: t, cssText: o },
|
|
2796
|
+
return e = { url: t, cssText: o }, Ce[t] = e, e;
|
|
2797
2797
|
}
|
|
2798
|
-
async function
|
|
2798
|
+
async function ze(t, e) {
|
|
2799
2799
|
let a = t.cssText;
|
|
2800
|
-
const o = /url\(["']?([^"')]+)["']?\)/g,
|
|
2801
|
-
let l =
|
|
2802
|
-
return l.startsWith("https://") || (l = new URL(l, t.url).href),
|
|
2800
|
+
const o = /url\(["']?([^"')]+)["']?\)/g, n = (a.match(/url\([^)]+\)/g) || []).map(async (s) => {
|
|
2801
|
+
let l = s.replace(o, "$1");
|
|
2802
|
+
return l.startsWith("https://") || (l = new URL(l, t.url).href), ta(l, e.fetchRequestInit, ({ result: c }) => (a = a.replace(s, `url(${c})`), [s, c]));
|
|
2803
2803
|
});
|
|
2804
|
-
return Promise.all(
|
|
2804
|
+
return Promise.all(n).then(() => a);
|
|
2805
2805
|
}
|
|
2806
|
-
function
|
|
2806
|
+
function Re(t) {
|
|
2807
2807
|
if (t == null)
|
|
2808
2808
|
return [];
|
|
2809
2809
|
const e = [], a = /(\/\*[\s\S]*?\*\/)/gi;
|
|
2810
2810
|
let o = t.replace(a, "");
|
|
2811
2811
|
const i = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
2812
2812
|
for (; ; ) {
|
|
2813
|
-
const
|
|
2814
|
-
if (
|
|
2813
|
+
const c = i.exec(o);
|
|
2814
|
+
if (c === null)
|
|
2815
2815
|
break;
|
|
2816
|
-
e.push(
|
|
2816
|
+
e.push(c[0]);
|
|
2817
2817
|
}
|
|
2818
2818
|
o = o.replace(i, "");
|
|
2819
|
-
const
|
|
2819
|
+
const n = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, s = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", l = new RegExp(s, "gi");
|
|
2820
2820
|
for (; ; ) {
|
|
2821
|
-
let
|
|
2822
|
-
if (
|
|
2823
|
-
if (
|
|
2821
|
+
let c = n.exec(o);
|
|
2822
|
+
if (c === null) {
|
|
2823
|
+
if (c = l.exec(o), c === null)
|
|
2824
2824
|
break;
|
|
2825
|
-
|
|
2825
|
+
n.lastIndex = l.lastIndex;
|
|
2826
2826
|
} else
|
|
2827
|
-
l.lastIndex =
|
|
2828
|
-
e.push(
|
|
2827
|
+
l.lastIndex = n.lastIndex;
|
|
2828
|
+
e.push(c[0]);
|
|
2829
2829
|
}
|
|
2830
2830
|
return e;
|
|
2831
2831
|
}
|
|
2832
|
-
async function
|
|
2832
|
+
async function Si(t, e) {
|
|
2833
2833
|
const a = [], o = [];
|
|
2834
2834
|
return t.forEach((i) => {
|
|
2835
2835
|
if ("cssRules" in i)
|
|
2836
2836
|
try {
|
|
2837
|
-
|
|
2838
|
-
if (
|
|
2839
|
-
let l =
|
|
2840
|
-
const
|
|
2837
|
+
et(i.cssRules || []).forEach((n, s) => {
|
|
2838
|
+
if (n.type === CSSRule.IMPORT_RULE) {
|
|
2839
|
+
let l = s + 1;
|
|
2840
|
+
const c = n.href, d = Ee(c).then((m) => ze(m, e)).then((m) => Re(m).forEach((S) => {
|
|
2841
2841
|
try {
|
|
2842
|
-
i.insertRule(
|
|
2842
|
+
i.insertRule(S, S.startsWith("@import") ? l += 1 : i.cssRules.length);
|
|
2843
2843
|
} catch (v) {
|
|
2844
2844
|
console.error("Error inserting rule from remote css", {
|
|
2845
|
-
rule:
|
|
2845
|
+
rule: S,
|
|
2846
2846
|
error: v
|
|
2847
2847
|
});
|
|
2848
2848
|
}
|
|
2849
|
-
})).catch((
|
|
2850
|
-
console.error("Error loading remote css",
|
|
2849
|
+
})).catch((m) => {
|
|
2850
|
+
console.error("Error loading remote css", m.toString());
|
|
2851
2851
|
});
|
|
2852
2852
|
o.push(d);
|
|
2853
2853
|
}
|
|
2854
2854
|
});
|
|
2855
|
-
} catch (
|
|
2856
|
-
const
|
|
2857
|
-
i.href != null && o.push(
|
|
2858
|
-
|
|
2855
|
+
} catch (n) {
|
|
2856
|
+
const s = t.find((l) => l.href == null) || document.styleSheets[0];
|
|
2857
|
+
i.href != null && o.push(Ee(i.href).then((l) => ze(l, e)).then((l) => Re(l).forEach((c) => {
|
|
2858
|
+
s.insertRule(c, s.cssRules.length);
|
|
2859
2859
|
})).catch((l) => {
|
|
2860
2860
|
console.error("Error loading remote stylesheet", l);
|
|
2861
|
-
})), console.error("Error inlining remote css file",
|
|
2861
|
+
})), console.error("Error inlining remote css file", n);
|
|
2862
2862
|
}
|
|
2863
2863
|
}), Promise.all(o).then(() => (t.forEach((i) => {
|
|
2864
2864
|
if ("cssRules" in i)
|
|
2865
2865
|
try {
|
|
2866
|
-
|
|
2867
|
-
a.push(
|
|
2866
|
+
et(i.cssRules || []).forEach((n) => {
|
|
2867
|
+
a.push(n);
|
|
2868
2868
|
});
|
|
2869
|
-
} catch (
|
|
2870
|
-
console.error(`Error while reading CSS rules from ${i.href}`,
|
|
2869
|
+
} catch (n) {
|
|
2870
|
+
console.error(`Error while reading CSS rules from ${i.href}`, n);
|
|
2871
2871
|
}
|
|
2872
2872
|
}), a));
|
|
2873
2873
|
}
|
|
2874
|
-
function
|
|
2875
|
-
return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
2874
|
+
function Ai(t) {
|
|
2875
|
+
return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => oa(e.style.getPropertyValue("src")));
|
|
2876
2876
|
}
|
|
2877
|
-
async function
|
|
2877
|
+
async function Ci(t, e) {
|
|
2878
2878
|
if (t.ownerDocument == null)
|
|
2879
2879
|
throw new Error("Provided element is not within a Document");
|
|
2880
|
-
const a =
|
|
2881
|
-
return
|
|
2880
|
+
const a = et(t.ownerDocument.styleSheets), o = await Si(a, e);
|
|
2881
|
+
return Ai(o);
|
|
2882
2882
|
}
|
|
2883
|
-
function
|
|
2883
|
+
function ra(t) {
|
|
2884
2884
|
return t.trim().replace(/["']/g, "");
|
|
2885
2885
|
}
|
|
2886
|
-
function
|
|
2886
|
+
function Ei(t) {
|
|
2887
2887
|
const e = /* @__PURE__ */ new Set();
|
|
2888
2888
|
function a(o) {
|
|
2889
|
-
(o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((
|
|
2890
|
-
e.add(
|
|
2891
|
-
}), Array.from(o.children).forEach((
|
|
2892
|
-
|
|
2889
|
+
(o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((n) => {
|
|
2890
|
+
e.add(ra(n));
|
|
2891
|
+
}), Array.from(o.children).forEach((n) => {
|
|
2892
|
+
n instanceof HTMLElement && a(n);
|
|
2893
2893
|
});
|
|
2894
2894
|
}
|
|
2895
2895
|
return a(t), e;
|
|
2896
2896
|
}
|
|
2897
|
-
async function
|
|
2898
|
-
const a = await
|
|
2899
|
-
return (await Promise.all(a.filter((
|
|
2900
|
-
const
|
|
2901
|
-
return
|
|
2897
|
+
async function zi(t, e) {
|
|
2898
|
+
const a = await Ci(t, e), o = Ei(t);
|
|
2899
|
+
return (await Promise.all(a.filter((n) => o.has(ra(n.style.fontFamily))).map((n) => {
|
|
2900
|
+
const s = n.parentStyleSheet ? n.parentStyleSheet.href : null;
|
|
2901
|
+
return ia(n.cssText, s, e);
|
|
2902
2902
|
}))).join(`
|
|
2903
2903
|
`);
|
|
2904
2904
|
}
|
|
2905
|
-
async function
|
|
2906
|
-
const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await
|
|
2905
|
+
async function Ri(t, e) {
|
|
2906
|
+
const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await zi(t, e);
|
|
2907
2907
|
if (a) {
|
|
2908
2908
|
const o = document.createElement("style"), i = document.createTextNode(a);
|
|
2909
2909
|
o.appendChild(i), t.firstChild ? t.insertBefore(o, t.firstChild) : t.appendChild(o);
|
|
2910
2910
|
}
|
|
2911
2911
|
}
|
|
2912
|
-
async function
|
|
2913
|
-
const { width: a, height: o } =
|
|
2914
|
-
return await
|
|
2912
|
+
async function ji(t, e = {}) {
|
|
2913
|
+
const { width: a, height: o } = Qe(t, e), i = await Bt(t, e, !0);
|
|
2914
|
+
return await Ri(i, e), await na(i, e), wi(i, e), await _o(i, a, o);
|
|
2915
2915
|
}
|
|
2916
|
-
async function
|
|
2917
|
-
const { width: a, height: o } =
|
|
2918
|
-
return
|
|
2916
|
+
async function Pi(t, e = {}) {
|
|
2917
|
+
const { width: a, height: o } = Qe(t, e), i = await ji(t, e), n = await Ut(i), s = document.createElement("canvas"), l = s.getContext("2d"), c = e.pixelRatio || No(), d = e.canvasWidth || a, m = e.canvasHeight || o;
|
|
2918
|
+
return s.width = d * c, s.height = m * c, e.skipAutoScale || Ko(s), s.style.width = `${d}`, s.style.height = `${m}`, e.backgroundColor && (l.fillStyle = e.backgroundColor, l.fillRect(0, 0, s.width, s.height)), l.drawImage(n, 0, 0, s.width, s.height), s;
|
|
2919
2919
|
}
|
|
2920
|
-
async function
|
|
2921
|
-
return (await
|
|
2920
|
+
async function je(t, e = {}) {
|
|
2921
|
+
return (await Pi(t, e)).toDataURL();
|
|
2922
2922
|
}
|
|
2923
|
-
const
|
|
2924
|
-
function
|
|
2925
|
-
return t instanceof Element && (t.hasAttribute(
|
|
2923
|
+
const Tt = "data-nf-capture-chrome", Li = "data-nf-canvas-snap", xi = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
|
|
2924
|
+
function sa(t) {
|
|
2925
|
+
return t instanceof Element && (t.hasAttribute(Tt) || t.hasAttribute("data-nf-mask-cover") || t.id === "notefully");
|
|
2926
2926
|
}
|
|
2927
|
-
function
|
|
2927
|
+
function Ui() {
|
|
2928
2928
|
const t = [];
|
|
2929
2929
|
return Array.from(document.styleSheets).forEach((e) => {
|
|
2930
2930
|
try {
|
|
@@ -2948,7 +2948,7 @@ function vi() {
|
|
|
2948
2948
|
});
|
|
2949
2949
|
};
|
|
2950
2950
|
}
|
|
2951
|
-
function
|
|
2951
|
+
function Ti() {
|
|
2952
2952
|
const t = [];
|
|
2953
2953
|
return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((a) => {
|
|
2954
2954
|
const o = a.getBoundingClientRect(), i = document.createElement("div");
|
|
@@ -2964,28 +2964,28 @@ function ki() {
|
|
|
2964
2964
|
].join(";"), document.body.appendChild(i), t.push(i);
|
|
2965
2965
|
}), () => t.forEach((a) => a.remove());
|
|
2966
2966
|
}
|
|
2967
|
-
function
|
|
2968
|
-
const t = document.querySelector(`[${
|
|
2967
|
+
function Fi() {
|
|
2968
|
+
const t = document.querySelector(`[${Tt}]`);
|
|
2969
2969
|
if (t)
|
|
2970
2970
|
return t;
|
|
2971
2971
|
const e = document.createElement("div");
|
|
2972
|
-
return e.setAttribute(
|
|
2972
|
+
return e.setAttribute(Tt, "1"), e.className = "nf-capture-chrome", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.innerHTML = `<span class="nf-capture-chrome-pill">${g("status.capturing")}</span>`, document.body.appendChild(e), e;
|
|
2973
2973
|
}
|
|
2974
|
-
function
|
|
2975
|
-
document.querySelectorAll(`[${
|
|
2974
|
+
function Mi() {
|
|
2975
|
+
document.querySelectorAll(`[${Tt}]`).forEach((t) => t.remove());
|
|
2976
2976
|
}
|
|
2977
|
-
function
|
|
2977
|
+
function Jt() {
|
|
2978
2978
|
return new Promise((t) => {
|
|
2979
2979
|
requestAnimationFrame(() => requestAnimationFrame(t));
|
|
2980
2980
|
});
|
|
2981
2981
|
}
|
|
2982
|
-
function
|
|
2982
|
+
function at(t) {
|
|
2983
2983
|
if (typeof t != "string" || !t.startsWith("data:image/"))
|
|
2984
2984
|
return !1;
|
|
2985
2985
|
const e = t.indexOf(",");
|
|
2986
2986
|
return e > 0 && e < t.length - 1;
|
|
2987
2987
|
}
|
|
2988
|
-
function
|
|
2988
|
+
function Di() {
|
|
2989
2989
|
const t = document.documentElement, e = document.body, a = Math.max(
|
|
2990
2990
|
window.innerWidth || 0,
|
|
2991
2991
|
(t == null ? void 0 : t.clientWidth) || 0,
|
|
@@ -3001,10 +3001,10 @@ function Si() {
|
|
|
3001
3001
|
);
|
|
3002
3002
|
return { width: a, height: o };
|
|
3003
3003
|
}
|
|
3004
|
-
async function
|
|
3004
|
+
async function Ii() {
|
|
3005
3005
|
const t = [], e = Array.from(document.querySelectorAll("canvas"));
|
|
3006
3006
|
for (const a of e) {
|
|
3007
|
-
if (a.closest("#notefully") ||
|
|
3007
|
+
if (a.closest("#notefully") || sa(a))
|
|
3008
3008
|
continue;
|
|
3009
3009
|
let o = "";
|
|
3010
3010
|
try {
|
|
@@ -3014,8 +3014,8 @@ async function Ci() {
|
|
|
3014
3014
|
}
|
|
3015
3015
|
if (!o || o === "data:,")
|
|
3016
3016
|
continue;
|
|
3017
|
-
const i = document.createElement("img"),
|
|
3018
|
-
i.setAttribute(
|
|
3017
|
+
const i = document.createElement("img"), n = getComputedStyle(a);
|
|
3018
|
+
i.setAttribute(Li, "1"), i.alt = "", i.src = o, i.className = a.className, i.style.cssText = a.style.cssText, i.style.width = n.width, i.style.height = n.height, i.style.maxWidth = n.maxWidth, i.style.maxHeight = n.maxHeight, i.style.objectFit = "fill", i.style.display = n.display === "inline" ? "inline-block" : n.display, a.replaceWith(i), t.push({ canvas: a, img: i });
|
|
3019
3019
|
}
|
|
3020
3020
|
return await Promise.all(t.map(({ img: a }) => {
|
|
3021
3021
|
if (!a.complete)
|
|
@@ -3031,37 +3031,37 @@ async function Ci() {
|
|
|
3031
3031
|
});
|
|
3032
3032
|
};
|
|
3033
3033
|
}
|
|
3034
|
-
async function
|
|
3034
|
+
async function Oi(t) {
|
|
3035
3035
|
if (!t)
|
|
3036
3036
|
return null;
|
|
3037
3037
|
if (typeof t == "string")
|
|
3038
|
-
return
|
|
3038
|
+
return at(t) ? t : null;
|
|
3039
3039
|
if (typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement)
|
|
3040
3040
|
try {
|
|
3041
3041
|
const e = t.toDataURL("image/png");
|
|
3042
|
-
return
|
|
3042
|
+
return at(e) ? e : null;
|
|
3043
3043
|
} catch {
|
|
3044
3044
|
return null;
|
|
3045
3045
|
}
|
|
3046
3046
|
if (typeof Blob < "u" && t instanceof Blob) {
|
|
3047
|
-
const e = await
|
|
3048
|
-
return
|
|
3047
|
+
const e = await $i(t);
|
|
3048
|
+
return at(e) ? e : null;
|
|
3049
3049
|
}
|
|
3050
3050
|
return null;
|
|
3051
3051
|
}
|
|
3052
|
-
async function
|
|
3052
|
+
async function $i(t) {
|
|
3053
3053
|
if (typeof FileReader == "function")
|
|
3054
3054
|
return new Promise((o, i) => {
|
|
3055
|
-
const
|
|
3056
|
-
|
|
3055
|
+
const n = new FileReader();
|
|
3056
|
+
n.onload = () => o(String(n.result || "")), n.onerror = () => i(n.error || new Error("Could not read capture blob")), n.readAsDataURL(t);
|
|
3057
3057
|
});
|
|
3058
3058
|
const e = Buffer.from(await t.arrayBuffer());
|
|
3059
3059
|
return `data:${t.type || "application/octet-stream"};base64,${e.toString("base64")}`;
|
|
3060
3060
|
}
|
|
3061
|
-
async function
|
|
3061
|
+
async function Vi() {
|
|
3062
3062
|
var e;
|
|
3063
3063
|
if (!((e = navigator.mediaDevices) != null && e.getDisplayMedia))
|
|
3064
|
-
throw new Error(
|
|
3064
|
+
throw new Error(g("status.screenUnsupported"));
|
|
3065
3065
|
const t = await navigator.mediaDevices.getDisplayMedia({
|
|
3066
3066
|
video: { displaySurface: "browser" },
|
|
3067
3067
|
audio: !1,
|
|
@@ -3072,74 +3072,74 @@ async function Ei() {
|
|
|
3072
3072
|
const a = document.createElement("video");
|
|
3073
3073
|
a.muted = !0, a.playsInline = !0, a.srcObject = t, await a.play(), a.videoWidth || await new Promise((l) => {
|
|
3074
3074
|
a.onloadedmetadata = () => l();
|
|
3075
|
-
}), await
|
|
3076
|
-
const o = a.videoWidth || 1, i = a.videoHeight || 1,
|
|
3077
|
-
|
|
3078
|
-
const
|
|
3079
|
-
if (!
|
|
3080
|
-
throw new Error(
|
|
3081
|
-
return
|
|
3075
|
+
}), await Jt();
|
|
3076
|
+
const o = a.videoWidth || 1, i = a.videoHeight || 1, n = document.createElement("canvas");
|
|
3077
|
+
n.width = o, n.height = i, n.getContext("2d").drawImage(a, 0, 0, o, i);
|
|
3078
|
+
const s = n.toDataURL("image/png");
|
|
3079
|
+
if (!at(s))
|
|
3080
|
+
throw new Error(g("status.screenEmpty"));
|
|
3081
|
+
return s;
|
|
3082
3082
|
} finally {
|
|
3083
3083
|
t.getTracks().forEach((a) => a.stop());
|
|
3084
3084
|
}
|
|
3085
3085
|
}
|
|
3086
|
-
async function
|
|
3087
|
-
const e = document.getElementById("notefully"), a = e ? e.style.display : "", o =
|
|
3088
|
-
let
|
|
3086
|
+
async function la(t = {}) {
|
|
3087
|
+
const e = document.getElementById("notefully"), a = e ? e.style.display : "", o = Fi(), i = Ui();
|
|
3088
|
+
let n = () => {
|
|
3089
3089
|
};
|
|
3090
3090
|
e && (e.style.display = "none");
|
|
3091
|
-
const
|
|
3091
|
+
const s = Ti();
|
|
3092
3092
|
try {
|
|
3093
|
-
if (typeof t.onBeforeCapture == "function" && await t.onBeforeCapture(), await
|
|
3094
|
-
const
|
|
3095
|
-
if (
|
|
3096
|
-
return
|
|
3093
|
+
if (typeof t.onBeforeCapture == "function" && await t.onBeforeCapture(), await Jt(), typeof t.capture == "function") {
|
|
3094
|
+
const S = await Oi(await t.capture());
|
|
3095
|
+
if (S)
|
|
3096
|
+
return S;
|
|
3097
3097
|
}
|
|
3098
|
-
|
|
3099
|
-
const { width: l, height:
|
|
3098
|
+
n = await Ii(), await Jt();
|
|
3099
|
+
const { width: l, height: c } = Di(), d = {
|
|
3100
3100
|
cacheBust: !0,
|
|
3101
3101
|
width: l,
|
|
3102
|
-
height:
|
|
3102
|
+
height: c,
|
|
3103
3103
|
pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
|
|
3104
|
-
filter: (
|
|
3104
|
+
filter: (S) => !sa(S),
|
|
3105
3105
|
// 404 / CORS images must not abort the whole capture.
|
|
3106
|
-
imagePlaceholder:
|
|
3106
|
+
imagePlaceholder: xi,
|
|
3107
3107
|
onImageErrorHandler: () => {
|
|
3108
3108
|
}
|
|
3109
3109
|
};
|
|
3110
|
-
let
|
|
3110
|
+
let m = "";
|
|
3111
3111
|
try {
|
|
3112
|
-
|
|
3112
|
+
m = await je(document.body, d);
|
|
3113
3113
|
} catch {
|
|
3114
|
-
|
|
3114
|
+
m = await je(document.body, { ...d, skipFonts: !0 });
|
|
3115
3115
|
}
|
|
3116
|
-
if (!
|
|
3117
|
-
throw new Error(
|
|
3118
|
-
return
|
|
3116
|
+
if (!at(m))
|
|
3117
|
+
throw new Error(g("status.captureEmpty"));
|
|
3118
|
+
return m;
|
|
3119
3119
|
} finally {
|
|
3120
3120
|
try {
|
|
3121
|
-
|
|
3121
|
+
n();
|
|
3122
3122
|
} catch {
|
|
3123
3123
|
}
|
|
3124
|
-
|
|
3124
|
+
s(), i(), o.remove(), Mi(), e && (e.style.display = a);
|
|
3125
3125
|
}
|
|
3126
3126
|
}
|
|
3127
|
-
function
|
|
3127
|
+
function Bi(t = "") {
|
|
3128
3128
|
const e = String(t || "");
|
|
3129
3129
|
return e ? /Windows NT/i.test(e) ? "Windows" : /iPhone|iPad|iPod/i.test(e) ? "iOS" : /Mac OS X|Macintosh/i.test(e) ? "macOS" : /Android/i.test(e) ? "Android" : /CrOS/i.test(e) ? "ChromeOS" : /Linux/i.test(e) ? "Linux" : "Other" : "";
|
|
3130
3130
|
}
|
|
3131
|
-
function
|
|
3131
|
+
function Ni(t = "") {
|
|
3132
3132
|
const e = String(t || "");
|
|
3133
3133
|
return e ? /Edg\//i.test(e) ? "Edge" : /OPR\/|Opera/i.test(e) ? "Opera" : /Firefox\//i.test(e) ? "Firefox" : /Chrome\//i.test(e) || /CriOS\//i.test(e) ? "Chrome" : /Safari\//i.test(e) ? "Safari" : "Other" : "";
|
|
3134
3134
|
}
|
|
3135
|
-
function
|
|
3135
|
+
function Ki(t = {}) {
|
|
3136
3136
|
const e = navigator.userAgent;
|
|
3137
3137
|
return {
|
|
3138
3138
|
url: location.href,
|
|
3139
3139
|
title: document.title,
|
|
3140
3140
|
userAgent: e,
|
|
3141
|
-
os:
|
|
3142
|
-
browser:
|
|
3141
|
+
os: Bi(e),
|
|
3142
|
+
browser: Ni(e),
|
|
3143
3143
|
language: navigator.language,
|
|
3144
3144
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
3145
3145
|
viewport: {
|
|
@@ -3159,11 +3159,11 @@ function Pi(t = {}) {
|
|
|
3159
3159
|
}
|
|
3160
3160
|
};
|
|
3161
3161
|
}
|
|
3162
|
-
const
|
|
3162
|
+
const Pe = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), Le = {
|
|
3163
3163
|
id: "userId",
|
|
3164
3164
|
username: "displayName",
|
|
3165
3165
|
name: "displayName"
|
|
3166
|
-
},
|
|
3166
|
+
}, xe = /* @__PURE__ */ new Set([
|
|
3167
3167
|
"endpoint",
|
|
3168
3168
|
"projectKey",
|
|
3169
3169
|
"version",
|
|
@@ -3174,6 +3174,9 @@ const be = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), we = {
|
|
|
3174
3174
|
"theme",
|
|
3175
3175
|
"video",
|
|
3176
3176
|
"consoleLogLimit",
|
|
3177
|
+
"consoleMethods",
|
|
3178
|
+
"scrubLog",
|
|
3179
|
+
"logSources",
|
|
3177
3180
|
"kinds",
|
|
3178
3181
|
"capture",
|
|
3179
3182
|
"onBeforeCapture",
|
|
@@ -3182,7 +3185,7 @@ const be = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), we = {
|
|
|
3182
3185
|
"displayLink",
|
|
3183
3186
|
"locale",
|
|
3184
3187
|
"translations"
|
|
3185
|
-
]),
|
|
3188
|
+
]), Ue = {
|
|
3186
3189
|
slug: "Use init({ name }) for a per-app report prefix (same idea as package.json name). slug is not a widget option.",
|
|
3187
3190
|
projectSlug: "Use init({ name }) for a per-app report prefix. projectSlug is not a widget option.",
|
|
3188
3191
|
project: "Pass projectKey (nfk_…) from Showfully Notefully settings — there is no project option on the widget.",
|
|
@@ -3191,40 +3194,40 @@ const be = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), we = {
|
|
|
3191
3194
|
email: "Pass people via Notefully.identify({ userId, email, displayName }), not init().",
|
|
3192
3195
|
displayName: "Pass people via Notefully.identify({ userId, email, displayName }), not init()."
|
|
3193
3196
|
};
|
|
3194
|
-
function
|
|
3195
|
-
const a = e.warn ||
|
|
3196
|
-
for (const
|
|
3197
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
3198
|
-
for (const [
|
|
3199
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
3200
|
-
for (const
|
|
3201
|
-
|
|
3202
|
-
if (
|
|
3203
|
-
const
|
|
3197
|
+
function Hi(t = {}, e = {}) {
|
|
3198
|
+
const a = e.warn || ca, o = t && typeof t == "object" ? t : {}, i = {}, n = [];
|
|
3199
|
+
for (const s of Pe)
|
|
3200
|
+
Object.prototype.hasOwnProperty.call(o, s) && (i[s] = o[s]);
|
|
3201
|
+
for (const [s, l] of Object.entries(Le))
|
|
3202
|
+
Object.prototype.hasOwnProperty.call(o, s) && (Object.prototype.hasOwnProperty.call(i, l) || (i[l] = o[s]));
|
|
3203
|
+
for (const s of Object.keys(o))
|
|
3204
|
+
Pe.has(s) || Object.prototype.hasOwnProperty.call(Le, s) || n.push(s);
|
|
3205
|
+
if (n.length) {
|
|
3206
|
+
const s = n.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
|
|
3204
3207
|
a(
|
|
3205
|
-
`Notefully.identify: ignoring unknown key(s): ${
|
|
3208
|
+
`Notefully.identify: ignoring unknown key(s): ${n.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + s
|
|
3206
3209
|
);
|
|
3207
3210
|
}
|
|
3208
3211
|
return i;
|
|
3209
3212
|
}
|
|
3210
|
-
function
|
|
3211
|
-
const a = e.warn ||
|
|
3213
|
+
function _i(t = {}, e = {}) {
|
|
3214
|
+
const a = e.warn || ca, o = t && typeof t == "object" ? t : {}, i = Object.keys(o).filter((n) => !xe.has(n));
|
|
3212
3215
|
if (i.length)
|
|
3213
|
-
for (const
|
|
3214
|
-
if (
|
|
3215
|
-
a(`Notefully.init: ignoring "${
|
|
3216
|
+
for (const n of i) {
|
|
3217
|
+
if (Ue[n]) {
|
|
3218
|
+
a(`Notefully.init: ignoring "${n}". ${Ue[n]}`);
|
|
3216
3219
|
continue;
|
|
3217
3220
|
}
|
|
3218
3221
|
a(
|
|
3219
|
-
`Notefully.init: ignoring unknown key "${
|
|
3222
|
+
`Notefully.init: ignoring unknown key "${n}". Supported: ${[...xe].join(", ")}.`
|
|
3220
3223
|
);
|
|
3221
3224
|
}
|
|
3222
3225
|
}
|
|
3223
|
-
function
|
|
3226
|
+
function ca(t) {
|
|
3224
3227
|
typeof console < "u" && typeof console.warn == "function" && console.warn(t);
|
|
3225
3228
|
}
|
|
3226
|
-
const
|
|
3227
|
-
function
|
|
3229
|
+
const Te = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, Gi = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
|
|
3230
|
+
function Fe(t) {
|
|
3228
3231
|
if (t instanceof Error)
|
|
3229
3232
|
return t.stack || t.message || String(t);
|
|
3230
3233
|
if (typeof t == "string")
|
|
@@ -3235,132 +3238,345 @@ function ze(t) {
|
|
|
3235
3238
|
return String(t);
|
|
3236
3239
|
}
|
|
3237
3240
|
}
|
|
3238
|
-
function
|
|
3241
|
+
function le(t) {
|
|
3239
3242
|
if (!t || typeof t != "string")
|
|
3240
3243
|
return "";
|
|
3241
3244
|
let e = t.replace(/[\u0000-\u001F\u007F]/g, "").trim();
|
|
3242
|
-
return e ? (
|
|
3245
|
+
return e ? (Te.test(e) && (e = e.split(";").map((a) => a.trim()).filter((a) => a && !Te.test(a)).join("; "), e && !e.endsWith(";") && (e += ";")), e.slice(0, 500)) : "";
|
|
3243
3246
|
}
|
|
3244
|
-
function
|
|
3247
|
+
function qi(t = []) {
|
|
3245
3248
|
if (!t.length)
|
|
3246
3249
|
return { text: "", segments: [{ text: "", style: null }] };
|
|
3247
3250
|
const e = t[0];
|
|
3248
3251
|
if (typeof e != "string" || !e.includes("%c")) {
|
|
3249
|
-
const
|
|
3250
|
-
return { text:
|
|
3252
|
+
const s = t.map(Fe).join(" ");
|
|
3253
|
+
return { text: s, segments: [{ text: s, style: null }] };
|
|
3251
3254
|
}
|
|
3252
3255
|
const a = e.split("%c"), o = [];
|
|
3253
3256
|
let i = 1;
|
|
3254
|
-
for (let
|
|
3255
|
-
const l = a[
|
|
3256
|
-
if (
|
|
3257
|
+
for (let s = 0; s < a.length; s++) {
|
|
3258
|
+
const l = a[s];
|
|
3259
|
+
if (s === 0) {
|
|
3257
3260
|
l && o.push({ text: l, style: null });
|
|
3258
3261
|
continue;
|
|
3259
3262
|
}
|
|
3260
|
-
const
|
|
3263
|
+
const c = i < t.length ? String(t[i++] ?? "") : "", d = le(c) || null;
|
|
3261
3264
|
o.push({ text: l, style: d });
|
|
3262
3265
|
}
|
|
3263
3266
|
if (i < t.length) {
|
|
3264
|
-
const
|
|
3265
|
-
|
|
3266
|
-
text: (o.length ? " " : "") +
|
|
3267
|
+
const s = t.slice(i).map(Fe).join(" ");
|
|
3268
|
+
s && o.push({
|
|
3269
|
+
text: (o.length ? " " : "") + s,
|
|
3267
3270
|
style: null
|
|
3268
3271
|
});
|
|
3269
3272
|
}
|
|
3270
3273
|
return {
|
|
3271
|
-
text: o.map((
|
|
3274
|
+
text: o.map((s) => s.text).join(""),
|
|
3272
3275
|
segments: o.length ? o : [{ text: "", style: null }]
|
|
3273
3276
|
};
|
|
3274
3277
|
}
|
|
3275
|
-
function
|
|
3278
|
+
function Wi(t) {
|
|
3276
3279
|
const e = String(t ?? "");
|
|
3277
3280
|
if (!e.includes("%c"))
|
|
3278
3281
|
return [{ text: e, style: null }];
|
|
3279
|
-
const a = e.split("%c"), o = a[a.length - 1], i = o.match(
|
|
3280
|
-
let
|
|
3282
|
+
const a = e.split("%c"), o = a[a.length - 1], i = o.match(Gi);
|
|
3283
|
+
let n = "";
|
|
3281
3284
|
if (i) {
|
|
3282
|
-
const
|
|
3283
|
-
/^[a-z-]+\s*:/i.test(o.slice(d)) && (a[a.length - 1] = o.slice(0, d).replace(/\s+$/, ""),
|
|
3285
|
+
const c = i.index, d = /\s/.test(o[c]) ? c + 1 : c;
|
|
3286
|
+
/^[a-z-]+\s*:/i.test(o.slice(d)) && (a[a.length - 1] = o.slice(0, d).replace(/\s+$/, ""), n = o.slice(d).trim());
|
|
3284
3287
|
}
|
|
3285
|
-
const
|
|
3286
|
-
for (let
|
|
3287
|
-
const d = a[
|
|
3288
|
-
if (
|
|
3288
|
+
const s = le(n) || null, l = [];
|
|
3289
|
+
for (let c = 0; c < a.length; c++) {
|
|
3290
|
+
const d = a[c];
|
|
3291
|
+
if (c === 0) {
|
|
3289
3292
|
d && l.push({ text: d, style: null });
|
|
3290
3293
|
continue;
|
|
3291
3294
|
}
|
|
3292
3295
|
l.push({
|
|
3293
3296
|
text: d,
|
|
3294
|
-
style:
|
|
3297
|
+
style: c === 1 ? s : null
|
|
3295
3298
|
});
|
|
3296
3299
|
}
|
|
3297
3300
|
return l.length ? l : [{ text: e, style: null }];
|
|
3298
3301
|
}
|
|
3299
|
-
function
|
|
3302
|
+
function ua(t = {}) {
|
|
3300
3303
|
return Array.isArray(t.segments) && t.segments.length ? t.segments.map((e) => ({
|
|
3301
3304
|
text: String((e == null ? void 0 : e.text) ?? ""),
|
|
3302
|
-
style:
|
|
3303
|
-
})) :
|
|
3305
|
+
style: le(e == null ? void 0 : e.style) || null
|
|
3306
|
+
})) : Wi(t.text);
|
|
3304
3307
|
}
|
|
3305
|
-
function
|
|
3306
|
-
return
|
|
3308
|
+
function Zi(t = {}) {
|
|
3309
|
+
return ua(t).map((a) => a.text).join("");
|
|
3307
3310
|
}
|
|
3308
|
-
function
|
|
3311
|
+
function Me(t) {
|
|
3309
3312
|
return String(t ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3310
3313
|
}
|
|
3311
|
-
function
|
|
3312
|
-
return
|
|
3313
|
-
const a =
|
|
3314
|
-
return e.style ? `<span class="nf-console-styled" style="${
|
|
3314
|
+
function Yi(t = {}) {
|
|
3315
|
+
return ua(t).map((e) => {
|
|
3316
|
+
const a = Me(e.text);
|
|
3317
|
+
return e.style ? `<span class="nf-console-styled" style="${Me(e.style)}">${a}</span>` : a;
|
|
3315
3318
|
}).join("");
|
|
3316
3319
|
}
|
|
3317
|
-
const
|
|
3318
|
-
function
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3320
|
+
const Xi = /\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g, Ji = /\bBearer\s+[A-Za-z0-9\-._~+/]+=*/gi, Qi = /(Authorization:\s*)(\S+)/gi, tn = /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b/g, en = /\b[a-f0-9]{32,}\b/gi, an = /\b[A-Za-z0-9+/]{40,}={0,2}\b/g, ct = "[redacted]";
|
|
3321
|
+
function De(t) {
|
|
3322
|
+
return !t || typeof t != "string" ? t == null ? "" : String(t) : t.replace(Ji, `Bearer ${ct}`).replace(Qi, `$1${ct}`).replace(tn, ct).replace(Xi, ct).replace(en, ct).replace(an, ct);
|
|
3323
|
+
}
|
|
3324
|
+
function Ft(t) {
|
|
3325
|
+
if (!t || typeof t != "object")
|
|
3326
|
+
return t;
|
|
3327
|
+
const e = { ...t, text: De(t.text || "") };
|
|
3328
|
+
return Array.isArray(t.segments) && t.segments.length && (e.segments = t.segments.map((a) => ({
|
|
3329
|
+
...a,
|
|
3330
|
+
text: De(a.text || "")
|
|
3331
|
+
}))), e;
|
|
3332
|
+
}
|
|
3333
|
+
const on = 60, nn = 20, ut = 2e3, Mt = ["log", "info", "warn", "error"], rn = ["debug", "trace", "assert"], da = [...Mt, ...rn], sn = /* @__PURE__ */ new Set(["warn", "error", "assert"]), ln = /* @__PURE__ */ new Set(["SCRIPT", "LINK", "IMG", "VIDEO", "AUDIO"]);
|
|
3334
|
+
function Qt(t) {
|
|
3335
|
+
return sn.has(t);
|
|
3336
|
+
}
|
|
3337
|
+
function Ie() {
|
|
3338
|
+
return Date.now();
|
|
3339
|
+
}
|
|
3340
|
+
function Oe() {
|
|
3341
|
+
return typeof performance < "u" && typeof performance.now == "function" ? performance.now() : 0;
|
|
3342
|
+
}
|
|
3343
|
+
function cn(t, e = 2) {
|
|
3344
|
+
if (!t || typeof t != "string")
|
|
3345
|
+
return "";
|
|
3346
|
+
const a = t.split(`
|
|
3347
|
+
`), o = a[0] && /^\s*Error\b/.test(a[0]) ? 1 : 0;
|
|
3348
|
+
return a.slice(o + e).join(`
|
|
3349
|
+
`).trim();
|
|
3350
|
+
}
|
|
3351
|
+
function un(t) {
|
|
3352
|
+
return (t || []).some((e) => e instanceof Error);
|
|
3353
|
+
}
|
|
3354
|
+
function pa(t) {
|
|
3355
|
+
const e = t && t.target;
|
|
3356
|
+
if (!e || typeof e.tagName != "string" || e === (typeof window < "u" ? window : null))
|
|
3357
|
+
return null;
|
|
3358
|
+
const a = String(e.tagName || "").toUpperCase();
|
|
3359
|
+
if (!ln.has(a))
|
|
3360
|
+
return null;
|
|
3361
|
+
const o = String(e.src || e.href || "").trim();
|
|
3362
|
+
return o ? `Failed to load <${a.toLowerCase()}> ${o}` : null;
|
|
3363
|
+
}
|
|
3364
|
+
function dn(t) {
|
|
3365
|
+
const e = pa(t);
|
|
3366
|
+
if (e)
|
|
3367
|
+
return e;
|
|
3368
|
+
const a = String((t == null ? void 0 : t.message) || "").trim(), o = t == null ? void 0 : t.error, i = String((t == null ? void 0 : t.filename) || "").trim(), n = t == null ? void 0 : t.lineno, s = t == null ? void 0 : t.colno, l = !!i || Number.isFinite(n) && n > 0 || Number.isFinite(s) && s > 0;
|
|
3369
|
+
if ((!a || a === "Script error.") && !o) {
|
|
3370
|
+
const m = ["Script error. (cross-origin; enable CORS for stack details)"];
|
|
3371
|
+
return l && m.push($e(i, n, s)), m.join(" ");
|
|
3372
|
+
}
|
|
3373
|
+
const d = [];
|
|
3374
|
+
return a ? d.push(a) : o && o.message ? d.push(String(o.message)) : d.push("window.error"), l && d.push($e(i, n, s)), o instanceof Error && o.stack && d.push(o.stack), d.join(`
|
|
3375
|
+
`);
|
|
3376
|
+
}
|
|
3377
|
+
function $e(t, e, a) {
|
|
3378
|
+
const o = t || "(unknown)", i = Number.isFinite(e) ? e : "?", n = Number.isFinite(a) ? a : "?";
|
|
3379
|
+
return `at ${o}:${i}:${n}`;
|
|
3380
|
+
}
|
|
3381
|
+
function pn(t) {
|
|
3382
|
+
const e = t == null ? void 0 : t.reason;
|
|
3383
|
+
return e instanceof Error ? [e] : e == null ? ["unhandledrejection"] : typeof e == "string" ? [`Unhandled rejection: ${e}`] : ["Unhandled rejection:", e];
|
|
3384
|
+
}
|
|
3385
|
+
function gn(t) {
|
|
3386
|
+
const e = (t == null ? void 0 : t.effectiveDirective) || (t == null ? void 0 : t.violatedDirective) || "unknown", a = (t == null ? void 0 : t.blockedURI) || "", o = (t == null ? void 0 : t.disposition) || "", i = [`CSP violation: ${e}`];
|
|
3387
|
+
return a && i.push(`blocked ${a}`), o && i.push(`(${o})`), i.join(" ");
|
|
3388
|
+
}
|
|
3389
|
+
function te(t, e) {
|
|
3390
|
+
const a = [...t, ...e];
|
|
3391
|
+
return a.sort((o, i) => {
|
|
3392
|
+
const n = (o.at || 0) - (i.at || 0);
|
|
3393
|
+
return n !== 0 ? n : (o.t || 0) - (i.t || 0);
|
|
3394
|
+
}), a;
|
|
3395
|
+
}
|
|
3396
|
+
function mn(t, e, a) {
|
|
3397
|
+
const o = te(t, e);
|
|
3398
|
+
if (a == null || !Number.isFinite(a) || a < 0)
|
|
3399
|
+
return o;
|
|
3400
|
+
if (a === 0)
|
|
3401
|
+
return [];
|
|
3402
|
+
if (o.length <= a)
|
|
3403
|
+
return o;
|
|
3404
|
+
const i = o.slice(-a), n = new Set(i), s = e.filter((c) => !n.has(c));
|
|
3405
|
+
if (!s.length)
|
|
3406
|
+
return i;
|
|
3407
|
+
const l = i.slice();
|
|
3408
|
+
for (const c of s.slice().reverse()) {
|
|
3409
|
+
const d = l.findIndex((m) => !Qt(m.level));
|
|
3410
|
+
if (d === -1)
|
|
3411
|
+
break;
|
|
3412
|
+
l.splice(d, 1), l.push(c);
|
|
3413
|
+
}
|
|
3414
|
+
return te(l, []);
|
|
3415
|
+
}
|
|
3416
|
+
function ce(t) {
|
|
3417
|
+
const e = Array.isArray(t) && t.length ? t : Mt, a = new Set(da), o = [];
|
|
3418
|
+
for (const i of e) {
|
|
3419
|
+
const n = String(i || "").trim();
|
|
3420
|
+
!a.has(n) || o.includes(n) || o.push(n);
|
|
3421
|
+
}
|
|
3422
|
+
return o.length ? o : Mt.slice();
|
|
3423
|
+
}
|
|
3424
|
+
function hn() {
|
|
3425
|
+
const t = [], e = [], a = {};
|
|
3426
|
+
let o = !1, i = Mt.slice(), n = Ft, s = null, l = null, c = null;
|
|
3427
|
+
const d = (u) => Qt(u) ? e : t, m = (u) => Qt(u) ? nn : on, S = (u) => {
|
|
3428
|
+
let h = {
|
|
3429
|
+
level: u.level || "log",
|
|
3430
|
+
text: String(u.text || ""),
|
|
3431
|
+
at: Number.isFinite(u.at) ? u.at : Ie(),
|
|
3432
|
+
t: Number.isFinite(u.t) ? u.t : Oe()
|
|
3433
|
+
};
|
|
3434
|
+
if (u.truncated && (h.truncated = !0), Number.isFinite(u.count) && u.count > 1 && (h.count = u.count), Array.isArray(u.segments) && u.segments.length && (h.segments = u.segments), typeof n == "function")
|
|
3435
|
+
try {
|
|
3436
|
+
const C = n(h);
|
|
3437
|
+
if (C == null)
|
|
3438
|
+
return;
|
|
3439
|
+
h = C;
|
|
3440
|
+
} catch {
|
|
3441
|
+
}
|
|
3442
|
+
h.text = String(h.text || "").slice(0, ut), Array.isArray(h.segments) && (h.segments = h.segments.map((C) => ({
|
|
3443
|
+
text: String(C.text || "").slice(0, ut),
|
|
3444
|
+
style: C.style || null
|
|
3445
|
+
})));
|
|
3446
|
+
const R = d(h.level), k = R[R.length - 1];
|
|
3447
|
+
if (k && k.level === h.level && k.text === h.text) {
|
|
3448
|
+
k.count = (k.count || 1) + 1, k.at = h.at, k.t = h.t, h.truncated && (k.truncated = !0);
|
|
3449
|
+
return;
|
|
3450
|
+
}
|
|
3451
|
+
R.push(h);
|
|
3452
|
+
const f = m(h.level);
|
|
3453
|
+
for (; R.length > f; )
|
|
3454
|
+
R.shift();
|
|
3455
|
+
}, v = (u, h, R = {}) => {
|
|
3456
|
+
let k = "", f = null;
|
|
3323
3457
|
try {
|
|
3324
|
-
const
|
|
3325
|
-
|
|
3458
|
+
const $ = qi(h);
|
|
3459
|
+
k = $.text, f = $.segments;
|
|
3326
3460
|
} catch {
|
|
3327
|
-
|
|
3461
|
+
k = String((h == null ? void 0 : h[0]) ?? ""), f = [{ text: k, style: null }];
|
|
3462
|
+
}
|
|
3463
|
+
if (R.captureStack !== !1 && (u === "warn" || u === "error") && !un(h)) {
|
|
3464
|
+
const $ = cn(new Error().stack || "", 2);
|
|
3465
|
+
$ && (k = k ? `${k}
|
|
3466
|
+
${$}` : $);
|
|
3328
3467
|
}
|
|
3329
|
-
const
|
|
3330
|
-
level:
|
|
3331
|
-
text:
|
|
3332
|
-
at:
|
|
3468
|
+
const Z = k.length > ut, Y = {
|
|
3469
|
+
level: u,
|
|
3470
|
+
text: k.slice(0, ut),
|
|
3471
|
+
at: Ie(),
|
|
3472
|
+
t: Oe()
|
|
3333
3473
|
};
|
|
3334
|
-
|
|
3335
|
-
text: String(
|
|
3336
|
-
style:
|
|
3337
|
-
}))),
|
|
3474
|
+
Z && (Y.truncated = !0), f && f.some(($) => $.style) && (Y.segments = f.map(($) => ({
|
|
3475
|
+
text: String($.text || "").slice(0, ut),
|
|
3476
|
+
style: $.style || null
|
|
3477
|
+
}))), S(Y);
|
|
3478
|
+
}, A = () => {
|
|
3479
|
+
for (const u of da)
|
|
3480
|
+
a[u] && (console[u] = a[u], delete a[u]);
|
|
3481
|
+
for (const u of i)
|
|
3482
|
+
if (typeof console[u] == "function") {
|
|
3483
|
+
if (a[u] = console[u].bind(console), u === "assert") {
|
|
3484
|
+
console.assert = (h, ...R) => {
|
|
3485
|
+
a.assert(h, ...R), h || v("assert", R.length ? R : ["Assertion failed"], { captureStack: !1 });
|
|
3486
|
+
};
|
|
3487
|
+
continue;
|
|
3488
|
+
}
|
|
3489
|
+
console[u] = (...h) => {
|
|
3490
|
+
v(u, h), a[u](...h);
|
|
3491
|
+
};
|
|
3492
|
+
}
|
|
3338
3493
|
};
|
|
3339
3494
|
return {
|
|
3340
3495
|
hook: () => {
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3496
|
+
o || typeof window > "u" || (o = !0, A(), s = (u) => {
|
|
3497
|
+
const h = u == null ? void 0 : u.target;
|
|
3498
|
+
if (!!(h && typeof h.tagName == "string" && h !== window)) {
|
|
3499
|
+
const k = pa(u);
|
|
3500
|
+
if (!k)
|
|
3501
|
+
return;
|
|
3502
|
+
v("error", [k], { captureStack: !1 });
|
|
3503
|
+
return;
|
|
3504
|
+
}
|
|
3505
|
+
v("error", [dn(u)], { captureStack: !1 });
|
|
3506
|
+
}, l = (u) => {
|
|
3507
|
+
v("error", pn(u), { captureStack: !1 });
|
|
3508
|
+
}, c = (u) => {
|
|
3509
|
+
v("error", [gn(u)], { captureStack: !1 });
|
|
3510
|
+
}, window.addEventListener("error", s, !0), window.addEventListener("unhandledrejection", l), window.addEventListener("securitypolicyviolation", c));
|
|
3511
|
+
},
|
|
3512
|
+
unhook: () => {
|
|
3513
|
+
if (o) {
|
|
3514
|
+
o = !1;
|
|
3515
|
+
for (const u of Object.keys(a))
|
|
3516
|
+
console[u] = a[u], delete a[u];
|
|
3517
|
+
typeof window < "u" && (s && window.removeEventListener("error", s, !0), l && window.removeEventListener("unhandledrejection", l), c && window.removeEventListener("securitypolicyviolation", c)), s = null, l = null, c = null;
|
|
3518
|
+
}
|
|
3350
3519
|
},
|
|
3520
|
+
push: v,
|
|
3521
|
+
/**
|
|
3522
|
+
* @param {object} entry
|
|
3523
|
+
*/
|
|
3524
|
+
pushEntry(u) {
|
|
3525
|
+
if (!u || typeof u != "object")
|
|
3526
|
+
return;
|
|
3527
|
+
const h = String(u.text ?? "");
|
|
3528
|
+
S({
|
|
3529
|
+
level: u.level || "log",
|
|
3530
|
+
text: h,
|
|
3531
|
+
at: u.at,
|
|
3532
|
+
t: u.t,
|
|
3533
|
+
truncated: u.truncated || h.length > ut,
|
|
3534
|
+
count: u.count,
|
|
3535
|
+
segments: u.segments
|
|
3536
|
+
});
|
|
3537
|
+
},
|
|
3538
|
+
/**
|
|
3539
|
+
* @param {string[]} next
|
|
3540
|
+
*/
|
|
3541
|
+
setConsoleMethods(u) {
|
|
3542
|
+
i = ce(u), o && A();
|
|
3543
|
+
},
|
|
3544
|
+
/**
|
|
3545
|
+
* @param {(entry: object) => object|null|undefined} [fn]
|
|
3546
|
+
*/
|
|
3547
|
+
setScrubLog(u) {
|
|
3548
|
+
n = typeof u == "function" ? u : Ft;
|
|
3549
|
+
},
|
|
3550
|
+
/**
|
|
3551
|
+
* Full merged buffer (both rings).
|
|
3552
|
+
* @returns {object[]}
|
|
3553
|
+
*/
|
|
3351
3554
|
snapshot() {
|
|
3352
|
-
return t
|
|
3555
|
+
return te(t, e);
|
|
3556
|
+
},
|
|
3557
|
+
/**
|
|
3558
|
+
* @param {number} limit
|
|
3559
|
+
* @returns {object[]}
|
|
3560
|
+
*/
|
|
3561
|
+
snapshotForReport(u) {
|
|
3562
|
+
return mn(t, e, u);
|
|
3563
|
+
},
|
|
3564
|
+
/**
|
|
3565
|
+
* @returns {{general: object[], priority: object[]}}
|
|
3566
|
+
*/
|
|
3567
|
+
_rings() {
|
|
3568
|
+
return { general: t, priority: e };
|
|
3353
3569
|
}
|
|
3354
3570
|
};
|
|
3355
3571
|
}
|
|
3356
|
-
function
|
|
3572
|
+
function fn(t, e = {}) {
|
|
3357
3573
|
const a = window.SpeechRecognition || window.webkitSpeechRecognition, o = typeof e.onActiveChange == "function" ? e.onActiveChange : null;
|
|
3358
|
-
let i = null,
|
|
3359
|
-
const
|
|
3360
|
-
const
|
|
3361
|
-
|
|
3574
|
+
let i = null, n = !1;
|
|
3575
|
+
const s = (d) => {
|
|
3576
|
+
const m = !!d;
|
|
3577
|
+
n !== m && (n = m, o == null || o(n));
|
|
3362
3578
|
}, l = () => {
|
|
3363
|
-
if (
|
|
3579
|
+
if (s(!1), i)
|
|
3364
3580
|
try {
|
|
3365
3581
|
i.stop();
|
|
3366
3582
|
} catch {
|
|
@@ -3369,34 +3585,34 @@ function Vi(t, e = {}) {
|
|
|
3369
3585
|
return {
|
|
3370
3586
|
start: (d = {}) => {
|
|
3371
3587
|
if (!a)
|
|
3372
|
-
throw new Error(
|
|
3373
|
-
return
|
|
3374
|
-
let
|
|
3375
|
-
for (let v =
|
|
3376
|
-
|
|
3377
|
-
|
|
3588
|
+
throw new Error(g("status.speechUnsupported"));
|
|
3589
|
+
return n ? (l(), !1) : (i = new a(), i.continuous = !0, i.interimResults = !0, i.lang = d.lang || navigator.language || "en-US", i.onresult = (m) => {
|
|
3590
|
+
let S = "";
|
|
3591
|
+
for (let v = m.resultIndex; v < m.results.length; v += 1)
|
|
3592
|
+
m.results[v].isFinal && (S += m.results[v][0].transcript);
|
|
3593
|
+
S && t(S);
|
|
3378
3594
|
}, i.onerror = () => {
|
|
3379
|
-
|
|
3595
|
+
s(!1);
|
|
3380
3596
|
}, i.onend = () => {
|
|
3381
|
-
|
|
3382
|
-
}, i.start(),
|
|
3597
|
+
s(!1);
|
|
3598
|
+
}, i.start(), s(!0), !0);
|
|
3383
3599
|
},
|
|
3384
3600
|
stop: l,
|
|
3385
3601
|
isSupported: () => !!a,
|
|
3386
|
-
isActive: () =>
|
|
3602
|
+
isActive: () => n
|
|
3387
3603
|
};
|
|
3388
3604
|
}
|
|
3389
|
-
const
|
|
3390
|
-
function
|
|
3391
|
-
let o = null, i = null,
|
|
3605
|
+
const yn = 60 * 1e3;
|
|
3606
|
+
function vn({ onStart: t, onStop: e, onError: a }) {
|
|
3607
|
+
let o = null, i = null, n = [], s = null;
|
|
3392
3608
|
const l = () => {
|
|
3393
|
-
if (
|
|
3609
|
+
if (s && (clearTimeout(s), s = null), i && i.state !== "inactive")
|
|
3394
3610
|
try {
|
|
3395
3611
|
i.stop();
|
|
3396
3612
|
} catch {
|
|
3397
3613
|
}
|
|
3398
|
-
o && (o.getTracks().forEach((
|
|
3399
|
-
},
|
|
3614
|
+
o && (o.getTracks().forEach((m) => m.stop()), o = null);
|
|
3615
|
+
}, c = () => {
|
|
3400
3616
|
if (i && i.state === "recording") {
|
|
3401
3617
|
i.stop();
|
|
3402
3618
|
return;
|
|
@@ -3404,25 +3620,25 @@ function Bi({ onStart: t, onStop: e, onError: a }) {
|
|
|
3404
3620
|
l(), e(null);
|
|
3405
3621
|
};
|
|
3406
3622
|
return { start: async () => {
|
|
3407
|
-
var
|
|
3408
|
-
if (!((
|
|
3623
|
+
var m, S;
|
|
3624
|
+
if (!((m = navigator.mediaDevices) != null && m.getDisplayMedia))
|
|
3409
3625
|
throw new Error("Screen recording is not supported in this browser.");
|
|
3410
3626
|
o = await navigator.mediaDevices.getDisplayMedia({
|
|
3411
3627
|
video: { displaySurface: "browser" },
|
|
3412
3628
|
audio: !1,
|
|
3413
3629
|
preferCurrentTab: !0,
|
|
3414
3630
|
selfBrowserSurface: "include"
|
|
3415
|
-
}),
|
|
3631
|
+
}), n = [], i = new MediaRecorder(o, {
|
|
3416
3632
|
mimeType: MediaRecorder.isTypeSupported("video/webm;codecs=vp9") ? "video/webm;codecs=vp9" : "video/webm"
|
|
3417
3633
|
}), i.ondataavailable = (v) => {
|
|
3418
|
-
v.data && v.data.size &&
|
|
3634
|
+
v.data && v.data.size && n.push(v.data);
|
|
3419
3635
|
}, i.onstop = () => {
|
|
3420
|
-
const v =
|
|
3636
|
+
const v = n.length ? new Blob(n, { type: i.mimeType || "video/webm" }) : null;
|
|
3421
3637
|
l(), e(v);
|
|
3422
|
-
}, (
|
|
3423
|
-
}, stop:
|
|
3638
|
+
}, (S = o.getVideoTracks()[0]) == null || S.addEventListener("ended", () => c()), i.start(), s = setTimeout(c, yn), t();
|
|
3639
|
+
}, stop: c };
|
|
3424
3640
|
}
|
|
3425
|
-
function
|
|
3641
|
+
function kn() {
|
|
3426
3642
|
const t = /* @__PURE__ */ new Set();
|
|
3427
3643
|
return {
|
|
3428
3644
|
alloc() {
|
|
@@ -3440,77 +3656,77 @@ function Ni() {
|
|
|
3440
3656
|
}
|
|
3441
3657
|
};
|
|
3442
3658
|
}
|
|
3443
|
-
const
|
|
3444
|
-
function
|
|
3445
|
-
const t =
|
|
3446
|
-
let e = [], a = { ...
|
|
3659
|
+
const qt = { x: 0, y: 0, w: 1, h: 1 };
|
|
3660
|
+
function ue() {
|
|
3661
|
+
const t = kn();
|
|
3662
|
+
let e = [], a = { ...qt }, o = 1;
|
|
3447
3663
|
return {
|
|
3448
|
-
list: () => e.filter((
|
|
3664
|
+
list: () => e.filter((n) => Sn(n, a)),
|
|
3449
3665
|
all: () => e.slice(),
|
|
3450
3666
|
crop: () => ({ ...a }),
|
|
3451
|
-
setCrop(
|
|
3452
|
-
return a =
|
|
3667
|
+
setCrop(n) {
|
|
3668
|
+
return a = wn(n), a;
|
|
3453
3669
|
},
|
|
3454
3670
|
resetCrop() {
|
|
3455
|
-
return a = { ...
|
|
3671
|
+
return a = { ...qt }, a;
|
|
3456
3672
|
},
|
|
3457
3673
|
isCropped() {
|
|
3458
3674
|
return a.x > 1e-6 || a.y > 1e-6 || a.w < 1 - 1e-6 || a.h < 1 - 1e-6;
|
|
3459
3675
|
},
|
|
3460
|
-
add(
|
|
3676
|
+
add(n, s) {
|
|
3461
3677
|
const l = {
|
|
3462
3678
|
id: `s${o++}`,
|
|
3463
|
-
type:
|
|
3679
|
+
type: n,
|
|
3464
3680
|
number: t.alloc(),
|
|
3465
3681
|
x: 0.2,
|
|
3466
3682
|
y: 0.2,
|
|
3467
|
-
w:
|
|
3468
|
-
h:
|
|
3683
|
+
w: n === "arrow" ? 0.2 : 0.22,
|
|
3684
|
+
h: n === "arrow" ? 0.05 : 0.16,
|
|
3469
3685
|
x2: 0.4,
|
|
3470
3686
|
y2: 0.28,
|
|
3471
|
-
...
|
|
3687
|
+
...s
|
|
3472
3688
|
};
|
|
3473
3689
|
return e.push(l), l;
|
|
3474
3690
|
},
|
|
3475
|
-
update(
|
|
3476
|
-
const l = e.find((
|
|
3477
|
-
return l ? (Object.assign(l,
|
|
3691
|
+
update(n, s) {
|
|
3692
|
+
const l = e.find((c) => c.id === n);
|
|
3693
|
+
return l ? (Object.assign(l, s), l) : null;
|
|
3478
3694
|
},
|
|
3479
|
-
remove(
|
|
3480
|
-
const
|
|
3481
|
-
if (
|
|
3695
|
+
remove(n) {
|
|
3696
|
+
const s = e.findIndex((c) => c.id === n);
|
|
3697
|
+
if (s < 0)
|
|
3482
3698
|
return null;
|
|
3483
|
-
const [l] = e.splice(
|
|
3699
|
+
const [l] = e.splice(s, 1);
|
|
3484
3700
|
return t.free(l.number), l;
|
|
3485
3701
|
},
|
|
3486
3702
|
reset() {
|
|
3487
|
-
for (e = [], a = { ...
|
|
3703
|
+
for (e = [], a = { ...qt }, o = 1; t.peekUsed().length; )
|
|
3488
3704
|
t.free(t.peekUsed()[0]);
|
|
3489
3705
|
}
|
|
3490
3706
|
};
|
|
3491
3707
|
}
|
|
3492
|
-
function
|
|
3493
|
-
const a = Number(e == null ? void 0 : e.w) || 1, o = Number(e == null ? void 0 : e.h) || 1, i = Number(e == null ? void 0 : e.x) || 0,
|
|
3494
|
-
return (Array.isArray(t) ? t : []).map((
|
|
3708
|
+
function bn(t, e) {
|
|
3709
|
+
const a = Number(e == null ? void 0 : e.w) || 1, o = Number(e == null ? void 0 : e.h) || 1, i = Number(e == null ? void 0 : e.x) || 0, n = Number(e == null ? void 0 : e.y) || 0;
|
|
3710
|
+
return (Array.isArray(t) ? t : []).map((s) => {
|
|
3495
3711
|
const l = {
|
|
3496
|
-
...
|
|
3497
|
-
x: (
|
|
3498
|
-
y: (
|
|
3499
|
-
w: (
|
|
3500
|
-
h: (
|
|
3712
|
+
...s,
|
|
3713
|
+
x: (s.x - i) / a,
|
|
3714
|
+
y: (s.y - n) / o,
|
|
3715
|
+
w: (s.w || 0) / a,
|
|
3716
|
+
h: (s.h || 0) / o
|
|
3501
3717
|
};
|
|
3502
|
-
return Number.isFinite(
|
|
3718
|
+
return Number.isFinite(s.x2) && (l.x2 = (s.x2 - i) / a), Number.isFinite(s.y2) && (l.y2 = (s.y2 - n) / o), l;
|
|
3503
3719
|
});
|
|
3504
3720
|
}
|
|
3505
|
-
function
|
|
3721
|
+
function wn(t) {
|
|
3506
3722
|
const e = Math.min(Math.max(t.x, 0), 0.95), a = Math.min(Math.max(t.y, 0), 0.95), o = Math.min(Math.max(t.w, 0.05), 1 - e), i = Math.min(Math.max(t.h, 0.05), 1 - a);
|
|
3507
3723
|
return { x: e, y: a, w: o, h: i };
|
|
3508
3724
|
}
|
|
3509
|
-
function
|
|
3725
|
+
function Sn(t, e) {
|
|
3510
3726
|
const a = t.type === "arrow" ? (t.x + (t.x2 ?? t.x)) / 2 : t.x + (t.w || 0) / 2, o = t.type === "arrow" ? (t.y + (t.y2 ?? t.y)) / 2 : t.y + (t.h || 0) / 2;
|
|
3511
3727
|
return a >= e.x && o >= e.y && a <= e.x + e.w && o <= e.y + e.h;
|
|
3512
3728
|
}
|
|
3513
|
-
function
|
|
3729
|
+
function ga(t) {
|
|
3514
3730
|
const e = Math.max(1, Number(t) || 1);
|
|
3515
3731
|
return {
|
|
3516
3732
|
stroke: Math.max(2, e * 75e-4),
|
|
@@ -3520,55 +3736,55 @@ function Je(t) {
|
|
|
3520
3736
|
arrowHeadAngle: 0.4
|
|
3521
3737
|
};
|
|
3522
3738
|
}
|
|
3523
|
-
function
|
|
3524
|
-
const
|
|
3525
|
-
x:
|
|
3526
|
-
y: d -
|
|
3527
|
-
},
|
|
3528
|
-
x:
|
|
3529
|
-
y: d -
|
|
3530
|
-
},
|
|
3531
|
-
x: a - Math.cos(
|
|
3532
|
-
y: o - Math.sin(
|
|
3739
|
+
function An(t, e, a, o, i) {
|
|
3740
|
+
const n = Math.atan2(o - e, a - t), s = i.arrowHead, l = Math.min(i.stroke, s * 0.2), c = a, d = o, m = a - Math.cos(n) * s, S = o - Math.sin(n) * s, v = {
|
|
3741
|
+
x: c - s * Math.cos(n - i.arrowHeadAngle),
|
|
3742
|
+
y: d - s * Math.sin(n - i.arrowHeadAngle)
|
|
3743
|
+
}, A = {
|
|
3744
|
+
x: c - s * Math.cos(n + i.arrowHeadAngle),
|
|
3745
|
+
y: d - s * Math.sin(n + i.arrowHeadAngle)
|
|
3746
|
+
}, E = {
|
|
3747
|
+
x: a - Math.cos(n) * l,
|
|
3748
|
+
y: o - Math.sin(n) * l
|
|
3533
3749
|
};
|
|
3534
|
-
return { angle:
|
|
3535
|
-
}
|
|
3536
|
-
async function
|
|
3537
|
-
const a = e.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(e.maxEdge) || 2048), i = e.webpQuality ?? 0.82,
|
|
3538
|
-
|
|
3539
|
-
const
|
|
3540
|
-
if (
|
|
3541
|
-
return { blob:
|
|
3542
|
-
const
|
|
3543
|
-
if (!
|
|
3750
|
+
return { angle: n, tipX: c, tipY: d, baseX: m, baseY: S, left: v, right: A, shaftEnd: E };
|
|
3751
|
+
}
|
|
3752
|
+
async function Ve(t, e = {}) {
|
|
3753
|
+
const a = e.crop || { x: 0, y: 0, w: 1, h: 1 }, o = Math.max(1, Number(e.maxEdge) || 2048), i = e.webpQuality ?? 0.82, n = await Rn(t), s = Math.round(a.x * n.width), l = Math.round(a.y * n.height), c = Math.max(1, Math.round(a.w * n.width)), d = Math.max(1, Math.round(a.h * n.height)), m = Cn(c, d, o), S = m.width, v = m.height, A = document.createElement("canvas");
|
|
3754
|
+
A.width = S, A.height = v, A.getContext("2d").drawImage(n, s, l, c, d, 0, 0, S, v);
|
|
3755
|
+
const P = await Be(A, "image/webp", i);
|
|
3756
|
+
if (P && P.size > 0 && P.type === "image/webp")
|
|
3757
|
+
return { blob: P, width: S, height: v, mime: "image/webp", ext: "webp" };
|
|
3758
|
+
const u = await Be(A, "image/png");
|
|
3759
|
+
if (!u || !u.size)
|
|
3544
3760
|
throw new Error("Could not encode screenshot");
|
|
3545
|
-
return { blob:
|
|
3761
|
+
return { blob: u, width: S, height: v, mime: "image/png", ext: "png" };
|
|
3546
3762
|
}
|
|
3547
|
-
function
|
|
3548
|
-
const o = Math.max(1, Number(t) || 1), i = Math.max(1, Number(e) || 1),
|
|
3763
|
+
function Cn(t, e, a = 2048) {
|
|
3764
|
+
const o = Math.max(1, Number(t) || 1), i = Math.max(1, Number(e) || 1), n = Math.max(1, Number(a) || 2048), s = Math.min(1, n / Math.max(o, i));
|
|
3549
3765
|
return {
|
|
3550
|
-
width: Math.max(1, Math.round(o *
|
|
3551
|
-
height: Math.max(1, Math.round(i *
|
|
3552
|
-
scale:
|
|
3766
|
+
width: Math.max(1, Math.round(o * s)),
|
|
3767
|
+
height: Math.max(1, Math.round(i * s)),
|
|
3768
|
+
scale: s
|
|
3553
3769
|
};
|
|
3554
3770
|
}
|
|
3555
|
-
function
|
|
3771
|
+
function En(t = 2048) {
|
|
3556
3772
|
const e = Math.floor(Number(t) / 2);
|
|
3557
3773
|
return Math.max(1, Math.min(1024, e || 1024));
|
|
3558
3774
|
}
|
|
3559
|
-
function
|
|
3775
|
+
function zn(t, e = null) {
|
|
3560
3776
|
if ((e == null ? void 0 : e.code) === "payload_too_large" || Number(e == null ? void 0 : e.status) === 413 || Number(t == null ? void 0 : t.status) === 413)
|
|
3561
3777
|
return !0;
|
|
3562
3778
|
const a = String((t == null ? void 0 : t.message) || t || (e == null ? void 0 : e.error) || "").toLowerCase();
|
|
3563
3779
|
return a.includes("failed to fetch") || a.includes("networkerror") || a.includes("load failed") || a.includes("too large") || a.includes("payload") || a.includes("entity too large") ? !0 : Number(t == null ? void 0 : t.status) === 413;
|
|
3564
3780
|
}
|
|
3565
|
-
function
|
|
3781
|
+
function Rn(t) {
|
|
3566
3782
|
return new Promise((e, a) => {
|
|
3567
3783
|
const o = new Image();
|
|
3568
3784
|
o.onload = () => e(o), o.onerror = () => a(new Error("Could not load screenshot")), o.src = t;
|
|
3569
3785
|
});
|
|
3570
3786
|
}
|
|
3571
|
-
function
|
|
3787
|
+
function Be(t, e, a) {
|
|
3572
3788
|
return new Promise((o) => {
|
|
3573
3789
|
try {
|
|
3574
3790
|
t.toBlob((i) => o(i), e, a);
|
|
@@ -3577,7 +3793,7 @@ function je(t, e, a) {
|
|
|
3577
3793
|
}
|
|
3578
3794
|
});
|
|
3579
3795
|
}
|
|
3580
|
-
const
|
|
3796
|
+
const jn = [
|
|
3581
3797
|
"url",
|
|
3582
3798
|
"title",
|
|
3583
3799
|
"userAgent",
|
|
@@ -3588,23 +3804,23 @@ const Xi = [
|
|
|
3588
3804
|
"viewport",
|
|
3589
3805
|
"user"
|
|
3590
3806
|
];
|
|
3591
|
-
function
|
|
3807
|
+
function Pn(t) {
|
|
3592
3808
|
return !t || typeof t != "object" ? !1 : !!(t.userId || t.email || t.displayName);
|
|
3593
3809
|
}
|
|
3594
|
-
function
|
|
3810
|
+
function Ln(t = {}) {
|
|
3595
3811
|
const e = [];
|
|
3596
|
-
for (const a of
|
|
3812
|
+
for (const a of jn) {
|
|
3597
3813
|
const o = t[a];
|
|
3598
|
-
o == null || o === "" || a === "user" && !
|
|
3814
|
+
o == null || o === "" || a === "user" && !Pn(o) || e.push({
|
|
3599
3815
|
key: a,
|
|
3600
|
-
label:
|
|
3816
|
+
label: g(`diag.${a}`),
|
|
3601
3817
|
value: o,
|
|
3602
3818
|
redacted: !1
|
|
3603
3819
|
});
|
|
3604
3820
|
}
|
|
3605
3821
|
return e;
|
|
3606
3822
|
}
|
|
3607
|
-
function
|
|
3823
|
+
function xn(t = []) {
|
|
3608
3824
|
return t.map((e, a) => {
|
|
3609
3825
|
const o = {
|
|
3610
3826
|
id: `log-${a}-${e.at || 0}`,
|
|
@@ -3613,25 +3829,25 @@ function ts(t = []) {
|
|
|
3613
3829
|
at: e.at || 0,
|
|
3614
3830
|
redacted: !1
|
|
3615
3831
|
};
|
|
3616
|
-
return Array.isArray(e.segments) && e.segments.length && (o.segments = e.segments), o;
|
|
3832
|
+
return Number.isFinite(e.t) && (o.t = e.t), e.truncated && (o.truncated = !0), Number.isFinite(e.count) && e.count > 1 && (o.count = e.count), Array.isArray(e.segments) && e.segments.length && (o.segments = e.segments), o;
|
|
3617
3833
|
});
|
|
3618
3834
|
}
|
|
3619
|
-
function
|
|
3835
|
+
function Un(t = []) {
|
|
3620
3836
|
if (!t.length)
|
|
3621
3837
|
return { checked: !0, indeterminate: !1 };
|
|
3622
3838
|
const e = t.filter((a) => !a.redacted).length;
|
|
3623
3839
|
return e === t.length ? { checked: !0, indeterminate: !1 } : e === 0 ? { checked: !1, indeterminate: !1 } : { checked: !1, indeterminate: !0 };
|
|
3624
3840
|
}
|
|
3625
|
-
function
|
|
3841
|
+
function Dt(t, e) {
|
|
3626
3842
|
t.forEach((a) => {
|
|
3627
3843
|
a.redacted = !!e;
|
|
3628
3844
|
});
|
|
3629
3845
|
}
|
|
3630
|
-
function
|
|
3631
|
-
const e = t.diagnostics || [], a = t.logs || [], o = e.some((
|
|
3632
|
-
return o && i ?
|
|
3846
|
+
function Tn(t = {}) {
|
|
3847
|
+
const e = t.diagnostics || [], a = t.logs || [], o = e.some((n) => !n.redacted), i = a.length > 0 && a.some((n) => !n.redacted);
|
|
3848
|
+
return o && i ? g("privacy.disclosure.both") : o ? g("privacy.disclosure.diagnostics") : i ? g("privacy.disclosure.logs") : "";
|
|
3633
3849
|
}
|
|
3634
|
-
function
|
|
3850
|
+
function Fn(t) {
|
|
3635
3851
|
if (t == null)
|
|
3636
3852
|
return "";
|
|
3637
3853
|
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean")
|
|
@@ -3642,7 +3858,7 @@ function os(t) {
|
|
|
3642
3858
|
return String(t);
|
|
3643
3859
|
}
|
|
3644
3860
|
}
|
|
3645
|
-
function
|
|
3861
|
+
function Mn(t = {}) {
|
|
3646
3862
|
const e = {};
|
|
3647
3863
|
t.author != null && t.author !== "" && (e.author = t.author);
|
|
3648
3864
|
for (const o of t.diagnostics || [])
|
|
@@ -3653,67 +3869,67 @@ function is(t = {}) {
|
|
|
3653
3869
|
text: o.text,
|
|
3654
3870
|
at: o.at
|
|
3655
3871
|
};
|
|
3656
|
-
return Array.isArray(o.segments) && o.segments.length && (i.segments = o.segments), i;
|
|
3872
|
+
return Number.isFinite(o.t) && (i.t = o.t), o.truncated && (i.truncated = !0), Number.isFinite(o.count) && o.count > 1 && (i.count = o.count), Array.isArray(o.segments) && o.segments.length && (i.segments = o.segments), i;
|
|
3657
3873
|
});
|
|
3658
3874
|
return e.console = a, e;
|
|
3659
3875
|
}
|
|
3660
|
-
const
|
|
3876
|
+
const Q = [
|
|
3661
3877
|
{ id: "bug", label: "Bug" },
|
|
3662
3878
|
{ id: "idea", label: "Idea" },
|
|
3663
3879
|
{ id: "other", label: "Other" }
|
|
3664
3880
|
];
|
|
3665
|
-
function
|
|
3881
|
+
function Ne(t) {
|
|
3666
3882
|
return String(t || "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32);
|
|
3667
3883
|
}
|
|
3668
|
-
function
|
|
3884
|
+
function Rt(t) {
|
|
3669
3885
|
const e = String(t || "").trim();
|
|
3670
3886
|
return e ? e.split(/[-_\s]+/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ") : "";
|
|
3671
3887
|
}
|
|
3672
|
-
function
|
|
3888
|
+
function Dn(t) {
|
|
3673
3889
|
if (!Array.isArray(t) || !t.length)
|
|
3674
|
-
return
|
|
3890
|
+
return Q.map((o) => ({ ...o }));
|
|
3675
3891
|
const e = /* @__PURE__ */ new Set(), a = [];
|
|
3676
3892
|
for (const o of t) {
|
|
3677
|
-
let i = "",
|
|
3678
|
-
if (typeof o == "string" || typeof o == "number" ? (i =
|
|
3893
|
+
let i = "", n = "", s = "", l = "";
|
|
3894
|
+
if (typeof o == "string" || typeof o == "number" ? (i = Ne(o), n = Rt(i)) : o && typeof o == "object" && (i = Ne(o.id ?? o.value ?? o.kind), n = String(o.label || o.name || Rt(i)).trim() || Rt(i), s = String(o.title || "").trim(), l = String(o.description || o.intro || "").trim()), !i || e.has(i))
|
|
3679
3895
|
continue;
|
|
3680
3896
|
e.add(i);
|
|
3681
|
-
const
|
|
3682
|
-
|
|
3897
|
+
const c = { id: i, label: n };
|
|
3898
|
+
s && (c.title = s), l && (c.description = l), a.push(c);
|
|
3683
3899
|
}
|
|
3684
|
-
return a.length ? a :
|
|
3900
|
+
return a.length ? a : Q.map((o) => ({ ...o }));
|
|
3685
3901
|
}
|
|
3686
|
-
function
|
|
3902
|
+
function Nt(t) {
|
|
3687
3903
|
var a;
|
|
3688
|
-
return ((a = (Array.isArray(t) && t.length ? t :
|
|
3904
|
+
return ((a = (Array.isArray(t) && t.length ? t : Q)[0]) == null ? void 0 : a.id) || "other";
|
|
3689
3905
|
}
|
|
3690
|
-
const
|
|
3906
|
+
const In = ["maker", "all-business", "brighter-day", "quiet-night"], ma = "maker", On = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), ee = 0.02, Ke = 0.05, $n = `
|
|
3691
3907
|
<svg class="nf-launcher-icon" viewBox="0 0 24 24" aria-hidden="true">
|
|
3692
3908
|
<path fill="currentColor" d="M5.2 2.8h9.1A2.7 2.7 0 0 1 17 5.5v8.2c0 .4-.3.7-.7.7h-.1a.7.7 0 0 1-.7-.7V5.5c0-.7-.6-1.3-1.3-1.3H5.2c-.7 0-1.3.6-1.3 1.3v12.2c0 .7.6 1.3 1.3 1.3h6.4a.7.7 0 0 1 0 1.4H5.2A2.7 2.7 0 0 1 2.5 17.7V5.5A2.7 2.7 0 0 1 5.2 2.8zm1.6 4.2a.7.7 0 0 0 0 1.4h6.2a.7.7 0 0 0 0-1.4H6.8zm0 3.2a.7.7 0 0 0 0 1.4h6.2a.7.7 0 0 0 0-1.4H6.8zm0 3.2a.7.7 0 0 0 0 1.4h3.6a.7.7 0 0 0 0-1.4H6.8z"/>
|
|
3693
3909
|
<path fill="currentColor" d="M14.7 13.05 20.2 7.55a1.55 1.55 0 0 1 2.2 2.2l-5.5 5.5-.45 1.9a.6.6 0 0 1-.72.45l-1.9-.45.87-1.9z"/>
|
|
3694
3910
|
</svg>
|
|
3695
3911
|
`;
|
|
3696
|
-
function
|
|
3912
|
+
function M(t) {
|
|
3697
3913
|
return `<svg class="nf-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${t}</svg>`;
|
|
3698
3914
|
}
|
|
3699
|
-
const
|
|
3700
|
-
crop:
|
|
3701
|
-
resetCrop:
|
|
3702
|
-
arrow:
|
|
3703
|
-
rect:
|
|
3704
|
-
circle:
|
|
3705
|
-
discard:
|
|
3706
|
-
recapture:
|
|
3707
|
-
privacy:
|
|
3708
|
-
audio:
|
|
3709
|
-
video:
|
|
3915
|
+
const U = {
|
|
3916
|
+
crop: M('<path d="M6 3v5H1M18 21v-5h5M8 5h8a2 2 0 0 1 2 2v8M16 19H8a2 2 0 0 1-2-2V8"/>'),
|
|
3917
|
+
resetCrop: M('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),
|
|
3918
|
+
arrow: M('<path d="M5 19 19 5"/><path d="M9 5h10v10"/>'),
|
|
3919
|
+
rect: M('<rect x="4" y="6" width="16" height="12" rx="1.5"/>'),
|
|
3920
|
+
circle: M('<circle cx="12" cy="12" r="8"/>'),
|
|
3921
|
+
discard: M('<path d="M4 7h16"/><path d="M9 7V5h6v2"/><path d="M6 7l1 13h10l1-13"/>'),
|
|
3922
|
+
recapture: M('<path d="M4 8h3l2-2h6l2 2h3v11H4z"/><circle cx="12" cy="13" r="3.5"/>'),
|
|
3923
|
+
privacy: M('<path d="M8 6h13M8 12h13M8 18h13"/><path d="M3 6h.01M3 12h.01M3 18h.01"/>'),
|
|
3924
|
+
audio: M('<rect x="9" y="3" width="6" height="11" rx="3"/><path d="M5 11a7 7 0 0 0 14 0"/><path d="M12 18v3"/>'),
|
|
3925
|
+
video: M('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>'),
|
|
3710
3926
|
stop: '<svg class="nf-icon" viewBox="0 0 24 24" fill="currentColor" stroke="none" aria-hidden="true"><rect x="7" y="7" width="10" height="10" rx="1.5"/></svg>',
|
|
3711
|
-
openArrow:
|
|
3712
|
-
close:
|
|
3713
|
-
},
|
|
3714
|
-
|
|
3715
|
-
const
|
|
3716
|
-
let
|
|
3927
|
+
openArrow: M('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>'),
|
|
3928
|
+
close: M('<path d="M6 6l12 12M18 6 6 18"/>')
|
|
3929
|
+
}, ot = hn();
|
|
3930
|
+
ot.hook();
|
|
3931
|
+
const ha = 10, Vn = 80, fa = "notefully.author", ya = "notefully.kind", va = "notefully.launcherCorner", ka = "notefully.redactSections", dt = 48, Bn = 6, At = ["tl", "tr", "bl", "br"];
|
|
3932
|
+
let p = {
|
|
3717
3933
|
endpoint: "",
|
|
3718
3934
|
projectKey: "",
|
|
3719
3935
|
version: "0.0.0",
|
|
@@ -3722,10 +3938,13 @@ let c = {
|
|
|
3722
3938
|
hideLauncher: !1,
|
|
3723
3939
|
/** Initial dock corner when localStorage has none: tl | tr | bl | br */
|
|
3724
3940
|
launcherCorner: null,
|
|
3725
|
-
theme:
|
|
3941
|
+
theme: ma,
|
|
3726
3942
|
video: !1,
|
|
3727
|
-
consoleLogLimit:
|
|
3728
|
-
|
|
3943
|
+
consoleLogLimit: ha,
|
|
3944
|
+
consoleMethods: ce(),
|
|
3945
|
+
scrubLog: Ft,
|
|
3946
|
+
logSources: null,
|
|
3947
|
+
kinds: Q.map((t) => ({ ...t })),
|
|
3729
3948
|
kindsCustom: !1,
|
|
3730
3949
|
capture: null,
|
|
3731
3950
|
onBeforeCapture: null,
|
|
@@ -3734,26 +3953,26 @@ let c = {
|
|
|
3734
3953
|
displayLink: !1,
|
|
3735
3954
|
locale: null,
|
|
3736
3955
|
translations: null
|
|
3737
|
-
},
|
|
3738
|
-
function
|
|
3739
|
-
return
|
|
3956
|
+
}, vt = !1, Wt = !1, _ = {}, b = null, r = {}, j = ue(), W = "", gt = "", G = null, q = Nt(Q), tt = null, V = null, x = null, L = null, zt = null, X = null, N = null, it = !1, D = null, ae = !1, ft = { w: 0, h: 0 }, Zt = !1, kt = !1, bt = !1, H = [], K = [], J = !1;
|
|
3957
|
+
function y(t) {
|
|
3958
|
+
return b.querySelector(t);
|
|
3740
3959
|
}
|
|
3741
|
-
function
|
|
3960
|
+
function ba(t) {
|
|
3742
3961
|
const e = String(t || "").trim().toLowerCase().replace(/\s+/g, "-");
|
|
3743
|
-
return
|
|
3962
|
+
return In.includes(e) ? e : ma;
|
|
3744
3963
|
}
|
|
3745
|
-
function
|
|
3746
|
-
|
|
3747
|
-
|
|
3964
|
+
function z(t, e = !1) {
|
|
3965
|
+
r.status && (r.status.textContent = t || "", zt && (clearTimeout(zt), zt = null), t && !e && (zt = setTimeout(() => {
|
|
3966
|
+
r.status.textContent = "";
|
|
3748
3967
|
}, 4e3)));
|
|
3749
3968
|
}
|
|
3750
|
-
function
|
|
3751
|
-
return
|
|
3752
|
-
<button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${
|
|
3969
|
+
function de() {
|
|
3970
|
+
return b && document.body.contains(b) || (b = document.createElement("div"), b.id = "notefully", b.innerHTML = `
|
|
3971
|
+
<button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${$n}</button>
|
|
3753
3972
|
<div class="nf-dialog" hidden>
|
|
3754
3973
|
<div class="nf-panel">
|
|
3755
3974
|
<div class="nf-pill nf-close-pill">
|
|
3756
|
-
<button class="nf-close nf-icon-btn" type="button" data-i18n-title="form.close" data-i18n-aria="form.close">${
|
|
3975
|
+
<button class="nf-close nf-icon-btn" type="button" data-i18n-title="form.close" data-i18n-aria="form.close">${U.close}</button>
|
|
3757
3976
|
</div>
|
|
3758
3977
|
<div class="nf-panel-body">
|
|
3759
3978
|
<div class="nf-heading">
|
|
@@ -3767,15 +3986,15 @@ function ae() {
|
|
|
3767
3986
|
<div class="nf-canvas"></div>
|
|
3768
3987
|
<div class="nf-palette">
|
|
3769
3988
|
<div class="nf-palette-tools">
|
|
3770
|
-
<button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${
|
|
3771
|
-
<button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${
|
|
3772
|
-
<button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${
|
|
3773
|
-
<button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${
|
|
3774
|
-
<button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${
|
|
3989
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${U.crop}</button>
|
|
3990
|
+
<button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${U.resetCrop}</button>
|
|
3991
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${U.arrow}</button>
|
|
3992
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${U.rect}</button>
|
|
3993
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${U.circle}</button>
|
|
3775
3994
|
</div>
|
|
3776
3995
|
<div class="nf-palette-shot">
|
|
3777
|
-
<button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${
|
|
3778
|
-
<button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${
|
|
3996
|
+
<button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${U.recapture}</button>
|
|
3997
|
+
<button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${U.discard}</button>
|
|
3779
3998
|
</div>
|
|
3780
3999
|
</div>
|
|
3781
4000
|
</div>
|
|
@@ -3788,7 +4007,7 @@ function ae() {
|
|
|
3788
4007
|
<div class="nf-privacy-summary">
|
|
3789
4008
|
<span class="nf-privacy-text"></span>
|
|
3790
4009
|
<div class="nf-pill nf-privacy-toggle-pill">
|
|
3791
|
-
<button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${
|
|
4010
|
+
<button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${U.privacy}</button>
|
|
3792
4011
|
</div>
|
|
3793
4012
|
</div>
|
|
3794
4013
|
</div>
|
|
@@ -3799,10 +4018,10 @@ function ae() {
|
|
|
3799
4018
|
</div>
|
|
3800
4019
|
</div>
|
|
3801
4020
|
<div class="nf-actions">
|
|
3802
|
-
<button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${
|
|
4021
|
+
<button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${U.resetCrop}</button>
|
|
3803
4022
|
<div class="nf-actions-media">
|
|
3804
|
-
<button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${
|
|
3805
|
-
<button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${
|
|
4023
|
+
<button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${U.audio}</button>
|
|
4024
|
+
<button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${U.video}</button>
|
|
3806
4025
|
</div>
|
|
3807
4026
|
<div class="nf-pill nf-submit-pill">
|
|
3808
4027
|
<button class="nf-submit" type="button" data-i18n-text="form.submit"></button>
|
|
@@ -3814,192 +4033,192 @@ function ae() {
|
|
|
3814
4033
|
<p class="nf-success-msg" hidden aria-live="polite" data-i18n-text="form.success"></p>
|
|
3815
4034
|
<a class="nf-success-link" hidden target="_blank" rel="noopener noreferrer" data-i18n-aria="form.viewReport">
|
|
3816
4035
|
<span class="nf-success-link-label" data-i18n-text="form.viewReport"></span>
|
|
3817
|
-
${
|
|
4036
|
+
${U.openArrow}
|
|
3818
4037
|
</a>
|
|
3819
4038
|
</div>
|
|
3820
4039
|
</div>
|
|
3821
|
-
<button class="nf-stop-video nf-icon-btn" type="button" hidden data-i18n-title="tool.stopVideo" data-i18n-aria="tool.stopVideo">${
|
|
3822
|
-
`, document.body.appendChild(
|
|
3823
|
-
launcher:
|
|
3824
|
-
dialog:
|
|
3825
|
-
panel:
|
|
3826
|
-
close:
|
|
3827
|
-
panelBody:
|
|
3828
|
-
heading:
|
|
3829
|
-
title:
|
|
3830
|
-
intro:
|
|
3831
|
-
successMsg:
|
|
3832
|
-
successLink:
|
|
3833
|
-
stage:
|
|
3834
|
-
shotBlock:
|
|
3835
|
-
palette:
|
|
3836
|
-
paletteTools:
|
|
3837
|
-
paletteShot:
|
|
3838
|
-
canvas:
|
|
3839
|
-
text:
|
|
3840
|
-
author:
|
|
3841
|
-
privacyStack:
|
|
3842
|
-
kindRow:
|
|
3843
|
-
kind:
|
|
3844
|
-
privacy:
|
|
3845
|
-
privacySummary:
|
|
3846
|
-
privacyText:
|
|
3847
|
-
privacyChange:
|
|
3848
|
-
privacyPanel:
|
|
3849
|
-
privacyScroll:
|
|
3850
|
-
actions:
|
|
3851
|
-
actionsMedia:
|
|
3852
|
-
restore:
|
|
3853
|
-
status:
|
|
3854
|
-
audio:
|
|
3855
|
-
video:
|
|
3856
|
-
discard:
|
|
3857
|
-
recapture:
|
|
3858
|
-
stop:
|
|
3859
|
-
resetCrop:
|
|
3860
|
-
submit:
|
|
4040
|
+
<button class="nf-stop-video nf-icon-btn" type="button" hidden data-i18n-title="tool.stopVideo" data-i18n-aria="tool.stopVideo">${U.stop}</button>
|
|
4041
|
+
`, document.body.appendChild(b), r = {
|
|
4042
|
+
launcher: y(".nf-launcher"),
|
|
4043
|
+
dialog: y(".nf-dialog"),
|
|
4044
|
+
panel: y(".nf-panel"),
|
|
4045
|
+
close: y(".nf-close"),
|
|
4046
|
+
panelBody: y(".nf-panel-body"),
|
|
4047
|
+
heading: y(".nf-heading"),
|
|
4048
|
+
title: y(".nf-title"),
|
|
4049
|
+
intro: y(".nf-intro"),
|
|
4050
|
+
successMsg: y(".nf-success-msg"),
|
|
4051
|
+
successLink: y(".nf-success-link"),
|
|
4052
|
+
stage: y(".nf-stage"),
|
|
4053
|
+
shotBlock: y(".nf-shot-block"),
|
|
4054
|
+
palette: y(".nf-palette"),
|
|
4055
|
+
paletteTools: y(".nf-palette-tools"),
|
|
4056
|
+
paletteShot: y(".nf-palette-shot"),
|
|
4057
|
+
canvas: y(".nf-canvas"),
|
|
4058
|
+
text: y(".nf-text"),
|
|
4059
|
+
author: y(".nf-author"),
|
|
4060
|
+
privacyStack: y(".nf-privacy-stack"),
|
|
4061
|
+
kindRow: y(".nf-kind-row"),
|
|
4062
|
+
kind: y(".nf-kind"),
|
|
4063
|
+
privacy: y(".nf-privacy"),
|
|
4064
|
+
privacySummary: y(".nf-privacy-summary"),
|
|
4065
|
+
privacyText: y(".nf-privacy-text"),
|
|
4066
|
+
privacyChange: y(".nf-privacy-change"),
|
|
4067
|
+
privacyPanel: y(".nf-privacy-panel"),
|
|
4068
|
+
privacyScroll: y(".nf-privacy-scroll"),
|
|
4069
|
+
actions: y(".nf-actions"),
|
|
4070
|
+
actionsMedia: y(".nf-actions-media"),
|
|
4071
|
+
restore: y(".nf-restore"),
|
|
4072
|
+
status: y(".nf-status"),
|
|
4073
|
+
audio: y(".nf-audio"),
|
|
4074
|
+
video: y(".nf-video"),
|
|
4075
|
+
discard: y(".nf-discard-shot"),
|
|
4076
|
+
recapture: y(".nf-recapture"),
|
|
4077
|
+
stop: y(".nf-stop-video"),
|
|
4078
|
+
resetCrop: y(".nf-reset-crop"),
|
|
4079
|
+
submit: y(".nf-submit"),
|
|
3861
4080
|
shot: null
|
|
3862
|
-
},
|
|
4081
|
+
}, Xn(), mt()), b;
|
|
3863
4082
|
}
|
|
3864
|
-
function
|
|
4083
|
+
function mt() {
|
|
3865
4084
|
var t;
|
|
3866
|
-
|
|
3867
|
-
e.label =
|
|
3868
|
-
}),
|
|
4085
|
+
b && (wa(), b.dataset.theme = ba(p.theme), b.lang = Lt(), b.dir = Xa(Lt()), p.hideLauncher ? b.setAttribute("data-nf-hidden-launcher", "") : b.removeAttribute("data-nf-hidden-launcher"), r.video && (r.video.hidden = !p.video), Nn(), H.length && H.forEach((e) => {
|
|
4086
|
+
e.label = g(`diag.${e.key}`);
|
|
4087
|
+
}), Ea(), J ? be() : ke(), ge(Aa()), (t = r.dialog) != null && t.hidden && It());
|
|
3869
4088
|
}
|
|
3870
|
-
function
|
|
3871
|
-
const t =
|
|
3872
|
-
locale:
|
|
4089
|
+
function wa() {
|
|
4090
|
+
const t = Wa({
|
|
4091
|
+
locale: p.locale == null ? void 0 : p.locale
|
|
3873
4092
|
});
|
|
3874
|
-
|
|
3875
|
-
}
|
|
3876
|
-
function
|
|
3877
|
-
if (
|
|
3878
|
-
if (
|
|
3879
|
-
t.title =
|
|
3880
|
-
}),
|
|
3881
|
-
t.setAttribute("aria-label",
|
|
3882
|
-
}),
|
|
3883
|
-
t.setAttribute("placeholder",
|
|
3884
|
-
}),
|
|
3885
|
-
t.textContent =
|
|
3886
|
-
}),
|
|
3887
|
-
const t =
|
|
3888
|
-
|
|
4093
|
+
Ya(p.translations), Za(t);
|
|
4094
|
+
}
|
|
4095
|
+
function Nn() {
|
|
4096
|
+
if (b) {
|
|
4097
|
+
if (b.querySelectorAll("[data-i18n-title]").forEach((t) => {
|
|
4098
|
+
t.title = g(t.getAttribute("data-i18n-title"));
|
|
4099
|
+
}), b.querySelectorAll("[data-i18n-aria]").forEach((t) => {
|
|
4100
|
+
t.setAttribute("aria-label", g(t.getAttribute("data-i18n-aria")));
|
|
4101
|
+
}), b.querySelectorAll("[data-i18n-placeholder]").forEach((t) => {
|
|
4102
|
+
t.setAttribute("placeholder", g(t.getAttribute("data-i18n-placeholder")));
|
|
4103
|
+
}), b.querySelectorAll("[data-i18n-text]").forEach((t) => {
|
|
4104
|
+
t.textContent = g(t.getAttribute("data-i18n-text"));
|
|
4105
|
+
}), r.audio) {
|
|
4106
|
+
const t = r.audio.dataset.active === "true";
|
|
4107
|
+
St(t);
|
|
3889
4108
|
}
|
|
3890
|
-
|
|
4109
|
+
he();
|
|
3891
4110
|
}
|
|
3892
4111
|
}
|
|
3893
|
-
function
|
|
3894
|
-
if (
|
|
4112
|
+
function Sa(t) {
|
|
4113
|
+
if (p.kindsCustom)
|
|
3895
4114
|
return t.label;
|
|
3896
|
-
const e = `kind.${t.id}`, a =
|
|
4115
|
+
const e = `kind.${t.id}`, a = g(e);
|
|
3897
4116
|
return a === e ? t.label : a;
|
|
3898
4117
|
}
|
|
3899
|
-
function
|
|
3900
|
-
|
|
4118
|
+
function It() {
|
|
4119
|
+
r.launcher && (r.launcher.hidden = !!p.hideLauncher);
|
|
3901
4120
|
}
|
|
3902
|
-
function
|
|
4121
|
+
function pe(t) {
|
|
3903
4122
|
const e = String(t || "").trim().toLowerCase();
|
|
3904
|
-
return
|
|
4123
|
+
return At.includes(e) ? e : "";
|
|
3905
4124
|
}
|
|
3906
|
-
function
|
|
4125
|
+
function Kn() {
|
|
3907
4126
|
try {
|
|
3908
|
-
return
|
|
4127
|
+
return pe(localStorage.getItem(va));
|
|
3909
4128
|
} catch {
|
|
3910
4129
|
return "";
|
|
3911
4130
|
}
|
|
3912
4131
|
}
|
|
3913
|
-
function
|
|
3914
|
-
if (
|
|
4132
|
+
function Hn(t) {
|
|
4133
|
+
if (At.includes(t))
|
|
3915
4134
|
try {
|
|
3916
|
-
localStorage.setItem(
|
|
4135
|
+
localStorage.setItem(va, t);
|
|
3917
4136
|
} catch {
|
|
3918
4137
|
}
|
|
3919
4138
|
}
|
|
3920
|
-
function
|
|
3921
|
-
return
|
|
4139
|
+
function Aa() {
|
|
4140
|
+
return Kn() || pe(p.launcherCorner) || "bl";
|
|
3922
4141
|
}
|
|
3923
|
-
function
|
|
3924
|
-
!
|
|
4142
|
+
function ge(t, e = !1) {
|
|
4143
|
+
!r.launcher || !At.includes(t) || (r.launcher.dataset.corner = t, e && Hn(t));
|
|
3925
4144
|
}
|
|
3926
|
-
function
|
|
3927
|
-
if (!
|
|
4145
|
+
function _n() {
|
|
4146
|
+
if (!r.launcher)
|
|
3928
4147
|
return 16;
|
|
3929
|
-
const t = getComputedStyle(
|
|
4148
|
+
const t = getComputedStyle(r.launcher).getPropertyValue("--nf-launcher-inset").trim() || getComputedStyle(b).getPropertyValue("--nf-launcher-inset").trim() || "16px", e = Number.parseFloat(t);
|
|
3930
4149
|
return Number.isFinite(e) ? e : 16;
|
|
3931
4150
|
}
|
|
3932
|
-
function
|
|
3933
|
-
const e =
|
|
4151
|
+
function Gn(t) {
|
|
4152
|
+
const e = _n(), a = window.innerWidth, o = window.innerHeight;
|
|
3934
4153
|
switch (t) {
|
|
3935
4154
|
case "tl":
|
|
3936
4155
|
return { x: e, y: e };
|
|
3937
4156
|
case "tr":
|
|
3938
|
-
return { x: a - e -
|
|
4157
|
+
return { x: a - e - dt, y: e };
|
|
3939
4158
|
case "br":
|
|
3940
|
-
return { x: a - e -
|
|
4159
|
+
return { x: a - e - dt, y: o - e - dt };
|
|
3941
4160
|
case "bl":
|
|
3942
4161
|
default:
|
|
3943
|
-
return { x: e, y: o - e -
|
|
4162
|
+
return { x: e, y: o - e - dt };
|
|
3944
4163
|
}
|
|
3945
4164
|
}
|
|
3946
|
-
function
|
|
4165
|
+
function qn(t, e) {
|
|
3947
4166
|
var i;
|
|
3948
|
-
let a = ((i =
|
|
3949
|
-
for (const
|
|
3950
|
-
const
|
|
3951
|
-
d > o && (o = d, a =
|
|
4167
|
+
let a = ((i = r.launcher) == null ? void 0 : i.dataset.corner) || "bl", o = -1 / 0;
|
|
4168
|
+
for (const n of At) {
|
|
4169
|
+
const s = Gn(n), l = Math.hypot(t.x - s.x, t.y - s.y), c = Math.hypot(e.x - s.x, e.y - s.y), d = l - c;
|
|
4170
|
+
d > o && (o = d, a = n);
|
|
3952
4171
|
}
|
|
3953
4172
|
return a;
|
|
3954
4173
|
}
|
|
3955
|
-
function
|
|
3956
|
-
|
|
4174
|
+
function Ca() {
|
|
4175
|
+
r.launcher && (r.launcher.style.left = "", r.launcher.style.top = "", r.launcher.style.right = "", r.launcher.style.bottom = "", r.launcher.style.transform = "", r.launcher.style.transition = "");
|
|
3957
4176
|
}
|
|
3958
|
-
function
|
|
3959
|
-
if (!
|
|
4177
|
+
function Wn(t, e) {
|
|
4178
|
+
if (!r.launcher)
|
|
3960
4179
|
return;
|
|
3961
|
-
const a = Math.max(0, window.innerWidth -
|
|
3962
|
-
|
|
4180
|
+
const a = Math.max(0, window.innerWidth - dt), o = Math.max(0, window.innerHeight - dt), i = Math.min(a, Math.max(0, t)), n = Math.min(o, Math.max(0, e));
|
|
4181
|
+
r.launcher.style.right = "auto", r.launcher.style.bottom = "auto", r.launcher.style.left = `${i}px`, r.launcher.style.top = `${n}px`;
|
|
3963
4182
|
}
|
|
3964
|
-
function
|
|
3965
|
-
const e =
|
|
3966
|
-
if (!e || !
|
|
4183
|
+
function Zn(t) {
|
|
4184
|
+
const e = r.launcher;
|
|
4185
|
+
if (!e || !At.includes(t))
|
|
3967
4186
|
return;
|
|
3968
4187
|
const a = e.getBoundingClientRect();
|
|
3969
|
-
|
|
3970
|
-
const o = e.getBoundingClientRect(), i = a.left - o.left,
|
|
3971
|
-
Math.abs(i) < 0.5 && Math.abs(
|
|
4188
|
+
Ca(), ge(t, !0);
|
|
4189
|
+
const o = e.getBoundingClientRect(), i = a.left - o.left, n = a.top - o.top;
|
|
4190
|
+
Math.abs(i) < 0.5 && Math.abs(n) < 0.5 || (e.style.transition = "none", e.style.transform = `translate(${i}px, ${n}px)`, e.getBoundingClientRect(), requestAnimationFrame(() => {
|
|
3972
4191
|
e.style.transition = "transform 0.42s cubic-bezier(0.22, 1, 0.36, 1)", e.style.transform = "";
|
|
3973
|
-
const
|
|
3974
|
-
l && l.propertyName && l.propertyName !== "transform" || (e.removeEventListener("transitionend",
|
|
4192
|
+
const s = (l) => {
|
|
4193
|
+
l && l.propertyName && l.propertyName !== "transform" || (e.removeEventListener("transitionend", s), e.style.transition = "", e.style.transform = "");
|
|
3975
4194
|
};
|
|
3976
|
-
e.addEventListener("transitionend",
|
|
4195
|
+
e.addEventListener("transitionend", s), window.setTimeout(s, 500);
|
|
3977
4196
|
}));
|
|
3978
4197
|
}
|
|
3979
|
-
function
|
|
3980
|
-
if (!
|
|
4198
|
+
function He(t) {
|
|
4199
|
+
if (!D || !r.launcher)
|
|
3981
4200
|
return;
|
|
3982
|
-
const e =
|
|
3983
|
-
|
|
4201
|
+
const e = D;
|
|
4202
|
+
D = null, r.launcher.dataset.dragging = "false";
|
|
3984
4203
|
try {
|
|
3985
|
-
|
|
4204
|
+
r.launcher.releasePointerCapture(e.pointerId);
|
|
3986
4205
|
} catch {
|
|
3987
4206
|
}
|
|
3988
4207
|
if (!e.moved) {
|
|
3989
|
-
|
|
4208
|
+
Ca();
|
|
3990
4209
|
return;
|
|
3991
4210
|
}
|
|
3992
|
-
|
|
3993
|
-
const a =
|
|
3994
|
-
|
|
4211
|
+
ae = !0;
|
|
4212
|
+
const a = r.launcher.getBoundingClientRect(), o = { x: a.left, y: a.top }, i = { x: e.originX, y: e.originY }, n = qn(i, o);
|
|
4213
|
+
Zn(n);
|
|
3995
4214
|
}
|
|
3996
|
-
function
|
|
3997
|
-
const t =
|
|
4215
|
+
function Yn() {
|
|
4216
|
+
const t = r.launcher;
|
|
3998
4217
|
!t || t.dataset.nfDragBound === "true" || (t.dataset.nfDragBound = "true", t.addEventListener("pointerdown", (e) => {
|
|
3999
|
-
if (e.button != null && e.button !== 0 ||
|
|
4218
|
+
if (e.button != null && e.button !== 0 || p.hideLauncher || t.hidden)
|
|
4000
4219
|
return;
|
|
4001
4220
|
const a = t.getBoundingClientRect();
|
|
4002
|
-
|
|
4221
|
+
D = {
|
|
4003
4222
|
pointerId: e.pointerId,
|
|
4004
4223
|
startX: e.clientX,
|
|
4005
4224
|
startY: e.clientY,
|
|
@@ -4008,209 +4227,209 @@ function ks() {
|
|
|
4008
4227
|
moved: !1
|
|
4009
4228
|
}, t.setPointerCapture(e.pointerId);
|
|
4010
4229
|
}), t.addEventListener("pointermove", (e) => {
|
|
4011
|
-
if (!
|
|
4230
|
+
if (!D || e.pointerId !== D.pointerId)
|
|
4012
4231
|
return;
|
|
4013
|
-
const a = e.clientX -
|
|
4014
|
-
if (!
|
|
4015
|
-
if (Math.hypot(a, o) <
|
|
4232
|
+
const a = e.clientX - D.startX, o = e.clientY - D.startY;
|
|
4233
|
+
if (!D.moved) {
|
|
4234
|
+
if (Math.hypot(a, o) < Bn)
|
|
4016
4235
|
return;
|
|
4017
|
-
|
|
4236
|
+
D.moved = !0, t.dataset.dragging = "true";
|
|
4018
4237
|
}
|
|
4019
|
-
|
|
4020
|
-
}), t.addEventListener("pointerup",
|
|
4238
|
+
Wn(D.originX + a, D.originY + o);
|
|
4239
|
+
}), t.addEventListener("pointerup", He), t.addEventListener("pointercancel", He));
|
|
4021
4240
|
}
|
|
4022
|
-
function
|
|
4241
|
+
function Xn() {
|
|
4023
4242
|
var e;
|
|
4024
|
-
|
|
4025
|
-
if (
|
|
4026
|
-
a.preventDefault(), a.stopPropagation(),
|
|
4243
|
+
r.launcher.addEventListener("click", (a) => {
|
|
4244
|
+
if (ae) {
|
|
4245
|
+
a.preventDefault(), a.stopPropagation(), ae = !1;
|
|
4027
4246
|
return;
|
|
4028
4247
|
}
|
|
4029
|
-
|
|
4030
|
-
}),
|
|
4031
|
-
|
|
4032
|
-
}), (e =
|
|
4033
|
-
|
|
4034
|
-
}), document.addEventListener("keydown",
|
|
4035
|
-
a.addEventListener("click", () =>
|
|
4036
|
-
}),
|
|
4037
|
-
const t =
|
|
4248
|
+
Ba();
|
|
4249
|
+
}), Yn(), ge(Aa()), y(".nf-dialog").addEventListener("click", (a) => {
|
|
4250
|
+
kt && !bt || a.target === r.dialog && nt();
|
|
4251
|
+
}), (e = r.close) == null || e.addEventListener("click", () => {
|
|
4252
|
+
kt && !bt || nt();
|
|
4253
|
+
}), document.addEventListener("keydown", Ia), b.querySelectorAll(".nf-tool").forEach((a) => {
|
|
4254
|
+
a.addEventListener("click", () => wt(a.dataset.tool));
|
|
4255
|
+
}), r.resetCrop.addEventListener("click", cr), r.canvas.addEventListener("pointerdown", ir), r.canvas.addEventListener("dragstart", (a) => a.preventDefault());
|
|
4256
|
+
const t = y(".nf-kind");
|
|
4038
4257
|
t && t.addEventListener("click", (a) => {
|
|
4039
4258
|
const o = a.target.closest("[data-kind]");
|
|
4040
|
-
o &&
|
|
4041
|
-
}),
|
|
4042
|
-
|
|
4043
|
-
}),
|
|
4044
|
-
|
|
4045
|
-
}),
|
|
4046
|
-
|
|
4047
|
-
}),
|
|
4048
|
-
}
|
|
4049
|
-
function
|
|
4259
|
+
o && me(o.dataset.kind);
|
|
4260
|
+
}), r.discard.addEventListener("click", ur), r.recapture.addEventListener("click", () => {
|
|
4261
|
+
pr().catch((a) => z(a.message || g("status.recaptureFailed")));
|
|
4262
|
+
}), r.restore.addEventListener("click", dr), r.audio.addEventListener("click", gr), r.video.addEventListener("click", () => {
|
|
4263
|
+
mr().catch((a) => z((a == null ? void 0 : a.message) || g("status.screenUnsupported")));
|
|
4264
|
+
}), r.stop.addEventListener("click", () => N == null ? void 0 : N.stop()), r.privacyChange.addEventListener("click", () => ve(!J)), r.privacyScroll.addEventListener("change", Mr), y(".nf-submit").addEventListener("click", () => {
|
|
4265
|
+
Ka().catch((a) => z(a.message || g("status.submitFailed")));
|
|
4266
|
+
}), Ea(), wt(null);
|
|
4267
|
+
}
|
|
4268
|
+
function I(t) {
|
|
4050
4269
|
return String(t || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
4051
4270
|
}
|
|
4052
|
-
function
|
|
4053
|
-
const t =
|
|
4271
|
+
function Ea() {
|
|
4272
|
+
const t = b == null ? void 0 : b.querySelector(".nf-kind");
|
|
4054
4273
|
if (!t)
|
|
4055
4274
|
return;
|
|
4056
|
-
const e = Array.isArray(
|
|
4057
|
-
t.innerHTML = e.map((i) => `<button type="button" data-kind="${
|
|
4058
|
-
const o = e.map((i) => i.id).includes(
|
|
4059
|
-
|
|
4060
|
-
}
|
|
4061
|
-
function
|
|
4062
|
-
|
|
4063
|
-
a.dataset.active = String(a.dataset.kind ===
|
|
4064
|
-
}),
|
|
4065
|
-
}
|
|
4066
|
-
function
|
|
4067
|
-
return (Array.isArray(
|
|
4068
|
-
}
|
|
4069
|
-
function
|
|
4070
|
-
const t =
|
|
4071
|
-
kind: t ?
|
|
4275
|
+
const e = Array.isArray(p.kinds) && p.kinds.length ? p.kinds : Q;
|
|
4276
|
+
t.innerHTML = e.map((i) => `<button type="button" data-kind="${I(i.id)}">${I(Sa(i))}</button>`).join("");
|
|
4277
|
+
const o = e.map((i) => i.id).includes(q) ? q : Nt(e);
|
|
4278
|
+
me(o);
|
|
4279
|
+
}
|
|
4280
|
+
function me(t) {
|
|
4281
|
+
q = (p.kinds || Q).map((a) => a.id).includes(t) ? t : Nt(p.kinds), b == null || b.querySelectorAll("[data-kind]").forEach((a) => {
|
|
4282
|
+
a.dataset.active = String(a.dataset.kind === q);
|
|
4283
|
+
}), er(q), he();
|
|
4284
|
+
}
|
|
4285
|
+
function Jn() {
|
|
4286
|
+
return (Array.isArray(p.kinds) && p.kinds.length ? p.kinds : Q).find((e) => e.id === q) || null;
|
|
4287
|
+
}
|
|
4288
|
+
function Qn() {
|
|
4289
|
+
const t = Jn(), e = (t == null ? void 0 : t.id) || q || "other", a = e === "bug" || e === "idea" || e === "other", o = (t == null ? void 0 : t.title) && String(t.title).trim() || g(a ? `form.title.${e}` : "form.title.other"), i = (t == null ? void 0 : t.description) && String(t.description).trim() || g(a ? `form.intro.${e}` : "form.intro.other"), n = a ? g(`form.placeholder.${e}`) : g("form.placeholder.custom", {
|
|
4290
|
+
kind: t ? Sa(t) : Rt(e)
|
|
4072
4291
|
});
|
|
4073
|
-
return { title: o, intro: i, placeholder:
|
|
4292
|
+
return { title: o, intro: i, placeholder: n };
|
|
4074
4293
|
}
|
|
4075
|
-
function
|
|
4076
|
-
if (!
|
|
4294
|
+
function he() {
|
|
4295
|
+
if (!r.title && !r.intro && !r.text)
|
|
4077
4296
|
return;
|
|
4078
|
-
const t =
|
|
4079
|
-
|
|
4297
|
+
const t = Qn(), e = B() ? ` ${g("form.screenshotNote")}` : "";
|
|
4298
|
+
r.title && (r.title.textContent = t.title), r.intro && (r.intro.textContent = `${t.intro}${e}`), r.text && r.text.setAttribute("placeholder", t.placeholder);
|
|
4080
4299
|
}
|
|
4081
|
-
function
|
|
4300
|
+
function tr() {
|
|
4082
4301
|
try {
|
|
4083
|
-
return String(localStorage.getItem(
|
|
4302
|
+
return String(localStorage.getItem(ya) || "").trim().toLowerCase();
|
|
4084
4303
|
} catch {
|
|
4085
4304
|
return "";
|
|
4086
4305
|
}
|
|
4087
4306
|
}
|
|
4088
|
-
function
|
|
4307
|
+
function er(t) {
|
|
4089
4308
|
const e = String(t || "").trim().toLowerCase();
|
|
4090
4309
|
if (e)
|
|
4091
4310
|
try {
|
|
4092
|
-
localStorage.setItem(
|
|
4311
|
+
localStorage.setItem(ya, e);
|
|
4093
4312
|
} catch {
|
|
4094
4313
|
}
|
|
4095
4314
|
}
|
|
4096
|
-
function
|
|
4097
|
-
const t = (
|
|
4098
|
-
return e && t.includes(e) ? e :
|
|
4315
|
+
function ar() {
|
|
4316
|
+
const t = (p.kinds || Q).map((a) => a.id), e = tr();
|
|
4317
|
+
return e && t.includes(e) ? e : Nt(p.kinds);
|
|
4099
4318
|
}
|
|
4100
|
-
function
|
|
4101
|
-
|
|
4102
|
-
e.dataset.active = String(e.dataset.tool ===
|
|
4103
|
-
}),
|
|
4319
|
+
function wt(t) {
|
|
4320
|
+
tt = On.has(t) ? t : null, V = null, b.querySelectorAll(".nf-tool").forEach((e) => {
|
|
4321
|
+
e.dataset.active = String(e.dataset.tool === tt);
|
|
4322
|
+
}), r.canvas && (r.canvas.dataset.draw = tt ? "true" : "false"), B() && O();
|
|
4104
4323
|
}
|
|
4105
|
-
function
|
|
4324
|
+
function _e(t) {
|
|
4106
4325
|
return Math.min(1, Math.max(0, t));
|
|
4107
4326
|
}
|
|
4108
|
-
function
|
|
4109
|
-
return
|
|
4327
|
+
function Ct() {
|
|
4328
|
+
return r.shot || r.canvas;
|
|
4110
4329
|
}
|
|
4111
|
-
function
|
|
4112
|
-
const e =
|
|
4330
|
+
function Ot(t) {
|
|
4331
|
+
const e = Ct().getBoundingClientRect();
|
|
4113
4332
|
return {
|
|
4114
|
-
x:
|
|
4115
|
-
y:
|
|
4333
|
+
x: _e((t.clientX - e.left) / Math.max(e.width, 1)),
|
|
4334
|
+
y: _e((t.clientY - e.top) / Math.max(e.height, 1))
|
|
4116
4335
|
};
|
|
4117
4336
|
}
|
|
4118
|
-
function
|
|
4119
|
-
const e =
|
|
4337
|
+
function or(t) {
|
|
4338
|
+
const e = Ct().getBoundingClientRect();
|
|
4120
4339
|
return t.clientX >= e.left && t.clientX <= e.right && t.clientY >= e.top && t.clientY <= e.bottom;
|
|
4121
4340
|
}
|
|
4122
|
-
function
|
|
4123
|
-
const e =
|
|
4341
|
+
function za(t) {
|
|
4342
|
+
const e = Ot(t), a = j.crop();
|
|
4124
4343
|
return {
|
|
4125
4344
|
x: a.x + e.x * a.w,
|
|
4126
4345
|
y: a.y + e.y * a.h
|
|
4127
4346
|
};
|
|
4128
4347
|
}
|
|
4129
|
-
function
|
|
4348
|
+
function Kt(t, e) {
|
|
4130
4349
|
const a = Math.min(t.x, e.x), o = Math.min(t.y, e.y);
|
|
4131
4350
|
return {
|
|
4132
4351
|
x: a,
|
|
4133
4352
|
y: o,
|
|
4134
|
-
w: Math.max(
|
|
4135
|
-
h: Math.max(
|
|
4353
|
+
w: Math.max(ee, Math.abs(e.x - t.x)),
|
|
4354
|
+
h: Math.max(ee, Math.abs(e.y - t.y))
|
|
4136
4355
|
};
|
|
4137
4356
|
}
|
|
4138
|
-
function
|
|
4139
|
-
|
|
4357
|
+
function fe(t) {
|
|
4358
|
+
b && (t ? b.dataset.grabbing = "true" : delete b.dataset.grabbing);
|
|
4140
4359
|
}
|
|
4141
|
-
function
|
|
4360
|
+
function Yt(t) {
|
|
4142
4361
|
try {
|
|
4143
|
-
|
|
4362
|
+
r.canvas.setPointerCapture(t.pointerId);
|
|
4144
4363
|
} catch {
|
|
4145
4364
|
}
|
|
4146
4365
|
}
|
|
4147
|
-
function
|
|
4148
|
-
window.addEventListener("pointermove",
|
|
4366
|
+
function oe() {
|
|
4367
|
+
window.addEventListener("pointermove", ja), window.addEventListener("pointerup", $t), window.addEventListener("pointercancel", $t);
|
|
4149
4368
|
}
|
|
4150
|
-
function
|
|
4151
|
-
window.removeEventListener("pointermove",
|
|
4369
|
+
function Ra() {
|
|
4370
|
+
window.removeEventListener("pointermove", ja), window.removeEventListener("pointerup", $t), window.removeEventListener("pointercancel", $t);
|
|
4152
4371
|
}
|
|
4153
|
-
function
|
|
4154
|
-
if (t.button !== 0 || !
|
|
4372
|
+
function ir(t) {
|
|
4373
|
+
if (t.button !== 0 || !B())
|
|
4155
4374
|
return;
|
|
4156
|
-
if (!t.target.closest(".nf-sticker") && !
|
|
4157
|
-
|
|
4375
|
+
if (!t.target.closest(".nf-sticker") && !or(t)) {
|
|
4376
|
+
V = null, O();
|
|
4158
4377
|
return;
|
|
4159
4378
|
}
|
|
4160
4379
|
const e = t.target.closest(".nf-handle"), a = t.target.closest(".nf-sticker");
|
|
4161
4380
|
if (a && a.dataset.preview !== "true") {
|
|
4162
|
-
t.preventDefault(), t.stopPropagation(),
|
|
4381
|
+
t.preventDefault(), t.stopPropagation(), V = a.dataset.id, Yt(t), nr({
|
|
4163
4382
|
kind: "sticker",
|
|
4164
|
-
id:
|
|
4383
|
+
id: V,
|
|
4165
4384
|
dir: (e == null ? void 0 : e.dataset.dir) || "move"
|
|
4166
4385
|
}, t), O();
|
|
4167
4386
|
return;
|
|
4168
4387
|
}
|
|
4169
|
-
if (
|
|
4170
|
-
t.preventDefault(),
|
|
4388
|
+
if (V = null, tt === "crop") {
|
|
4389
|
+
t.preventDefault(), Yt(t), x = { kind: "crop", start: Ot(t), current: Ot(t) }, oe(), O();
|
|
4171
4390
|
return;
|
|
4172
4391
|
}
|
|
4173
|
-
if (
|
|
4174
|
-
t.preventDefault(),
|
|
4175
|
-
const o =
|
|
4176
|
-
|
|
4392
|
+
if (tt === "arrow" || tt === "rect" || tt === "circle") {
|
|
4393
|
+
t.preventDefault(), Yt(t);
|
|
4394
|
+
const o = za(t);
|
|
4395
|
+
x = { kind: "sticker", type: tt, start: o, current: o }, oe(), O();
|
|
4177
4396
|
return;
|
|
4178
4397
|
}
|
|
4179
4398
|
O();
|
|
4180
4399
|
}
|
|
4181
|
-
function
|
|
4400
|
+
function nr(t, e) {
|
|
4182
4401
|
e.preventDefault(), e.stopPropagation();
|
|
4183
|
-
const a =
|
|
4184
|
-
|
|
4402
|
+
const a = Ct().getBoundingClientRect(), o = j.list().find((i) => i.id === t.id);
|
|
4403
|
+
L = {
|
|
4185
4404
|
...t,
|
|
4186
4405
|
startX: e.clientX,
|
|
4187
4406
|
startY: e.clientY,
|
|
4188
|
-
crop:
|
|
4407
|
+
crop: j.crop(),
|
|
4189
4408
|
sticker: o ? { ...o } : null,
|
|
4190
4409
|
rect: a
|
|
4191
|
-
},
|
|
4410
|
+
}, fe(t.dir === "move" || t.dir === "start" || t.dir === "end"), oe();
|
|
4192
4411
|
}
|
|
4193
|
-
function
|
|
4194
|
-
if (
|
|
4195
|
-
|
|
4412
|
+
function ja(t) {
|
|
4413
|
+
if (x) {
|
|
4414
|
+
x.current = x.kind === "crop" ? Ot(t) : za(t), O();
|
|
4196
4415
|
return;
|
|
4197
4416
|
}
|
|
4198
|
-
if (!
|
|
4417
|
+
if (!L)
|
|
4199
4418
|
return;
|
|
4200
|
-
const e = (t.clientX -
|
|
4419
|
+
const e = (t.clientX - L.startX) / L.rect.width * L.crop.w, a = (t.clientY - L.startY) / L.rect.height * L.crop.h, o = L.sticker;
|
|
4201
4420
|
if (o) {
|
|
4202
|
-
if (
|
|
4203
|
-
|
|
4421
|
+
if (L.dir === "end")
|
|
4422
|
+
j.update(o.id, {
|
|
4204
4423
|
x2: o.x2 + e,
|
|
4205
4424
|
y2: o.y2 + a
|
|
4206
4425
|
});
|
|
4207
|
-
else if (
|
|
4208
|
-
|
|
4426
|
+
else if (L.dir === "start")
|
|
4427
|
+
j.update(o.id, {
|
|
4209
4428
|
x: o.x + e,
|
|
4210
4429
|
y: o.y + a
|
|
4211
4430
|
});
|
|
4212
|
-
else if (
|
|
4213
|
-
|
|
4431
|
+
else if (L.dir === "move")
|
|
4432
|
+
j.update(o.id, {
|
|
4214
4433
|
x: o.x + e,
|
|
4215
4434
|
y: o.y + a,
|
|
4216
4435
|
x2: (o.x2 || o.x) + e,
|
|
@@ -4218,12 +4437,12 @@ function ma(t) {
|
|
|
4218
4437
|
});
|
|
4219
4438
|
else {
|
|
4220
4439
|
const i = { x: o.x, y: o.y, w: o.w, h: o.h };
|
|
4221
|
-
|
|
4440
|
+
rr(i, L.dir, e, a), j.update(o.id, i);
|
|
4222
4441
|
}
|
|
4223
4442
|
O();
|
|
4224
4443
|
}
|
|
4225
4444
|
}
|
|
4226
|
-
function
|
|
4445
|
+
function rr(t, e, a, o) {
|
|
4227
4446
|
if (e.includes("e") && (t.w = Math.max(0.04, t.w + a)), e.includes("s") && (t.h = Math.max(0.04, t.h + o)), e.includes("w")) {
|
|
4228
4447
|
const i = Math.max(0.04, t.w - a);
|
|
4229
4448
|
t.x += t.w - i, t.w = i;
|
|
@@ -4233,52 +4452,52 @@ function Ps(t, e, a, o) {
|
|
|
4233
4452
|
t.y += t.h - i, t.h = i;
|
|
4234
4453
|
}
|
|
4235
4454
|
}
|
|
4236
|
-
function
|
|
4237
|
-
if (
|
|
4238
|
-
|
|
4455
|
+
function $t(t) {
|
|
4456
|
+
if (Ra(), fe(!1), x) {
|
|
4457
|
+
sr();
|
|
4239
4458
|
return;
|
|
4240
4459
|
}
|
|
4241
|
-
if (
|
|
4242
|
-
if (
|
|
4243
|
-
const e =
|
|
4244
|
-
(t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (
|
|
4460
|
+
if (L) {
|
|
4461
|
+
if (L.kind === "sticker") {
|
|
4462
|
+
const e = r.canvas.getBoundingClientRect();
|
|
4463
|
+
(t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (j.remove(L.id), V = null);
|
|
4245
4464
|
}
|
|
4246
|
-
|
|
4465
|
+
L = null, O();
|
|
4247
4466
|
}
|
|
4248
4467
|
}
|
|
4249
|
-
function
|
|
4250
|
-
const t =
|
|
4251
|
-
if (
|
|
4468
|
+
function sr() {
|
|
4469
|
+
const t = x;
|
|
4470
|
+
if (x = null, !t)
|
|
4252
4471
|
return;
|
|
4253
4472
|
if (t.kind === "crop") {
|
|
4254
|
-
const a =
|
|
4255
|
-
if (Math.abs(t.current.x - t.start.x) <
|
|
4473
|
+
const a = Kt(t.start, t.current);
|
|
4474
|
+
if (Math.abs(t.current.x - t.start.x) < Ke || Math.abs(t.current.y - t.start.y) < Ke) {
|
|
4256
4475
|
O();
|
|
4257
4476
|
return;
|
|
4258
4477
|
}
|
|
4259
|
-
const i =
|
|
4260
|
-
|
|
4478
|
+
const i = j.crop();
|
|
4479
|
+
j.setCrop({
|
|
4261
4480
|
x: i.x + a.x * i.w,
|
|
4262
4481
|
y: i.y + a.y * i.h,
|
|
4263
4482
|
w: a.w * i.w,
|
|
4264
4483
|
h: a.h * i.h
|
|
4265
|
-
}),
|
|
4484
|
+
}), rt();
|
|
4266
4485
|
return;
|
|
4267
4486
|
}
|
|
4268
|
-
const e =
|
|
4269
|
-
e && (
|
|
4487
|
+
const e = lr(t);
|
|
4488
|
+
e && (V = e.id), O();
|
|
4270
4489
|
}
|
|
4271
|
-
function
|
|
4490
|
+
function lr(t) {
|
|
4272
4491
|
if (t.type === "arrow") {
|
|
4273
4492
|
const e = t.current.x - t.start.x, a = t.current.y - t.start.y;
|
|
4274
|
-
return Math.hypot(e, a) <
|
|
4493
|
+
return Math.hypot(e, a) < ee ? j.add("arrow", {
|
|
4275
4494
|
x: t.start.x,
|
|
4276
4495
|
y: t.start.y,
|
|
4277
4496
|
x2: t.start.x + 0.12,
|
|
4278
4497
|
y2: t.start.y,
|
|
4279
4498
|
w: 0.12,
|
|
4280
4499
|
h: 0.02
|
|
4281
|
-
}) :
|
|
4500
|
+
}) : j.add("arrow", {
|
|
4282
4501
|
x: t.start.x,
|
|
4283
4502
|
y: t.start.y,
|
|
4284
4503
|
x2: t.current.x,
|
|
@@ -4287,174 +4506,174 @@ function Ls(t) {
|
|
|
4287
4506
|
h: Math.abs(a)
|
|
4288
4507
|
});
|
|
4289
4508
|
}
|
|
4290
|
-
return
|
|
4509
|
+
return j.add(t.type, Kt(t.start, t.current));
|
|
4291
4510
|
}
|
|
4292
|
-
function
|
|
4293
|
-
|
|
4511
|
+
function cr() {
|
|
4512
|
+
j.resetCrop(), V = null, rt();
|
|
4294
4513
|
}
|
|
4295
|
-
function
|
|
4296
|
-
|
|
4514
|
+
function Vt() {
|
|
4515
|
+
r.resetCrop && (r.resetCrop.hidden = !j.isCropped());
|
|
4297
4516
|
}
|
|
4298
|
-
function
|
|
4299
|
-
if (!
|
|
4517
|
+
function St(t) {
|
|
4518
|
+
if (!r.audio)
|
|
4300
4519
|
return;
|
|
4301
|
-
const e = !!t, a =
|
|
4302
|
-
|
|
4520
|
+
const e = !!t, a = g(e ? "tool.audioStop" : "tool.audio");
|
|
4521
|
+
r.audio.title = a, r.audio.setAttribute("aria-label", a), r.audio.dataset.active = String(e), r.audio.innerHTML = e ? U.stop : U.audio;
|
|
4303
4522
|
}
|
|
4304
|
-
function
|
|
4305
|
-
if (
|
|
4306
|
-
const e =
|
|
4307
|
-
|
|
4523
|
+
function ht(t) {
|
|
4524
|
+
if (it = !!t, r.video) {
|
|
4525
|
+
const e = g(it ? "tool.stopVideo" : "tool.video");
|
|
4526
|
+
r.video.title = e, r.video.setAttribute("aria-label", e), r.video.dataset.active = String(it), r.video.innerHTML = it ? U.stop : U.video;
|
|
4308
4527
|
}
|
|
4309
|
-
if (
|
|
4310
|
-
const e =
|
|
4311
|
-
|
|
4528
|
+
if (r.stop) {
|
|
4529
|
+
const e = g("tool.stopVideo");
|
|
4530
|
+
r.stop.title = e, r.stop.setAttribute("aria-label", e), r.stop.innerHTML = U.stop, r.stop.dataset.active = "true";
|
|
4312
4531
|
}
|
|
4313
4532
|
}
|
|
4314
|
-
function
|
|
4315
|
-
return
|
|
4533
|
+
function B() {
|
|
4534
|
+
return at(W);
|
|
4316
4535
|
}
|
|
4317
|
-
function
|
|
4318
|
-
if (!
|
|
4536
|
+
function Et() {
|
|
4537
|
+
if (!r.stage || !r.palette || !r.actions || !r.recapture)
|
|
4319
4538
|
return;
|
|
4320
|
-
const t =
|
|
4321
|
-
|
|
4539
|
+
const t = B();
|
|
4540
|
+
r.stage.hidden = !t && !G, r.palette.hidden = !t, r.discard && (r.discard.hidden = !t), r.restore && (r.restore.hidden = t || !gt), t && r.paletteShot ? (r.paletteShot.appendChild(r.recapture), r.paletteShot.appendChild(r.discard)) : r.actionsMedia ? r.actionsMedia.after(r.recapture) : r.audio ? r.audio.after(r.recapture) : r.actions.insertBefore(r.recapture, r.submit || null), r.recapture.hidden = !1, he();
|
|
4322
4541
|
}
|
|
4323
|
-
function
|
|
4324
|
-
|
|
4542
|
+
function ur() {
|
|
4543
|
+
B() && (gt = W), W = "", wt(null), Et(), rt();
|
|
4325
4544
|
}
|
|
4326
|
-
function
|
|
4327
|
-
|
|
4545
|
+
function dr() {
|
|
4546
|
+
at(gt) && (W = gt, Et(), rt());
|
|
4328
4547
|
}
|
|
4329
|
-
function
|
|
4548
|
+
function Pa() {
|
|
4330
4549
|
return {
|
|
4331
|
-
capture: typeof
|
|
4332
|
-
onBeforeCapture: typeof
|
|
4550
|
+
capture: typeof p.capture == "function" ? p.capture : void 0,
|
|
4551
|
+
onBeforeCapture: typeof p.onBeforeCapture == "function" ? p.onBeforeCapture : void 0
|
|
4333
4552
|
};
|
|
4334
4553
|
}
|
|
4335
|
-
function
|
|
4336
|
-
if (!
|
|
4337
|
-
throw new Error(
|
|
4338
|
-
|
|
4554
|
+
function La(t) {
|
|
4555
|
+
if (!at(t))
|
|
4556
|
+
throw new Error(g("status.screenshotFailed"));
|
|
4557
|
+
W = t, gt = t, j = ue(), ft = { w: 0, h: 0 }, V = null, x = null, L = null, wt(null);
|
|
4339
4558
|
}
|
|
4340
|
-
async function
|
|
4341
|
-
if (!(
|
|
4342
|
-
|
|
4559
|
+
async function pr() {
|
|
4560
|
+
if (!(Wt || !r.dialog || r.dialog.hidden)) {
|
|
4561
|
+
Wt = !0, r.recapture.disabled = !0, z(g("status.capturing"), !0), r.dialog.hidden = !0;
|
|
4343
4562
|
try {
|
|
4344
4563
|
let t = "";
|
|
4345
4564
|
try {
|
|
4346
|
-
t = await
|
|
4565
|
+
t = await Vi();
|
|
4347
4566
|
} catch {
|
|
4348
|
-
t = await
|
|
4567
|
+
t = await la(Pa());
|
|
4349
4568
|
}
|
|
4350
|
-
|
|
4569
|
+
La(t), z("");
|
|
4351
4570
|
} catch (t) {
|
|
4352
|
-
|
|
4571
|
+
z((t == null ? void 0 : t.message) || g("status.screenshotFailed"));
|
|
4353
4572
|
} finally {
|
|
4354
|
-
|
|
4573
|
+
r.dialog.hidden = !1, r.recapture.disabled = !1, Wt = !1, Et(), rt();
|
|
4355
4574
|
}
|
|
4356
4575
|
}
|
|
4357
4576
|
}
|
|
4358
|
-
function
|
|
4577
|
+
function gr() {
|
|
4359
4578
|
try {
|
|
4360
|
-
if (
|
|
4361
|
-
const a =
|
|
4362
|
-
|
|
4579
|
+
if (X || (X = fn((e) => {
|
|
4580
|
+
const a = r.text.value.trim();
|
|
4581
|
+
r.text.value = a ? `${a} ${e}` : e;
|
|
4363
4582
|
}, {
|
|
4364
4583
|
onActiveChange(e) {
|
|
4365
|
-
|
|
4584
|
+
St(e), e || z("");
|
|
4366
4585
|
}
|
|
4367
|
-
})), !
|
|
4368
|
-
|
|
4586
|
+
})), !X.isSupported()) {
|
|
4587
|
+
z(g("status.audioUnsupported"));
|
|
4369
4588
|
return;
|
|
4370
4589
|
}
|
|
4371
|
-
if (
|
|
4372
|
-
|
|
4590
|
+
if (X.isActive()) {
|
|
4591
|
+
X.stop();
|
|
4373
4592
|
return;
|
|
4374
4593
|
}
|
|
4375
|
-
const t =
|
|
4376
|
-
|
|
4594
|
+
const t = X.start({ lang: Lt() });
|
|
4595
|
+
St(t), z(t ? g("status.listening") : "");
|
|
4377
4596
|
} catch (t) {
|
|
4378
|
-
|
|
4597
|
+
z(t.message);
|
|
4379
4598
|
}
|
|
4380
4599
|
}
|
|
4381
|
-
async function
|
|
4382
|
-
if (
|
|
4383
|
-
|
|
4600
|
+
async function mr() {
|
|
4601
|
+
if (it) {
|
|
4602
|
+
N == null || N.stop();
|
|
4384
4603
|
return;
|
|
4385
4604
|
}
|
|
4386
|
-
await
|
|
4605
|
+
await hr();
|
|
4387
4606
|
}
|
|
4388
|
-
async function
|
|
4389
|
-
if (!
|
|
4390
|
-
|
|
4607
|
+
async function hr() {
|
|
4608
|
+
if (!p.video) {
|
|
4609
|
+
z(g("status.videoDisabled"));
|
|
4391
4610
|
return;
|
|
4392
4611
|
}
|
|
4393
|
-
if (!
|
|
4394
|
-
|
|
4612
|
+
if (!it) {
|
|
4613
|
+
r.dialog.hidden = !0, r.stop.hidden = !1, mt(), r.launcher.hidden = !0, N = vn({
|
|
4395
4614
|
onStart() {
|
|
4396
|
-
|
|
4615
|
+
ht(!0);
|
|
4397
4616
|
},
|
|
4398
4617
|
onStop(t) {
|
|
4399
|
-
G = t,
|
|
4618
|
+
G = t, ht(!1), r.stop.hidden = !0, It(), r.dialog.hidden = !1, Et(), rt(), z(g(t ? "status.videoAttached" : "status.recordingCancelled"));
|
|
4400
4619
|
},
|
|
4401
4620
|
onError(t) {
|
|
4402
|
-
|
|
4621
|
+
ht(!1), z(t.message);
|
|
4403
4622
|
}
|
|
4404
4623
|
});
|
|
4405
4624
|
try {
|
|
4406
|
-
await
|
|
4625
|
+
await N.start();
|
|
4407
4626
|
} catch (t) {
|
|
4408
|
-
|
|
4627
|
+
ht(!1), r.stop.hidden = !0, It(), r.dialog.hidden = !1, z(t.message);
|
|
4409
4628
|
}
|
|
4410
4629
|
}
|
|
4411
4630
|
}
|
|
4412
|
-
function
|
|
4631
|
+
function fr() {
|
|
4413
4632
|
var e;
|
|
4414
|
-
const t =
|
|
4415
|
-
t == null || t.style.removeProperty("--nf-shot-aspect"), (e =
|
|
4633
|
+
const t = r.shotBlock || r.canvas;
|
|
4634
|
+
t == null || t.style.removeProperty("--nf-shot-aspect"), (e = r.canvas) == null || e.style.removeProperty("aspect-ratio");
|
|
4416
4635
|
}
|
|
4417
|
-
function
|
|
4636
|
+
function yr(t, e) {
|
|
4418
4637
|
if (!(t > 0) || !(e > 0))
|
|
4419
4638
|
return;
|
|
4420
|
-
const a =
|
|
4421
|
-
a == null || a.style.setProperty("--nf-shot-aspect", String(o)),
|
|
4639
|
+
const a = r.shotBlock || r.canvas, o = t / e;
|
|
4640
|
+
a == null || a.style.setProperty("--nf-shot-aspect", String(o)), r.canvas && (r.canvas.style.aspectRatio = `${t} / ${e}`);
|
|
4422
4641
|
}
|
|
4423
|
-
function
|
|
4424
|
-
if (!
|
|
4642
|
+
function vr(t) {
|
|
4643
|
+
if (!r.shot || !r.canvas || !(t > 0))
|
|
4425
4644
|
return;
|
|
4426
|
-
const e =
|
|
4645
|
+
const e = r.canvas.clientWidth, a = r.canvas.clientHeight;
|
|
4427
4646
|
if (!(e > 0) || !(a > 0)) {
|
|
4428
|
-
|
|
4647
|
+
r.shot.style.left = "0", r.shot.style.top = "0", r.shot.style.width = "100%", r.shot.style.height = "100%";
|
|
4429
4648
|
return;
|
|
4430
4649
|
}
|
|
4431
|
-
const o = e / a, i = Math.min(1, t / o),
|
|
4432
|
-
|
|
4650
|
+
const o = e / a, i = Math.min(1, t / o), n = Math.min(1, o / t);
|
|
4651
|
+
r.shot.style.left = `${(1 - i) / 2 * 100}%`, r.shot.style.top = `${(1 - n) / 2 * 100}%`, r.shot.style.width = `${i * 100}%`, r.shot.style.height = `${n * 100}%`;
|
|
4433
4652
|
}
|
|
4434
|
-
function
|
|
4435
|
-
if (
|
|
4436
|
-
|
|
4653
|
+
function rt() {
|
|
4654
|
+
if (r.shot = null, !B()) {
|
|
4655
|
+
fr(), r.canvas.innerHTML = G ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(G)}"></video>` : "", Vt();
|
|
4437
4656
|
return;
|
|
4438
4657
|
}
|
|
4439
|
-
|
|
4440
|
-
const t =
|
|
4658
|
+
r.canvas.innerHTML = `<div class="nf-shot"><img alt="${I(g("shot.alt"))}" src="${W}" draggable="false"></div>`, r.shot = r.canvas.querySelector(".nf-shot");
|
|
4659
|
+
const t = r.shot.querySelector("img");
|
|
4441
4660
|
t.draggable = !1, t.addEventListener("dragstart", (a) => a.preventDefault());
|
|
4442
4661
|
const e = () => {
|
|
4443
|
-
|
|
4662
|
+
kr(t), O();
|
|
4444
4663
|
};
|
|
4445
|
-
t.addEventListener("load", e), t.complete && t.naturalWidth && e(),
|
|
4664
|
+
t.addEventListener("load", e), t.complete && t.naturalWidth && e(), Vt();
|
|
4446
4665
|
}
|
|
4447
|
-
function
|
|
4448
|
-
const e = t.naturalWidth ||
|
|
4449
|
-
if (!
|
|
4666
|
+
function kr(t) {
|
|
4667
|
+
const e = t.naturalWidth || ft.w, a = t.naturalHeight || ft.h;
|
|
4668
|
+
if (!r.shot || !(e > 0) || !(a > 0))
|
|
4450
4669
|
return;
|
|
4451
|
-
|
|
4452
|
-
const o =
|
|
4453
|
-
|
|
4454
|
-
const l = () =>
|
|
4670
|
+
ft = { w: e, h: a };
|
|
4671
|
+
const o = j.crop(), i = o.w * e, n = o.h * a, s = i / n;
|
|
4672
|
+
yr(i, n), t.style.width = `${100 / o.w}%`, t.style.height = `${100 / o.h}%`, t.style.left = `${-o.x / o.w * 100}%`, t.style.top = `${-o.y / o.h * 100}%`;
|
|
4673
|
+
const l = () => vr(s);
|
|
4455
4674
|
l(), requestAnimationFrame(l);
|
|
4456
4675
|
}
|
|
4457
|
-
function
|
|
4676
|
+
function br(t) {
|
|
4458
4677
|
return t.type === "arrow" ? {
|
|
4459
4678
|
id: "preview",
|
|
4460
4679
|
type: "arrow",
|
|
@@ -4469,66 +4688,66 @@ function Ks(t) {
|
|
|
4469
4688
|
id: "preview",
|
|
4470
4689
|
type: t.type,
|
|
4471
4690
|
number: "",
|
|
4472
|
-
...
|
|
4691
|
+
...Kt(t.start, t.current)
|
|
4473
4692
|
};
|
|
4474
4693
|
}
|
|
4475
4694
|
function O() {
|
|
4476
|
-
if ((
|
|
4477
|
-
|
|
4695
|
+
if ((r.shot || r.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((n) => n.remove()), !B() || !r.shot) {
|
|
4696
|
+
Vt();
|
|
4478
4697
|
return;
|
|
4479
4698
|
}
|
|
4480
|
-
const e =
|
|
4481
|
-
if (
|
|
4482
|
-
const
|
|
4483
|
-
|
|
4699
|
+
const e = j.crop(), a = Ct(), o = ga(a.clientWidth || 400);
|
|
4700
|
+
if (r.shot.style.setProperty("--nf-anno-stroke", `${o.stroke}px`), r.shot.style.setProperty("--nf-anno-badge", `${o.badgeRadius * 2}px`), r.shot.style.setProperty("--nf-anno-badge-font", `${o.fontSize}px`), r.shot.style.setProperty("--nf-anno-handle", `${Math.max(8, o.stroke * 2.5)}px`), (x == null ? void 0 : x.kind) === "crop") {
|
|
4701
|
+
const n = document.createElement("div");
|
|
4702
|
+
n.className = "nf-crop", Ge(n, Kt(x.start, x.current), { x: 0, y: 0, w: 1, h: 1 }), r.shot.appendChild(n);
|
|
4484
4703
|
}
|
|
4485
|
-
const i =
|
|
4486
|
-
if ((
|
|
4487
|
-
const
|
|
4488
|
-
if (
|
|
4704
|
+
const i = j.list().slice();
|
|
4705
|
+
if ((x == null ? void 0 : x.kind) === "sticker" && i.push(br(x)), i.forEach((n) => {
|
|
4706
|
+
const s = n.id === "preview", l = !s && n.id === V, c = document.createElement("div");
|
|
4707
|
+
if (c.className = `nf-sticker nf-${n.type}`, c.dataset.id = n.id, l && (c.dataset.selected = "true"), s && (c.dataset.preview = "true"), n.type === "arrow" ? wr(c, n, e, l, o) : (Ge(c, n, e), l && ["nw", "ne", "sw", "se"].forEach((d) => ie(c, d))), !s && n.number) {
|
|
4489
4708
|
const d = document.createElement("span");
|
|
4490
|
-
d.className = "nf-badge", d.textContent = String(
|
|
4709
|
+
d.className = "nf-badge", d.textContent = String(n.number), c.appendChild(d);
|
|
4491
4710
|
}
|
|
4492
|
-
|
|
4493
|
-
}),
|
|
4494
|
-
const
|
|
4495
|
-
|
|
4711
|
+
r.shot.appendChild(c);
|
|
4712
|
+
}), r.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((n) => n.remove()), G) {
|
|
4713
|
+
const n = document.createElement("video");
|
|
4714
|
+
n.className = "nf-recording-preview", n.controls = !0, n.src = URL.createObjectURL(G), n.style.position = "absolute", n.style.right = "8px", n.style.bottom = "8px", n.style.width = "160px", r.canvas.appendChild(n);
|
|
4496
4715
|
}
|
|
4497
|
-
|
|
4716
|
+
Vt();
|
|
4498
4717
|
}
|
|
4499
|
-
function
|
|
4500
|
-
const
|
|
4501
|
-
t.style.left = `${
|
|
4502
|
-
<line class="nf-arrow-hit" x1="${
|
|
4503
|
-
<line class="nf-arrow-shaft" x1="${
|
|
4504
|
-
<polygon class="nf-arrow-head" points="${
|
|
4505
|
-
`, t.appendChild(
|
|
4718
|
+
function wr(t, e, a, o, i = ga(400)) {
|
|
4719
|
+
const n = Ct(), s = n.clientWidth, l = n.clientHeight, c = (e.x - a.x) / a.w * s, d = (e.y - a.y) / a.h * l, m = ((e.x2 ?? e.x + e.w) - a.x) / a.w * s, S = ((e.y2 ?? e.y) - a.y) / a.h * l, v = Math.max(18, i.arrowHead + i.stroke * 2), A = Math.min(c, m) - v, E = Math.min(d, S) - v, P = Math.max(2, Math.abs(m - c)) + v * 2, u = Math.max(2, Math.abs(S - d)) + v * 2, h = c - A, R = d - E, k = m - A, f = S - E, C = An(h, R, k, f, i), Z = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4720
|
+
t.style.left = `${A}px`, t.style.top = `${E}px`, t.style.width = `${P}px`, t.style.height = `${u}px`, Z.setAttribute("class", "nf-arrow-svg"), Z.setAttribute("viewBox", `0 0 ${P} ${u}`), Z.setAttribute("width", String(P)), Z.setAttribute("height", String(u)), Z.innerHTML = `
|
|
4721
|
+
<line class="nf-arrow-hit" x1="${h}" y1="${R}" x2="${k}" y2="${f}" />
|
|
4722
|
+
<line class="nf-arrow-shaft" x1="${h}" y1="${R}" x2="${C.shaftEnd.x}" y2="${C.shaftEnd.y}" />
|
|
4723
|
+
<polygon class="nf-arrow-head" points="${C.tipX},${C.tipY} ${C.left.x},${C.left.y} ${C.right.x},${C.right.y}" />
|
|
4724
|
+
`, t.appendChild(Z), o && (ie(t, "start", { left: h - 5, top: R - 5 }), ie(t, "end", { left: k - 5, top: f - 5 }));
|
|
4506
4725
|
}
|
|
4507
|
-
function
|
|
4726
|
+
function ie(t, e, a) {
|
|
4508
4727
|
const o = document.createElement("span");
|
|
4509
4728
|
o.className = "nf-handle", o.dataset.dir = e, a && (o.style.left = `${a.left}px`, o.style.top = `${a.top}px`), t.appendChild(o);
|
|
4510
4729
|
}
|
|
4511
|
-
function
|
|
4730
|
+
function Ge(t, e, a) {
|
|
4512
4731
|
t.style.left = `${(e.x - a.x) / a.w * 100}%`, t.style.top = `${(e.y - a.y) / a.h * 100}%`, t.style.width = `${e.w / a.w * 100}%`, t.style.height = `${e.h / a.h * 100}%`;
|
|
4513
4732
|
}
|
|
4514
|
-
function
|
|
4733
|
+
function xa() {
|
|
4515
4734
|
try {
|
|
4516
|
-
return String(localStorage.getItem(
|
|
4735
|
+
return String(localStorage.getItem(fa) || "").trim();
|
|
4517
4736
|
} catch {
|
|
4518
4737
|
return "";
|
|
4519
4738
|
}
|
|
4520
4739
|
}
|
|
4521
|
-
function
|
|
4740
|
+
function Sr(t) {
|
|
4522
4741
|
const e = String(t || "").trim();
|
|
4523
|
-
if (!(!e || e ===
|
|
4742
|
+
if (!(!e || e === ne()))
|
|
4524
4743
|
try {
|
|
4525
|
-
localStorage.setItem(
|
|
4744
|
+
localStorage.setItem(fa, e);
|
|
4526
4745
|
} catch {
|
|
4527
4746
|
}
|
|
4528
4747
|
}
|
|
4529
|
-
function
|
|
4748
|
+
function Ua() {
|
|
4530
4749
|
try {
|
|
4531
|
-
const t = localStorage.getItem(
|
|
4750
|
+
const t = localStorage.getItem(ka);
|
|
4532
4751
|
if (!t)
|
|
4533
4752
|
return { diagnostics: !1, logs: !1 };
|
|
4534
4753
|
const e = JSON.parse(t);
|
|
@@ -4540,82 +4759,131 @@ function va() {
|
|
|
4540
4759
|
return { diagnostics: !1, logs: !1 };
|
|
4541
4760
|
}
|
|
4542
4761
|
}
|
|
4543
|
-
function
|
|
4762
|
+
function qe(t = {}) {
|
|
4544
4763
|
const e = {
|
|
4545
|
-
...
|
|
4764
|
+
...Ua(),
|
|
4546
4765
|
...t
|
|
4547
4766
|
};
|
|
4548
4767
|
try {
|
|
4549
|
-
localStorage.setItem(
|
|
4768
|
+
localStorage.setItem(ka, JSON.stringify({
|
|
4550
4769
|
diagnostics: !!e.diagnostics,
|
|
4551
4770
|
logs: !!e.logs
|
|
4552
4771
|
}));
|
|
4553
4772
|
} catch {
|
|
4554
4773
|
}
|
|
4555
4774
|
}
|
|
4556
|
-
function
|
|
4557
|
-
return !!(String(
|
|
4775
|
+
function Ta() {
|
|
4776
|
+
return !!(String(_.userId || "").trim() || String(_.email || "").trim() || String(_.displayName || "").trim());
|
|
4558
4777
|
}
|
|
4559
|
-
function
|
|
4778
|
+
function Fa() {
|
|
4560
4779
|
return String(
|
|
4561
|
-
|
|
4780
|
+
_.displayName || _.email || _.userId || ""
|
|
4562
4781
|
).trim();
|
|
4563
4782
|
}
|
|
4564
|
-
function
|
|
4565
|
-
return
|
|
4783
|
+
function ne() {
|
|
4784
|
+
return g("form.authorPlaceholder");
|
|
4566
4785
|
}
|
|
4567
|
-
function
|
|
4786
|
+
function Ar() {
|
|
4568
4787
|
var e;
|
|
4569
|
-
if (
|
|
4570
|
-
return
|
|
4571
|
-
const t = String(((e =
|
|
4572
|
-
return t ? (
|
|
4788
|
+
if (Ta())
|
|
4789
|
+
return Fa() || ne();
|
|
4790
|
+
const t = String(((e = r.author) == null ? void 0 : e.value) || "").trim();
|
|
4791
|
+
return t ? (Sr(t), t) : ne();
|
|
4573
4792
|
}
|
|
4574
|
-
function
|
|
4575
|
-
if (!
|
|
4793
|
+
function Ma() {
|
|
4794
|
+
if (!r.author)
|
|
4576
4795
|
return;
|
|
4577
|
-
const t =
|
|
4578
|
-
if (
|
|
4579
|
-
|
|
4796
|
+
const t = Ta();
|
|
4797
|
+
if (r.author.hidden = t, t) {
|
|
4798
|
+
r.author.value = "";
|
|
4580
4799
|
return;
|
|
4581
4800
|
}
|
|
4582
|
-
|
|
4801
|
+
r.author.value = xa();
|
|
4583
4802
|
}
|
|
4584
|
-
function
|
|
4803
|
+
function Da(t, e = ha) {
|
|
4585
4804
|
const a = Number(t);
|
|
4586
|
-
return Number.isFinite(a) ? Math.min(
|
|
4805
|
+
return Number.isFinite(a) ? Math.min(Vn, Math.max(0, Math.floor(a))) : e;
|
|
4587
4806
|
}
|
|
4588
|
-
function
|
|
4589
|
-
t
|
|
4807
|
+
function Cr(t, e = null) {
|
|
4808
|
+
return t === void 0 ? e : t == null ? null : Array.isArray(t) ? t.filter((a) => typeof a == "function") : e;
|
|
4590
4809
|
}
|
|
4591
|
-
function
|
|
4592
|
-
|
|
4593
|
-
const e = Object.prototype.hasOwnProperty.call(t, "kinds");
|
|
4594
|
-
c = {
|
|
4595
|
-
...c,
|
|
4596
|
-
endpoint: String(t.endpoint || c.endpoint || "").replace(/\/$/, ""),
|
|
4597
|
-
projectKey: t.projectKey == null ? c.projectKey : String(t.projectKey),
|
|
4598
|
-
version: t.version == null ? c.version : String(t.version),
|
|
4599
|
-
name: t.name == null ? c.name : String(t.name || ""),
|
|
4600
|
-
targets: t.targets === void 0 ? c.targets : t.targets,
|
|
4601
|
-
hideLauncher: t.hideLauncher == null ? c.hideLauncher : !!t.hideLauncher,
|
|
4602
|
-
launcherCorner: t.launcherCorner === void 0 ? c.launcherCorner : oe(t.launcherCorner) || null,
|
|
4603
|
-
theme: na(t.theme ?? c.theme),
|
|
4604
|
-
video: t.video == null ? c.video : !!t.video,
|
|
4605
|
-
consoleLogLimit: t.consoleLogLimit == null ? c.consoleLogLimit : Sa(t.consoleLogLimit, c.consoleLogLimit),
|
|
4606
|
-
kinds: e ? ss(t.kinds) : c.kinds,
|
|
4607
|
-
kindsCustom: e ? !0 : c.kindsCustom,
|
|
4608
|
-
capture: t.capture === void 0 ? c.capture : t.capture,
|
|
4609
|
-
onBeforeCapture: t.onBeforeCapture === void 0 ? c.onBeforeCapture : t.onBeforeCapture,
|
|
4610
|
-
onOpen: t.onOpen === void 0 ? c.onOpen : t.onOpen,
|
|
4611
|
-
onClose: t.onClose === void 0 ? c.onClose : t.onClose,
|
|
4612
|
-
displayLink: t.displayLink == null ? c.displayLink : !!t.displayLink,
|
|
4613
|
-
locale: t.locale === void 0 ? c.locale : t.locale == null || t.locale === "" ? null : String(t.locale),
|
|
4614
|
-
translations: t.translations === void 0 ? c.translations : t.translations && typeof t.translations == "object" ? t.translations : null
|
|
4615
|
-
};
|
|
4810
|
+
function Er() {
|
|
4811
|
+
ot.setConsoleMethods(p.consoleMethods), ot.setScrubLog(p.scrubLog);
|
|
4616
4812
|
}
|
|
4617
|
-
function
|
|
4618
|
-
const e =
|
|
4813
|
+
function zr() {
|
|
4814
|
+
const t = Da(p.consoleLogLimit), e = ot.snapshotForReport(t), a = p.logSources;
|
|
4815
|
+
if (!a || !a.length)
|
|
4816
|
+
return e;
|
|
4817
|
+
const o = [];
|
|
4818
|
+
for (const n of a)
|
|
4819
|
+
try {
|
|
4820
|
+
const s = n();
|
|
4821
|
+
if (!Array.isArray(s))
|
|
4822
|
+
continue;
|
|
4823
|
+
for (const l of s)
|
|
4824
|
+
!l || typeof l != "object" || o.push({
|
|
4825
|
+
level: l.level || "log",
|
|
4826
|
+
text: String(l.text || ""),
|
|
4827
|
+
at: Number.isFinite(l.at) ? l.at : Date.now(),
|
|
4828
|
+
t: Number.isFinite(l.t) ? l.t : void 0,
|
|
4829
|
+
truncated: !!l.truncated,
|
|
4830
|
+
count: l.count,
|
|
4831
|
+
segments: l.segments
|
|
4832
|
+
});
|
|
4833
|
+
} catch {
|
|
4834
|
+
}
|
|
4835
|
+
if (!o.length)
|
|
4836
|
+
return e;
|
|
4837
|
+
const i = [...e, ...o].sort((n, s) => {
|
|
4838
|
+
const l = (n.at || 0) - (s.at || 0);
|
|
4839
|
+
return l !== 0 ? l : (n.t || 0) - (s.t || 0);
|
|
4840
|
+
});
|
|
4841
|
+
return t === 0 ? [] : i.slice(-t);
|
|
4842
|
+
}
|
|
4843
|
+
function Rr(t, ...e) {
|
|
4844
|
+
if (t && typeof t == "object" && !Array.isArray(t)) {
|
|
4845
|
+
ot.pushEntry(t);
|
|
4846
|
+
return;
|
|
4847
|
+
}
|
|
4848
|
+
const a = String(t || "log");
|
|
4849
|
+
ot.push(a, e, {
|
|
4850
|
+
captureStack: a === "warn" || a === "error"
|
|
4851
|
+
});
|
|
4852
|
+
}
|
|
4853
|
+
function Ia(t) {
|
|
4854
|
+
t.key !== "Escape" || !r.dialog || r.dialog.hidden || kt && !bt || nt();
|
|
4855
|
+
}
|
|
4856
|
+
function Oa(t = {}) {
|
|
4857
|
+
_i(t);
|
|
4858
|
+
const e = Object.prototype.hasOwnProperty.call(t, "kinds");
|
|
4859
|
+
p = {
|
|
4860
|
+
...p,
|
|
4861
|
+
endpoint: String(t.endpoint || p.endpoint || "").replace(/\/$/, ""),
|
|
4862
|
+
projectKey: t.projectKey == null ? p.projectKey : String(t.projectKey),
|
|
4863
|
+
version: t.version == null ? p.version : String(t.version),
|
|
4864
|
+
name: t.name == null ? p.name : String(t.name || ""),
|
|
4865
|
+
targets: t.targets === void 0 ? p.targets : t.targets,
|
|
4866
|
+
hideLauncher: t.hideLauncher == null ? p.hideLauncher : !!t.hideLauncher,
|
|
4867
|
+
launcherCorner: t.launcherCorner === void 0 ? p.launcherCorner : pe(t.launcherCorner) || null,
|
|
4868
|
+
theme: ba(t.theme ?? p.theme),
|
|
4869
|
+
video: t.video == null ? p.video : !!t.video,
|
|
4870
|
+
consoleLogLimit: t.consoleLogLimit == null ? p.consoleLogLimit : Da(t.consoleLogLimit, p.consoleLogLimit),
|
|
4871
|
+
consoleMethods: t.consoleMethods === void 0 ? p.consoleMethods : ce(t.consoleMethods),
|
|
4872
|
+
scrubLog: t.scrubLog === void 0 ? p.scrubLog : typeof t.scrubLog == "function" ? t.scrubLog : Ft,
|
|
4873
|
+
logSources: t.logSources === void 0 ? p.logSources : Cr(t.logSources, p.logSources),
|
|
4874
|
+
kinds: e ? Dn(t.kinds) : p.kinds,
|
|
4875
|
+
kindsCustom: e ? !0 : p.kindsCustom,
|
|
4876
|
+
capture: t.capture === void 0 ? p.capture : t.capture,
|
|
4877
|
+
onBeforeCapture: t.onBeforeCapture === void 0 ? p.onBeforeCapture : t.onBeforeCapture,
|
|
4878
|
+
onOpen: t.onOpen === void 0 ? p.onOpen : t.onOpen,
|
|
4879
|
+
onClose: t.onClose === void 0 ? p.onClose : t.onClose,
|
|
4880
|
+
displayLink: t.displayLink == null ? p.displayLink : !!t.displayLink,
|
|
4881
|
+
locale: t.locale === void 0 ? p.locale : t.locale == null || t.locale === "" ? null : String(t.locale),
|
|
4882
|
+
translations: t.translations === void 0 ? p.translations : t.translations && typeof t.translations == "object" ? t.translations : null
|
|
4883
|
+
}, Er();
|
|
4884
|
+
}
|
|
4885
|
+
function $a(t) {
|
|
4886
|
+
const e = p[t];
|
|
4619
4887
|
if (typeof e == "function")
|
|
4620
4888
|
try {
|
|
4621
4889
|
e();
|
|
@@ -4623,319 +4891,319 @@ function za(t) {
|
|
|
4623
4891
|
console.warn(`Notefully.${t} failed:`, a);
|
|
4624
4892
|
}
|
|
4625
4893
|
}
|
|
4626
|
-
function
|
|
4627
|
-
return
|
|
4894
|
+
function jr() {
|
|
4895
|
+
return vt;
|
|
4628
4896
|
}
|
|
4629
|
-
function
|
|
4630
|
-
return
|
|
4897
|
+
function Pr() {
|
|
4898
|
+
return Lt();
|
|
4631
4899
|
}
|
|
4632
|
-
function
|
|
4633
|
-
return
|
|
4900
|
+
function Lr(t, e) {
|
|
4901
|
+
return p.locale = t == null || t === "" ? null : String(t), e !== void 0 && (p.translations = e && typeof e == "object" ? e : null), b ? mt() : wa(), Ht;
|
|
4634
4902
|
}
|
|
4635
|
-
function
|
|
4636
|
-
return
|
|
4903
|
+
function ye(t = {}) {
|
|
4904
|
+
return Oa(t), b && mt(), Ht;
|
|
4637
4905
|
}
|
|
4638
|
-
function
|
|
4639
|
-
return
|
|
4906
|
+
function xr(t = {}) {
|
|
4907
|
+
return ot.hook(), Oa(t), de(), mt(), Ht;
|
|
4640
4908
|
}
|
|
4641
|
-
function
|
|
4642
|
-
return
|
|
4909
|
+
function Ur(t) {
|
|
4910
|
+
return ye({ theme: t });
|
|
4643
4911
|
}
|
|
4644
|
-
function
|
|
4912
|
+
function Tr(t) {
|
|
4645
4913
|
const e = !!t;
|
|
4646
|
-
return !e &&
|
|
4914
|
+
return !e && b && r.dialog && !r.dialog.hidden && nt(), ye({ hideLauncher: !e });
|
|
4647
4915
|
}
|
|
4648
|
-
function
|
|
4649
|
-
const t =
|
|
4650
|
-
...
|
|
4651
|
-
displayName:
|
|
4916
|
+
function Fr() {
|
|
4917
|
+
const t = Fa() || xa() || void 0, e = Ki({
|
|
4918
|
+
..._,
|
|
4919
|
+
displayName: _.displayName || t
|
|
4652
4920
|
});
|
|
4653
|
-
|
|
4654
|
-
|
|
4655
|
-
);
|
|
4656
|
-
const a = va();
|
|
4657
|
-
a.diagnostics && xt(N, !0), a.logs && B.length && xt(B, !0), Z = !1;
|
|
4921
|
+
H = Ln(e), K = xn(zr());
|
|
4922
|
+
const a = Ua();
|
|
4923
|
+
a.diagnostics && Dt(H, !0), a.logs && K.length && Dt(K, !0), J = !1;
|
|
4658
4924
|
}
|
|
4659
|
-
function
|
|
4660
|
-
|
|
4925
|
+
function ve(t) {
|
|
4926
|
+
J = !!t, r.privacyPanel && (r.privacyPanel.hidden = !J), r.privacyStack && (r.privacyStack.dataset.open = String(J)), r.privacyChange && (r.privacyChange.setAttribute("aria-expanded", J ? "true" : "false"), r.privacyChange.dataset.active = String(J)), J && be();
|
|
4661
4927
|
}
|
|
4662
|
-
function
|
|
4663
|
-
if (!
|
|
4928
|
+
function ke() {
|
|
4929
|
+
if (!r.privacy || !r.privacyText || !r.privacyChange)
|
|
4664
4930
|
return;
|
|
4665
|
-
const t =
|
|
4666
|
-
diagnostics:
|
|
4667
|
-
logs:
|
|
4931
|
+
const t = Tn({
|
|
4932
|
+
diagnostics: H,
|
|
4933
|
+
logs: K
|
|
4668
4934
|
});
|
|
4669
|
-
|
|
4670
|
-
const e =
|
|
4671
|
-
|
|
4935
|
+
r.privacyText.textContent = t, r.privacyText.hidden = !t;
|
|
4936
|
+
const e = H.length === 0 && K.length === 0;
|
|
4937
|
+
r.privacySummary && (r.privacySummary.hidden = e), r.privacy.hidden = e, r.privacyChange.hidden = !1;
|
|
4672
4938
|
}
|
|
4673
|
-
function
|
|
4674
|
-
const i = `${
|
|
4939
|
+
function Va(t, e, a) {
|
|
4940
|
+
const i = `${g(t ? "privacy.included" : "privacy.redacted")} ${a}`;
|
|
4675
4941
|
return `<label class="pill-switch nf-privacy-toggle" data-included="${t ? "true" : "false"}">
|
|
4676
|
-
<input type="checkbox" class="pill-switch-input" role="switch" ${t ? "checked" : ""} ${e ? 'data-indeterminate="true"' : ""} aria-label="${
|
|
4942
|
+
<input type="checkbox" class="pill-switch-input" role="switch" ${t ? "checked" : ""} ${e ? 'data-indeterminate="true"' : ""} aria-label="${I(i)}" aria-checked="${t ? "true" : "false"}">
|
|
4677
4943
|
<span class="pill-switch-track" aria-hidden="true">
|
|
4678
4944
|
<span class="pill-switch-mark"></span>
|
|
4679
4945
|
<span class="pill-switch-thumb"></span>
|
|
4680
4946
|
</span>
|
|
4681
4947
|
</label>`;
|
|
4682
4948
|
}
|
|
4683
|
-
function
|
|
4684
|
-
const
|
|
4685
|
-
return `<div class="nf-privacy-row" data-kind="${
|
|
4686
|
-
${
|
|
4687
|
-
<div class="nf-privacy-row-text"${i ? ` title="${
|
|
4688
|
-
<span class="nf-privacy-row-title">${
|
|
4689
|
-
<span class="nf-privacy-row-detail">${
|
|
4949
|
+
function We(t, e, a, o, i, n = null) {
|
|
4950
|
+
const s = Va(!i, !1, a), l = typeof o == "string" ? o : String(o || ""), c = i ? I(l) : n ?? I(l), d = l ? `${a}: ${l}` : a;
|
|
4951
|
+
return `<div class="nf-privacy-row" data-kind="${I(t)}" data-id="${I(e)}"${i ? ' data-redacted="true"' : ""}>
|
|
4952
|
+
${s}
|
|
4953
|
+
<div class="nf-privacy-row-text"${i ? ` title="${I(d)}"` : ""}>
|
|
4954
|
+
<span class="nf-privacy-row-title">${I(a)}</span>
|
|
4955
|
+
<span class="nf-privacy-row-detail">${c}</span>
|
|
4690
4956
|
</div>
|
|
4691
4957
|
</div>`;
|
|
4692
4958
|
}
|
|
4693
|
-
function
|
|
4959
|
+
function Ze(t, e, a, o) {
|
|
4694
4960
|
if (!a.length)
|
|
4695
4961
|
return "";
|
|
4696
|
-
const i =
|
|
4697
|
-
return `<section class="nf-privacy-section" data-section="${
|
|
4962
|
+
const i = Un(a), n = !i.checked && !i.indeterminate;
|
|
4963
|
+
return `<section class="nf-privacy-section" data-section="${I(t)}"${n ? ' data-redacted="true"' : ""}>
|
|
4698
4964
|
<div class="nf-privacy-section-head">
|
|
4699
|
-
${
|
|
4700
|
-
<h3 class="nf-privacy-section-title">${
|
|
4965
|
+
${Va(i.checked, i.indeterminate, e)}
|
|
4966
|
+
<h3 class="nf-privacy-section-title">${I(e)}</h3>
|
|
4701
4967
|
</div>
|
|
4702
|
-
<div class="nf-privacy-rows"${
|
|
4968
|
+
<div class="nf-privacy-rows"${n ? " hidden" : ""}>${o}</div>
|
|
4703
4969
|
</section>`;
|
|
4704
4970
|
}
|
|
4705
|
-
function
|
|
4706
|
-
if (!
|
|
4971
|
+
function be() {
|
|
4972
|
+
if (!r.privacyScroll)
|
|
4707
4973
|
return;
|
|
4708
|
-
const t =
|
|
4974
|
+
const t = H.map((a) => We(
|
|
4709
4975
|
"diagnostic",
|
|
4710
4976
|
a.key,
|
|
4711
4977
|
a.label,
|
|
4712
|
-
|
|
4978
|
+
Fn(a.value),
|
|
4713
4979
|
a.redacted
|
|
4714
|
-
)).join(""), e =
|
|
4715
|
-
const o =
|
|
4716
|
-
return
|
|
4980
|
+
)).join(""), e = K.map((a) => {
|
|
4981
|
+
const o = Zi(a), i = Number.isFinite(a.count) && a.count > 1 ? ` ×${a.count}` : "", n = `${a.level}${i}`, s = a.redacted ? null : `${Yi(a)}${a.truncated ? '<span class="nf-console-truncated">…</span>' : ""}`;
|
|
4982
|
+
return We(
|
|
4717
4983
|
"log",
|
|
4718
4984
|
a.id,
|
|
4719
|
-
|
|
4985
|
+
n,
|
|
4720
4986
|
o,
|
|
4721
4987
|
a.redacted,
|
|
4722
|
-
|
|
4988
|
+
s
|
|
4723
4989
|
);
|
|
4724
4990
|
}).join("");
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
].join(""),
|
|
4991
|
+
r.privacyScroll.innerHTML = [
|
|
4992
|
+
Ze("diagnostics", g("privacy.section.diagnostics"), H, t),
|
|
4993
|
+
K.length ? Ze("logs", g("privacy.section.logs"), K, e) : ""
|
|
4994
|
+
].join(""), r.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
|
|
4729
4995
|
a.indeterminate = !0, a.removeAttribute("data-indeterminate");
|
|
4730
|
-
}),
|
|
4996
|
+
}), ke();
|
|
4731
4997
|
}
|
|
4732
|
-
function
|
|
4998
|
+
function Mr(t) {
|
|
4733
4999
|
const e = t.target;
|
|
4734
5000
|
if (!(e instanceof HTMLInputElement) || e.type !== "checkbox")
|
|
4735
5001
|
return;
|
|
4736
5002
|
const a = e.closest("[data-section]"), o = e.closest(".nf-privacy-row"), i = !e.checked;
|
|
4737
5003
|
if (o) {
|
|
4738
|
-
const
|
|
4739
|
-
if (
|
|
4740
|
-
const l =
|
|
5004
|
+
const n = o.dataset.kind, s = o.dataset.id;
|
|
5005
|
+
if (n === "diagnostic") {
|
|
5006
|
+
const l = H.find((c) => c.key === s);
|
|
4741
5007
|
l && (l.redacted = i);
|
|
4742
|
-
} else if (
|
|
4743
|
-
const l =
|
|
5008
|
+
} else if (n === "log") {
|
|
5009
|
+
const l = K.find((c) => c.id === s);
|
|
4744
5010
|
l && (l.redacted = i);
|
|
4745
5011
|
}
|
|
4746
5012
|
} else if (a) {
|
|
4747
|
-
const
|
|
4748
|
-
|
|
5013
|
+
const n = a.dataset.section;
|
|
5014
|
+
n === "diagnostics" ? (Dt(H, i), qe({ diagnostics: i })) : n === "logs" && (Dt(K, i), qe({ logs: i }));
|
|
4749
5015
|
} else
|
|
4750
5016
|
return;
|
|
4751
|
-
|
|
5017
|
+
be();
|
|
4752
5018
|
}
|
|
4753
|
-
async function
|
|
4754
|
-
|
|
5019
|
+
async function Ba() {
|
|
5020
|
+
de(), vt || (vt = !0, $a("onOpen")), Na(), mt(), r.launcher.hidden = !0, j = ue(), ft = { w: 0, h: 0 }, G = null, W = "", gt = "", V = null, x = null, L = null, q = ar(), me(q), wt(null), St(!1), r.text.value = "", Ma(), z(""), Fr();
|
|
4755
5021
|
try {
|
|
4756
|
-
|
|
5022
|
+
La(await la(Pa())), z("");
|
|
4757
5023
|
} catch (e) {
|
|
4758
|
-
|
|
5024
|
+
W = "", z((e == null ? void 0 : e.message) || g("status.screenshotFailed"));
|
|
4759
5025
|
}
|
|
4760
|
-
|
|
5026
|
+
Et(), ve(!1), ke(), r.dialog.hidden = !1, rt(), r.text.focus();
|
|
4761
5027
|
}
|
|
4762
|
-
function
|
|
4763
|
-
if (!
|
|
5028
|
+
function nt() {
|
|
5029
|
+
if (!b)
|
|
4764
5030
|
return;
|
|
4765
|
-
const t =
|
|
4766
|
-
|
|
5031
|
+
const t = vt;
|
|
5032
|
+
X == null || X.stop(), St(!1), it && (N == null || N.stop()), ht(!1), Ra(), x = null, L = null, fe(!1), Na(), ve(!1), r.dialog.hidden = !0, r.stop.hidden = !0, It(), t && (vt = !1, $a("onClose"));
|
|
4767
5033
|
}
|
|
4768
|
-
function
|
|
4769
|
-
const e =
|
|
5034
|
+
function Dr(t = "") {
|
|
5035
|
+
const e = r.dialog, a = r.panel, o = r.panelBody, i = r.successMsg, n = r.successLink, s = String(t || "").trim(), l = !!(p.displayLink && s);
|
|
4770
5036
|
if (!e || !a || !o || !i)
|
|
4771
5037
|
return Promise.resolve(!1);
|
|
4772
|
-
|
|
4773
|
-
const
|
|
4774
|
-
if (o.hidden = !0, i.hidden = !1, e.classList.add("nf-success"), e.classList.toggle("nf-success-sticky", l), e.style.opacity = "1",
|
|
4775
|
-
if (
|
|
5038
|
+
kt = !0, bt = l, z("");
|
|
5039
|
+
const c = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, d = a.getBoundingClientRect();
|
|
5040
|
+
if (o.hidden = !0, i.hidden = !1, e.classList.add("nf-success"), e.classList.toggle("nf-success-sticky", l), e.style.opacity = "1", n && (l ? (n.hidden = !1, n.href = s) : (n.hidden = !0, n.removeAttribute("href"))), l) {
|
|
5041
|
+
if (c)
|
|
4776
5042
|
return Promise.resolve(!0);
|
|
4777
|
-
const
|
|
4778
|
-
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${
|
|
4779
|
-
let
|
|
4780
|
-
const
|
|
4781
|
-
|
|
4782
|
-
},
|
|
4783
|
-
|
|
5043
|
+
const A = a.getBoundingClientRect(), E = A.width > 0 ? d.width / A.width : 1, P = A.height > 0 ? d.height / A.height : 1;
|
|
5044
|
+
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${E}, ${P})`, a.getBoundingClientRect(), new Promise((u) => {
|
|
5045
|
+
let h = !1;
|
|
5046
|
+
const R = () => {
|
|
5047
|
+
h || (h = !0, a.removeEventListener("transitionend", k), u(!0));
|
|
5048
|
+
}, k = (f) => {
|
|
5049
|
+
f.target !== a || f.propertyName !== "transform" || R();
|
|
4784
5050
|
};
|
|
4785
|
-
a.addEventListener("transitionend",
|
|
5051
|
+
a.addEventListener("transitionend", k), requestAnimationFrame(() => {
|
|
4786
5052
|
a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
|
|
4787
|
-
}), window.setTimeout(
|
|
5053
|
+
}), window.setTimeout(R, 700);
|
|
4788
5054
|
});
|
|
4789
5055
|
}
|
|
4790
|
-
if (
|
|
4791
|
-
return new Promise((
|
|
4792
|
-
window.setTimeout(() =>
|
|
5056
|
+
if (c)
|
|
5057
|
+
return new Promise((A) => {
|
|
5058
|
+
window.setTimeout(() => A(!1), 1e3);
|
|
4793
5059
|
});
|
|
4794
|
-
const
|
|
4795
|
-
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${
|
|
4796
|
-
let
|
|
4797
|
-
const
|
|
4798
|
-
|
|
4799
|
-
e.style.transition = "opacity 0.28s ease", e.style.opacity = "0", window.setTimeout(() =>
|
|
5060
|
+
const m = a.getBoundingClientRect(), S = m.width > 0 ? d.width / m.width : 1, v = m.height > 0 ? d.height / m.height : 1;
|
|
5061
|
+
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${S}, ${v})`, a.getBoundingClientRect(), new Promise((A) => {
|
|
5062
|
+
let E = !1;
|
|
5063
|
+
const P = () => {
|
|
5064
|
+
E || (E = !0, a.removeEventListener("transitionend", u), window.setTimeout(() => {
|
|
5065
|
+
e.style.transition = "opacity 0.28s ease", e.style.opacity = "0", window.setTimeout(() => A(!1), 280);
|
|
4800
5066
|
}, 1e3));
|
|
4801
|
-
},
|
|
4802
|
-
|
|
5067
|
+
}, u = (h) => {
|
|
5068
|
+
h.target !== a || h.propertyName !== "transform" || P();
|
|
4803
5069
|
};
|
|
4804
|
-
a.addEventListener("transitionend",
|
|
5070
|
+
a.addEventListener("transitionend", u), requestAnimationFrame(() => {
|
|
4805
5071
|
a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
|
|
4806
|
-
}), window.setTimeout(
|
|
5072
|
+
}), window.setTimeout(P, 700);
|
|
4807
5073
|
});
|
|
4808
5074
|
}
|
|
4809
|
-
function
|
|
4810
|
-
|
|
5075
|
+
function Na() {
|
|
5076
|
+
kt = !1, bt = !1, r.dialog && (r.dialog.classList.remove("nf-success", "nf-success-sticky"), r.dialog.style.opacity = "", r.dialog.style.transition = "", r.panel && (r.panel.style.transform = "", r.panel.style.transition = "", r.panel.style.transformOrigin = ""), r.panelBody && (r.panelBody.hidden = !1), r.successMsg && (r.successMsg.hidden = !0), r.successLink && (r.successLink.hidden = !0, r.successLink.removeAttribute("href")));
|
|
4811
5077
|
}
|
|
4812
|
-
function
|
|
4813
|
-
|
|
5078
|
+
function Ir(t = {}) {
|
|
5079
|
+
_ = { ..._, ...Hi(t) }, Ma();
|
|
4814
5080
|
}
|
|
4815
|
-
async function
|
|
5081
|
+
async function Ka() {
|
|
4816
5082
|
var e, a;
|
|
4817
|
-
if (
|
|
5083
|
+
if (de(), Zt)
|
|
4818
5084
|
return null;
|
|
4819
|
-
const t =
|
|
4820
|
-
if (!t && !
|
|
4821
|
-
return
|
|
4822
|
-
if (!
|
|
4823
|
-
return
|
|
4824
|
-
|
|
5085
|
+
const t = r.text.value.trim();
|
|
5086
|
+
if (!t && !B() && !G)
|
|
5087
|
+
return z(g("status.emptyReport")), null;
|
|
5088
|
+
if (!p.endpoint || !p.projectKey)
|
|
5089
|
+
return z(g("status.missingConfig")), null;
|
|
5090
|
+
Zt = !0, Ye(!0), z(g("status.submitting"), !0);
|
|
4825
5091
|
try {
|
|
4826
|
-
const o =
|
|
5092
|
+
const o = Ar(), i = j.crop(), n = j.list(), s = j.isCropped(), l = s ? bn(n, i) : n, c = s ? { x: 0, y: 0, w: 1, h: 1 } : i, d = Mn({
|
|
4827
5093
|
author: o,
|
|
4828
|
-
diagnostics:
|
|
4829
|
-
logs:
|
|
4830
|
-
}),
|
|
5094
|
+
diagnostics: H,
|
|
5095
|
+
logs: K
|
|
5096
|
+
}), m = {
|
|
4831
5097
|
width: typeof screen < "u" ? screen.width : null,
|
|
4832
5098
|
height: typeof screen < "u" ? screen.height : null,
|
|
4833
5099
|
dpr: window.devicePixelRatio || 1
|
|
4834
|
-
},
|
|
4835
|
-
let v = 2048,
|
|
4836
|
-
|
|
4837
|
-
crop:
|
|
5100
|
+
}, S = [];
|
|
5101
|
+
let v = 2048, A = null, E = null;
|
|
5102
|
+
B() && (E = await Ve(W, {
|
|
5103
|
+
crop: s ? i : { x: 0, y: 0, w: 1, h: 1 },
|
|
4838
5104
|
maxEdge: v
|
|
4839
5105
|
}));
|
|
4840
|
-
for (let
|
|
4841
|
-
const
|
|
4842
|
-
...
|
|
4843
|
-
attempt:
|
|
5106
|
+
for (let P = 1; P <= 3; P += 1) {
|
|
5107
|
+
const u = P === 3 || !E, h = u ? {
|
|
5108
|
+
...E ? { width: E.width, height: E.height, mime: E.mime } : {},
|
|
5109
|
+
attempt: P,
|
|
4844
5110
|
omitted: !0
|
|
4845
5111
|
} : {
|
|
4846
|
-
width:
|
|
4847
|
-
height:
|
|
4848
|
-
mime:
|
|
4849
|
-
attempt:
|
|
4850
|
-
},
|
|
5112
|
+
width: E.width,
|
|
5113
|
+
height: E.height,
|
|
5114
|
+
mime: E.mime,
|
|
5115
|
+
attempt: P
|
|
5116
|
+
}, R = {
|
|
4851
5117
|
...d,
|
|
4852
|
-
screen:
|
|
4853
|
-
screenshotMeta:
|
|
5118
|
+
screen: m,
|
|
5119
|
+
screenshotMeta: h
|
|
4854
5120
|
};
|
|
4855
|
-
|
|
4856
|
-
message: (
|
|
4857
|
-
attempts: [...
|
|
5121
|
+
u && B() && (R.screenshotError = {
|
|
5122
|
+
message: (A == null ? void 0 : A.message) || "Screenshot omitted after failed uploads",
|
|
5123
|
+
attempts: [...S]
|
|
4858
5124
|
});
|
|
4859
|
-
const
|
|
4860
|
-
|
|
5125
|
+
const k = new FormData();
|
|
5126
|
+
k.append("message", t), k.append("kind", q), k.append("version", p.version || "0.0.0"), k.append("author", o), p.name && k.append("name", p.name), k.append("context", JSON.stringify(R)), k.append("annotations", JSON.stringify(l)), k.append("crop", JSON.stringify(c)), Array.isArray(p.targets) && k.append("targets", JSON.stringify(p.targets)), !u && E && k.append("screenshot", E.blob, `screenshot.${E.ext}`), G && k.append("recording", G, "recording.webm");
|
|
4861
5127
|
try {
|
|
4862
|
-
const
|
|
5128
|
+
const f = await fetch(`${p.endpoint}/v1/reports`, {
|
|
4863
5129
|
method: "POST",
|
|
4864
5130
|
headers: {
|
|
4865
|
-
"X-Notefully-Key":
|
|
5131
|
+
"X-Notefully-Key": p.projectKey
|
|
4866
5132
|
},
|
|
4867
|
-
body:
|
|
5133
|
+
body: k
|
|
4868
5134
|
});
|
|
4869
|
-
let
|
|
5135
|
+
let C = null;
|
|
4870
5136
|
try {
|
|
4871
|
-
|
|
5137
|
+
C = await f.json();
|
|
4872
5138
|
} catch {
|
|
4873
|
-
|
|
5139
|
+
C = null;
|
|
4874
5140
|
}
|
|
4875
|
-
if (!
|
|
4876
|
-
const
|
|
4877
|
-
throw
|
|
5141
|
+
if (!f.ok) {
|
|
5142
|
+
const Y = new Error((C == null ? void 0 : C.error) || `${g("status.submitFailed")} (${f.status})`);
|
|
5143
|
+
throw Y.status = f.status, Y.code = C == null ? void 0 : C.code, Y.json = C, Y;
|
|
4878
5144
|
}
|
|
4879
|
-
return
|
|
4880
|
-
} catch (
|
|
4881
|
-
if (
|
|
4882
|
-
attempt:
|
|
4883
|
-
maxEdge:
|
|
4884
|
-
status: (
|
|
4885
|
-
code: (
|
|
4886
|
-
message: String((
|
|
4887
|
-
}),
|
|
4888
|
-
throw
|
|
4889
|
-
if (!
|
|
4890
|
-
throw
|
|
4891
|
-
if (
|
|
4892
|
-
|
|
4893
|
-
crop:
|
|
5145
|
+
return u && B() && z(g("status.submitWithoutImage"), !0), await Dr((C == null ? void 0 : C.trackerUrl) || "") || nt(), C;
|
|
5146
|
+
} catch (f) {
|
|
5147
|
+
if (A = f, S.push({
|
|
5148
|
+
attempt: P,
|
|
5149
|
+
maxEdge: u ? null : v,
|
|
5150
|
+
status: (f == null ? void 0 : f.status) || null,
|
|
5151
|
+
code: (f == null ? void 0 : f.code) || null,
|
|
5152
|
+
message: String((f == null ? void 0 : f.message) || f)
|
|
5153
|
+
}), u || !E)
|
|
5154
|
+
throw z(((e = f == null ? void 0 : f.json) == null ? void 0 : e.error) || (f == null ? void 0 : f.message) || g("status.submitFailed")), f;
|
|
5155
|
+
if (!zn(f, (f == null ? void 0 : f.json) || null))
|
|
5156
|
+
throw z(((a = f == null ? void 0 : f.json) == null ? void 0 : a.error) || (f == null ? void 0 : f.message) || g("status.submitFailed")), f;
|
|
5157
|
+
if (P === 1) {
|
|
5158
|
+
z(g("status.submitTooLarge"), !0), v = En(v), E = await Ve(W, {
|
|
5159
|
+
crop: s ? i : { x: 0, y: 0, w: 1, h: 1 },
|
|
4894
5160
|
maxEdge: v
|
|
4895
5161
|
});
|
|
4896
5162
|
continue;
|
|
4897
5163
|
}
|
|
4898
|
-
|
|
5164
|
+
z(g("status.submitTooLarge"), !0), E = null;
|
|
4899
5165
|
}
|
|
4900
5166
|
}
|
|
4901
|
-
throw
|
|
5167
|
+
throw A || new Error(g("status.submitFailed"));
|
|
4902
5168
|
} finally {
|
|
4903
|
-
|
|
5169
|
+
Zt = !1, Ye(!1);
|
|
4904
5170
|
}
|
|
4905
5171
|
}
|
|
4906
|
-
function
|
|
4907
|
-
|
|
4908
|
-
}
|
|
4909
|
-
function
|
|
4910
|
-
|
|
4911
|
-
}
|
|
4912
|
-
const
|
|
4913
|
-
init:
|
|
4914
|
-
configure:
|
|
4915
|
-
setTheme:
|
|
4916
|
-
setVisible:
|
|
4917
|
-
open:
|
|
4918
|
-
close:
|
|
4919
|
-
isOpen:
|
|
4920
|
-
getLocale:
|
|
4921
|
-
setLocale:
|
|
4922
|
-
identify:
|
|
4923
|
-
|
|
4924
|
-
|
|
5172
|
+
function Ye(t) {
|
|
5173
|
+
r.submit && (r.submit.disabled = !!t, r.submit.setAttribute("aria-busy", t ? "true" : "false"));
|
|
5174
|
+
}
|
|
5175
|
+
function Or() {
|
|
5176
|
+
nt(), document.removeEventListener("keydown", Ia), b == null || b.remove(), b = null, r = {}, ot.unhook();
|
|
5177
|
+
}
|
|
5178
|
+
const Ht = {
|
|
5179
|
+
init: xr,
|
|
5180
|
+
configure: ye,
|
|
5181
|
+
setTheme: Ur,
|
|
5182
|
+
setVisible: Tr,
|
|
5183
|
+
open: Ba,
|
|
5184
|
+
close: nt,
|
|
5185
|
+
isOpen: jr,
|
|
5186
|
+
getLocale: Pr,
|
|
5187
|
+
setLocale: Lr,
|
|
5188
|
+
identify: Ir,
|
|
5189
|
+
log: Rr,
|
|
5190
|
+
submit: Ka,
|
|
5191
|
+
destroy: Or
|
|
4925
5192
|
};
|
|
4926
|
-
typeof window < "u" && (window.Notefully =
|
|
5193
|
+
typeof window < "u" && (window.Notefully = Ht);
|
|
4927
5194
|
export {
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
5195
|
+
nt as close,
|
|
5196
|
+
ye as configure,
|
|
5197
|
+
Ht as default,
|
|
5198
|
+
Or as destroy,
|
|
5199
|
+
Pr as getLocaleTag,
|
|
5200
|
+
Ir as identify,
|
|
5201
|
+
xr as init,
|
|
5202
|
+
jr as isOpen,
|
|
5203
|
+
Rr as log,
|
|
5204
|
+
Ba as open,
|
|
5205
|
+
Lr as setLocale,
|
|
5206
|
+
Ur as setTheme,
|
|
5207
|
+
Tr as setVisible,
|
|
5208
|
+
Ka as submit
|
|
4941
5209
|
};
|