@makefully/notefully 0.2.3 → 0.2.5
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 +38 -2
- package/dist/notefully.css +1 -1
- package/dist/notefully.iife.js +67 -51
- package/dist/notefully.js +1591 -1483
- package/package.json +1 -1
package/dist/notefully.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const wt = {
|
|
2
2
|
"launcher.open": "Leave a note…",
|
|
3
3
|
"tool.crop": "Crop",
|
|
4
4
|
"tool.resetCrop": "Reset crop",
|
|
@@ -14,9 +14,21 @@ const he = {
|
|
|
14
14
|
"tool.video": "Record video",
|
|
15
15
|
"tool.stopVideo": "Stop",
|
|
16
16
|
"form.messagePlaceholder": "Describe the bug or the change you want…",
|
|
17
|
+
"form.placeholder.bug": "What did you expect to happen and what happened instead?",
|
|
18
|
+
"form.placeholder.idea": "What's your idea?",
|
|
19
|
+
"form.placeholder.other": "Describe what you are reporting in detail.",
|
|
20
|
+
"form.placeholder.custom": "{kind}: Describe what you are reporting in detail.",
|
|
21
|
+
"form.title.bug": "Report a Problem",
|
|
22
|
+
"form.title.idea": "Share an Idea",
|
|
23
|
+
"form.title.other": "Send Feedback",
|
|
24
|
+
"form.intro.bug": "Tell us what went wrong.",
|
|
25
|
+
"form.intro.idea": "Tell us what we could improve.",
|
|
26
|
+
"form.intro.other": "Let us know what you think.",
|
|
27
|
+
"form.screenshotNote": "A screenshot of this page is attached. Use the image tools to crop, annotate, remove, or retake the screenshot.",
|
|
17
28
|
"form.author": "Author",
|
|
18
29
|
"form.authorPlaceholder": "Anonymous",
|
|
19
|
-
"form.submit": "
|
|
30
|
+
"form.submit": "Send Report",
|
|
31
|
+
"form.close": "Close",
|
|
20
32
|
"form.done": "Done",
|
|
21
33
|
"form.success": "Submitted!",
|
|
22
34
|
"form.viewReport": "View Report",
|
|
@@ -43,6 +55,8 @@ const he = {
|
|
|
43
55
|
"status.captureEmpty": "Screenshot capture produced an empty image.",
|
|
44
56
|
"shot.alt": "Screenshot",
|
|
45
57
|
"privacy.redact": "Redact",
|
|
58
|
+
"privacy.included": "Included",
|
|
59
|
+
"privacy.redacted": "Redacted",
|
|
46
60
|
"privacy.section.diagnostics": "Diagnostics",
|
|
47
61
|
"privacy.section.logs": "Logs",
|
|
48
62
|
"privacy.disclosure.both": "Also sending logs and diagnostic information",
|
|
@@ -57,15 +71,15 @@ const he = {
|
|
|
57
71
|
"diag.timezone": "Timezone",
|
|
58
72
|
"diag.viewport": "Viewport",
|
|
59
73
|
"diag.user": "User"
|
|
60
|
-
},
|
|
61
|
-
"en-US":
|
|
62
|
-
},
|
|
74
|
+
}, St = {
|
|
75
|
+
"en-US": wt
|
|
76
|
+
}, Dt = {
|
|
63
77
|
en: "en-US",
|
|
64
78
|
no: "nb",
|
|
65
79
|
tl: "fil",
|
|
66
80
|
"zh-Hans": "zh-CN",
|
|
67
81
|
"zh-Hant": "zh-TW"
|
|
68
|
-
},
|
|
82
|
+
}, ba = {
|
|
69
83
|
"es-MX": ["es-419", "es"],
|
|
70
84
|
"es-AR": ["es-419", "es"],
|
|
71
85
|
"es-CL": ["es-419", "es"],
|
|
@@ -85,71 +99,71 @@ const he = {
|
|
|
85
99
|
"es-DO": ["es-419", "es"],
|
|
86
100
|
"es-PR": ["es-419", "es"],
|
|
87
101
|
"es-CU": ["es-419", "es"]
|
|
88
|
-
},
|
|
89
|
-
let
|
|
90
|
-
function
|
|
91
|
-
!
|
|
102
|
+
}, wa = /* @__PURE__ */ new Set(["ar", "he", "fa", "ur"]);
|
|
103
|
+
let dt = "en-US", Le = {};
|
|
104
|
+
function f(t, e) {
|
|
105
|
+
!t || !e || typeof e != "object" || (St[String(t)] = e);
|
|
92
106
|
}
|
|
93
|
-
function
|
|
94
|
-
return String(
|
|
107
|
+
function rt(t) {
|
|
108
|
+
return String(t || "").trim().replace(/_/g, "-");
|
|
95
109
|
}
|
|
96
|
-
function
|
|
97
|
-
const
|
|
98
|
-
if (!
|
|
110
|
+
function Sa(t) {
|
|
111
|
+
const e = rt(t);
|
|
112
|
+
if (!e)
|
|
99
113
|
return ["en-US"];
|
|
100
|
-
const a =
|
|
101
|
-
l && !
|
|
114
|
+
const a = e, o = Dt[a] || Dt[a.toLowerCase()] || a, i = [], s = (l) => {
|
|
115
|
+
l && !i.includes(l) && i.push(l);
|
|
102
116
|
};
|
|
103
|
-
|
|
104
|
-
for (const [l, u] of Object.entries(
|
|
105
|
-
l.toLowerCase() === o.toLowerCase() && u.forEach(
|
|
106
|
-
const
|
|
107
|
-
for (let l =
|
|
108
|
-
|
|
109
|
-
return
|
|
110
|
-
}
|
|
111
|
-
function
|
|
112
|
-
for (const
|
|
113
|
-
if (
|
|
114
|
-
return
|
|
115
|
-
const a = Object.keys(
|
|
116
|
-
(o) => o.toLowerCase() ===
|
|
117
|
+
s(o);
|
|
118
|
+
for (const [l, u] of Object.entries(ba))
|
|
119
|
+
l.toLowerCase() === o.toLowerCase() && u.forEach(s);
|
|
120
|
+
const n = o.split("-");
|
|
121
|
+
for (let l = n.length - 1; l >= 1; l -= 1)
|
|
122
|
+
s(n.slice(0, l).join("-"));
|
|
123
|
+
return s(Dt[n[0]] || n[0]), s("en-US"), i;
|
|
124
|
+
}
|
|
125
|
+
function Aa(t) {
|
|
126
|
+
for (const e of Sa(t)) {
|
|
127
|
+
if (St[e])
|
|
128
|
+
return e;
|
|
129
|
+
const a = Object.keys(St).find(
|
|
130
|
+
(o) => o.toLowerCase() === e.toLowerCase()
|
|
117
131
|
);
|
|
118
132
|
if (a)
|
|
119
133
|
return a;
|
|
120
134
|
}
|
|
121
135
|
return "en-US";
|
|
122
136
|
}
|
|
123
|
-
function
|
|
124
|
-
var
|
|
125
|
-
if (
|
|
126
|
-
return
|
|
137
|
+
function Ca(t = {}) {
|
|
138
|
+
var e;
|
|
139
|
+
if (t.locale != null && String(t.locale).trim())
|
|
140
|
+
return rt(t.locale);
|
|
127
141
|
if (typeof document < "u") {
|
|
128
|
-
const a = (
|
|
142
|
+
const a = (e = document.documentElement) == null ? void 0 : e.lang;
|
|
129
143
|
if (a && String(a).trim())
|
|
130
|
-
return
|
|
144
|
+
return rt(a);
|
|
131
145
|
}
|
|
132
|
-
return typeof navigator < "u" && navigator.language ?
|
|
146
|
+
return typeof navigator < "u" && navigator.language ? rt(navigator.language) : "en-US";
|
|
133
147
|
}
|
|
134
|
-
function
|
|
135
|
-
return
|
|
148
|
+
function za(t, e) {
|
|
149
|
+
return t != null && (dt = rt(t) || "en-US"), dt;
|
|
136
150
|
}
|
|
137
|
-
function
|
|
138
|
-
|
|
151
|
+
function Ea(t) {
|
|
152
|
+
Le = t && typeof t == "object" ? { ...t } : {};
|
|
139
153
|
}
|
|
140
|
-
function
|
|
141
|
-
return
|
|
154
|
+
function At() {
|
|
155
|
+
return dt;
|
|
142
156
|
}
|
|
143
|
-
function
|
|
144
|
-
const
|
|
145
|
-
return
|
|
157
|
+
function Ra(t = dt) {
|
|
158
|
+
const e = rt(t).split("-")[0].toLowerCase();
|
|
159
|
+
return wa.has(e) ? "rtl" : "ltr";
|
|
146
160
|
}
|
|
147
|
-
function p(
|
|
148
|
-
const a = String(
|
|
149
|
-
let
|
|
150
|
-
return String(
|
|
161
|
+
function p(t, e) {
|
|
162
|
+
const a = String(t || ""), o = Aa(dt), i = St[o] || wt;
|
|
163
|
+
let s = Le[a] ?? i[a] ?? wt[a] ?? a;
|
|
164
|
+
return e && typeof e == "object" && (s = String(s).replace(/\{(\w+)\}/g, (n, l) => e[l] == null ? `{${l}}` : String(e[l]))), String(s);
|
|
151
165
|
}
|
|
152
|
-
const
|
|
166
|
+
const ja = {
|
|
153
167
|
"launcher.open": "Оставете бележка...",
|
|
154
168
|
"tool.crop": "Реколта",
|
|
155
169
|
"tool.resetCrop": "Нулиране на изрязването",
|
|
@@ -206,7 +220,7 @@ const Ca = {
|
|
|
206
220
|
"diag.timezone": "Часова зона",
|
|
207
221
|
"diag.viewport": "Изгледна плоча",
|
|
208
222
|
"diag.user": "Потребител"
|
|
209
|
-
},
|
|
223
|
+
}, Pa = {
|
|
210
224
|
"launcher.open": "Deixa una nota...",
|
|
211
225
|
"tool.crop": "Cultiu",
|
|
212
226
|
"tool.resetCrop": "Restablir el cultiu",
|
|
@@ -263,7 +277,7 @@ const Ca = {
|
|
|
263
277
|
"diag.timezone": "Zona horària",
|
|
264
278
|
"diag.viewport": "Porta de vista",
|
|
265
279
|
"diag.user": "Usuari"
|
|
266
|
-
},
|
|
280
|
+
}, xa = {
|
|
267
281
|
"launcher.open": "Zanechte poznámku...",
|
|
268
282
|
"tool.crop": "Oříznout",
|
|
269
283
|
"tool.resetCrop": "Obnovit oříznutí",
|
|
@@ -320,7 +334,7 @@ const Ca = {
|
|
|
320
334
|
"diag.timezone": "Časové pásmo",
|
|
321
335
|
"diag.viewport": "Výřez",
|
|
322
336
|
"diag.user": "Uživatel"
|
|
323
|
-
},
|
|
337
|
+
}, La = {
|
|
324
338
|
"launcher.open": "Efterlad en note...",
|
|
325
339
|
"tool.crop": "Afgrøde",
|
|
326
340
|
"tool.resetCrop": "Nulstil afgrøde",
|
|
@@ -377,7 +391,7 @@ const Ca = {
|
|
|
377
391
|
"diag.timezone": "Tidszone",
|
|
378
392
|
"diag.viewport": "Viewport",
|
|
379
393
|
"diag.user": "Bruger"
|
|
380
|
-
},
|
|
394
|
+
}, Ua = {
|
|
381
395
|
"launcher.open": "Hinterlassen Sie eine Notiz...",
|
|
382
396
|
"tool.crop": "Ernte",
|
|
383
397
|
"tool.resetCrop": "Zuschnitt zurücksetzen",
|
|
@@ -434,7 +448,7 @@ const Ca = {
|
|
|
434
448
|
"diag.timezone": "Zeitzone",
|
|
435
449
|
"diag.viewport": "Sichtfenster",
|
|
436
450
|
"diag.user": "Nutzer"
|
|
437
|
-
},
|
|
451
|
+
}, Ta = {
|
|
438
452
|
"launcher.open": "Αφήστε ένα σημείωμα...",
|
|
439
453
|
"tool.crop": "Καλλιέργεια",
|
|
440
454
|
"tool.resetCrop": "Επαναφορά της καλλιέργειας",
|
|
@@ -491,7 +505,7 @@ const Ca = {
|
|
|
491
505
|
"diag.timezone": "Ζώνη ώρας",
|
|
492
506
|
"diag.viewport": "Θύρα προβολής",
|
|
493
507
|
"diag.user": "Χρήστης"
|
|
494
|
-
},
|
|
508
|
+
}, Fa = {
|
|
495
509
|
"launcher.open": "Leave a note…",
|
|
496
510
|
"tool.crop": "Crop",
|
|
497
511
|
"tool.resetCrop": "Reset crop",
|
|
@@ -507,9 +521,21 @@ const Ca = {
|
|
|
507
521
|
"tool.video": "Record video",
|
|
508
522
|
"tool.stopVideo": "Stop",
|
|
509
523
|
"form.messagePlaceholder": "Describe the bug or the change you want…",
|
|
524
|
+
"form.placeholder.bug": "What did you expect to happen and what happened instead?",
|
|
525
|
+
"form.placeholder.idea": "What's your idea?",
|
|
526
|
+
"form.placeholder.other": "Describe what you are reporting in detail.",
|
|
527
|
+
"form.placeholder.custom": "{kind}: Describe what you are reporting in detail.",
|
|
528
|
+
"form.title.bug": "Report a Problem",
|
|
529
|
+
"form.title.idea": "Share an Idea",
|
|
530
|
+
"form.title.other": "Send Feedback",
|
|
531
|
+
"form.intro.bug": "Tell us what went wrong.",
|
|
532
|
+
"form.intro.idea": "Tell us what we could improve.",
|
|
533
|
+
"form.intro.other": "Let us know what you think.",
|
|
534
|
+
"form.screenshotNote": "A screenshot of this page is attached. Use the image tools to crop, annotate, remove, or retake the screenshot.",
|
|
510
535
|
"form.author": "Author",
|
|
511
536
|
"form.authorPlaceholder": "Anonymous",
|
|
512
|
-
"form.submit": "
|
|
537
|
+
"form.submit": "Send Report",
|
|
538
|
+
"form.close": "Close",
|
|
513
539
|
"form.done": "Done",
|
|
514
540
|
"form.success": "Submitted!",
|
|
515
541
|
"form.viewReport": "View Report",
|
|
@@ -536,6 +562,8 @@ const Ca = {
|
|
|
536
562
|
"status.captureEmpty": "Screenshot capture produced an empty image.",
|
|
537
563
|
"shot.alt": "Screenshot",
|
|
538
564
|
"privacy.redact": "Redact",
|
|
565
|
+
"privacy.included": "Included",
|
|
566
|
+
"privacy.redacted": "Redacted",
|
|
539
567
|
"privacy.section.diagnostics": "Diagnostics",
|
|
540
568
|
"privacy.section.logs": "Logs",
|
|
541
569
|
"privacy.disclosure.both": "Also sending logs and diagnostic information",
|
|
@@ -550,7 +578,7 @@ const Ca = {
|
|
|
550
578
|
"diag.timezone": "Timezone",
|
|
551
579
|
"diag.viewport": "Viewport",
|
|
552
580
|
"diag.user": "User"
|
|
553
|
-
},
|
|
581
|
+
}, Ma = {
|
|
554
582
|
"launcher.open": "Deja una nota...",
|
|
555
583
|
"tool.crop": "Cultivo",
|
|
556
584
|
"tool.resetCrop": "Restablecer cultivo",
|
|
@@ -607,7 +635,7 @@ const Ca = {
|
|
|
607
635
|
"diag.timezone": "Zona horaria",
|
|
608
636
|
"diag.viewport": "Ventana",
|
|
609
637
|
"diag.user": "Usuario"
|
|
610
|
-
},
|
|
638
|
+
}, Da = {
|
|
611
639
|
"launcher.open": "Deja una nota...",
|
|
612
640
|
"tool.crop": "Cultivo",
|
|
613
641
|
"tool.resetCrop": "Restablecer recorte",
|
|
@@ -664,7 +692,7 @@ const Ca = {
|
|
|
664
692
|
"diag.timezone": "Zona horaria",
|
|
665
693
|
"diag.viewport": "ViEWPORT",
|
|
666
694
|
"diag.user": "Usuario"
|
|
667
|
-
},
|
|
695
|
+
}, Oa = {
|
|
668
696
|
"launcher.open": "Jäta märkus...",
|
|
669
697
|
"tool.crop": "Põllukultuur",
|
|
670
698
|
"tool.resetCrop": "Lähtesta põllukultuur",
|
|
@@ -721,7 +749,7 @@ const Ca = {
|
|
|
721
749
|
"diag.timezone": "Ajavöönd",
|
|
722
750
|
"diag.viewport": "Vaatenurk",
|
|
723
751
|
"diag.user": "Kasutaja"
|
|
724
|
-
},
|
|
752
|
+
}, Ia = {
|
|
725
753
|
"launcher.open": "Jätä muistiinpano...",
|
|
726
754
|
"tool.crop": "Viljely",
|
|
727
755
|
"tool.resetCrop": "Nollaa rajaus",
|
|
@@ -778,7 +806,7 @@ const Ca = {
|
|
|
778
806
|
"diag.timezone": "Aikavyöhyke",
|
|
779
807
|
"diag.viewport": "Näyttöikkuna",
|
|
780
808
|
"diag.user": "Käyttäjä"
|
|
781
|
-
},
|
|
809
|
+
}, Va = {
|
|
782
810
|
"launcher.open": "Laissez un message...",
|
|
783
811
|
"tool.crop": "Récolte",
|
|
784
812
|
"tool.resetCrop": "Réinitialiser la récolte",
|
|
@@ -835,7 +863,7 @@ const Ca = {
|
|
|
835
863
|
"diag.timezone": "Fuseau horaire",
|
|
836
864
|
"diag.viewport": "Viewport",
|
|
837
865
|
"diag.user": "Utilisateur"
|
|
838
|
-
},
|
|
866
|
+
}, $a = {
|
|
839
867
|
"launcher.open": "एक नोट छोड़ें...",
|
|
840
868
|
"tool.crop": "क्रॉप",
|
|
841
869
|
"tool.resetCrop": "क्रॉप रीसेट करें",
|
|
@@ -892,7 +920,7 @@ const Ca = {
|
|
|
892
920
|
"diag.timezone": "टाइमज़ोन",
|
|
893
921
|
"diag.viewport": "व्यूपोर्ट",
|
|
894
922
|
"diag.user": "यूज़र"
|
|
895
|
-
},
|
|
923
|
+
}, Ba = {
|
|
896
924
|
"launcher.open": "Ostavite poruku...",
|
|
897
925
|
"tool.crop": "Usjev",
|
|
898
926
|
"tool.resetCrop": "Resetirajte obrezivanje",
|
|
@@ -949,7 +977,7 @@ const Ca = {
|
|
|
949
977
|
"diag.timezone": "Vremenska zona",
|
|
950
978
|
"diag.viewport": "Prikaznica",
|
|
951
979
|
"diag.user": "Korisnik"
|
|
952
|
-
},
|
|
980
|
+
}, Na = {
|
|
953
981
|
"launcher.open": "Hagyjon egy jegyzetet...",
|
|
954
982
|
"tool.crop": "Termés",
|
|
955
983
|
"tool.resetCrop": "Vágás visszaállítása",
|
|
@@ -1006,7 +1034,7 @@ const Ca = {
|
|
|
1006
1034
|
"diag.timezone": "Időzóna",
|
|
1007
1035
|
"diag.viewport": "Nézetablak",
|
|
1008
1036
|
"diag.user": "Felhasználó"
|
|
1009
|
-
},
|
|
1037
|
+
}, Ka = {
|
|
1010
1038
|
"launcher.open": "Tinggalkan catatan...",
|
|
1011
1039
|
"tool.crop": "Panas",
|
|
1012
1040
|
"tool.resetCrop": "Setel ulang tanaman",
|
|
@@ -1063,7 +1091,7 @@ const Ca = {
|
|
|
1063
1091
|
"diag.timezone": "Zona Waktu",
|
|
1064
1092
|
"diag.viewport": "Pintu pandang",
|
|
1065
1093
|
"diag.user": "Pengguna"
|
|
1066
|
-
},
|
|
1094
|
+
}, Ha = {
|
|
1067
1095
|
"launcher.open": "Lascia una nota...",
|
|
1068
1096
|
"tool.crop": "Ritaglia",
|
|
1069
1097
|
"tool.resetCrop": "Reimposta il ritaglio",
|
|
@@ -1120,7 +1148,7 @@ const Ca = {
|
|
|
1120
1148
|
"diag.timezone": "Fuso orario",
|
|
1121
1149
|
"diag.viewport": "Viewport",
|
|
1122
1150
|
"diag.user": "Utente"
|
|
1123
|
-
},
|
|
1151
|
+
}, Ga = {
|
|
1124
1152
|
"launcher.open": "メモを残してください...",
|
|
1125
1153
|
"tool.crop": "クロップ",
|
|
1126
1154
|
"tool.resetCrop": "トリミングをリセット",
|
|
@@ -1177,7 +1205,7 @@ const Ca = {
|
|
|
1177
1205
|
"diag.timezone": "タイムゾーン",
|
|
1178
1206
|
"diag.viewport": "ビューポート",
|
|
1179
1207
|
"diag.user": "ユーザ"
|
|
1180
|
-
},
|
|
1208
|
+
}, qa = {
|
|
1181
1209
|
"launcher.open": "메모 남기기...",
|
|
1182
1210
|
"tool.crop": "크롭",
|
|
1183
1211
|
"tool.resetCrop": "크롭 재설정",
|
|
@@ -1234,7 +1262,7 @@ const Ca = {
|
|
|
1234
1262
|
"diag.timezone": "타임존",
|
|
1235
1263
|
"diag.viewport": "뷰포트",
|
|
1236
1264
|
"diag.user": "사용자"
|
|
1237
|
-
},
|
|
1265
|
+
}, _a = {
|
|
1238
1266
|
"launcher.open": "Palikite pastabą...",
|
|
1239
1267
|
"tool.crop": "Apkarpyti",
|
|
1240
1268
|
"tool.resetCrop": "Iš naujo nustatyti apkarpymą",
|
|
@@ -1291,7 +1319,7 @@ const Ca = {
|
|
|
1291
1319
|
"diag.timezone": "Laiko juosta",
|
|
1292
1320
|
"diag.viewport": "Peržiūros sritis",
|
|
1293
1321
|
"diag.user": "Vartotojas"
|
|
1294
|
-
},
|
|
1322
|
+
}, Wa = {
|
|
1295
1323
|
"launcher.open": "Atstājiet piezīmi...",
|
|
1296
1324
|
"tool.crop": "Kultūraugs",
|
|
1297
1325
|
"tool.resetCrop": "Atiestatīt apgriešanu",
|
|
@@ -1348,7 +1376,7 @@ const Ca = {
|
|
|
1348
1376
|
"diag.timezone": "Laika josla",
|
|
1349
1377
|
"diag.viewport": "Skatu laukums",
|
|
1350
1378
|
"diag.user": "Lietotājs"
|
|
1351
|
-
},
|
|
1379
|
+
}, Za = {
|
|
1352
1380
|
"launcher.open": "Legg igjen et notat...",
|
|
1353
1381
|
"tool.crop": "Beskjæring",
|
|
1354
1382
|
"tool.resetCrop": "Tilbakestill beskjæring",
|
|
@@ -1405,7 +1433,7 @@ const Ca = {
|
|
|
1405
1433
|
"diag.timezone": "Tidssone",
|
|
1406
1434
|
"diag.viewport": "Visningsport",
|
|
1407
1435
|
"diag.user": "Bruker"
|
|
1408
|
-
},
|
|
1436
|
+
}, Ja = {
|
|
1409
1437
|
"launcher.open": "Laat een briefje achter...",
|
|
1410
1438
|
"tool.crop": "Gewas",
|
|
1411
1439
|
"tool.resetCrop": "Bijsnijden opnieuw instellen",
|
|
@@ -1462,7 +1490,7 @@ const Ca = {
|
|
|
1462
1490
|
"diag.timezone": "Tijdzone",
|
|
1463
1491
|
"diag.viewport": "Viewport",
|
|
1464
1492
|
"diag.user": "Gebruiker"
|
|
1465
|
-
},
|
|
1493
|
+
}, Ya = {
|
|
1466
1494
|
"launcher.open": "Zostaw notatkę...",
|
|
1467
1495
|
"tool.crop": "Uprawa",
|
|
1468
1496
|
"tool.resetCrop": "Resetuj kadrowanie",
|
|
@@ -1519,7 +1547,7 @@ const Ca = {
|
|
|
1519
1547
|
"diag.timezone": "Strefa czasowa",
|
|
1520
1548
|
"diag.viewport": "rzutnia",
|
|
1521
1549
|
"diag.user": "Użytkownik"
|
|
1522
|
-
},
|
|
1550
|
+
}, Xa = {
|
|
1523
1551
|
"launcher.open": "Deixe uma nota...",
|
|
1524
1552
|
"tool.crop": "Colheita",
|
|
1525
1553
|
"tool.resetCrop": "Redefinir o corte",
|
|
@@ -1576,7 +1604,7 @@ const Ca = {
|
|
|
1576
1604
|
"diag.timezone": "Fuso horário",
|
|
1577
1605
|
"diag.viewport": "Janela de visualização",
|
|
1578
1606
|
"diag.user": "Usuário"
|
|
1579
|
-
},
|
|
1607
|
+
}, Qa = {
|
|
1580
1608
|
"launcher.open": "Deixe uma nota...",
|
|
1581
1609
|
"tool.crop": "Colheita",
|
|
1582
1610
|
"tool.resetCrop": "Redefinir o recorte",
|
|
@@ -1633,7 +1661,7 @@ const Ca = {
|
|
|
1633
1661
|
"diag.timezone": "Fuso horário",
|
|
1634
1662
|
"diag.viewport": "Viewport",
|
|
1635
1663
|
"diag.user": "Utilizador"
|
|
1636
|
-
},
|
|
1664
|
+
}, to = {
|
|
1637
1665
|
"launcher.open": "Lăsați o notă...",
|
|
1638
1666
|
"tool.crop": "Cultură",
|
|
1639
1667
|
"tool.resetCrop": "Resetați recolta",
|
|
@@ -1690,7 +1718,7 @@ const Ca = {
|
|
|
1690
1718
|
"diag.timezone": "Fus orar",
|
|
1691
1719
|
"diag.viewport": "Portul de vizualizare",
|
|
1692
1720
|
"diag.user": "Utilizator"
|
|
1693
|
-
},
|
|
1721
|
+
}, eo = {
|
|
1694
1722
|
"launcher.open": "Оставьте заметку...",
|
|
1695
1723
|
"tool.crop": "урожай",
|
|
1696
1724
|
"tool.resetCrop": "Сбросить урожай",
|
|
@@ -1747,7 +1775,7 @@ const Ca = {
|
|
|
1747
1775
|
"diag.timezone": "Часовой пояс",
|
|
1748
1776
|
"diag.viewport": "окно просмотра",
|
|
1749
1777
|
"diag.user": "Пользователь"
|
|
1750
|
-
},
|
|
1778
|
+
}, ao = {
|
|
1751
1779
|
"launcher.open": "Zanechať poznámku...",
|
|
1752
1780
|
"tool.crop": "Oplodina",
|
|
1753
1781
|
"tool.resetCrop": "Obnoviť orezanie",
|
|
@@ -1804,7 +1832,7 @@ const Ca = {
|
|
|
1804
1832
|
"diag.timezone": "Časové pásmo",
|
|
1805
1833
|
"diag.viewport": "Zobrazenie",
|
|
1806
1834
|
"diag.user": "Používateľ"
|
|
1807
|
-
},
|
|
1835
|
+
}, oo = {
|
|
1808
1836
|
"launcher.open": "Pustite opombo...",
|
|
1809
1837
|
"tool.crop": "Pridelek",
|
|
1810
1838
|
"tool.resetCrop": "Ponastavi obrezovanje",
|
|
@@ -1861,7 +1889,7 @@ const Ca = {
|
|
|
1861
1889
|
"diag.timezone": "Časovni pas",
|
|
1862
1890
|
"diag.viewport": "Razgledna plošča",
|
|
1863
1891
|
"diag.user": "Uporabnik"
|
|
1864
|
-
},
|
|
1892
|
+
}, io = {
|
|
1865
1893
|
"launcher.open": "Ostavite belešku...",
|
|
1866
1894
|
"tool.crop": "Usjev",
|
|
1867
1895
|
"tool.resetCrop": "Resetujte usev",
|
|
@@ -1918,7 +1946,7 @@ const Ca = {
|
|
|
1918
1946
|
"diag.timezone": "Vremenska zona",
|
|
1919
1947
|
"diag.viewport": "Viedport",
|
|
1920
1948
|
"diag.user": "Korisnik"
|
|
1921
|
-
},
|
|
1949
|
+
}, so = {
|
|
1922
1950
|
"launcher.open": "Lämna en anteckning...",
|
|
1923
1951
|
"tool.crop": "Skörda",
|
|
1924
1952
|
"tool.resetCrop": "Återställ beskärning",
|
|
@@ -1975,7 +2003,7 @@ const Ca = {
|
|
|
1975
2003
|
"diag.timezone": "Tidszon",
|
|
1976
2004
|
"diag.viewport": "Viewport",
|
|
1977
2005
|
"diag.user": "Användare"
|
|
1978
|
-
},
|
|
2006
|
+
}, ro = {
|
|
1979
2007
|
"launcher.open": "Mag-iwan ng tala...",
|
|
1980
2008
|
"tool.crop": "Pag-ani",
|
|
1981
2009
|
"tool.resetCrop": "I-reset ang panani",
|
|
@@ -2032,7 +2060,7 @@ const Ca = {
|
|
|
2032
2060
|
"diag.timezone": "Timesone",
|
|
2033
2061
|
"diag.viewport": "Viewport",
|
|
2034
2062
|
"diag.user": "Gumagamit"
|
|
2035
|
-
},
|
|
2063
|
+
}, no = {
|
|
2036
2064
|
"launcher.open": "ทิ้งหมายเหตุ...",
|
|
2037
2065
|
"tool.crop": "พืชผล",
|
|
2038
2066
|
"tool.resetCrop": "รีเซ็ตการตัดพืช",
|
|
@@ -2089,7 +2117,7 @@ const Ca = {
|
|
|
2089
2117
|
"diag.timezone": "เขตเวลา",
|
|
2090
2118
|
"diag.viewport": "พอร์ตมุมมอง",
|
|
2091
2119
|
"diag.user": "ผู้ใช้"
|
|
2092
|
-
},
|
|
2120
|
+
}, lo = {
|
|
2093
2121
|
"launcher.open": "Bir not bırakın...",
|
|
2094
2122
|
"tool.crop": "Mahsul",
|
|
2095
2123
|
"tool.resetCrop": "Kırpmayı sıfırla",
|
|
@@ -2146,7 +2174,7 @@ const Ca = {
|
|
|
2146
2174
|
"diag.timezone": "Saat dilimi",
|
|
2147
2175
|
"diag.viewport": "Görünüm noktası",
|
|
2148
2176
|
"diag.user": "Kullanıcı"
|
|
2149
|
-
},
|
|
2177
|
+
}, uo = {
|
|
2150
2178
|
"launcher.open": "Залиште записку...",
|
|
2151
2179
|
"tool.crop": "Урожай",
|
|
2152
2180
|
"tool.resetCrop": "Скинути обрізку",
|
|
@@ -2203,7 +2231,7 @@ const Ca = {
|
|
|
2203
2231
|
"diag.timezone": "Часовий пояс",
|
|
2204
2232
|
"diag.viewport": "Вигляд",
|
|
2205
2233
|
"diag.user": "Користувач"
|
|
2206
|
-
},
|
|
2234
|
+
}, co = {
|
|
2207
2235
|
"launcher.open": "Để lại một ghi chú...",
|
|
2208
2236
|
"tool.crop": "Cây trồng",
|
|
2209
2237
|
"tool.resetCrop": "Đặt lại cây trồng",
|
|
@@ -2260,7 +2288,7 @@ const Ca = {
|
|
|
2260
2288
|
"diag.timezone": "Múi giờ",
|
|
2261
2289
|
"diag.viewport": "Cổng quan sát",
|
|
2262
2290
|
"diag.user": "Người dùng"
|
|
2263
|
-
},
|
|
2291
|
+
}, po = {
|
|
2264
2292
|
"launcher.open": "留个笔记...",
|
|
2265
2293
|
"tool.crop": "作物",
|
|
2266
2294
|
"tool.resetCrop": "重置裁剪",
|
|
@@ -2317,7 +2345,7 @@ const Ca = {
|
|
|
2317
2345
|
"diag.timezone": "时区",
|
|
2318
2346
|
"diag.viewport": "视口",
|
|
2319
2347
|
"diag.user": "用户"
|
|
2320
|
-
},
|
|
2348
|
+
}, go = {
|
|
2321
2349
|
"launcher.open": "留下筆記...",
|
|
2322
2350
|
"tool.crop": "作物",
|
|
2323
2351
|
"tool.resetCrop": "重設裁切",
|
|
@@ -2375,556 +2403,556 @@ const Ca = {
|
|
|
2375
2403
|
"diag.viewport": "視埠",
|
|
2376
2404
|
"diag.user": "使用者"
|
|
2377
2405
|
};
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
function
|
|
2419
|
-
if (
|
|
2420
|
-
return
|
|
2421
|
-
if (
|
|
2422
|
-
return window.location.protocol +
|
|
2423
|
-
if (
|
|
2424
|
-
return
|
|
2425
|
-
const a = document.implementation.createHTMLDocument(), o = a.createElement("base"),
|
|
2426
|
-
return a.head.appendChild(o), a.body.appendChild(
|
|
2406
|
+
f("en-US", wt);
|
|
2407
|
+
f("bg", ja);
|
|
2408
|
+
f("ca", Pa);
|
|
2409
|
+
f("cs", xa);
|
|
2410
|
+
f("da", La);
|
|
2411
|
+
f("de", Ua);
|
|
2412
|
+
f("el", Ta);
|
|
2413
|
+
f("en-GB", Fa);
|
|
2414
|
+
f("es", Ma);
|
|
2415
|
+
f("es-419", Da);
|
|
2416
|
+
f("et", Oa);
|
|
2417
|
+
f("fi", Ia);
|
|
2418
|
+
f("fr", Va);
|
|
2419
|
+
f("hi", $a);
|
|
2420
|
+
f("hr", Ba);
|
|
2421
|
+
f("hu", Na);
|
|
2422
|
+
f("id", Ka);
|
|
2423
|
+
f("it", Ha);
|
|
2424
|
+
f("ja", Ga);
|
|
2425
|
+
f("ko", qa);
|
|
2426
|
+
f("lt", _a);
|
|
2427
|
+
f("lv", Wa);
|
|
2428
|
+
f("nb", Za);
|
|
2429
|
+
f("nl", Ja);
|
|
2430
|
+
f("pl", Ya);
|
|
2431
|
+
f("pt-BR", Xa);
|
|
2432
|
+
f("pt-PT", Qa);
|
|
2433
|
+
f("ro", to);
|
|
2434
|
+
f("ru", eo);
|
|
2435
|
+
f("sk", ao);
|
|
2436
|
+
f("sl", oo);
|
|
2437
|
+
f("sr", io);
|
|
2438
|
+
f("sv", so);
|
|
2439
|
+
f("fil", ro);
|
|
2440
|
+
f("th", no);
|
|
2441
|
+
f("tr", lo);
|
|
2442
|
+
f("uk", uo);
|
|
2443
|
+
f("vi", co);
|
|
2444
|
+
f("zh-CN", po);
|
|
2445
|
+
f("zh-TW", go);
|
|
2446
|
+
function mo(t, e) {
|
|
2447
|
+
if (t.match(/^[a-z]+:\/\//i))
|
|
2448
|
+
return t;
|
|
2449
|
+
if (t.match(/^\/\//))
|
|
2450
|
+
return window.location.protocol + t;
|
|
2451
|
+
if (t.match(/^[a-z]+:/i))
|
|
2452
|
+
return t;
|
|
2453
|
+
const a = document.implementation.createHTMLDocument(), o = a.createElement("base"), i = a.createElement("a");
|
|
2454
|
+
return a.head.appendChild(o), a.body.appendChild(i), e && (o.href = e), i.href = t, i.href;
|
|
2427
2455
|
}
|
|
2428
|
-
const
|
|
2429
|
-
let
|
|
2430
|
-
const
|
|
2456
|
+
const ho = /* @__PURE__ */ (() => {
|
|
2457
|
+
let t = 0;
|
|
2458
|
+
const e = () => (
|
|
2431
2459
|
// eslint-disable-next-line no-bitwise
|
|
2432
2460
|
`0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4)
|
|
2433
2461
|
);
|
|
2434
|
-
return () => (
|
|
2462
|
+
return () => (t += 1, `u${e()}${t}`);
|
|
2435
2463
|
})();
|
|
2436
|
-
function
|
|
2437
|
-
const
|
|
2438
|
-
for (let a = 0, o =
|
|
2439
|
-
|
|
2440
|
-
return
|
|
2464
|
+
function X(t) {
|
|
2465
|
+
const e = [];
|
|
2466
|
+
for (let a = 0, o = t.length; a < o; a++)
|
|
2467
|
+
e.push(t[a]);
|
|
2468
|
+
return e;
|
|
2441
2469
|
}
|
|
2442
|
-
let
|
|
2443
|
-
function
|
|
2444
|
-
return
|
|
2470
|
+
let it = null;
|
|
2471
|
+
function Ue(t = {}) {
|
|
2472
|
+
return it || (t.includeStyleProperties ? (it = t.includeStyleProperties, it) : (it = X(window.getComputedStyle(document.documentElement)), it));
|
|
2445
2473
|
}
|
|
2446
|
-
function
|
|
2447
|
-
const o = (
|
|
2474
|
+
function Ct(t, e) {
|
|
2475
|
+
const o = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
|
|
2448
2476
|
return o ? parseFloat(o.replace("px", "")) : 0;
|
|
2449
2477
|
}
|
|
2450
|
-
function
|
|
2451
|
-
const
|
|
2452
|
-
return
|
|
2478
|
+
function fo(t) {
|
|
2479
|
+
const e = Ct(t, "border-left-width"), a = Ct(t, "border-right-width");
|
|
2480
|
+
return t.clientWidth + e + a;
|
|
2453
2481
|
}
|
|
2454
|
-
function
|
|
2455
|
-
const
|
|
2456
|
-
return
|
|
2482
|
+
function yo(t) {
|
|
2483
|
+
const e = Ct(t, "border-top-width"), a = Ct(t, "border-bottom-width");
|
|
2484
|
+
return t.clientHeight + e + a;
|
|
2457
2485
|
}
|
|
2458
|
-
function
|
|
2459
|
-
const a =
|
|
2486
|
+
function Te(t, e = {}) {
|
|
2487
|
+
const a = e.width || fo(t), o = e.height || yo(t);
|
|
2460
2488
|
return { width: a, height: o };
|
|
2461
2489
|
}
|
|
2462
|
-
function
|
|
2463
|
-
let
|
|
2490
|
+
function vo() {
|
|
2491
|
+
let t, e;
|
|
2464
2492
|
try {
|
|
2465
|
-
|
|
2493
|
+
e = process;
|
|
2466
2494
|
} catch {
|
|
2467
2495
|
}
|
|
2468
|
-
const a =
|
|
2469
|
-
return a && (
|
|
2496
|
+
const a = e && e.env ? e.env.devicePixelRatio : null;
|
|
2497
|
+
return a && (t = parseInt(a, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
|
|
2470
2498
|
}
|
|
2471
2499
|
const U = 16384;
|
|
2472
|
-
function
|
|
2473
|
-
(
|
|
2500
|
+
function ko(t) {
|
|
2501
|
+
(t.width > U || t.height > U) && (t.width > U && t.height > U ? t.width > t.height ? (t.height *= U / t.width, t.width = U) : (t.width *= U / t.height, t.height = U) : t.width > U ? (t.height *= U / t.width, t.width = U) : (t.width *= U / t.height, t.height = U));
|
|
2474
2502
|
}
|
|
2475
|
-
function
|
|
2476
|
-
return new Promise((
|
|
2503
|
+
function zt(t) {
|
|
2504
|
+
return new Promise((e, a) => {
|
|
2477
2505
|
const o = new Image();
|
|
2478
2506
|
o.onload = () => {
|
|
2479
2507
|
o.decode().then(() => {
|
|
2480
|
-
requestAnimationFrame(() =>
|
|
2508
|
+
requestAnimationFrame(() => e(o));
|
|
2481
2509
|
});
|
|
2482
|
-
}, o.onerror = a, o.crossOrigin = "anonymous", o.decoding = "async", o.src =
|
|
2510
|
+
}, o.onerror = a, o.crossOrigin = "anonymous", o.decoding = "async", o.src = t;
|
|
2483
2511
|
});
|
|
2484
2512
|
}
|
|
2485
|
-
async function
|
|
2486
|
-
return Promise.resolve().then(() => new XMLSerializer().serializeToString(
|
|
2513
|
+
async function bo(t) {
|
|
2514
|
+
return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
2487
2515
|
}
|
|
2488
|
-
async function
|
|
2489
|
-
const o = "http://www.w3.org/2000/svg",
|
|
2490
|
-
return
|
|
2516
|
+
async function wo(t, e, a) {
|
|
2517
|
+
const o = "http://www.w3.org/2000/svg", i = document.createElementNS(o, "svg"), s = document.createElementNS(o, "foreignObject");
|
|
2518
|
+
return i.setAttribute("width", `${e}`), i.setAttribute("height", `${a}`), i.setAttribute("viewBox", `0 0 ${e} ${a}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), i.appendChild(s), s.appendChild(t), bo(i);
|
|
2491
2519
|
}
|
|
2492
|
-
const L = (
|
|
2493
|
-
if (
|
|
2520
|
+
const L = (t, e) => {
|
|
2521
|
+
if (t instanceof e)
|
|
2494
2522
|
return !0;
|
|
2495
|
-
const a = Object.getPrototypeOf(
|
|
2496
|
-
return a === null ? !1 : a.constructor.name ===
|
|
2523
|
+
const a = Object.getPrototypeOf(t);
|
|
2524
|
+
return a === null ? !1 : a.constructor.name === e.name || L(a, e);
|
|
2497
2525
|
};
|
|
2498
|
-
function
|
|
2499
|
-
const
|
|
2500
|
-
return `${
|
|
2501
|
-
}
|
|
2502
|
-
function
|
|
2503
|
-
return
|
|
2504
|
-
const o =
|
|
2505
|
-
return `${a}: ${o}${
|
|
2526
|
+
function So(t) {
|
|
2527
|
+
const e = t.getPropertyValue("content");
|
|
2528
|
+
return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
|
|
2529
|
+
}
|
|
2530
|
+
function Ao(t, e) {
|
|
2531
|
+
return Ue(e).map((a) => {
|
|
2532
|
+
const o = t.getPropertyValue(a), i = t.getPropertyPriority(a);
|
|
2533
|
+
return `${a}: ${o}${i ? " !important" : ""};`;
|
|
2506
2534
|
}).join(" ");
|
|
2507
2535
|
}
|
|
2508
|
-
function
|
|
2509
|
-
const
|
|
2510
|
-
return document.createTextNode(`${
|
|
2536
|
+
function Co(t, e, a, o) {
|
|
2537
|
+
const i = `.${t}:${e}`, s = a.cssText ? So(a) : Ao(a, o);
|
|
2538
|
+
return document.createTextNode(`${i}{${s}}`);
|
|
2511
2539
|
}
|
|
2512
|
-
function
|
|
2513
|
-
const
|
|
2514
|
-
if (
|
|
2540
|
+
function re(t, e, a, o) {
|
|
2541
|
+
const i = window.getComputedStyle(t, a), s = i.getPropertyValue("content");
|
|
2542
|
+
if (s === "" || s === "none")
|
|
2515
2543
|
return;
|
|
2516
|
-
const
|
|
2544
|
+
const n = ho();
|
|
2517
2545
|
try {
|
|
2518
|
-
|
|
2546
|
+
e.className = `${e.className} ${n}`;
|
|
2519
2547
|
} catch {
|
|
2520
2548
|
return;
|
|
2521
2549
|
}
|
|
2522
2550
|
const l = document.createElement("style");
|
|
2523
|
-
l.appendChild(
|
|
2551
|
+
l.appendChild(Co(n, a, i, o)), e.appendChild(l);
|
|
2524
2552
|
}
|
|
2525
|
-
function
|
|
2526
|
-
|
|
2553
|
+
function zo(t, e, a) {
|
|
2554
|
+
re(t, e, ":before", a), re(t, e, ":after", a);
|
|
2527
2555
|
}
|
|
2528
|
-
const
|
|
2529
|
-
woff:
|
|
2530
|
-
woff2:
|
|
2556
|
+
const ne = "application/font-woff", le = "image/jpeg", Eo = {
|
|
2557
|
+
woff: ne,
|
|
2558
|
+
woff2: ne,
|
|
2531
2559
|
ttf: "application/font-truetype",
|
|
2532
2560
|
eot: "application/vnd.ms-fontobject",
|
|
2533
2561
|
png: "image/png",
|
|
2534
|
-
jpg:
|
|
2535
|
-
jpeg:
|
|
2562
|
+
jpg: le,
|
|
2563
|
+
jpeg: le,
|
|
2536
2564
|
gif: "image/gif",
|
|
2537
2565
|
tiff: "image/tiff",
|
|
2538
2566
|
svg: "image/svg+xml",
|
|
2539
2567
|
webp: "image/webp"
|
|
2540
2568
|
};
|
|
2541
|
-
function
|
|
2542
|
-
const
|
|
2543
|
-
return
|
|
2569
|
+
function Ro(t) {
|
|
2570
|
+
const e = /\.([^./]*?)$/g.exec(t);
|
|
2571
|
+
return e ? e[1] : "";
|
|
2544
2572
|
}
|
|
2545
|
-
function
|
|
2546
|
-
const
|
|
2547
|
-
return
|
|
2573
|
+
function Wt(t) {
|
|
2574
|
+
const e = Ro(t).toLowerCase();
|
|
2575
|
+
return Eo[e] || "";
|
|
2548
2576
|
}
|
|
2549
|
-
function
|
|
2550
|
-
return
|
|
2577
|
+
function jo(t) {
|
|
2578
|
+
return t.split(/,/)[1];
|
|
2551
2579
|
}
|
|
2552
|
-
function
|
|
2553
|
-
return
|
|
2580
|
+
function Nt(t) {
|
|
2581
|
+
return t.search(/^(data:)/) !== -1;
|
|
2554
2582
|
}
|
|
2555
|
-
function
|
|
2556
|
-
return `data:${
|
|
2583
|
+
function Po(t, e) {
|
|
2584
|
+
return `data:${e};base64,${t}`;
|
|
2557
2585
|
}
|
|
2558
|
-
async function
|
|
2559
|
-
const o = await fetch(
|
|
2586
|
+
async function Fe(t, e, a) {
|
|
2587
|
+
const o = await fetch(t, e);
|
|
2560
2588
|
if (o.status === 404)
|
|
2561
2589
|
throw new Error(`Resource "${o.url}" not found`);
|
|
2562
|
-
const
|
|
2563
|
-
return new Promise((
|
|
2590
|
+
const i = await o.blob();
|
|
2591
|
+
return new Promise((s, n) => {
|
|
2564
2592
|
const l = new FileReader();
|
|
2565
|
-
l.onerror =
|
|
2593
|
+
l.onerror = n, l.onloadend = () => {
|
|
2566
2594
|
try {
|
|
2567
|
-
|
|
2595
|
+
s(a({ res: o, result: l.result }));
|
|
2568
2596
|
} catch (u) {
|
|
2569
|
-
|
|
2597
|
+
n(u);
|
|
2570
2598
|
}
|
|
2571
|
-
}, l.readAsDataURL(
|
|
2599
|
+
}, l.readAsDataURL(i);
|
|
2572
2600
|
});
|
|
2573
2601
|
}
|
|
2574
|
-
const
|
|
2575
|
-
function
|
|
2576
|
-
let o =
|
|
2577
|
-
return a && (o =
|
|
2578
|
-
}
|
|
2579
|
-
async function
|
|
2580
|
-
const o =
|
|
2581
|
-
if (
|
|
2582
|
-
return
|
|
2583
|
-
a.cacheBust && (
|
|
2584
|
-
let
|
|
2602
|
+
const Ot = {};
|
|
2603
|
+
function xo(t, e, a) {
|
|
2604
|
+
let o = t.replace(/\?.*/, "");
|
|
2605
|
+
return a && (o = t), /ttf|otf|eot|woff2?/i.test(o) && (o = o.replace(/.*\//, "")), e ? `[${e}]${o}` : o;
|
|
2606
|
+
}
|
|
2607
|
+
async function Zt(t, e, a) {
|
|
2608
|
+
const o = xo(t, e, a.includeQueryParams);
|
|
2609
|
+
if (Ot[o] != null)
|
|
2610
|
+
return Ot[o];
|
|
2611
|
+
a.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
2612
|
+
let i;
|
|
2585
2613
|
try {
|
|
2586
|
-
const
|
|
2587
|
-
|
|
2588
|
-
} catch (
|
|
2589
|
-
|
|
2590
|
-
let
|
|
2591
|
-
|
|
2614
|
+
const s = await Fe(t, a.fetchRequestInit, ({ res: n, result: l }) => (e || (e = n.headers.get("Content-Type") || ""), jo(l)));
|
|
2615
|
+
i = Po(s, e);
|
|
2616
|
+
} catch (s) {
|
|
2617
|
+
i = a.imagePlaceholder || "";
|
|
2618
|
+
let n = `Failed to fetch resource: ${t}`;
|
|
2619
|
+
s && (n = typeof s == "string" ? s : s.message), n && console.warn(n);
|
|
2592
2620
|
}
|
|
2593
|
-
return
|
|
2594
|
-
}
|
|
2595
|
-
async function
|
|
2596
|
-
const
|
|
2597
|
-
return
|
|
2598
|
-
}
|
|
2599
|
-
async function
|
|
2600
|
-
if (
|
|
2601
|
-
const
|
|
2602
|
-
|
|
2603
|
-
const l =
|
|
2604
|
-
return
|
|
2621
|
+
return Ot[o] = i, i;
|
|
2622
|
+
}
|
|
2623
|
+
async function Lo(t) {
|
|
2624
|
+
const e = t.toDataURL();
|
|
2625
|
+
return e === "data:," ? t.cloneNode(!1) : zt(e);
|
|
2626
|
+
}
|
|
2627
|
+
async function Uo(t, e) {
|
|
2628
|
+
if (t.currentSrc) {
|
|
2629
|
+
const s = document.createElement("canvas"), n = s.getContext("2d");
|
|
2630
|
+
s.width = t.clientWidth, s.height = t.clientHeight, n == null || n.drawImage(t, 0, 0, s.width, s.height);
|
|
2631
|
+
const l = s.toDataURL();
|
|
2632
|
+
return zt(l);
|
|
2605
2633
|
}
|
|
2606
|
-
const a =
|
|
2607
|
-
return
|
|
2634
|
+
const a = t.poster, o = Wt(a), i = await Zt(a, o, e);
|
|
2635
|
+
return zt(i);
|
|
2608
2636
|
}
|
|
2609
|
-
async function
|
|
2637
|
+
async function To(t, e) {
|
|
2610
2638
|
var a;
|
|
2611
2639
|
try {
|
|
2612
|
-
if (!((a =
|
|
2613
|
-
return await
|
|
2640
|
+
if (!((a = t == null ? void 0 : t.contentDocument) === null || a === void 0) && a.body)
|
|
2641
|
+
return await Ut(t.contentDocument.body, e, !0);
|
|
2614
2642
|
} catch {
|
|
2615
2643
|
}
|
|
2616
|
-
return
|
|
2644
|
+
return t.cloneNode(!1);
|
|
2617
2645
|
}
|
|
2618
|
-
async function
|
|
2619
|
-
return L(
|
|
2646
|
+
async function Fo(t, e) {
|
|
2647
|
+
return L(t, HTMLCanvasElement) ? Lo(t) : L(t, HTMLVideoElement) ? Uo(t, e) : L(t, HTMLIFrameElement) ? To(t, e) : t.cloneNode(Me(t));
|
|
2620
2648
|
}
|
|
2621
|
-
const
|
|
2622
|
-
async function
|
|
2623
|
-
var o,
|
|
2624
|
-
if (
|
|
2625
|
-
return
|
|
2626
|
-
let
|
|
2627
|
-
return
|
|
2628
|
-
u &&
|
|
2629
|
-
}), Promise.resolve()),
|
|
2649
|
+
const Mo = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT", Me = (t) => t.tagName != null && t.tagName.toUpperCase() === "SVG";
|
|
2650
|
+
async function Do(t, e, a) {
|
|
2651
|
+
var o, i;
|
|
2652
|
+
if (Me(e))
|
|
2653
|
+
return e;
|
|
2654
|
+
let s = [];
|
|
2655
|
+
return Mo(t) && t.assignedNodes ? s = X(t.assignedNodes()) : L(t, HTMLIFrameElement) && (!((o = t.contentDocument) === null || o === void 0) && o.body) ? s = X(t.contentDocument.body.childNodes) : s = X(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), s.length === 0 || L(t, HTMLVideoElement) || await s.reduce((n, l) => n.then(() => Ut(l, a)).then((u) => {
|
|
2656
|
+
u && e.appendChild(u);
|
|
2657
|
+
}), Promise.resolve()), e;
|
|
2630
2658
|
}
|
|
2631
|
-
function
|
|
2632
|
-
const o =
|
|
2659
|
+
function Oo(t, e, a) {
|
|
2660
|
+
const o = e.style;
|
|
2633
2661
|
if (!o)
|
|
2634
2662
|
return;
|
|
2635
|
-
const
|
|
2636
|
-
|
|
2637
|
-
let
|
|
2638
|
-
|
|
2663
|
+
const i = window.getComputedStyle(t);
|
|
2664
|
+
i.cssText ? (o.cssText = i.cssText, o.transformOrigin = i.transformOrigin) : Ue(a).forEach((s) => {
|
|
2665
|
+
let n = i.getPropertyValue(s);
|
|
2666
|
+
s === "font-size" && n.endsWith("px") && (n = `${Math.floor(parseFloat(n.substring(0, n.length - 2))) - 0.1}px`), L(t, HTMLIFrameElement) && s === "display" && n === "inline" && (n = "block"), s === "d" && e.getAttribute("d") && (n = `path(${e.getAttribute("d")})`), o.setProperty(s, n, i.getPropertyPriority(s));
|
|
2639
2667
|
});
|
|
2640
2668
|
}
|
|
2641
|
-
function
|
|
2642
|
-
L(
|
|
2669
|
+
function Io(t, e) {
|
|
2670
|
+
L(t, HTMLTextAreaElement) && (e.innerHTML = t.value), L(t, HTMLInputElement) && e.setAttribute("value", t.value);
|
|
2643
2671
|
}
|
|
2644
|
-
function
|
|
2645
|
-
if (L(
|
|
2646
|
-
const o = Array.from(
|
|
2672
|
+
function Vo(t, e) {
|
|
2673
|
+
if (L(t, HTMLSelectElement)) {
|
|
2674
|
+
const o = Array.from(e.children).find((i) => t.value === i.getAttribute("value"));
|
|
2647
2675
|
o && o.setAttribute("selected", "");
|
|
2648
2676
|
}
|
|
2649
2677
|
}
|
|
2650
|
-
function
|
|
2651
|
-
return L(
|
|
2678
|
+
function $o(t, e, a) {
|
|
2679
|
+
return L(e, Element) && (Oo(t, e, a), zo(t, e, a), Io(t, e), Vo(t, e)), e;
|
|
2652
2680
|
}
|
|
2653
|
-
async function
|
|
2654
|
-
const a =
|
|
2681
|
+
async function Bo(t, e) {
|
|
2682
|
+
const a = t.querySelectorAll ? t.querySelectorAll("use") : [];
|
|
2655
2683
|
if (a.length === 0)
|
|
2656
|
-
return
|
|
2684
|
+
return t;
|
|
2657
2685
|
const o = {};
|
|
2658
|
-
for (let
|
|
2659
|
-
const l = a[
|
|
2686
|
+
for (let s = 0; s < a.length; s++) {
|
|
2687
|
+
const l = a[s].getAttribute("xlink:href");
|
|
2660
2688
|
if (l) {
|
|
2661
|
-
const u =
|
|
2662
|
-
!u &&
|
|
2689
|
+
const u = t.querySelector(l), d = document.querySelector(l);
|
|
2690
|
+
!u && d && !o[l] && (o[l] = await Ut(d, e, !0));
|
|
2663
2691
|
}
|
|
2664
2692
|
}
|
|
2665
|
-
const
|
|
2666
|
-
if (
|
|
2667
|
-
const
|
|
2668
|
-
|
|
2669
|
-
const l = document.createElementNS(
|
|
2670
|
-
|
|
2671
|
-
for (let u = 0; u <
|
|
2672
|
-
l.appendChild(
|
|
2673
|
-
|
|
2693
|
+
const i = Object.values(o);
|
|
2694
|
+
if (i.length) {
|
|
2695
|
+
const s = "http://www.w3.org/1999/xhtml", n = document.createElementNS(s, "svg");
|
|
2696
|
+
n.setAttribute("xmlns", s), n.style.position = "absolute", n.style.width = "0", n.style.height = "0", n.style.overflow = "hidden", n.style.display = "none";
|
|
2697
|
+
const l = document.createElementNS(s, "defs");
|
|
2698
|
+
n.appendChild(l);
|
|
2699
|
+
for (let u = 0; u < i.length; u++)
|
|
2700
|
+
l.appendChild(i[u]);
|
|
2701
|
+
t.appendChild(n);
|
|
2674
2702
|
}
|
|
2675
|
-
return
|
|
2703
|
+
return t;
|
|
2676
2704
|
}
|
|
2677
|
-
async function
|
|
2678
|
-
return !a &&
|
|
2705
|
+
async function Ut(t, e, a) {
|
|
2706
|
+
return !a && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((o) => Fo(o, e)).then((o) => Do(t, o, e)).then((o) => $o(t, o, e)).then((o) => Bo(o, e));
|
|
2679
2707
|
}
|
|
2680
|
-
const
|
|
2681
|
-
function
|
|
2682
|
-
const
|
|
2683
|
-
return new RegExp(`(url\\(['"]?)(${
|
|
2708
|
+
const De = /url\((['"]?)([^'"]+?)\1\)/g, No = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, Ko = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
2709
|
+
function Ho(t) {
|
|
2710
|
+
const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
2711
|
+
return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
|
|
2684
2712
|
}
|
|
2685
|
-
function
|
|
2686
|
-
const
|
|
2687
|
-
return
|
|
2713
|
+
function Go(t) {
|
|
2714
|
+
const e = [];
|
|
2715
|
+
return t.replace(De, (a, o, i) => (e.push(i), a)), e.filter((a) => !Nt(a));
|
|
2688
2716
|
}
|
|
2689
|
-
async function
|
|
2717
|
+
async function qo(t, e, a, o, i) {
|
|
2690
2718
|
try {
|
|
2691
|
-
const
|
|
2719
|
+
const s = a ? mo(e, a) : e, n = Wt(e);
|
|
2692
2720
|
let l;
|
|
2693
|
-
return
|
|
2721
|
+
return i || (l = await Zt(s, n, o)), t.replace(Ho(e), `$1${l}$3`);
|
|
2694
2722
|
} catch {
|
|
2695
2723
|
}
|
|
2696
|
-
return
|
|
2724
|
+
return t;
|
|
2697
2725
|
}
|
|
2698
|
-
function
|
|
2699
|
-
return
|
|
2726
|
+
function _o(t, { preferredFontFormat: e }) {
|
|
2727
|
+
return e ? t.replace(Ko, (a) => {
|
|
2700
2728
|
for (; ; ) {
|
|
2701
|
-
const [o, ,
|
|
2702
|
-
if (!
|
|
2729
|
+
const [o, , i] = No.exec(a) || [];
|
|
2730
|
+
if (!i)
|
|
2703
2731
|
return "";
|
|
2704
|
-
if (
|
|
2732
|
+
if (i === e)
|
|
2705
2733
|
return `src: ${o};`;
|
|
2706
2734
|
}
|
|
2707
|
-
}) :
|
|
2735
|
+
}) : t;
|
|
2708
2736
|
}
|
|
2709
|
-
function
|
|
2710
|
-
return
|
|
2737
|
+
function Oe(t) {
|
|
2738
|
+
return t.search(De) !== -1;
|
|
2711
2739
|
}
|
|
2712
|
-
async function
|
|
2713
|
-
if (!
|
|
2714
|
-
return
|
|
2715
|
-
const o =
|
|
2716
|
-
return
|
|
2740
|
+
async function Ie(t, e, a) {
|
|
2741
|
+
if (!Oe(t))
|
|
2742
|
+
return t;
|
|
2743
|
+
const o = _o(t, a);
|
|
2744
|
+
return Go(o).reduce((s, n) => s.then((l) => qo(l, n, e, a)), Promise.resolve(o));
|
|
2717
2745
|
}
|
|
2718
|
-
async function
|
|
2746
|
+
async function st(t, e, a) {
|
|
2719
2747
|
var o;
|
|
2720
|
-
const
|
|
2721
|
-
if (
|
|
2722
|
-
const
|
|
2723
|
-
return
|
|
2748
|
+
const i = (o = e.style) === null || o === void 0 ? void 0 : o.getPropertyValue(t);
|
|
2749
|
+
if (i) {
|
|
2750
|
+
const s = await Ie(i, null, a);
|
|
2751
|
+
return e.style.setProperty(t, s, e.style.getPropertyPriority(t)), !0;
|
|
2724
2752
|
}
|
|
2725
2753
|
return !1;
|
|
2726
2754
|
}
|
|
2727
|
-
async function
|
|
2728
|
-
await
|
|
2755
|
+
async function Wo(t, e) {
|
|
2756
|
+
await st("background", t, e) || await st("background-image", t, e), await st("mask", t, e) || await st("-webkit-mask", t, e) || await st("mask-image", t, e) || await st("-webkit-mask-image", t, e);
|
|
2729
2757
|
}
|
|
2730
|
-
async function
|
|
2731
|
-
const a = L(
|
|
2732
|
-
if (!(a && !
|
|
2758
|
+
async function Zo(t, e) {
|
|
2759
|
+
const a = L(t, HTMLImageElement);
|
|
2760
|
+
if (!(a && !Nt(t.src)) && !(L(t, SVGImageElement) && !Nt(t.href.baseVal)))
|
|
2733
2761
|
return;
|
|
2734
|
-
const o = a ?
|
|
2735
|
-
await new Promise((
|
|
2736
|
-
|
|
2762
|
+
const o = a ? t.src : t.href.baseVal, i = await Zt(o, Wt(o), e);
|
|
2763
|
+
await new Promise((s, n) => {
|
|
2764
|
+
t.onload = s, t.onerror = e.onImageErrorHandler ? (...u) => {
|
|
2737
2765
|
try {
|
|
2738
|
-
|
|
2739
|
-
} catch (
|
|
2740
|
-
|
|
2766
|
+
s(e.onImageErrorHandler(...u));
|
|
2767
|
+
} catch (d) {
|
|
2768
|
+
n(d);
|
|
2741
2769
|
}
|
|
2742
|
-
} :
|
|
2743
|
-
const l =
|
|
2744
|
-
l.decode && (l.decode =
|
|
2770
|
+
} : n;
|
|
2771
|
+
const l = t;
|
|
2772
|
+
l.decode && (l.decode = s), l.loading === "lazy" && (l.loading = "eager"), a ? (t.srcset = "", t.src = i) : t.href.baseVal = i;
|
|
2745
2773
|
});
|
|
2746
2774
|
}
|
|
2747
|
-
async function
|
|
2748
|
-
const o =
|
|
2749
|
-
await Promise.all(o).then(() =>
|
|
2750
|
-
}
|
|
2751
|
-
async function
|
|
2752
|
-
L(
|
|
2753
|
-
}
|
|
2754
|
-
function
|
|
2755
|
-
const { style: a } =
|
|
2756
|
-
|
|
2757
|
-
const o =
|
|
2758
|
-
return o != null && Object.keys(o).forEach((
|
|
2759
|
-
a[
|
|
2760
|
-
}),
|
|
2761
|
-
}
|
|
2762
|
-
const
|
|
2763
|
-
async function
|
|
2764
|
-
let
|
|
2765
|
-
if (
|
|
2766
|
-
return
|
|
2767
|
-
const o = await (await fetch(
|
|
2768
|
-
return
|
|
2769
|
-
}
|
|
2770
|
-
async function
|
|
2771
|
-
let a =
|
|
2772
|
-
const o = /url\(["']?([^"')]+)["']?\)/g,
|
|
2773
|
-
let l =
|
|
2774
|
-
return l.startsWith("https://") || (l = new URL(l,
|
|
2775
|
+
async function Jo(t, e) {
|
|
2776
|
+
const o = X(t.childNodes).map((i) => Ve(i, e));
|
|
2777
|
+
await Promise.all(o).then(() => t);
|
|
2778
|
+
}
|
|
2779
|
+
async function Ve(t, e) {
|
|
2780
|
+
L(t, Element) && (await Wo(t, e), await Zo(t, e), await Jo(t, e));
|
|
2781
|
+
}
|
|
2782
|
+
function Yo(t, e) {
|
|
2783
|
+
const { style: a } = t;
|
|
2784
|
+
e.backgroundColor && (a.backgroundColor = e.backgroundColor), e.width && (a.width = `${e.width}px`), e.height && (a.height = `${e.height}px`);
|
|
2785
|
+
const o = e.style;
|
|
2786
|
+
return o != null && Object.keys(o).forEach((i) => {
|
|
2787
|
+
a[i] = o[i];
|
|
2788
|
+
}), t;
|
|
2789
|
+
}
|
|
2790
|
+
const ue = {};
|
|
2791
|
+
async function ce(t) {
|
|
2792
|
+
let e = ue[t];
|
|
2793
|
+
if (e != null)
|
|
2794
|
+
return e;
|
|
2795
|
+
const o = await (await fetch(t)).text();
|
|
2796
|
+
return e = { url: t, cssText: o }, ue[t] = e, e;
|
|
2797
|
+
}
|
|
2798
|
+
async function de(t, e) {
|
|
2799
|
+
let a = t.cssText;
|
|
2800
|
+
const o = /url\(["']?([^"')]+)["']?\)/g, s = (a.match(/url\([^)]+\)/g) || []).map(async (n) => {
|
|
2801
|
+
let l = n.replace(o, "$1");
|
|
2802
|
+
return l.startsWith("https://") || (l = new URL(l, t.url).href), Fe(l, e.fetchRequestInit, ({ result: u }) => (a = a.replace(n, `url(${u})`), [n, u]));
|
|
2775
2803
|
});
|
|
2776
|
-
return Promise.all(
|
|
2804
|
+
return Promise.all(s).then(() => a);
|
|
2777
2805
|
}
|
|
2778
|
-
function
|
|
2779
|
-
if (
|
|
2806
|
+
function pe(t) {
|
|
2807
|
+
if (t == null)
|
|
2780
2808
|
return [];
|
|
2781
|
-
const
|
|
2782
|
-
let o =
|
|
2783
|
-
const
|
|
2809
|
+
const e = [], a = /(\/\*[\s\S]*?\*\/)/gi;
|
|
2810
|
+
let o = t.replace(a, "");
|
|
2811
|
+
const i = new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
2784
2812
|
for (; ; ) {
|
|
2785
|
-
const u =
|
|
2813
|
+
const u = i.exec(o);
|
|
2786
2814
|
if (u === null)
|
|
2787
2815
|
break;
|
|
2788
|
-
|
|
2816
|
+
e.push(u[0]);
|
|
2789
2817
|
}
|
|
2790
|
-
o = o.replace(
|
|
2791
|
-
const
|
|
2818
|
+
o = o.replace(i, "");
|
|
2819
|
+
const s = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, n = "((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", l = new RegExp(n, "gi");
|
|
2792
2820
|
for (; ; ) {
|
|
2793
|
-
let u =
|
|
2821
|
+
let u = s.exec(o);
|
|
2794
2822
|
if (u === null) {
|
|
2795
2823
|
if (u = l.exec(o), u === null)
|
|
2796
2824
|
break;
|
|
2797
|
-
|
|
2825
|
+
s.lastIndex = l.lastIndex;
|
|
2798
2826
|
} else
|
|
2799
|
-
l.lastIndex =
|
|
2800
|
-
|
|
2827
|
+
l.lastIndex = s.lastIndex;
|
|
2828
|
+
e.push(u[0]);
|
|
2801
2829
|
}
|
|
2802
|
-
return
|
|
2830
|
+
return e;
|
|
2803
2831
|
}
|
|
2804
|
-
async function
|
|
2832
|
+
async function Xo(t, e) {
|
|
2805
2833
|
const a = [], o = [];
|
|
2806
|
-
return
|
|
2807
|
-
if ("cssRules" in
|
|
2834
|
+
return t.forEach((i) => {
|
|
2835
|
+
if ("cssRules" in i)
|
|
2808
2836
|
try {
|
|
2809
|
-
|
|
2810
|
-
if (
|
|
2811
|
-
let l =
|
|
2812
|
-
const u =
|
|
2837
|
+
X(i.cssRules || []).forEach((s, n) => {
|
|
2838
|
+
if (s.type === CSSRule.IMPORT_RULE) {
|
|
2839
|
+
let l = n + 1;
|
|
2840
|
+
const u = s.href, d = ce(u).then((g) => de(g, e)).then((g) => pe(g).forEach((k) => {
|
|
2813
2841
|
try {
|
|
2814
|
-
|
|
2815
|
-
} catch (
|
|
2842
|
+
i.insertRule(k, k.startsWith("@import") ? l += 1 : i.cssRules.length);
|
|
2843
|
+
} catch (v) {
|
|
2816
2844
|
console.error("Error inserting rule from remote css", {
|
|
2817
|
-
rule:
|
|
2818
|
-
error:
|
|
2845
|
+
rule: k,
|
|
2846
|
+
error: v
|
|
2819
2847
|
});
|
|
2820
2848
|
}
|
|
2821
2849
|
})).catch((g) => {
|
|
2822
2850
|
console.error("Error loading remote css", g.toString());
|
|
2823
2851
|
});
|
|
2824
|
-
o.push(
|
|
2852
|
+
o.push(d);
|
|
2825
2853
|
}
|
|
2826
2854
|
});
|
|
2827
|
-
} catch (
|
|
2828
|
-
const
|
|
2829
|
-
|
|
2830
|
-
|
|
2855
|
+
} catch (s) {
|
|
2856
|
+
const n = t.find((l) => l.href == null) || document.styleSheets[0];
|
|
2857
|
+
i.href != null && o.push(ce(i.href).then((l) => de(l, e)).then((l) => pe(l).forEach((u) => {
|
|
2858
|
+
n.insertRule(u, n.cssRules.length);
|
|
2831
2859
|
})).catch((l) => {
|
|
2832
2860
|
console.error("Error loading remote stylesheet", l);
|
|
2833
|
-
})), console.error("Error inlining remote css file",
|
|
2861
|
+
})), console.error("Error inlining remote css file", s);
|
|
2834
2862
|
}
|
|
2835
|
-
}), Promise.all(o).then(() => (
|
|
2836
|
-
if ("cssRules" in
|
|
2863
|
+
}), Promise.all(o).then(() => (t.forEach((i) => {
|
|
2864
|
+
if ("cssRules" in i)
|
|
2837
2865
|
try {
|
|
2838
|
-
|
|
2839
|
-
a.push(
|
|
2866
|
+
X(i.cssRules || []).forEach((s) => {
|
|
2867
|
+
a.push(s);
|
|
2840
2868
|
});
|
|
2841
|
-
} catch (
|
|
2842
|
-
console.error(`Error while reading CSS rules from ${
|
|
2869
|
+
} catch (s) {
|
|
2870
|
+
console.error(`Error while reading CSS rules from ${i.href}`, s);
|
|
2843
2871
|
}
|
|
2844
2872
|
}), a));
|
|
2845
2873
|
}
|
|
2846
|
-
function
|
|
2847
|
-
return
|
|
2874
|
+
function Qo(t) {
|
|
2875
|
+
return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => Oe(e.style.getPropertyValue("src")));
|
|
2848
2876
|
}
|
|
2849
|
-
async function
|
|
2850
|
-
if (
|
|
2877
|
+
async function ti(t, e) {
|
|
2878
|
+
if (t.ownerDocument == null)
|
|
2851
2879
|
throw new Error("Provided element is not within a Document");
|
|
2852
|
-
const a =
|
|
2853
|
-
return
|
|
2880
|
+
const a = X(t.ownerDocument.styleSheets), o = await Xo(a, e);
|
|
2881
|
+
return Qo(o);
|
|
2854
2882
|
}
|
|
2855
|
-
function
|
|
2856
|
-
return
|
|
2883
|
+
function $e(t) {
|
|
2884
|
+
return t.trim().replace(/["']/g, "");
|
|
2857
2885
|
}
|
|
2858
|
-
function
|
|
2859
|
-
const
|
|
2886
|
+
function ei(t) {
|
|
2887
|
+
const e = /* @__PURE__ */ new Set();
|
|
2860
2888
|
function a(o) {
|
|
2861
|
-
(o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((
|
|
2862
|
-
|
|
2863
|
-
}), Array.from(o.children).forEach((
|
|
2864
|
-
|
|
2889
|
+
(o.style.fontFamily || getComputedStyle(o).fontFamily).split(",").forEach((s) => {
|
|
2890
|
+
e.add($e(s));
|
|
2891
|
+
}), Array.from(o.children).forEach((s) => {
|
|
2892
|
+
s instanceof HTMLElement && a(s);
|
|
2865
2893
|
});
|
|
2866
2894
|
}
|
|
2867
|
-
return a(
|
|
2895
|
+
return a(t), e;
|
|
2868
2896
|
}
|
|
2869
|
-
async function
|
|
2870
|
-
const a = await
|
|
2871
|
-
return (await Promise.all(a.filter((
|
|
2872
|
-
const
|
|
2873
|
-
return
|
|
2897
|
+
async function ai(t, e) {
|
|
2898
|
+
const a = await ti(t, e), o = ei(t);
|
|
2899
|
+
return (await Promise.all(a.filter((s) => o.has($e(s.style.fontFamily))).map((s) => {
|
|
2900
|
+
const n = s.parentStyleSheet ? s.parentStyleSheet.href : null;
|
|
2901
|
+
return Ie(s.cssText, n, e);
|
|
2874
2902
|
}))).join(`
|
|
2875
2903
|
`);
|
|
2876
2904
|
}
|
|
2877
|
-
async function
|
|
2878
|
-
const a =
|
|
2905
|
+
async function oi(t, e) {
|
|
2906
|
+
const a = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await ai(t, e);
|
|
2879
2907
|
if (a) {
|
|
2880
|
-
const o = document.createElement("style"),
|
|
2881
|
-
o.appendChild(
|
|
2908
|
+
const o = document.createElement("style"), i = document.createTextNode(a);
|
|
2909
|
+
o.appendChild(i), t.firstChild ? t.insertBefore(o, t.firstChild) : t.appendChild(o);
|
|
2882
2910
|
}
|
|
2883
2911
|
}
|
|
2884
|
-
async function
|
|
2885
|
-
const { width: a, height: o } =
|
|
2886
|
-
return await
|
|
2912
|
+
async function ii(t, e = {}) {
|
|
2913
|
+
const { width: a, height: o } = Te(t, e), i = await Ut(t, e, !0);
|
|
2914
|
+
return await oi(i, e), await Ve(i, e), Yo(i, e), await wo(i, a, o);
|
|
2887
2915
|
}
|
|
2888
|
-
async function
|
|
2889
|
-
const { width: a, height: o } =
|
|
2890
|
-
return
|
|
2916
|
+
async function si(t, e = {}) {
|
|
2917
|
+
const { width: a, height: o } = Te(t, e), i = await ii(t, e), s = await zt(i), n = document.createElement("canvas"), l = n.getContext("2d"), u = e.pixelRatio || vo(), d = e.canvasWidth || a, g = e.canvasHeight || o;
|
|
2918
|
+
return n.width = d * u, n.height = g * u, e.skipAutoScale || ko(n), n.style.width = `${d}`, n.style.height = `${g}`, e.backgroundColor && (l.fillStyle = e.backgroundColor, l.fillRect(0, 0, n.width, n.height)), l.drawImage(s, 0, 0, n.width, n.height), n;
|
|
2891
2919
|
}
|
|
2892
|
-
async function
|
|
2893
|
-
return (await
|
|
2920
|
+
async function ge(t, e = {}) {
|
|
2921
|
+
return (await si(t, e)).toDataURL();
|
|
2894
2922
|
}
|
|
2895
|
-
const
|
|
2896
|
-
function
|
|
2897
|
-
return
|
|
2923
|
+
const Et = "data-nf-capture-chrome", ri = "data-nf-canvas-snap", ni = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
|
|
2924
|
+
function Be(t) {
|
|
2925
|
+
return t instanceof Element && (t.hasAttribute(Et) || t.hasAttribute("data-nf-mask-cover") || t.id === "notefully");
|
|
2898
2926
|
}
|
|
2899
|
-
function
|
|
2900
|
-
const
|
|
2901
|
-
return Array.from(document.styleSheets).forEach((
|
|
2927
|
+
function li() {
|
|
2928
|
+
const t = [];
|
|
2929
|
+
return Array.from(document.styleSheets).forEach((e) => {
|
|
2902
2930
|
try {
|
|
2903
|
-
|
|
2931
|
+
e.cssRules;
|
|
2904
2932
|
} catch {
|
|
2905
2933
|
try {
|
|
2906
|
-
if (
|
|
2934
|
+
if (e.disabled)
|
|
2907
2935
|
return;
|
|
2908
|
-
|
|
2936
|
+
e.disabled = !0, t.push(e);
|
|
2909
2937
|
} catch {
|
|
2910
|
-
const a =
|
|
2911
|
-
a && "disabled" in a && !a.disabled && (a.disabled = !0,
|
|
2938
|
+
const a = e.ownerNode;
|
|
2939
|
+
a && "disabled" in a && !a.disabled && (a.disabled = !0, t.push({ node: a }));
|
|
2912
2940
|
}
|
|
2913
2941
|
}
|
|
2914
2942
|
}), () => {
|
|
2915
|
-
|
|
2943
|
+
t.forEach((e) => {
|
|
2916
2944
|
try {
|
|
2917
|
-
|
|
2945
|
+
e && e.node ? e.node.disabled = !1 : e && (e.disabled = !1);
|
|
2918
2946
|
} catch {
|
|
2919
2947
|
}
|
|
2920
2948
|
});
|
|
2921
2949
|
};
|
|
2922
2950
|
}
|
|
2923
|
-
function
|
|
2924
|
-
const
|
|
2951
|
+
function ui() {
|
|
2952
|
+
const t = [];
|
|
2925
2953
|
return document.querySelectorAll('input[type="password"], [data-notefully-mask]').forEach((a) => {
|
|
2926
|
-
const o = a.getBoundingClientRect(),
|
|
2927
|
-
|
|
2954
|
+
const o = a.getBoundingClientRect(), i = document.createElement("div");
|
|
2955
|
+
i.setAttribute("data-nf-mask-cover", "1"), i.style.cssText = [
|
|
2928
2956
|
"position:fixed",
|
|
2929
2957
|
`left:${o.left}px`,
|
|
2930
2958
|
`top:${o.top}px`,
|
|
@@ -2933,50 +2961,50 @@ function si() {
|
|
|
2933
2961
|
"background:#111",
|
|
2934
2962
|
"z-index:2147483646",
|
|
2935
2963
|
"pointer-events:none"
|
|
2936
|
-
].join(";"), document.body.appendChild(
|
|
2937
|
-
}), () =>
|
|
2964
|
+
].join(";"), document.body.appendChild(i), t.push(i);
|
|
2965
|
+
}), () => t.forEach((a) => a.remove());
|
|
2938
2966
|
}
|
|
2939
|
-
function
|
|
2940
|
-
const
|
|
2941
|
-
if (
|
|
2942
|
-
return
|
|
2943
|
-
const
|
|
2944
|
-
return
|
|
2967
|
+
function ci() {
|
|
2968
|
+
const t = document.querySelector(`[${Et}]`);
|
|
2969
|
+
if (t)
|
|
2970
|
+
return t;
|
|
2971
|
+
const e = document.createElement("div");
|
|
2972
|
+
return e.setAttribute(Et, "1"), e.className = "nf-capture-chrome", e.setAttribute("role", "status"), e.setAttribute("aria-live", "polite"), e.innerHTML = `<span class="nf-capture-chrome-pill">${p("status.capturing")}</span>`, document.body.appendChild(e), e;
|
|
2945
2973
|
}
|
|
2946
|
-
function
|
|
2947
|
-
document.querySelectorAll(`[${
|
|
2974
|
+
function di() {
|
|
2975
|
+
document.querySelectorAll(`[${Et}]`).forEach((t) => t.remove());
|
|
2948
2976
|
}
|
|
2949
|
-
function
|
|
2950
|
-
return new Promise((
|
|
2951
|
-
requestAnimationFrame(() => requestAnimationFrame(
|
|
2977
|
+
function Kt() {
|
|
2978
|
+
return new Promise((t) => {
|
|
2979
|
+
requestAnimationFrame(() => requestAnimationFrame(t));
|
|
2952
2980
|
});
|
|
2953
2981
|
}
|
|
2954
|
-
function
|
|
2955
|
-
if (typeof
|
|
2982
|
+
function Q(t) {
|
|
2983
|
+
if (typeof t != "string" || !t.startsWith("data:image/"))
|
|
2956
2984
|
return !1;
|
|
2957
|
-
const
|
|
2958
|
-
return
|
|
2985
|
+
const e = t.indexOf(",");
|
|
2986
|
+
return e > 0 && e < t.length - 1;
|
|
2959
2987
|
}
|
|
2960
|
-
function
|
|
2961
|
-
const
|
|
2988
|
+
function pi() {
|
|
2989
|
+
const t = document.documentElement, e = document.body, a = Math.max(
|
|
2962
2990
|
window.innerWidth || 0,
|
|
2963
|
-
(
|
|
2964
|
-
(e == null ? void 0 : e.scrollWidth) || 0,
|
|
2991
|
+
(t == null ? void 0 : t.clientWidth) || 0,
|
|
2965
2992
|
(t == null ? void 0 : t.scrollWidth) || 0,
|
|
2993
|
+
(e == null ? void 0 : e.scrollWidth) || 0,
|
|
2966
2994
|
1
|
|
2967
2995
|
), o = Math.max(
|
|
2968
2996
|
window.innerHeight || 0,
|
|
2969
|
-
(
|
|
2970
|
-
(e == null ? void 0 : e.scrollHeight) || 0,
|
|
2997
|
+
(t == null ? void 0 : t.clientHeight) || 0,
|
|
2971
2998
|
(t == null ? void 0 : t.scrollHeight) || 0,
|
|
2999
|
+
(e == null ? void 0 : e.scrollHeight) || 0,
|
|
2972
3000
|
1
|
|
2973
3001
|
);
|
|
2974
3002
|
return { width: a, height: o };
|
|
2975
3003
|
}
|
|
2976
|
-
async function
|
|
2977
|
-
const
|
|
2978
|
-
for (const a of
|
|
2979
|
-
if (a.closest("#notefully") ||
|
|
3004
|
+
async function gi() {
|
|
3005
|
+
const t = [], e = Array.from(document.querySelectorAll("canvas"));
|
|
3006
|
+
for (const a of e) {
|
|
3007
|
+
if (a.closest("#notefully") || Be(a))
|
|
2980
3008
|
continue;
|
|
2981
3009
|
let o = "";
|
|
2982
3010
|
try {
|
|
@@ -2986,16 +3014,16 @@ async function ui() {
|
|
|
2986
3014
|
}
|
|
2987
3015
|
if (!o || o === "data:,")
|
|
2988
3016
|
continue;
|
|
2989
|
-
const
|
|
2990
|
-
|
|
3017
|
+
const i = document.createElement("img"), s = getComputedStyle(a);
|
|
3018
|
+
i.setAttribute(ri, "1"), i.alt = "", i.src = o, i.className = a.className, i.style.cssText = a.style.cssText, i.style.width = s.width, i.style.height = s.height, i.style.maxWidth = s.maxWidth, i.style.maxHeight = s.maxHeight, i.style.objectFit = "fill", i.style.display = s.display === "inline" ? "inline-block" : s.display, a.replaceWith(i), t.push({ canvas: a, img: i });
|
|
2991
3019
|
}
|
|
2992
|
-
return await Promise.all(
|
|
3020
|
+
return await Promise.all(t.map(({ img: a }) => {
|
|
2993
3021
|
if (!a.complete)
|
|
2994
3022
|
return new Promise((o) => {
|
|
2995
3023
|
a.onload = () => o(), a.onerror = () => o();
|
|
2996
3024
|
});
|
|
2997
3025
|
})), () => {
|
|
2998
|
-
|
|
3026
|
+
t.forEach(({ canvas: a, img: o }) => {
|
|
2999
3027
|
try {
|
|
3000
3028
|
o.parentNode && o.replaceWith(a);
|
|
3001
3029
|
} catch {
|
|
@@ -3003,38 +3031,38 @@ async function ui() {
|
|
|
3003
3031
|
});
|
|
3004
3032
|
};
|
|
3005
3033
|
}
|
|
3006
|
-
async function
|
|
3007
|
-
if (!
|
|
3034
|
+
async function mi(t) {
|
|
3035
|
+
if (!t)
|
|
3008
3036
|
return null;
|
|
3009
|
-
if (typeof
|
|
3010
|
-
return
|
|
3011
|
-
if (typeof HTMLCanvasElement < "u" &&
|
|
3037
|
+
if (typeof t == "string")
|
|
3038
|
+
return Q(t) ? t : null;
|
|
3039
|
+
if (typeof HTMLCanvasElement < "u" && t instanceof HTMLCanvasElement)
|
|
3012
3040
|
try {
|
|
3013
|
-
const
|
|
3014
|
-
return
|
|
3041
|
+
const e = t.toDataURL("image/png");
|
|
3042
|
+
return Q(e) ? e : null;
|
|
3015
3043
|
} catch {
|
|
3016
3044
|
return null;
|
|
3017
3045
|
}
|
|
3018
|
-
if (typeof Blob < "u" &&
|
|
3019
|
-
const
|
|
3020
|
-
return
|
|
3046
|
+
if (typeof Blob < "u" && t instanceof Blob) {
|
|
3047
|
+
const e = await hi(t);
|
|
3048
|
+
return Q(e) ? e : null;
|
|
3021
3049
|
}
|
|
3022
3050
|
return null;
|
|
3023
3051
|
}
|
|
3024
|
-
async function
|
|
3052
|
+
async function hi(t) {
|
|
3025
3053
|
if (typeof FileReader == "function")
|
|
3026
|
-
return new Promise((o,
|
|
3027
|
-
const
|
|
3028
|
-
|
|
3054
|
+
return new Promise((o, i) => {
|
|
3055
|
+
const s = new FileReader();
|
|
3056
|
+
s.onload = () => o(String(s.result || "")), s.onerror = () => i(s.error || new Error("Could not read capture blob")), s.readAsDataURL(t);
|
|
3029
3057
|
});
|
|
3030
|
-
const
|
|
3031
|
-
return `data:${
|
|
3058
|
+
const e = Buffer.from(await t.arrayBuffer());
|
|
3059
|
+
return `data:${t.type || "application/octet-stream"};base64,${e.toString("base64")}`;
|
|
3032
3060
|
}
|
|
3033
|
-
async function
|
|
3034
|
-
var
|
|
3035
|
-
if (!((
|
|
3061
|
+
async function fi() {
|
|
3062
|
+
var e;
|
|
3063
|
+
if (!((e = navigator.mediaDevices) != null && e.getDisplayMedia))
|
|
3036
3064
|
throw new Error(p("status.screenUnsupported"));
|
|
3037
|
-
const
|
|
3065
|
+
const t = await navigator.mediaDevices.getDisplayMedia({
|
|
3038
3066
|
video: { displaySurface: "browser" },
|
|
3039
3067
|
audio: !1,
|
|
3040
3068
|
preferCurrentTab: !0,
|
|
@@ -3042,76 +3070,76 @@ async function pi() {
|
|
|
3042
3070
|
});
|
|
3043
3071
|
try {
|
|
3044
3072
|
const a = document.createElement("video");
|
|
3045
|
-
a.muted = !0, a.playsInline = !0, a.srcObject =
|
|
3073
|
+
a.muted = !0, a.playsInline = !0, a.srcObject = t, await a.play(), a.videoWidth || await new Promise((l) => {
|
|
3046
3074
|
a.onloadedmetadata = () => l();
|
|
3047
|
-
}), await
|
|
3048
|
-
const o = a.videoWidth || 1,
|
|
3049
|
-
|
|
3050
|
-
const
|
|
3051
|
-
if (!
|
|
3075
|
+
}), await Kt();
|
|
3076
|
+
const o = a.videoWidth || 1, i = a.videoHeight || 1, s = document.createElement("canvas");
|
|
3077
|
+
s.width = o, s.height = i, s.getContext("2d").drawImage(a, 0, 0, o, i);
|
|
3078
|
+
const n = s.toDataURL("image/png");
|
|
3079
|
+
if (!Q(n))
|
|
3052
3080
|
throw new Error(p("status.screenEmpty"));
|
|
3053
|
-
return
|
|
3081
|
+
return n;
|
|
3054
3082
|
} finally {
|
|
3055
|
-
|
|
3083
|
+
t.getTracks().forEach((a) => a.stop());
|
|
3056
3084
|
}
|
|
3057
3085
|
}
|
|
3058
|
-
async function
|
|
3059
|
-
const
|
|
3060
|
-
let
|
|
3086
|
+
async function Ne(t = {}) {
|
|
3087
|
+
const e = document.getElementById("notefully"), a = e ? e.style.display : "", o = ci(), i = li();
|
|
3088
|
+
let s = () => {
|
|
3061
3089
|
};
|
|
3062
|
-
|
|
3063
|
-
const
|
|
3090
|
+
e && (e.style.display = "none");
|
|
3091
|
+
const n = ui();
|
|
3064
3092
|
try {
|
|
3065
|
-
if (typeof
|
|
3066
|
-
const
|
|
3067
|
-
if (
|
|
3068
|
-
return
|
|
3093
|
+
if (typeof t.onBeforeCapture == "function" && await t.onBeforeCapture(), await Kt(), typeof t.capture == "function") {
|
|
3094
|
+
const k = await mi(await t.capture());
|
|
3095
|
+
if (k)
|
|
3096
|
+
return k;
|
|
3069
3097
|
}
|
|
3070
|
-
|
|
3071
|
-
const { width: l, height: u } =
|
|
3098
|
+
s = await gi(), await Kt();
|
|
3099
|
+
const { width: l, height: u } = pi(), d = {
|
|
3072
3100
|
cacheBust: !0,
|
|
3073
3101
|
width: l,
|
|
3074
3102
|
height: u,
|
|
3075
3103
|
pixelRatio: Math.min(window.devicePixelRatio || 1, 2),
|
|
3076
|
-
filter: (
|
|
3104
|
+
filter: (k) => !Be(k),
|
|
3077
3105
|
// 404 / CORS images must not abort the whole capture.
|
|
3078
|
-
imagePlaceholder:
|
|
3106
|
+
imagePlaceholder: ni,
|
|
3079
3107
|
onImageErrorHandler: () => {
|
|
3080
3108
|
}
|
|
3081
3109
|
};
|
|
3082
3110
|
let g = "";
|
|
3083
3111
|
try {
|
|
3084
|
-
g = await
|
|
3112
|
+
g = await ge(document.body, d);
|
|
3085
3113
|
} catch {
|
|
3086
|
-
g = await
|
|
3114
|
+
g = await ge(document.body, { ...d, skipFonts: !0 });
|
|
3087
3115
|
}
|
|
3088
|
-
if (!
|
|
3116
|
+
if (!Q(g))
|
|
3089
3117
|
throw new Error(p("status.captureEmpty"));
|
|
3090
3118
|
return g;
|
|
3091
3119
|
} finally {
|
|
3092
3120
|
try {
|
|
3093
|
-
|
|
3121
|
+
s();
|
|
3094
3122
|
} catch {
|
|
3095
3123
|
}
|
|
3096
|
-
|
|
3124
|
+
n(), i(), o.remove(), di(), e && (e.style.display = a);
|
|
3097
3125
|
}
|
|
3098
3126
|
}
|
|
3099
|
-
function
|
|
3100
|
-
const
|
|
3101
|
-
return
|
|
3127
|
+
function yi(t = "") {
|
|
3128
|
+
const e = String(t || "");
|
|
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" : "";
|
|
3102
3130
|
}
|
|
3103
|
-
function
|
|
3104
|
-
const
|
|
3105
|
-
return
|
|
3131
|
+
function vi(t = "") {
|
|
3132
|
+
const e = String(t || "");
|
|
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" : "";
|
|
3106
3134
|
}
|
|
3107
|
-
function
|
|
3108
|
-
const
|
|
3135
|
+
function ki(t = {}) {
|
|
3136
|
+
const e = navigator.userAgent;
|
|
3109
3137
|
return {
|
|
3110
3138
|
url: location.href,
|
|
3111
3139
|
title: document.title,
|
|
3112
|
-
userAgent:
|
|
3113
|
-
os:
|
|
3114
|
-
browser:
|
|
3140
|
+
userAgent: e,
|
|
3141
|
+
os: yi(e),
|
|
3142
|
+
browser: vi(e),
|
|
3115
3143
|
language: navigator.language,
|
|
3116
3144
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
3117
3145
|
viewport: {
|
|
@@ -3125,17 +3153,17 @@ function hi(e = {}) {
|
|
|
3125
3153
|
dpr: window.devicePixelRatio || 1
|
|
3126
3154
|
},
|
|
3127
3155
|
user: {
|
|
3128
|
-
userId:
|
|
3129
|
-
email:
|
|
3130
|
-
displayName:
|
|
3156
|
+
userId: t.userId || null,
|
|
3157
|
+
email: t.email || null,
|
|
3158
|
+
displayName: t.displayName || null
|
|
3131
3159
|
}
|
|
3132
3160
|
};
|
|
3133
3161
|
}
|
|
3134
|
-
const
|
|
3162
|
+
const me = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), he = {
|
|
3135
3163
|
id: "userId",
|
|
3136
3164
|
username: "displayName",
|
|
3137
3165
|
name: "displayName"
|
|
3138
|
-
},
|
|
3166
|
+
}, fe = /* @__PURE__ */ new Set([
|
|
3139
3167
|
"endpoint",
|
|
3140
3168
|
"projectKey",
|
|
3141
3169
|
"version",
|
|
@@ -3153,7 +3181,7 @@ const dt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), pt = {
|
|
|
3153
3181
|
"displayLink",
|
|
3154
3182
|
"locale",
|
|
3155
3183
|
"translations"
|
|
3156
|
-
]),
|
|
3184
|
+
]), ye = {
|
|
3157
3185
|
slug: "Use init({ name }) for a per-app report prefix (same idea as package.json name). slug is not a widget option.",
|
|
3158
3186
|
projectSlug: "Use init({ name }) for a per-app report prefix. projectSlug is not a widget option.",
|
|
3159
3187
|
project: "Pass projectKey (nfk_…) from Showfully Notefully settings — there is no project option on the widget.",
|
|
@@ -3162,217 +3190,220 @@ const dt = /* @__PURE__ */ new Set(["userId", "email", "displayName"]), pt = {
|
|
|
3162
3190
|
email: "Pass people via Notefully.identify({ userId, email, displayName }), not init().",
|
|
3163
3191
|
displayName: "Pass people via Notefully.identify({ userId, email, displayName }), not init()."
|
|
3164
3192
|
};
|
|
3165
|
-
function
|
|
3166
|
-
const a =
|
|
3167
|
-
for (const
|
|
3168
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
3169
|
-
for (const [
|
|
3170
|
-
Object.prototype.hasOwnProperty.call(o,
|
|
3171
|
-
for (const
|
|
3172
|
-
|
|
3173
|
-
if (
|
|
3174
|
-
const
|
|
3193
|
+
function bi(t = {}, e = {}) {
|
|
3194
|
+
const a = e.warn || Ke, o = t && typeof t == "object" ? t : {}, i = {}, s = [];
|
|
3195
|
+
for (const n of me)
|
|
3196
|
+
Object.prototype.hasOwnProperty.call(o, n) && (i[n] = o[n]);
|
|
3197
|
+
for (const [n, l] of Object.entries(he))
|
|
3198
|
+
Object.prototype.hasOwnProperty.call(o, n) && (Object.prototype.hasOwnProperty.call(i, l) || (i[l] = o[n]));
|
|
3199
|
+
for (const n of Object.keys(o))
|
|
3200
|
+
me.has(n) || Object.prototype.hasOwnProperty.call(he, n) || s.push(n);
|
|
3201
|
+
if (s.length) {
|
|
3202
|
+
const n = s.some((l) => l === "name" || l === "slug" || l === "projectSlug") ? " Pass the package/report name via Notefully.init({ name }), not identify()." : "";
|
|
3175
3203
|
a(
|
|
3176
|
-
`Notefully.identify: ignoring unknown key(s): ${
|
|
3204
|
+
`Notefully.identify: ignoring unknown key(s): ${s.join(", ")}. Supported: userId, email, displayName (aliases: id → userId; username/name → displayName).` + n
|
|
3177
3205
|
);
|
|
3178
3206
|
}
|
|
3179
|
-
return
|
|
3180
|
-
}
|
|
3181
|
-
function
|
|
3182
|
-
const a =
|
|
3183
|
-
if (
|
|
3184
|
-
for (const
|
|
3185
|
-
if (
|
|
3186
|
-
a(`Notefully.init: ignoring "${
|
|
3207
|
+
return i;
|
|
3208
|
+
}
|
|
3209
|
+
function wi(t = {}, e = {}) {
|
|
3210
|
+
const a = e.warn || Ke, o = t && typeof t == "object" ? t : {}, i = Object.keys(o).filter((s) => !fe.has(s));
|
|
3211
|
+
if (i.length)
|
|
3212
|
+
for (const s of i) {
|
|
3213
|
+
if (ye[s]) {
|
|
3214
|
+
a(`Notefully.init: ignoring "${s}". ${ye[s]}`);
|
|
3187
3215
|
continue;
|
|
3188
3216
|
}
|
|
3189
3217
|
a(
|
|
3190
|
-
`Notefully.init: ignoring unknown key "${
|
|
3218
|
+
`Notefully.init: ignoring unknown key "${s}". Supported: ${[...fe].join(", ")}.`
|
|
3191
3219
|
);
|
|
3192
3220
|
}
|
|
3193
3221
|
}
|
|
3194
|
-
function
|
|
3195
|
-
typeof console < "u" && typeof console.warn == "function" && console.warn(
|
|
3222
|
+
function Ke(t) {
|
|
3223
|
+
typeof console < "u" && typeof console.warn == "function" && console.warn(t);
|
|
3196
3224
|
}
|
|
3197
|
-
const
|
|
3198
|
-
function
|
|
3199
|
-
if (
|
|
3200
|
-
return
|
|
3201
|
-
if (typeof
|
|
3202
|
-
return
|
|
3225
|
+
const ve = /expression\s*\(|url\s*\(|@import|javascript:|behavior\s*:|-moz-binding|\bbinding\s*:/i, Si = /(?:^|\s)(?=[a-z-]+\s*:\s*[^;]+;)/i;
|
|
3226
|
+
function ke(t) {
|
|
3227
|
+
if (t instanceof Error)
|
|
3228
|
+
return t.stack || t.message || String(t);
|
|
3229
|
+
if (typeof t == "string")
|
|
3230
|
+
return t;
|
|
3203
3231
|
try {
|
|
3204
|
-
return JSON.stringify(
|
|
3232
|
+
return JSON.stringify(t);
|
|
3205
3233
|
} catch {
|
|
3206
|
-
return String(
|
|
3234
|
+
return String(t);
|
|
3207
3235
|
}
|
|
3208
3236
|
}
|
|
3209
|
-
function
|
|
3210
|
-
if (!
|
|
3237
|
+
function Jt(t) {
|
|
3238
|
+
if (!t || typeof t != "string")
|
|
3211
3239
|
return "";
|
|
3212
|
-
let
|
|
3213
|
-
return
|
|
3240
|
+
let e = t.replace(/[\u0000-\u001F\u007F]/g, "").trim();
|
|
3241
|
+
return e ? (ve.test(e) && (e = e.split(";").map((a) => a.trim()).filter((a) => a && !ve.test(a)).join("; "), e && !e.endsWith(";") && (e += ";")), e.slice(0, 500)) : "";
|
|
3214
3242
|
}
|
|
3215
|
-
function
|
|
3216
|
-
if (!
|
|
3243
|
+
function Ai(t = []) {
|
|
3244
|
+
if (!t.length)
|
|
3217
3245
|
return { text: "", segments: [{ text: "", style: null }] };
|
|
3218
|
-
const
|
|
3219
|
-
if (typeof
|
|
3220
|
-
const
|
|
3221
|
-
return { text:
|
|
3246
|
+
const e = t[0];
|
|
3247
|
+
if (typeof e != "string" || !e.includes("%c")) {
|
|
3248
|
+
const n = t.map(ke).join(" ");
|
|
3249
|
+
return { text: n, segments: [{ text: n, style: null }] };
|
|
3222
3250
|
}
|
|
3223
|
-
const a =
|
|
3224
|
-
let
|
|
3225
|
-
for (let
|
|
3226
|
-
const l = a[
|
|
3227
|
-
if (
|
|
3251
|
+
const a = e.split("%c"), o = [];
|
|
3252
|
+
let i = 1;
|
|
3253
|
+
for (let n = 0; n < a.length; n++) {
|
|
3254
|
+
const l = a[n];
|
|
3255
|
+
if (n === 0) {
|
|
3228
3256
|
l && o.push({ text: l, style: null });
|
|
3229
3257
|
continue;
|
|
3230
3258
|
}
|
|
3231
|
-
const u =
|
|
3232
|
-
o.push({ text: l, style:
|
|
3259
|
+
const u = i < t.length ? String(t[i++] ?? "") : "", d = Jt(u) || null;
|
|
3260
|
+
o.push({ text: l, style: d });
|
|
3233
3261
|
}
|
|
3234
|
-
if (
|
|
3235
|
-
const
|
|
3236
|
-
|
|
3237
|
-
text: (o.length ? " " : "") +
|
|
3262
|
+
if (i < t.length) {
|
|
3263
|
+
const n = t.slice(i).map(ke).join(" ");
|
|
3264
|
+
n && o.push({
|
|
3265
|
+
text: (o.length ? " " : "") + n,
|
|
3238
3266
|
style: null
|
|
3239
3267
|
});
|
|
3240
3268
|
}
|
|
3241
3269
|
return {
|
|
3242
|
-
text: o.map((
|
|
3270
|
+
text: o.map((n) => n.text).join(""),
|
|
3243
3271
|
segments: o.length ? o : [{ text: "", style: null }]
|
|
3244
3272
|
};
|
|
3245
3273
|
}
|
|
3246
|
-
function
|
|
3247
|
-
const
|
|
3248
|
-
if (!
|
|
3249
|
-
return [{ text:
|
|
3250
|
-
const a =
|
|
3251
|
-
let
|
|
3252
|
-
if (
|
|
3253
|
-
const u =
|
|
3254
|
-
/^[a-z-]+\s*:/i.test(o.slice(
|
|
3274
|
+
function Ci(t) {
|
|
3275
|
+
const e = String(t ?? "");
|
|
3276
|
+
if (!e.includes("%c"))
|
|
3277
|
+
return [{ text: e, style: null }];
|
|
3278
|
+
const a = e.split("%c"), o = a[a.length - 1], i = o.match(Si);
|
|
3279
|
+
let s = "";
|
|
3280
|
+
if (i) {
|
|
3281
|
+
const u = i.index, d = /\s/.test(o[u]) ? u + 1 : u;
|
|
3282
|
+
/^[a-z-]+\s*:/i.test(o.slice(d)) && (a[a.length - 1] = o.slice(0, d).replace(/\s+$/, ""), s = o.slice(d).trim());
|
|
3255
3283
|
}
|
|
3256
|
-
const
|
|
3284
|
+
const n = Jt(s) || null, l = [];
|
|
3257
3285
|
for (let u = 0; u < a.length; u++) {
|
|
3258
|
-
const
|
|
3286
|
+
const d = a[u];
|
|
3259
3287
|
if (u === 0) {
|
|
3260
|
-
|
|
3288
|
+
d && l.push({ text: d, style: null });
|
|
3261
3289
|
continue;
|
|
3262
3290
|
}
|
|
3263
3291
|
l.push({
|
|
3264
|
-
text:
|
|
3265
|
-
style: u === 1 ?
|
|
3292
|
+
text: d,
|
|
3293
|
+
style: u === 1 ? n : null
|
|
3266
3294
|
});
|
|
3267
3295
|
}
|
|
3268
|
-
return l.length ? l : [{ text:
|
|
3296
|
+
return l.length ? l : [{ text: e, style: null }];
|
|
3269
3297
|
}
|
|
3270
|
-
function
|
|
3271
|
-
return Array.isArray(
|
|
3272
|
-
text: String((
|
|
3273
|
-
style:
|
|
3274
|
-
})) :
|
|
3298
|
+
function He(t = {}) {
|
|
3299
|
+
return Array.isArray(t.segments) && t.segments.length ? t.segments.map((e) => ({
|
|
3300
|
+
text: String((e == null ? void 0 : e.text) ?? ""),
|
|
3301
|
+
style: Jt(e == null ? void 0 : e.style) || null
|
|
3302
|
+
})) : Ci(t.text);
|
|
3275
3303
|
}
|
|
3276
|
-
function
|
|
3277
|
-
return
|
|
3304
|
+
function zi(t = {}) {
|
|
3305
|
+
return He(t).map((a) => a.text).join("");
|
|
3278
3306
|
}
|
|
3279
|
-
function
|
|
3280
|
-
return String(
|
|
3307
|
+
function be(t) {
|
|
3308
|
+
return String(t ?? "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3281
3309
|
}
|
|
3282
|
-
function
|
|
3283
|
-
return
|
|
3284
|
-
const a =
|
|
3285
|
-
return
|
|
3310
|
+
function Ei(t = {}) {
|
|
3311
|
+
return He(t).map((e) => {
|
|
3312
|
+
const a = be(e.text);
|
|
3313
|
+
return e.style ? `<span class="nf-console-styled" style="${be(e.style)}">${a}</span>` : a;
|
|
3286
3314
|
}).join("");
|
|
3287
3315
|
}
|
|
3288
|
-
const
|
|
3289
|
-
function
|
|
3290
|
-
const
|
|
3316
|
+
const Ri = 80;
|
|
3317
|
+
function ji() {
|
|
3318
|
+
const t = [], e = {};
|
|
3291
3319
|
let a = !1;
|
|
3292
|
-
const o = (
|
|
3320
|
+
const o = (s, n) => {
|
|
3293
3321
|
let l = "", u = null;
|
|
3294
3322
|
try {
|
|
3295
|
-
const g =
|
|
3323
|
+
const g = Ai(n);
|
|
3296
3324
|
l = g.text, u = g.segments;
|
|
3297
3325
|
} catch {
|
|
3298
|
-
l = String(
|
|
3326
|
+
l = String(n[0]), u = [{ text: l, style: null }];
|
|
3299
3327
|
}
|
|
3300
|
-
const
|
|
3301
|
-
level:
|
|
3328
|
+
const d = {
|
|
3329
|
+
level: s,
|
|
3302
3330
|
text: l.slice(0, 2e3),
|
|
3303
3331
|
at: Date.now()
|
|
3304
3332
|
};
|
|
3305
|
-
u && u.some((g) => g.style) && (
|
|
3333
|
+
u && u.some((g) => g.style) && (d.segments = u.map((g) => ({
|
|
3306
3334
|
text: String(g.text || "").slice(0, 2e3),
|
|
3307
3335
|
style: g.style || null
|
|
3308
|
-
}))),
|
|
3336
|
+
}))), t.push(d), t.length > Ri && t.shift();
|
|
3309
3337
|
};
|
|
3310
3338
|
return {
|
|
3311
3339
|
hook: () => {
|
|
3312
|
-
a || typeof window > "u" || (a = !0, ["log", "info", "warn", "error"].forEach((
|
|
3313
|
-
|
|
3314
|
-
o(
|
|
3340
|
+
a || typeof window > "u" || (a = !0, ["log", "info", "warn", "error"].forEach((s) => {
|
|
3341
|
+
e[s] = console[s].bind(console), console[s] = (...n) => {
|
|
3342
|
+
o(s, n), e[s](...n);
|
|
3315
3343
|
};
|
|
3316
|
-
}), window.addEventListener("error", (
|
|
3317
|
-
o("error", [
|
|
3318
|
-
}), window.addEventListener("unhandledrejection", (
|
|
3319
|
-
o("error", [
|
|
3344
|
+
}), window.addEventListener("error", (s) => {
|
|
3345
|
+
o("error", [s.message || "window.error"]);
|
|
3346
|
+
}), window.addEventListener("unhandledrejection", (s) => {
|
|
3347
|
+
o("error", [s.reason || "unhandledrejection"]);
|
|
3320
3348
|
}));
|
|
3321
3349
|
},
|
|
3322
3350
|
snapshot() {
|
|
3323
|
-
return
|
|
3351
|
+
return t.slice();
|
|
3324
3352
|
}
|
|
3325
3353
|
};
|
|
3326
3354
|
}
|
|
3327
|
-
function
|
|
3328
|
-
const
|
|
3329
|
-
let
|
|
3330
|
-
const
|
|
3331
|
-
|
|
3355
|
+
function Pi(t, e = {}) {
|
|
3356
|
+
const a = window.SpeechRecognition || window.webkitSpeechRecognition, o = typeof e.onActiveChange == "function" ? e.onActiveChange : null;
|
|
3357
|
+
let i = null, s = !1;
|
|
3358
|
+
const n = (d) => {
|
|
3359
|
+
const g = !!d;
|
|
3360
|
+
s !== g && (s = g, o == null || o(s));
|
|
3361
|
+
}, l = () => {
|
|
3362
|
+
if (n(!1), i)
|
|
3332
3363
|
try {
|
|
3333
|
-
|
|
3364
|
+
i.stop();
|
|
3334
3365
|
} catch {
|
|
3335
3366
|
}
|
|
3336
3367
|
};
|
|
3337
3368
|
return {
|
|
3338
|
-
start: (
|
|
3339
|
-
if (!
|
|
3369
|
+
start: (d = {}) => {
|
|
3370
|
+
if (!a)
|
|
3340
3371
|
throw new Error(p("status.speechUnsupported"));
|
|
3341
|
-
return
|
|
3342
|
-
let
|
|
3343
|
-
for (let
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
},
|
|
3347
|
-
|
|
3348
|
-
},
|
|
3349
|
-
|
|
3350
|
-
},
|
|
3372
|
+
return s ? (l(), !1) : (i = new a(), i.continuous = !0, i.interimResults = !0, i.lang = d.lang || navigator.language || "en-US", i.onresult = (g) => {
|
|
3373
|
+
let k = "";
|
|
3374
|
+
for (let v = g.resultIndex; v < g.results.length; v += 1)
|
|
3375
|
+
g.results[v].isFinal && (k += g.results[v][0].transcript);
|
|
3376
|
+
k && t(k);
|
|
3377
|
+
}, i.onerror = () => {
|
|
3378
|
+
n(!1);
|
|
3379
|
+
}, i.onend = () => {
|
|
3380
|
+
n(!1);
|
|
3381
|
+
}, i.start(), n(!0), !0);
|
|
3351
3382
|
},
|
|
3352
|
-
stop:
|
|
3353
|
-
isSupported: () => !!
|
|
3354
|
-
isActive: () =>
|
|
3383
|
+
stop: l,
|
|
3384
|
+
isSupported: () => !!a,
|
|
3385
|
+
isActive: () => s
|
|
3355
3386
|
};
|
|
3356
3387
|
}
|
|
3357
|
-
const
|
|
3358
|
-
function
|
|
3359
|
-
let o = null,
|
|
3388
|
+
const xi = 60 * 1e3;
|
|
3389
|
+
function Li({ onStart: t, onStop: e, onError: a }) {
|
|
3390
|
+
let o = null, i = null, s = [], n = null;
|
|
3360
3391
|
const l = () => {
|
|
3361
|
-
if (
|
|
3392
|
+
if (n && (clearTimeout(n), n = null), i && i.state !== "inactive")
|
|
3362
3393
|
try {
|
|
3363
|
-
|
|
3394
|
+
i.stop();
|
|
3364
3395
|
} catch {
|
|
3365
3396
|
}
|
|
3366
3397
|
o && (o.getTracks().forEach((g) => g.stop()), o = null);
|
|
3367
3398
|
}, u = () => {
|
|
3368
|
-
if (
|
|
3369
|
-
|
|
3399
|
+
if (i && i.state === "recording") {
|
|
3400
|
+
i.stop();
|
|
3370
3401
|
return;
|
|
3371
3402
|
}
|
|
3372
|
-
l(),
|
|
3403
|
+
l(), e(null);
|
|
3373
3404
|
};
|
|
3374
3405
|
return { start: async () => {
|
|
3375
|
-
var g,
|
|
3406
|
+
var g, k;
|
|
3376
3407
|
if (!((g = navigator.mediaDevices) != null && g.getDisplayMedia))
|
|
3377
3408
|
throw new Error("Screen recording is not supported in this browser.");
|
|
3378
3409
|
o = await navigator.mediaDevices.getDisplayMedia({
|
|
@@ -3380,172 +3411,172 @@ function ji({ onStart: e, onStop: t, onError: a }) {
|
|
|
3380
3411
|
audio: !1,
|
|
3381
3412
|
preferCurrentTab: !0,
|
|
3382
3413
|
selfBrowserSurface: "include"
|
|
3383
|
-
}),
|
|
3414
|
+
}), s = [], i = new MediaRecorder(o, {
|
|
3384
3415
|
mimeType: MediaRecorder.isTypeSupported("video/webm;codecs=vp9") ? "video/webm;codecs=vp9" : "video/webm"
|
|
3385
|
-
}),
|
|
3386
|
-
|
|
3387
|
-
},
|
|
3388
|
-
const
|
|
3389
|
-
l(),
|
|
3390
|
-
}, (
|
|
3416
|
+
}), i.ondataavailable = (v) => {
|
|
3417
|
+
v.data && v.data.size && s.push(v.data);
|
|
3418
|
+
}, i.onstop = () => {
|
|
3419
|
+
const v = s.length ? new Blob(s, { type: i.mimeType || "video/webm" }) : null;
|
|
3420
|
+
l(), e(v);
|
|
3421
|
+
}, (k = o.getVideoTracks()[0]) == null || k.addEventListener("ended", () => u()), i.start(), n = setTimeout(u, xi), t();
|
|
3391
3422
|
}, stop: u };
|
|
3392
3423
|
}
|
|
3393
|
-
function
|
|
3394
|
-
const
|
|
3424
|
+
function Ui() {
|
|
3425
|
+
const t = /* @__PURE__ */ new Set();
|
|
3395
3426
|
return {
|
|
3396
3427
|
alloc() {
|
|
3397
|
-
let
|
|
3398
|
-
for (;
|
|
3399
|
-
|
|
3400
|
-
return
|
|
3428
|
+
let e = 1;
|
|
3429
|
+
for (; t.has(e); )
|
|
3430
|
+
e += 1;
|
|
3431
|
+
return t.add(e), e;
|
|
3401
3432
|
},
|
|
3402
|
-
free(
|
|
3403
|
-
const a = Number(
|
|
3404
|
-
Number.isInteger(a) && a > 0 &&
|
|
3433
|
+
free(e) {
|
|
3434
|
+
const a = Number(e);
|
|
3435
|
+
Number.isInteger(a) && a > 0 && t.delete(a);
|
|
3405
3436
|
},
|
|
3406
3437
|
peekUsed() {
|
|
3407
|
-
return [...
|
|
3438
|
+
return [...t].sort((e, a) => e - a);
|
|
3408
3439
|
}
|
|
3409
3440
|
};
|
|
3410
3441
|
}
|
|
3411
|
-
const
|
|
3412
|
-
function
|
|
3413
|
-
const
|
|
3414
|
-
let
|
|
3442
|
+
const It = { x: 0, y: 0, w: 1, h: 1 };
|
|
3443
|
+
function Yt() {
|
|
3444
|
+
const t = Ui();
|
|
3445
|
+
let e = [], a = { ...It }, o = 1;
|
|
3415
3446
|
return {
|
|
3416
|
-
list: () =>
|
|
3417
|
-
all: () =>
|
|
3447
|
+
list: () => e.filter((s) => Mi(s, a)),
|
|
3448
|
+
all: () => e.slice(),
|
|
3418
3449
|
crop: () => ({ ...a }),
|
|
3419
|
-
setCrop(
|
|
3420
|
-
return a =
|
|
3450
|
+
setCrop(s) {
|
|
3451
|
+
return a = Fi(s), a;
|
|
3421
3452
|
},
|
|
3422
3453
|
resetCrop() {
|
|
3423
|
-
return a = { ...
|
|
3454
|
+
return a = { ...It }, a;
|
|
3424
3455
|
},
|
|
3425
3456
|
isCropped() {
|
|
3426
3457
|
return a.x > 1e-6 || a.y > 1e-6 || a.w < 1 - 1e-6 || a.h < 1 - 1e-6;
|
|
3427
3458
|
},
|
|
3428
|
-
add(
|
|
3459
|
+
add(s, n) {
|
|
3429
3460
|
const l = {
|
|
3430
3461
|
id: `s${o++}`,
|
|
3431
|
-
type:
|
|
3432
|
-
number:
|
|
3462
|
+
type: s,
|
|
3463
|
+
number: t.alloc(),
|
|
3433
3464
|
x: 0.2,
|
|
3434
3465
|
y: 0.2,
|
|
3435
|
-
w:
|
|
3436
|
-
h:
|
|
3466
|
+
w: s === "arrow" ? 0.2 : 0.22,
|
|
3467
|
+
h: s === "arrow" ? 0.05 : 0.16,
|
|
3437
3468
|
x2: 0.4,
|
|
3438
3469
|
y2: 0.28,
|
|
3439
|
-
...
|
|
3470
|
+
...n
|
|
3440
3471
|
};
|
|
3441
|
-
return
|
|
3472
|
+
return e.push(l), l;
|
|
3442
3473
|
},
|
|
3443
|
-
update(
|
|
3444
|
-
const l =
|
|
3445
|
-
return l ? (Object.assign(l,
|
|
3474
|
+
update(s, n) {
|
|
3475
|
+
const l = e.find((u) => u.id === s);
|
|
3476
|
+
return l ? (Object.assign(l, n), l) : null;
|
|
3446
3477
|
},
|
|
3447
|
-
remove(
|
|
3448
|
-
const
|
|
3449
|
-
if (
|
|
3478
|
+
remove(s) {
|
|
3479
|
+
const n = e.findIndex((u) => u.id === s);
|
|
3480
|
+
if (n < 0)
|
|
3450
3481
|
return null;
|
|
3451
|
-
const [l] =
|
|
3452
|
-
return
|
|
3482
|
+
const [l] = e.splice(n, 1);
|
|
3483
|
+
return t.free(l.number), l;
|
|
3453
3484
|
},
|
|
3454
3485
|
reset() {
|
|
3455
|
-
for (
|
|
3456
|
-
|
|
3486
|
+
for (e = [], a = { ...It }, o = 1; t.peekUsed().length; )
|
|
3487
|
+
t.free(t.peekUsed()[0]);
|
|
3457
3488
|
}
|
|
3458
3489
|
};
|
|
3459
3490
|
}
|
|
3460
|
-
function
|
|
3461
|
-
const a = Number(
|
|
3462
|
-
return (Array.isArray(
|
|
3491
|
+
function Ti(t, e) {
|
|
3492
|
+
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, s = Number(e == null ? void 0 : e.y) || 0;
|
|
3493
|
+
return (Array.isArray(t) ? t : []).map((n) => {
|
|
3463
3494
|
const l = {
|
|
3464
|
-
...
|
|
3465
|
-
x: (
|
|
3466
|
-
y: (
|
|
3467
|
-
w: (
|
|
3468
|
-
h: (
|
|
3495
|
+
...n,
|
|
3496
|
+
x: (n.x - i) / a,
|
|
3497
|
+
y: (n.y - s) / o,
|
|
3498
|
+
w: (n.w || 0) / a,
|
|
3499
|
+
h: (n.h || 0) / o
|
|
3469
3500
|
};
|
|
3470
|
-
return Number.isFinite(
|
|
3501
|
+
return Number.isFinite(n.x2) && (l.x2 = (n.x2 - i) / a), Number.isFinite(n.y2) && (l.y2 = (n.y2 - s) / o), l;
|
|
3471
3502
|
});
|
|
3472
3503
|
}
|
|
3473
|
-
function
|
|
3474
|
-
const
|
|
3475
|
-
return { x:
|
|
3504
|
+
function Fi(t) {
|
|
3505
|
+
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);
|
|
3506
|
+
return { x: e, y: a, w: o, h: i };
|
|
3476
3507
|
}
|
|
3477
|
-
function
|
|
3478
|
-
const a =
|
|
3479
|
-
return a >=
|
|
3508
|
+
function Mi(t, e) {
|
|
3509
|
+
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;
|
|
3510
|
+
return a >= e.x && o >= e.y && a <= e.x + e.w && o <= e.y + e.h;
|
|
3480
3511
|
}
|
|
3481
|
-
function
|
|
3482
|
-
const
|
|
3512
|
+
function Ge(t) {
|
|
3513
|
+
const e = Math.max(1, Number(t) || 1);
|
|
3483
3514
|
return {
|
|
3484
|
-
stroke: Math.max(2,
|
|
3485
|
-
badgeRadius: Math.max(8,
|
|
3486
|
-
fontSize: Math.max(10,
|
|
3487
|
-
arrowHead: Math.max(8,
|
|
3515
|
+
stroke: Math.max(2, e * 75e-4),
|
|
3516
|
+
badgeRadius: Math.max(8, e * 0.025),
|
|
3517
|
+
fontSize: Math.max(10, e * 0.0275),
|
|
3518
|
+
arrowHead: Math.max(8, e * 0.035),
|
|
3488
3519
|
arrowHeadAngle: 0.4
|
|
3489
3520
|
};
|
|
3490
3521
|
}
|
|
3491
|
-
function
|
|
3492
|
-
const
|
|
3493
|
-
x: u -
|
|
3494
|
-
y:
|
|
3522
|
+
function Di(t, e, a, o, i) {
|
|
3523
|
+
const s = Math.atan2(o - e, a - t), n = i.arrowHead, l = Math.min(i.stroke, n * 0.2), u = a, d = o, g = a - Math.cos(s) * n, k = o - Math.sin(s) * n, v = {
|
|
3524
|
+
x: u - n * Math.cos(s - i.arrowHeadAngle),
|
|
3525
|
+
y: d - n * Math.sin(s - i.arrowHeadAngle)
|
|
3495
3526
|
}, w = {
|
|
3496
|
-
x: u -
|
|
3497
|
-
y:
|
|
3527
|
+
x: u - n * Math.cos(s + i.arrowHeadAngle),
|
|
3528
|
+
y: d - n * Math.sin(s + i.arrowHeadAngle)
|
|
3498
3529
|
}, b = {
|
|
3499
|
-
x: a - Math.cos(
|
|
3500
|
-
y: o - Math.sin(
|
|
3530
|
+
x: a - Math.cos(s) * l,
|
|
3531
|
+
y: o - Math.sin(s) * l
|
|
3501
3532
|
};
|
|
3502
|
-
return { angle:
|
|
3533
|
+
return { angle: s, tipX: u, tipY: d, baseX: g, baseY: k, left: v, right: w, shaftEnd: b };
|
|
3503
3534
|
}
|
|
3504
|
-
async function
|
|
3505
|
-
const a =
|
|
3506
|
-
w.width =
|
|
3507
|
-
const z = await
|
|
3535
|
+
async function we(t, e = {}) {
|
|
3536
|
+
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, s = await $i(t), n = Math.round(a.x * s.width), l = Math.round(a.y * s.height), u = Math.max(1, Math.round(a.w * s.width)), d = Math.max(1, Math.round(a.h * s.height)), g = Oi(u, d, o), k = g.width, v = g.height, w = document.createElement("canvas");
|
|
3537
|
+
w.width = k, w.height = v, w.getContext("2d").drawImage(s, n, l, u, d, 0, 0, k, v);
|
|
3538
|
+
const z = await Se(w, "image/webp", i);
|
|
3508
3539
|
if (z && z.size > 0 && z.type === "image/webp")
|
|
3509
|
-
return { blob: z, width:
|
|
3510
|
-
const
|
|
3511
|
-
if (!
|
|
3540
|
+
return { blob: z, width: k, height: v, mime: "image/webp", ext: "webp" };
|
|
3541
|
+
const j = await Se(w, "image/png");
|
|
3542
|
+
if (!j || !j.size)
|
|
3512
3543
|
throw new Error("Could not encode screenshot");
|
|
3513
|
-
return { blob:
|
|
3544
|
+
return { blob: j, width: k, height: v, mime: "image/png", ext: "png" };
|
|
3514
3545
|
}
|
|
3515
|
-
function
|
|
3516
|
-
const o = Math.max(1, Number(
|
|
3546
|
+
function Oi(t, e, a = 2048) {
|
|
3547
|
+
const o = Math.max(1, Number(t) || 1), i = Math.max(1, Number(e) || 1), s = Math.max(1, Number(a) || 2048), n = Math.min(1, s / Math.max(o, i));
|
|
3517
3548
|
return {
|
|
3518
|
-
width: Math.max(1, Math.round(o *
|
|
3519
|
-
height: Math.max(1, Math.round(
|
|
3520
|
-
scale:
|
|
3549
|
+
width: Math.max(1, Math.round(o * n)),
|
|
3550
|
+
height: Math.max(1, Math.round(i * n)),
|
|
3551
|
+
scale: n
|
|
3521
3552
|
};
|
|
3522
3553
|
}
|
|
3523
|
-
function
|
|
3524
|
-
const
|
|
3525
|
-
return Math.max(1, Math.min(1024,
|
|
3554
|
+
function Ii(t = 2048) {
|
|
3555
|
+
const e = Math.floor(Number(t) / 2);
|
|
3556
|
+
return Math.max(1, Math.min(1024, e || 1024));
|
|
3526
3557
|
}
|
|
3527
|
-
function
|
|
3528
|
-
if ((
|
|
3558
|
+
function Vi(t, e = null) {
|
|
3559
|
+
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)
|
|
3529
3560
|
return !0;
|
|
3530
|
-
const a = String((
|
|
3531
|
-
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(
|
|
3561
|
+
const a = String((t == null ? void 0 : t.message) || t || (e == null ? void 0 : e.error) || "").toLowerCase();
|
|
3562
|
+
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;
|
|
3532
3563
|
}
|
|
3533
|
-
function
|
|
3534
|
-
return new Promise((
|
|
3564
|
+
function $i(t) {
|
|
3565
|
+
return new Promise((e, a) => {
|
|
3535
3566
|
const o = new Image();
|
|
3536
|
-
o.onload = () =>
|
|
3567
|
+
o.onload = () => e(o), o.onerror = () => a(new Error("Could not load screenshot")), o.src = t;
|
|
3537
3568
|
});
|
|
3538
3569
|
}
|
|
3539
|
-
function
|
|
3570
|
+
function Se(t, e, a) {
|
|
3540
3571
|
return new Promise((o) => {
|
|
3541
3572
|
try {
|
|
3542
|
-
|
|
3573
|
+
t.toBlob((i) => o(i), e, a);
|
|
3543
3574
|
} catch {
|
|
3544
3575
|
o(null);
|
|
3545
3576
|
}
|
|
3546
3577
|
});
|
|
3547
3578
|
}
|
|
3548
|
-
const
|
|
3579
|
+
const Bi = [
|
|
3549
3580
|
"url",
|
|
3550
3581
|
"title",
|
|
3551
3582
|
"userAgent",
|
|
@@ -3556,137 +3587,143 @@ const Mi = [
|
|
|
3556
3587
|
"viewport",
|
|
3557
3588
|
"user"
|
|
3558
3589
|
];
|
|
3559
|
-
function
|
|
3560
|
-
return !
|
|
3590
|
+
function Ni(t) {
|
|
3591
|
+
return !t || typeof t != "object" ? !1 : !!(t.userId || t.email || t.displayName);
|
|
3561
3592
|
}
|
|
3562
|
-
function
|
|
3563
|
-
const
|
|
3564
|
-
for (const a of
|
|
3565
|
-
const o =
|
|
3566
|
-
o == null || o === "" || a === "user" && !
|
|
3593
|
+
function Ki(t = {}) {
|
|
3594
|
+
const e = [];
|
|
3595
|
+
for (const a of Bi) {
|
|
3596
|
+
const o = t[a];
|
|
3597
|
+
o == null || o === "" || a === "user" && !Ni(o) || e.push({
|
|
3567
3598
|
key: a,
|
|
3568
3599
|
label: p(`diag.${a}`),
|
|
3569
3600
|
value: o,
|
|
3570
3601
|
redacted: !1
|
|
3571
3602
|
});
|
|
3572
3603
|
}
|
|
3573
|
-
return
|
|
3604
|
+
return e;
|
|
3574
3605
|
}
|
|
3575
|
-
function
|
|
3576
|
-
return
|
|
3606
|
+
function Hi(t = []) {
|
|
3607
|
+
return t.map((e, a) => {
|
|
3577
3608
|
const o = {
|
|
3578
|
-
id: `log-${a}-${
|
|
3579
|
-
level:
|
|
3580
|
-
text: String(
|
|
3581
|
-
at:
|
|
3609
|
+
id: `log-${a}-${e.at || 0}`,
|
|
3610
|
+
level: e.level || "log",
|
|
3611
|
+
text: String(e.text || ""),
|
|
3612
|
+
at: e.at || 0,
|
|
3582
3613
|
redacted: !1
|
|
3583
3614
|
};
|
|
3584
|
-
return Array.isArray(
|
|
3615
|
+
return Array.isArray(e.segments) && e.segments.length && (o.segments = e.segments), o;
|
|
3585
3616
|
});
|
|
3586
3617
|
}
|
|
3587
|
-
function
|
|
3588
|
-
if (!
|
|
3589
|
-
return { checked: !
|
|
3590
|
-
const
|
|
3591
|
-
return
|
|
3618
|
+
function Gi(t = []) {
|
|
3619
|
+
if (!t.length)
|
|
3620
|
+
return { checked: !0, indeterminate: !1 };
|
|
3621
|
+
const e = t.filter((a) => !a.redacted).length;
|
|
3622
|
+
return e === t.length ? { checked: !0, indeterminate: !1 } : e === 0 ? { checked: !1, indeterminate: !1 } : { checked: !1, indeterminate: !0 };
|
|
3592
3623
|
}
|
|
3593
|
-
function
|
|
3594
|
-
|
|
3595
|
-
a.redacted = !!
|
|
3624
|
+
function Rt(t, e) {
|
|
3625
|
+
t.forEach((a) => {
|
|
3626
|
+
a.redacted = !!e;
|
|
3596
3627
|
});
|
|
3597
3628
|
}
|
|
3598
|
-
function
|
|
3599
|
-
const
|
|
3600
|
-
return o &&
|
|
3629
|
+
function qi(t = {}) {
|
|
3630
|
+
const e = t.diagnostics || [], a = t.logs || [], o = e.some((s) => !s.redacted), i = a.length > 0 && a.some((s) => !s.redacted);
|
|
3631
|
+
return o && i ? p("privacy.disclosure.both") : o ? p("privacy.disclosure.diagnostics") : i ? p("privacy.disclosure.logs") : "";
|
|
3601
3632
|
}
|
|
3602
|
-
function
|
|
3603
|
-
if (
|
|
3633
|
+
function _i(t) {
|
|
3634
|
+
if (t == null)
|
|
3604
3635
|
return "";
|
|
3605
|
-
if (typeof
|
|
3606
|
-
return String(
|
|
3636
|
+
if (typeof t == "string" || typeof t == "number" || typeof t == "boolean")
|
|
3637
|
+
return String(t);
|
|
3607
3638
|
try {
|
|
3608
|
-
return JSON.stringify(
|
|
3639
|
+
return JSON.stringify(t);
|
|
3609
3640
|
} catch {
|
|
3610
|
-
return String(
|
|
3641
|
+
return String(t);
|
|
3611
3642
|
}
|
|
3612
3643
|
}
|
|
3613
|
-
function
|
|
3614
|
-
const
|
|
3615
|
-
|
|
3616
|
-
for (const o of
|
|
3617
|
-
o.redacted || (
|
|
3618
|
-
const a = (
|
|
3619
|
-
const
|
|
3644
|
+
function Wi(t = {}) {
|
|
3645
|
+
const e = {};
|
|
3646
|
+
t.author != null && t.author !== "" && (e.author = t.author);
|
|
3647
|
+
for (const o of t.diagnostics || [])
|
|
3648
|
+
o.redacted || (e[o.key] = o.value);
|
|
3649
|
+
const a = (t.logs || []).filter((o) => !o.redacted).map((o) => {
|
|
3650
|
+
const i = {
|
|
3620
3651
|
level: o.level,
|
|
3621
3652
|
text: o.text,
|
|
3622
3653
|
at: o.at
|
|
3623
3654
|
};
|
|
3624
|
-
return Array.isArray(o.segments) && o.segments.length && (
|
|
3655
|
+
return Array.isArray(o.segments) && o.segments.length && (i.segments = o.segments), i;
|
|
3625
3656
|
});
|
|
3626
|
-
return
|
|
3657
|
+
return e.console = a, e;
|
|
3627
3658
|
}
|
|
3628
|
-
const
|
|
3659
|
+
const J = [
|
|
3629
3660
|
{ id: "bug", label: "Bug" },
|
|
3630
3661
|
{ id: "idea", label: "Idea" },
|
|
3631
3662
|
{ id: "other", label: "Other" }
|
|
3632
3663
|
];
|
|
3633
|
-
function
|
|
3634
|
-
return String(
|
|
3635
|
-
}
|
|
3636
|
-
function
|
|
3637
|
-
const
|
|
3638
|
-
return
|
|
3639
|
-
}
|
|
3640
|
-
function
|
|
3641
|
-
if (!Array.isArray(
|
|
3642
|
-
return
|
|
3643
|
-
const
|
|
3644
|
-
for (const o of
|
|
3645
|
-
let s = "",
|
|
3646
|
-
typeof o == "string" || typeof o == "number" ? (
|
|
3664
|
+
function Ae(t) {
|
|
3665
|
+
return String(t || "").trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32);
|
|
3666
|
+
}
|
|
3667
|
+
function bt(t) {
|
|
3668
|
+
const e = String(t || "").trim();
|
|
3669
|
+
return e ? e.split(/[-_\s]+/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ") : "";
|
|
3670
|
+
}
|
|
3671
|
+
function Zi(t) {
|
|
3672
|
+
if (!Array.isArray(t) || !t.length)
|
|
3673
|
+
return J.map((o) => ({ ...o }));
|
|
3674
|
+
const e = /* @__PURE__ */ new Set(), a = [];
|
|
3675
|
+
for (const o of t) {
|
|
3676
|
+
let i = "", s = "", n = "", l = "";
|
|
3677
|
+
if (typeof o == "string" || typeof o == "number" ? (i = Ae(o), s = bt(i)) : o && typeof o == "object" && (i = Ae(o.id ?? o.value ?? o.kind), s = String(o.label || o.name || bt(i)).trim() || bt(i), n = String(o.title || "").trim(), l = String(o.description || o.intro || "").trim()), !i || e.has(i))
|
|
3678
|
+
continue;
|
|
3679
|
+
e.add(i);
|
|
3680
|
+
const u = { id: i, label: s };
|
|
3681
|
+
n && (u.title = n), l && (u.description = l), a.push(u);
|
|
3647
3682
|
}
|
|
3648
|
-
return a.length ? a :
|
|
3683
|
+
return a.length ? a : J.map((o) => ({ ...o }));
|
|
3649
3684
|
}
|
|
3650
|
-
function
|
|
3685
|
+
function Tt(t) {
|
|
3651
3686
|
var a;
|
|
3652
|
-
const
|
|
3653
|
-
return
|
|
3687
|
+
const e = Array.isArray(t) && t.length ? t : J;
|
|
3688
|
+
return e.some((o) => o.id === "bug") ? "bug" : ((a = e[0]) == null ? void 0 : a.id) || "other";
|
|
3654
3689
|
}
|
|
3655
|
-
const
|
|
3690
|
+
const Ji = ["maker", "all-business", "brighter-day", "quiet-night"], qe = "maker", Yi = /* @__PURE__ */ new Set(["crop", "arrow", "rect", "circle"]), Ht = 0.02, Ce = 0.05, Xi = `
|
|
3656
3691
|
<svg class="nf-launcher-icon" viewBox="0 0 24 24" aria-hidden="true">
|
|
3657
3692
|
<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"/>
|
|
3658
3693
|
<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"/>
|
|
3659
3694
|
</svg>
|
|
3660
3695
|
`;
|
|
3661
|
-
function
|
|
3662
|
-
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">${
|
|
3663
|
-
}
|
|
3664
|
-
const
|
|
3665
|
-
crop:
|
|
3666
|
-
resetCrop:
|
|
3667
|
-
arrow:
|
|
3668
|
-
rect:
|
|
3669
|
-
circle:
|
|
3670
|
-
discard:
|
|
3671
|
-
recapture:
|
|
3672
|
-
privacy:
|
|
3673
|
-
audio:
|
|
3674
|
-
video:
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
|
|
3679
|
-
|
|
3696
|
+
function F(t) {
|
|
3697
|
+
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
|
+
}
|
|
3699
|
+
const x = {
|
|
3700
|
+
crop: F('<path d="M6 3v5H1M18 21v-5h5M8 5h8a2 2 0 0 1 2 2v8M16 19H8a2 2 0 0 1-2-2V8"/>'),
|
|
3701
|
+
resetCrop: F('<path d="M3 12a9 9 0 1 0 3-6.7L3 8"/><path d="M3 3v5h5"/>'),
|
|
3702
|
+
arrow: F('<path d="M5 19 19 5"/><path d="M9 5h10v10"/>'),
|
|
3703
|
+
rect: F('<rect x="4" y="6" width="16" height="12" rx="1.5"/>'),
|
|
3704
|
+
circle: F('<circle cx="12" cy="12" r="8"/>'),
|
|
3705
|
+
discard: F('<path d="M4 7h16"/><path d="M9 7V5h6v2"/><path d="M6 7l1 13h10l1-13"/>'),
|
|
3706
|
+
recapture: F('<path d="M4 8h3l2-2h6l2 2h3v11H4z"/><circle cx="12" cy="13" r="3.5"/>'),
|
|
3707
|
+
privacy: F('<path d="M8 6h13M8 12h13M8 18h13"/><path d="M3 6h.01M3 12h.01M3 18h.01"/>'),
|
|
3708
|
+
audio: F('<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"/>'),
|
|
3709
|
+
video: F('<rect x="3" y="7" width="13" height="10" rx="2"/><path d="M16 10.5 21 8v8l-5-2.5z"/>'),
|
|
3710
|
+
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: F('<path d="M5 12h14"/><path d="m13 6 6 6-6 6"/>'),
|
|
3712
|
+
close: F('<path d="M6 6l12 12M18 6 6 18"/>')
|
|
3713
|
+
}, _e = ji();
|
|
3714
|
+
_e.hook();
|
|
3715
|
+
const We = 10, Qi = 80, Ze = "notefully.author", Je = "notefully.kind", Ye = "notefully.redactSections";
|
|
3716
|
+
let c = {
|
|
3680
3717
|
endpoint: "",
|
|
3681
3718
|
projectKey: "",
|
|
3682
3719
|
version: "0.0.0",
|
|
3683
3720
|
name: "",
|
|
3684
3721
|
targets: null,
|
|
3685
3722
|
hideLauncher: !1,
|
|
3686
|
-
theme:
|
|
3723
|
+
theme: qe,
|
|
3687
3724
|
video: !1,
|
|
3688
|
-
consoleLogLimit:
|
|
3689
|
-
kinds:
|
|
3725
|
+
consoleLogLimit: We,
|
|
3726
|
+
kinds: J.map((t) => ({ ...t })),
|
|
3690
3727
|
kindsCustom: !1,
|
|
3691
3728
|
capture: null,
|
|
3692
3729
|
onBeforeCapture: null,
|
|
@@ -3695,883 +3732,954 @@ let d = {
|
|
|
3695
3732
|
displayLink: !1,
|
|
3696
3733
|
locale: null,
|
|
3697
3734
|
translations: null
|
|
3698
|
-
},
|
|
3699
|
-
function
|
|
3700
|
-
return
|
|
3735
|
+
}, pt = !1, Vt = !1, K = {}, y = null, r = {}, A = Yt(), q = "", nt = "", H = null, G = Tt(J), Y = null, O = null, R = null, E = null, kt = null, W = null, V = null, et = !1, _ = { w: 0, h: 0 }, $t = !1, gt = !1, mt = !1, B = [], $ = [], Z = !1;
|
|
3736
|
+
function h(t) {
|
|
3737
|
+
return y.querySelector(t);
|
|
3701
3738
|
}
|
|
3702
|
-
function
|
|
3703
|
-
const
|
|
3704
|
-
return
|
|
3739
|
+
function Xe(t) {
|
|
3740
|
+
const e = String(t || "").trim().toLowerCase().replace(/\s+/g, "-");
|
|
3741
|
+
return Ji.includes(e) ? e : qe;
|
|
3705
3742
|
}
|
|
3706
|
-
function S(
|
|
3707
|
-
|
|
3708
|
-
|
|
3743
|
+
function S(t, e = !1) {
|
|
3744
|
+
r.status && (r.status.textContent = t || "", kt && (clearTimeout(kt), kt = null), t && !e && (kt = setTimeout(() => {
|
|
3745
|
+
r.status.textContent = "";
|
|
3709
3746
|
}, 4e3)));
|
|
3710
3747
|
}
|
|
3711
|
-
function
|
|
3712
|
-
return
|
|
3713
|
-
<button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${
|
|
3748
|
+
function Xt() {
|
|
3749
|
+
return y && document.body.contains(y) || (y = document.createElement("div"), y.id = "notefully", y.innerHTML = `
|
|
3750
|
+
<button class="nf-launcher" type="button" data-i18n-title="launcher.open" data-i18n-aria="launcher.open">${Xi}</button>
|
|
3714
3751
|
<div class="nf-dialog" hidden>
|
|
3715
3752
|
<div class="nf-panel">
|
|
3753
|
+
<div class="nf-pill nf-close-pill">
|
|
3754
|
+
<button class="nf-close nf-icon-btn" type="button" data-i18n-title="form.close" data-i18n-aria="form.close">${x.close}</button>
|
|
3755
|
+
</div>
|
|
3716
3756
|
<div class="nf-panel-body">
|
|
3757
|
+
<div class="nf-heading">
|
|
3758
|
+
<h2 class="nf-title"></h2>
|
|
3759
|
+
<p class="nf-intro"></p>
|
|
3760
|
+
</div>
|
|
3717
3761
|
<div class="nf-stage" hidden>
|
|
3718
|
-
<div class="nf-
|
|
3719
|
-
<
|
|
3720
|
-
<
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3762
|
+
<div class="nf-shot-block">
|
|
3763
|
+
<div class="nf-canvas"></div>
|
|
3764
|
+
<div class="nf-palette">
|
|
3765
|
+
<div class="nf-palette-tools">
|
|
3766
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="crop" data-i18n-title="tool.crop" data-i18n-aria="tool.crop">${x.crop}</button>
|
|
3767
|
+
<button class="nf-reset-crop nf-icon-btn" type="button" data-i18n-title="tool.resetCrop" data-i18n-aria="tool.resetCrop" hidden>${x.resetCrop}</button>
|
|
3768
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="arrow" data-i18n-title="tool.arrow" data-i18n-aria="tool.arrow">${x.arrow}</button>
|
|
3769
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="rect" data-i18n-title="tool.rect" data-i18n-aria="tool.rect">${x.rect}</button>
|
|
3770
|
+
<button class="nf-tool nf-icon-btn" type="button" data-tool="circle" data-i18n-title="tool.circle" data-i18n-aria="tool.circle">${x.circle}</button>
|
|
3771
|
+
</div>
|
|
3772
|
+
<div class="nf-palette-shot">
|
|
3773
|
+
<button class="nf-recapture nf-icon-btn" type="button" data-i18n-title="tool.recapture" data-i18n-aria="tool.recapture">${x.recapture}</button>
|
|
3774
|
+
<button class="nf-discard-shot nf-icon-btn" type="button" data-i18n-title="tool.discard" data-i18n-aria="tool.discard">${x.discard}</button>
|
|
3775
|
+
</div>
|
|
3776
|
+
</div>
|
|
3726
3777
|
</div>
|
|
3727
|
-
<div class="nf-canvas"></div>
|
|
3728
3778
|
</div>
|
|
3729
|
-
<textarea class="nf-text"
|
|
3779
|
+
<textarea class="nf-text"></textarea>
|
|
3730
3780
|
<input class="nf-author" type="text" name="author" autocomplete="nickname" data-i18n-placeholder="form.authorPlaceholder" data-i18n-aria="form.author">
|
|
3731
|
-
<div class="nf-
|
|
3732
|
-
<div class="nf-kind"
|
|
3733
|
-
|
|
3734
|
-
<
|
|
3735
|
-
|
|
3781
|
+
<div class="nf-privacy-stack">
|
|
3782
|
+
<div class="nf-kind-row">
|
|
3783
|
+
<div class="nf-kind"></div>
|
|
3784
|
+
<div class="nf-privacy-summary">
|
|
3785
|
+
<span class="nf-privacy-text"></span>
|
|
3786
|
+
<div class="nf-pill nf-privacy-toggle-pill">
|
|
3787
|
+
<button class="nf-privacy-change nf-icon-btn" type="button" data-i18n-title="tool.privacy" data-i18n-aria="tool.privacy" aria-expanded="false">${x.privacy}</button>
|
|
3788
|
+
</div>
|
|
3789
|
+
</div>
|
|
3736
3790
|
</div>
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
<button class="nf-privacy-done" type="button" data-i18n-text="form.done"></button>
|
|
3791
|
+
<div class="nf-privacy">
|
|
3792
|
+
<div class="nf-privacy-panel" hidden>
|
|
3793
|
+
<div class="nf-privacy-scroll"></div>
|
|
3794
|
+
</div>
|
|
3742
3795
|
</div>
|
|
3743
3796
|
</div>
|
|
3744
3797
|
<div class="nf-actions">
|
|
3745
|
-
<button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${
|
|
3746
|
-
<
|
|
3747
|
-
|
|
3748
|
-
|
|
3798
|
+
<button class="nf-restore nf-icon-btn" type="button" data-i18n-title="tool.restore" data-i18n-aria="tool.restore" hidden>${x.resetCrop}</button>
|
|
3799
|
+
<div class="nf-actions-media">
|
|
3800
|
+
<button class="nf-audio nf-icon-btn" type="button" data-i18n-title="tool.audio" data-i18n-aria="tool.audio">${x.audio}</button>
|
|
3801
|
+
<button class="nf-video nf-icon-btn" type="button" data-i18n-title="tool.video" data-i18n-aria="tool.video">${x.video}</button>
|
|
3802
|
+
</div>
|
|
3803
|
+
<div class="nf-pill nf-submit-pill">
|
|
3804
|
+
<button class="nf-submit" type="button" data-i18n-text="form.submit"></button>
|
|
3805
|
+
</div>
|
|
3749
3806
|
</div>
|
|
3750
3807
|
<div class="nf-status"></div>
|
|
3751
3808
|
</div>
|
|
3752
3809
|
<p class="nf-success-msg" hidden aria-live="polite" data-i18n-text="form.success"></p>
|
|
3753
3810
|
<a class="nf-success-link" hidden target="_blank" rel="noopener noreferrer" data-i18n-aria="form.viewReport">
|
|
3754
3811
|
<span class="nf-success-link-label" data-i18n-text="form.viewReport"></span>
|
|
3755
|
-
${
|
|
3812
|
+
${x.openArrow}
|
|
3756
3813
|
</a>
|
|
3757
3814
|
</div>
|
|
3758
3815
|
</div>
|
|
3759
|
-
<button class="nf-stop-video" type="button" hidden data-i18n-
|
|
3760
|
-
`, document.body.appendChild(
|
|
3761
|
-
launcher:
|
|
3762
|
-
dialog:
|
|
3763
|
-
panel:
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3816
|
+
<button class="nf-stop-video nf-icon-btn" type="button" hidden data-i18n-title="tool.stopVideo" data-i18n-aria="tool.stopVideo">${x.stop}</button>
|
|
3817
|
+
`, document.body.appendChild(y), r = {
|
|
3818
|
+
launcher: h(".nf-launcher"),
|
|
3819
|
+
dialog: h(".nf-dialog"),
|
|
3820
|
+
panel: h(".nf-panel"),
|
|
3821
|
+
close: h(".nf-close"),
|
|
3822
|
+
panelBody: h(".nf-panel-body"),
|
|
3823
|
+
heading: h(".nf-heading"),
|
|
3824
|
+
title: h(".nf-title"),
|
|
3825
|
+
intro: h(".nf-intro"),
|
|
3826
|
+
successMsg: h(".nf-success-msg"),
|
|
3827
|
+
successLink: h(".nf-success-link"),
|
|
3828
|
+
stage: h(".nf-stage"),
|
|
3829
|
+
shotBlock: h(".nf-shot-block"),
|
|
3830
|
+
palette: h(".nf-palette"),
|
|
3831
|
+
paletteTools: h(".nf-palette-tools"),
|
|
3832
|
+
paletteShot: h(".nf-palette-shot"),
|
|
3833
|
+
canvas: h(".nf-canvas"),
|
|
3834
|
+
text: h(".nf-text"),
|
|
3835
|
+
author: h(".nf-author"),
|
|
3836
|
+
privacyStack: h(".nf-privacy-stack"),
|
|
3837
|
+
kindRow: h(".nf-kind-row"),
|
|
3838
|
+
kind: h(".nf-kind"),
|
|
3839
|
+
privacy: h(".nf-privacy"),
|
|
3840
|
+
privacySummary: h(".nf-privacy-summary"),
|
|
3841
|
+
privacyText: h(".nf-privacy-text"),
|
|
3842
|
+
privacyChange: h(".nf-privacy-change"),
|
|
3843
|
+
privacyPanel: h(".nf-privacy-panel"),
|
|
3844
|
+
privacyScroll: h(".nf-privacy-scroll"),
|
|
3845
|
+
actions: h(".nf-actions"),
|
|
3846
|
+
actionsMedia: h(".nf-actions-media"),
|
|
3847
|
+
restore: h(".nf-restore"),
|
|
3848
|
+
status: h(".nf-status"),
|
|
3849
|
+
audio: h(".nf-audio"),
|
|
3850
|
+
video: h(".nf-video"),
|
|
3851
|
+
discard: h(".nf-discard-shot"),
|
|
3852
|
+
recapture: h(".nf-recapture"),
|
|
3853
|
+
stop: h(".nf-stop-video"),
|
|
3854
|
+
resetCrop: h(".nf-reset-crop"),
|
|
3855
|
+
submit: h(".nf-submit"),
|
|
3791
3856
|
shot: null
|
|
3792
|
-
},
|
|
3857
|
+
}, es(), lt()), y;
|
|
3793
3858
|
}
|
|
3794
|
-
function
|
|
3795
|
-
var
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
}),
|
|
3859
|
+
function lt() {
|
|
3860
|
+
var t;
|
|
3861
|
+
y && (Qe(), y.dataset.theme = Xe(c.theme), y.lang = At(), y.dir = Ra(At()), c.hideLauncher ? y.setAttribute("data-nf-hidden-launcher", "") : y.removeAttribute("data-nf-hidden-launcher"), r.video && (r.video.hidden = !c.video), ts(), B.length && B.forEach((e) => {
|
|
3862
|
+
e.label = p(`diag.${e.key}`);
|
|
3863
|
+
}), ea(), Z ? se() : ie(), (t = r.dialog) != null && t.hidden && jt());
|
|
3799
3864
|
}
|
|
3800
|
-
function
|
|
3801
|
-
const
|
|
3802
|
-
locale:
|
|
3865
|
+
function Qe() {
|
|
3866
|
+
const t = Ca({
|
|
3867
|
+
locale: c.locale == null ? void 0 : c.locale
|
|
3803
3868
|
});
|
|
3804
|
-
|
|
3805
|
-
}
|
|
3806
|
-
function
|
|
3807
|
-
if (
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3869
|
+
Ea(c.translations), za(t);
|
|
3870
|
+
}
|
|
3871
|
+
function ts() {
|
|
3872
|
+
if (y) {
|
|
3873
|
+
if (y.querySelectorAll("[data-i18n-title]").forEach((t) => {
|
|
3874
|
+
t.title = p(t.getAttribute("data-i18n-title"));
|
|
3875
|
+
}), y.querySelectorAll("[data-i18n-aria]").forEach((t) => {
|
|
3876
|
+
t.setAttribute("aria-label", p(t.getAttribute("data-i18n-aria")));
|
|
3877
|
+
}), y.querySelectorAll("[data-i18n-placeholder]").forEach((t) => {
|
|
3878
|
+
t.setAttribute("placeholder", p(t.getAttribute("data-i18n-placeholder")));
|
|
3879
|
+
}), y.querySelectorAll("[data-i18n-text]").forEach((t) => {
|
|
3880
|
+
t.textContent = p(t.getAttribute("data-i18n-text"));
|
|
3881
|
+
}), r.audio) {
|
|
3882
|
+
const t = r.audio.dataset.active === "true";
|
|
3883
|
+
ft(t);
|
|
3884
|
+
}
|
|
3885
|
+
te();
|
|
3818
3886
|
}
|
|
3819
3887
|
}
|
|
3820
|
-
function
|
|
3821
|
-
if (
|
|
3822
|
-
return
|
|
3823
|
-
const
|
|
3824
|
-
return a ===
|
|
3825
|
-
}
|
|
3826
|
-
function Se() {
|
|
3827
|
-
n.launcher && (n.launcher.hidden = !!d.hideLauncher);
|
|
3828
|
-
}
|
|
3829
|
-
function Xi() {
|
|
3830
|
-
n.launcher.addEventListener("click", () => ga()), y(".nf-dialog").addEventListener("click", (t) => {
|
|
3831
|
-
Pe && !xe || t.target === n.dialog && re();
|
|
3832
|
-
}), document.addEventListener("keydown", ua), f.querySelectorAll(".nf-tool").forEach((t) => {
|
|
3833
|
-
t.addEventListener("click", () => de(t.dataset.tool));
|
|
3834
|
-
}), n.resetCrop.addEventListener("click", ls), n.canvas.addEventListener("pointerdown", os), n.canvas.addEventListener("dragstart", (t) => t.preventDefault());
|
|
3835
|
-
const e = y(".nf-kind");
|
|
3836
|
-
e && e.addEventListener("click", (t) => {
|
|
3837
|
-
const a = t.target.closest("[data-kind]");
|
|
3838
|
-
a && Xe(a.dataset.kind);
|
|
3839
|
-
}), n.discard.addEventListener("click", us), n.recapture.addEventListener("click", () => {
|
|
3840
|
-
ds().catch((t) => S(t.message || p("status.recaptureFailed")));
|
|
3841
|
-
}), n.restore.addEventListener("click", cs), n.audio.addEventListener("click", ps), n.video.addEventListener("click", gs), n.stop.addEventListener("click", () => le == null ? void 0 : le.stop()), n.privacyChange.addEventListener("click", () => Ee(!_)), n.privacyDone.addEventListener("click", () => Ee(!1)), n.privacyScroll.addEventListener("change", Es), y(".nf-submit").addEventListener("click", () => {
|
|
3842
|
-
ha().catch((t) => S(t.message || p("status.submitFailed")));
|
|
3843
|
-
}), Yt(), de(null);
|
|
3844
|
-
}
|
|
3845
|
-
function x(e) {
|
|
3846
|
-
return String(e || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3888
|
+
function ta(t) {
|
|
3889
|
+
if (c.kindsCustom)
|
|
3890
|
+
return t.label;
|
|
3891
|
+
const e = `kind.${t.id}`, a = p(e);
|
|
3892
|
+
return a === e ? t.label : a;
|
|
3847
3893
|
}
|
|
3848
|
-
function
|
|
3849
|
-
|
|
3850
|
-
|
|
3894
|
+
function jt() {
|
|
3895
|
+
r.launcher && (r.launcher.hidden = !!c.hideLauncher);
|
|
3896
|
+
}
|
|
3897
|
+
function es() {
|
|
3898
|
+
var e;
|
|
3899
|
+
r.launcher.addEventListener("click", () => ya()), h(".nf-dialog").addEventListener("click", (a) => {
|
|
3900
|
+
gt && !mt || a.target === r.dialog && at();
|
|
3901
|
+
}), (e = r.close) == null || e.addEventListener("click", () => {
|
|
3902
|
+
gt && !mt || at();
|
|
3903
|
+
}), document.addEventListener("keydown", ga), y.querySelectorAll(".nf-tool").forEach((a) => {
|
|
3904
|
+
a.addEventListener("click", () => ht(a.dataset.tool));
|
|
3905
|
+
}), r.resetCrop.addEventListener("click", gs), r.canvas.addEventListener("pointerdown", ls), r.canvas.addEventListener("dragstart", (a) => a.preventDefault());
|
|
3906
|
+
const t = h(".nf-kind");
|
|
3907
|
+
t && t.addEventListener("click", (a) => {
|
|
3908
|
+
const o = a.target.closest("[data-kind]");
|
|
3909
|
+
o && Qt(o.dataset.kind);
|
|
3910
|
+
}), r.discard.addEventListener("click", ms), r.recapture.addEventListener("click", () => {
|
|
3911
|
+
fs().catch((a) => S(a.message || p("status.recaptureFailed")));
|
|
3912
|
+
}), r.restore.addEventListener("click", hs), r.audio.addEventListener("click", ys), r.video.addEventListener("click", () => {
|
|
3913
|
+
vs().catch((a) => S((a == null ? void 0 : a.message) || p("status.screenUnsupported")));
|
|
3914
|
+
}), r.stop.addEventListener("click", () => V == null ? void 0 : V.stop()), r.privacyChange.addEventListener("click", () => oe(!Z)), r.privacyScroll.addEventListener("change", Us), h(".nf-submit").addEventListener("click", () => {
|
|
3915
|
+
ka().catch((a) => S(a.message || p("status.submitFailed")));
|
|
3916
|
+
}), ea(), ht(null);
|
|
3917
|
+
}
|
|
3918
|
+
function M(t) {
|
|
3919
|
+
return String(t || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
3920
|
+
}
|
|
3921
|
+
function ea() {
|
|
3922
|
+
const t = y == null ? void 0 : y.querySelector(".nf-kind");
|
|
3923
|
+
if (!t)
|
|
3851
3924
|
return;
|
|
3852
|
-
const
|
|
3853
|
-
|
|
3854
|
-
const o =
|
|
3855
|
-
|
|
3925
|
+
const e = Array.isArray(c.kinds) && c.kinds.length ? c.kinds : J;
|
|
3926
|
+
t.innerHTML = e.map((i) => `<button type="button" data-kind="${M(i.id)}">${M(ta(i))}</button>`).join("");
|
|
3927
|
+
const o = e.map((i) => i.id).includes(G) ? G : Tt(e);
|
|
3928
|
+
Qt(o);
|
|
3929
|
+
}
|
|
3930
|
+
function Qt(t) {
|
|
3931
|
+
G = (c.kinds || J).map((a) => a.id).includes(t) ? t : Tt(c.kinds), y == null || y.querySelectorAll("[data-kind]").forEach((a) => {
|
|
3932
|
+
a.dataset.active = String(a.dataset.kind === G);
|
|
3933
|
+
}), ss(G), te();
|
|
3934
|
+
}
|
|
3935
|
+
function as() {
|
|
3936
|
+
return (Array.isArray(c.kinds) && c.kinds.length ? c.kinds : J).find((e) => e.id === G) || null;
|
|
3937
|
+
}
|
|
3938
|
+
function os() {
|
|
3939
|
+
const t = as(), e = (t == null ? void 0 : t.id) || G || "other", a = e === "bug" || e === "idea" || e === "other", o = (t == null ? void 0 : t.title) && String(t.title).trim() || p(a ? `form.title.${e}` : "form.title.other"), i = (t == null ? void 0 : t.description) && String(t.description).trim() || p(a ? `form.intro.${e}` : "form.intro.other"), s = a ? p(`form.placeholder.${e}`) : p("form.placeholder.custom", {
|
|
3940
|
+
kind: t ? ta(t) : bt(e)
|
|
3941
|
+
});
|
|
3942
|
+
return { title: o, intro: i, placeholder: s };
|
|
3856
3943
|
}
|
|
3857
|
-
function
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3944
|
+
function te() {
|
|
3945
|
+
if (!r.title && !r.intro && !r.text)
|
|
3946
|
+
return;
|
|
3947
|
+
const t = os(), e = I() ? ` ${p("form.screenshotNote")}` : "";
|
|
3948
|
+
r.title && (r.title.textContent = t.title), r.intro && (r.intro.textContent = `${t.intro}${e}`), r.text && r.text.setAttribute("placeholder", t.placeholder);
|
|
3861
3949
|
}
|
|
3862
|
-
function
|
|
3950
|
+
function is() {
|
|
3863
3951
|
try {
|
|
3864
|
-
return String(localStorage.getItem(
|
|
3952
|
+
return String(localStorage.getItem(Je) || "").trim().toLowerCase();
|
|
3865
3953
|
} catch {
|
|
3866
3954
|
return "";
|
|
3867
3955
|
}
|
|
3868
3956
|
}
|
|
3869
|
-
function
|
|
3870
|
-
const
|
|
3871
|
-
if (
|
|
3957
|
+
function ss(t) {
|
|
3958
|
+
const e = String(t || "").trim().toLowerCase();
|
|
3959
|
+
if (e)
|
|
3872
3960
|
try {
|
|
3873
|
-
localStorage.setItem(
|
|
3961
|
+
localStorage.setItem(Je, e);
|
|
3874
3962
|
} catch {
|
|
3875
3963
|
}
|
|
3876
3964
|
}
|
|
3877
|
-
function
|
|
3878
|
-
const
|
|
3879
|
-
return
|
|
3965
|
+
function rs() {
|
|
3966
|
+
const t = (c.kinds || J).map((a) => a.id), e = is();
|
|
3967
|
+
return e && t.includes(e) ? e : Tt(c.kinds);
|
|
3880
3968
|
}
|
|
3881
|
-
function
|
|
3882
|
-
|
|
3883
|
-
|
|
3884
|
-
}),
|
|
3969
|
+
function ht(t) {
|
|
3970
|
+
Y = Yi.has(t) ? t : null, O = null, y.querySelectorAll(".nf-tool").forEach((e) => {
|
|
3971
|
+
e.dataset.active = String(e.dataset.tool === Y);
|
|
3972
|
+
}), r.canvas && (r.canvas.dataset.draw = Y ? "true" : "false"), I() && D();
|
|
3885
3973
|
}
|
|
3886
|
-
function
|
|
3887
|
-
return Math.min(1, Math.max(0,
|
|
3974
|
+
function ze(t) {
|
|
3975
|
+
return Math.min(1, Math.max(0, t));
|
|
3888
3976
|
}
|
|
3889
|
-
function
|
|
3890
|
-
return
|
|
3977
|
+
function yt() {
|
|
3978
|
+
return r.shot || r.canvas;
|
|
3891
3979
|
}
|
|
3892
|
-
function
|
|
3893
|
-
const
|
|
3980
|
+
function Pt(t) {
|
|
3981
|
+
const e = yt().getBoundingClientRect();
|
|
3894
3982
|
return {
|
|
3895
|
-
x:
|
|
3896
|
-
y:
|
|
3983
|
+
x: ze((t.clientX - e.left) / Math.max(e.width, 1)),
|
|
3984
|
+
y: ze((t.clientY - e.top) / Math.max(e.height, 1))
|
|
3897
3985
|
};
|
|
3898
3986
|
}
|
|
3899
|
-
function
|
|
3900
|
-
const
|
|
3901
|
-
return
|
|
3987
|
+
function ns(t) {
|
|
3988
|
+
const e = yt().getBoundingClientRect();
|
|
3989
|
+
return t.clientX >= e.left && t.clientX <= e.right && t.clientY >= e.top && t.clientY <= e.bottom;
|
|
3902
3990
|
}
|
|
3903
|
-
function
|
|
3904
|
-
const
|
|
3991
|
+
function aa(t) {
|
|
3992
|
+
const e = Pt(t), a = A.crop();
|
|
3905
3993
|
return {
|
|
3906
|
-
x: a.x +
|
|
3907
|
-
y: a.y +
|
|
3994
|
+
x: a.x + e.x * a.w,
|
|
3995
|
+
y: a.y + e.y * a.h
|
|
3908
3996
|
};
|
|
3909
3997
|
}
|
|
3910
|
-
function
|
|
3911
|
-
const a = Math.min(
|
|
3998
|
+
function Ft(t, e) {
|
|
3999
|
+
const a = Math.min(t.x, e.x), o = Math.min(t.y, e.y);
|
|
3912
4000
|
return {
|
|
3913
4001
|
x: a,
|
|
3914
4002
|
y: o,
|
|
3915
|
-
w: Math.max(
|
|
3916
|
-
h: Math.max(
|
|
4003
|
+
w: Math.max(Ht, Math.abs(e.x - t.x)),
|
|
4004
|
+
h: Math.max(Ht, Math.abs(e.y - t.y))
|
|
3917
4005
|
};
|
|
3918
4006
|
}
|
|
3919
|
-
function
|
|
3920
|
-
|
|
4007
|
+
function ee(t) {
|
|
4008
|
+
y && (t ? y.dataset.grabbing = "true" : delete y.dataset.grabbing);
|
|
3921
4009
|
}
|
|
3922
|
-
function
|
|
4010
|
+
function Bt(t) {
|
|
3923
4011
|
try {
|
|
3924
|
-
|
|
4012
|
+
r.canvas.setPointerCapture(t.pointerId);
|
|
3925
4013
|
} catch {
|
|
3926
4014
|
}
|
|
3927
4015
|
}
|
|
3928
|
-
function
|
|
3929
|
-
window.addEventListener("pointermove",
|
|
4016
|
+
function Gt() {
|
|
4017
|
+
window.addEventListener("pointermove", ia), window.addEventListener("pointerup", xt), window.addEventListener("pointercancel", xt);
|
|
3930
4018
|
}
|
|
3931
|
-
function
|
|
3932
|
-
window.removeEventListener("pointermove",
|
|
4019
|
+
function oa() {
|
|
4020
|
+
window.removeEventListener("pointermove", ia), window.removeEventListener("pointerup", xt), window.removeEventListener("pointercancel", xt);
|
|
3933
4021
|
}
|
|
3934
|
-
function
|
|
3935
|
-
if (
|
|
4022
|
+
function ls(t) {
|
|
4023
|
+
if (t.button !== 0 || !I())
|
|
3936
4024
|
return;
|
|
3937
|
-
if (!
|
|
3938
|
-
|
|
4025
|
+
if (!t.target.closest(".nf-sticker") && !ns(t)) {
|
|
4026
|
+
O = null, D();
|
|
3939
4027
|
return;
|
|
3940
4028
|
}
|
|
3941
|
-
const
|
|
4029
|
+
const e = t.target.closest(".nf-handle"), a = t.target.closest(".nf-sticker");
|
|
3942
4030
|
if (a && a.dataset.preview !== "true") {
|
|
3943
|
-
|
|
4031
|
+
t.preventDefault(), t.stopPropagation(), O = a.dataset.id, Bt(t), us({
|
|
3944
4032
|
kind: "sticker",
|
|
3945
|
-
id:
|
|
3946
|
-
dir: (
|
|
3947
|
-
},
|
|
4033
|
+
id: O,
|
|
4034
|
+
dir: (e == null ? void 0 : e.dataset.dir) || "move"
|
|
4035
|
+
}, t), D();
|
|
3948
4036
|
return;
|
|
3949
4037
|
}
|
|
3950
|
-
if (
|
|
3951
|
-
|
|
4038
|
+
if (O = null, Y === "crop") {
|
|
4039
|
+
t.preventDefault(), Bt(t), R = { kind: "crop", start: Pt(t), current: Pt(t) }, Gt(), D();
|
|
3952
4040
|
return;
|
|
3953
4041
|
}
|
|
3954
|
-
if (
|
|
3955
|
-
|
|
3956
|
-
const o =
|
|
3957
|
-
|
|
4042
|
+
if (Y === "arrow" || Y === "rect" || Y === "circle") {
|
|
4043
|
+
t.preventDefault(), Bt(t);
|
|
4044
|
+
const o = aa(t);
|
|
4045
|
+
R = { kind: "sticker", type: Y, start: o, current: o }, Gt(), D();
|
|
3958
4046
|
return;
|
|
3959
4047
|
}
|
|
3960
|
-
|
|
4048
|
+
D();
|
|
3961
4049
|
}
|
|
3962
|
-
function
|
|
3963
|
-
|
|
3964
|
-
const a =
|
|
4050
|
+
function us(t, e) {
|
|
4051
|
+
e.preventDefault(), e.stopPropagation();
|
|
4052
|
+
const a = yt().getBoundingClientRect(), o = A.list().find((i) => i.id === t.id);
|
|
3965
4053
|
E = {
|
|
3966
|
-
...
|
|
3967
|
-
startX:
|
|
3968
|
-
startY:
|
|
4054
|
+
...t,
|
|
4055
|
+
startX: e.clientX,
|
|
4056
|
+
startY: e.clientY,
|
|
3969
4057
|
crop: A.crop(),
|
|
3970
4058
|
sticker: o ? { ...o } : null,
|
|
3971
4059
|
rect: a
|
|
3972
|
-
},
|
|
4060
|
+
}, ee(t.dir === "move" || t.dir === "start" || t.dir === "end"), Gt();
|
|
3973
4061
|
}
|
|
3974
|
-
function
|
|
3975
|
-
if (
|
|
3976
|
-
|
|
4062
|
+
function ia(t) {
|
|
4063
|
+
if (R) {
|
|
4064
|
+
R.current = R.kind === "crop" ? Pt(t) : aa(t), D();
|
|
3977
4065
|
return;
|
|
3978
4066
|
}
|
|
3979
4067
|
if (!E)
|
|
3980
4068
|
return;
|
|
3981
|
-
const
|
|
4069
|
+
const e = (t.clientX - E.startX) / E.rect.width * E.crop.w, a = (t.clientY - E.startY) / E.rect.height * E.crop.h, o = E.sticker;
|
|
3982
4070
|
if (o) {
|
|
3983
4071
|
if (E.dir === "end")
|
|
3984
4072
|
A.update(o.id, {
|
|
3985
|
-
x2: o.x2 +
|
|
4073
|
+
x2: o.x2 + e,
|
|
3986
4074
|
y2: o.y2 + a
|
|
3987
4075
|
});
|
|
3988
4076
|
else if (E.dir === "start")
|
|
3989
4077
|
A.update(o.id, {
|
|
3990
|
-
x: o.x +
|
|
4078
|
+
x: o.x + e,
|
|
3991
4079
|
y: o.y + a
|
|
3992
4080
|
});
|
|
3993
4081
|
else if (E.dir === "move")
|
|
3994
4082
|
A.update(o.id, {
|
|
3995
|
-
x: o.x +
|
|
4083
|
+
x: o.x + e,
|
|
3996
4084
|
y: o.y + a,
|
|
3997
|
-
x2: (o.x2 || o.x) +
|
|
4085
|
+
x2: (o.x2 || o.x) + e,
|
|
3998
4086
|
y2: (o.y2 || o.y) + a
|
|
3999
4087
|
});
|
|
4000
4088
|
else {
|
|
4001
|
-
const
|
|
4002
|
-
|
|
4089
|
+
const i = { x: o.x, y: o.y, w: o.w, h: o.h };
|
|
4090
|
+
cs(i, E.dir, e, a), A.update(o.id, i);
|
|
4003
4091
|
}
|
|
4004
|
-
|
|
4092
|
+
D();
|
|
4005
4093
|
}
|
|
4006
4094
|
}
|
|
4007
|
-
function
|
|
4008
|
-
if (
|
|
4009
|
-
const
|
|
4010
|
-
|
|
4095
|
+
function cs(t, e, a, o) {
|
|
4096
|
+
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")) {
|
|
4097
|
+
const i = Math.max(0.04, t.w - a);
|
|
4098
|
+
t.x += t.w - i, t.w = i;
|
|
4011
4099
|
}
|
|
4012
|
-
if (
|
|
4013
|
-
const
|
|
4014
|
-
|
|
4100
|
+
if (e.includes("n")) {
|
|
4101
|
+
const i = Math.max(0.04, t.h - o);
|
|
4102
|
+
t.y += t.h - i, t.h = i;
|
|
4015
4103
|
}
|
|
4016
4104
|
}
|
|
4017
|
-
function
|
|
4018
|
-
if (
|
|
4019
|
-
|
|
4105
|
+
function xt(t) {
|
|
4106
|
+
if (oa(), ee(!1), R) {
|
|
4107
|
+
ds();
|
|
4020
4108
|
return;
|
|
4021
4109
|
}
|
|
4022
4110
|
if (E) {
|
|
4023
4111
|
if (E.kind === "sticker") {
|
|
4024
|
-
const
|
|
4025
|
-
(
|
|
4112
|
+
const e = r.canvas.getBoundingClientRect();
|
|
4113
|
+
(t.clientX < e.left - 24 || t.clientX > e.right + 24 || t.clientY < e.top - 24 || t.clientY > e.bottom + 24) && (A.remove(E.id), O = null);
|
|
4026
4114
|
}
|
|
4027
|
-
E = null,
|
|
4115
|
+
E = null, D();
|
|
4028
4116
|
}
|
|
4029
4117
|
}
|
|
4030
|
-
function
|
|
4031
|
-
const
|
|
4032
|
-
if (
|
|
4118
|
+
function ds() {
|
|
4119
|
+
const t = R;
|
|
4120
|
+
if (R = null, !t)
|
|
4033
4121
|
return;
|
|
4034
|
-
if (
|
|
4035
|
-
const a =
|
|
4036
|
-
if (Math.abs(
|
|
4037
|
-
|
|
4122
|
+
if (t.kind === "crop") {
|
|
4123
|
+
const a = Ft(t.start, t.current);
|
|
4124
|
+
if (Math.abs(t.current.x - t.start.x) < Ce || Math.abs(t.current.y - t.start.y) < Ce) {
|
|
4125
|
+
D();
|
|
4038
4126
|
return;
|
|
4039
4127
|
}
|
|
4040
|
-
const
|
|
4128
|
+
const i = A.crop();
|
|
4041
4129
|
A.setCrop({
|
|
4042
|
-
x:
|
|
4043
|
-
y:
|
|
4044
|
-
w: a.w *
|
|
4045
|
-
h: a.h *
|
|
4046
|
-
}),
|
|
4130
|
+
x: i.x + a.x * i.w,
|
|
4131
|
+
y: i.y + a.y * i.h,
|
|
4132
|
+
w: a.w * i.w,
|
|
4133
|
+
h: a.h * i.h
|
|
4134
|
+
}), ot();
|
|
4047
4135
|
return;
|
|
4048
4136
|
}
|
|
4049
|
-
const
|
|
4050
|
-
|
|
4051
|
-
}
|
|
4052
|
-
function
|
|
4053
|
-
if (
|
|
4054
|
-
const
|
|
4055
|
-
return Math.hypot(
|
|
4056
|
-
x:
|
|
4057
|
-
y:
|
|
4058
|
-
x2:
|
|
4059
|
-
y2:
|
|
4137
|
+
const e = ps(t);
|
|
4138
|
+
e && (O = e.id), D();
|
|
4139
|
+
}
|
|
4140
|
+
function ps(t) {
|
|
4141
|
+
if (t.type === "arrow") {
|
|
4142
|
+
const e = t.current.x - t.start.x, a = t.current.y - t.start.y;
|
|
4143
|
+
return Math.hypot(e, a) < Ht ? A.add("arrow", {
|
|
4144
|
+
x: t.start.x,
|
|
4145
|
+
y: t.start.y,
|
|
4146
|
+
x2: t.start.x + 0.12,
|
|
4147
|
+
y2: t.start.y,
|
|
4060
4148
|
w: 0.12,
|
|
4061
4149
|
h: 0.02
|
|
4062
4150
|
}) : A.add("arrow", {
|
|
4063
|
-
x:
|
|
4064
|
-
y:
|
|
4065
|
-
x2:
|
|
4066
|
-
y2:
|
|
4067
|
-
w: Math.abs(
|
|
4151
|
+
x: t.start.x,
|
|
4152
|
+
y: t.start.y,
|
|
4153
|
+
x2: t.current.x,
|
|
4154
|
+
y2: t.current.y,
|
|
4155
|
+
w: Math.abs(e),
|
|
4068
4156
|
h: Math.abs(a)
|
|
4069
4157
|
});
|
|
4070
4158
|
}
|
|
4071
|
-
return A.add(
|
|
4159
|
+
return A.add(t.type, Ft(t.start, t.current));
|
|
4072
4160
|
}
|
|
4073
|
-
function
|
|
4074
|
-
A.resetCrop(),
|
|
4161
|
+
function gs() {
|
|
4162
|
+
A.resetCrop(), O = null, ot();
|
|
4075
4163
|
}
|
|
4076
|
-
function
|
|
4077
|
-
|
|
4164
|
+
function Lt() {
|
|
4165
|
+
r.resetCrop && (r.resetCrop.hidden = !A.isCropped());
|
|
4078
4166
|
}
|
|
4079
|
-
function
|
|
4080
|
-
if (!
|
|
4167
|
+
function ft(t) {
|
|
4168
|
+
if (!r.audio)
|
|
4081
4169
|
return;
|
|
4082
|
-
const t = p(e ? "tool.audioStop" : "tool.audio");
|
|
4083
|
-
|
|
4170
|
+
const e = !!t, a = p(e ? "tool.audioStop" : "tool.audio");
|
|
4171
|
+
r.audio.title = a, r.audio.setAttribute("aria-label", a), r.audio.dataset.active = String(e), r.audio.innerHTML = e ? x.stop : x.audio;
|
|
4172
|
+
}
|
|
4173
|
+
function ct(t) {
|
|
4174
|
+
if (et = !!t, r.video) {
|
|
4175
|
+
const e = p(et ? "tool.stopVideo" : "tool.video");
|
|
4176
|
+
r.video.title = e, r.video.setAttribute("aria-label", e), r.video.dataset.active = String(et), r.video.innerHTML = et ? x.stop : x.video;
|
|
4177
|
+
}
|
|
4178
|
+
if (r.stop) {
|
|
4179
|
+
const e = p("tool.stopVideo");
|
|
4180
|
+
r.stop.title = e, r.stop.setAttribute("aria-label", e), r.stop.innerHTML = x.stop, r.stop.dataset.active = "true";
|
|
4181
|
+
}
|
|
4084
4182
|
}
|
|
4085
|
-
function
|
|
4086
|
-
return
|
|
4183
|
+
function I() {
|
|
4184
|
+
return Q(q);
|
|
4087
4185
|
}
|
|
4088
|
-
function
|
|
4089
|
-
if (!
|
|
4186
|
+
function vt() {
|
|
4187
|
+
if (!r.stage || !r.palette || !r.actions || !r.recapture)
|
|
4090
4188
|
return;
|
|
4091
|
-
const
|
|
4092
|
-
|
|
4189
|
+
const t = I();
|
|
4190
|
+
r.stage.hidden = !t && !H, r.palette.hidden = !t, r.discard && (r.discard.hidden = !t), r.restore && (r.restore.hidden = t || !nt), 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, te();
|
|
4093
4191
|
}
|
|
4094
|
-
function
|
|
4095
|
-
|
|
4192
|
+
function ms() {
|
|
4193
|
+
I() && (nt = q), q = "", ht(null), vt(), ot();
|
|
4096
4194
|
}
|
|
4097
|
-
function
|
|
4098
|
-
|
|
4195
|
+
function hs() {
|
|
4196
|
+
Q(nt) && (q = nt, vt(), ot());
|
|
4099
4197
|
}
|
|
4100
|
-
function
|
|
4198
|
+
function sa() {
|
|
4101
4199
|
return {
|
|
4102
|
-
capture: typeof
|
|
4103
|
-
onBeforeCapture: typeof
|
|
4200
|
+
capture: typeof c.capture == "function" ? c.capture : void 0,
|
|
4201
|
+
onBeforeCapture: typeof c.onBeforeCapture == "function" ? c.onBeforeCapture : void 0
|
|
4104
4202
|
};
|
|
4105
4203
|
}
|
|
4106
|
-
function
|
|
4107
|
-
if (!
|
|
4204
|
+
function ra(t) {
|
|
4205
|
+
if (!Q(t))
|
|
4108
4206
|
throw new Error(p("status.screenshotFailed"));
|
|
4109
|
-
|
|
4207
|
+
q = t, nt = t, A = Yt(), _ = { w: 0, h: 0 }, O = null, R = null, E = null, ht(null);
|
|
4110
4208
|
}
|
|
4111
|
-
async function
|
|
4112
|
-
if (!(
|
|
4113
|
-
|
|
4209
|
+
async function fs() {
|
|
4210
|
+
if (!(Vt || !r.dialog || r.dialog.hidden)) {
|
|
4211
|
+
Vt = !0, r.recapture.disabled = !0, S(p("status.capturing"), !0), r.dialog.hidden = !0;
|
|
4114
4212
|
try {
|
|
4115
|
-
let
|
|
4213
|
+
let t = "";
|
|
4116
4214
|
try {
|
|
4117
|
-
|
|
4215
|
+
t = await fi();
|
|
4118
4216
|
} catch {
|
|
4119
|
-
|
|
4217
|
+
t = await Ne(sa());
|
|
4120
4218
|
}
|
|
4121
|
-
|
|
4122
|
-
} catch (
|
|
4123
|
-
S((
|
|
4219
|
+
ra(t), S("");
|
|
4220
|
+
} catch (t) {
|
|
4221
|
+
S((t == null ? void 0 : t.message) || p("status.screenshotFailed"));
|
|
4124
4222
|
} finally {
|
|
4125
|
-
|
|
4223
|
+
r.dialog.hidden = !1, r.recapture.disabled = !1, Vt = !1, vt(), ot();
|
|
4126
4224
|
}
|
|
4127
4225
|
}
|
|
4128
4226
|
}
|
|
4129
|
-
function
|
|
4227
|
+
function ys() {
|
|
4130
4228
|
try {
|
|
4131
|
-
if (
|
|
4132
|
-
const a =
|
|
4133
|
-
|
|
4134
|
-
}
|
|
4229
|
+
if (W || (W = Pi((e) => {
|
|
4230
|
+
const a = r.text.value.trim();
|
|
4231
|
+
r.text.value = a ? `${a} ${e}` : e;
|
|
4232
|
+
}, {
|
|
4233
|
+
onActiveChange(e) {
|
|
4234
|
+
ft(e), e || S("");
|
|
4235
|
+
}
|
|
4236
|
+
})), !W.isSupported()) {
|
|
4135
4237
|
S(p("status.audioUnsupported"));
|
|
4136
4238
|
return;
|
|
4137
4239
|
}
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4240
|
+
if (W.isActive()) {
|
|
4241
|
+
W.stop();
|
|
4242
|
+
return;
|
|
4243
|
+
}
|
|
4244
|
+
const t = W.start({ lang: At() });
|
|
4245
|
+
ft(t), S(t ? p("status.listening") : "");
|
|
4246
|
+
} catch (t) {
|
|
4247
|
+
S(t.message);
|
|
4248
|
+
}
|
|
4249
|
+
}
|
|
4250
|
+
async function vs() {
|
|
4251
|
+
if (et) {
|
|
4252
|
+
V == null || V.stop();
|
|
4253
|
+
return;
|
|
4142
4254
|
}
|
|
4255
|
+
await ks();
|
|
4143
4256
|
}
|
|
4144
|
-
async function
|
|
4145
|
-
if (!
|
|
4257
|
+
async function ks() {
|
|
4258
|
+
if (!c.video) {
|
|
4146
4259
|
S(p("status.videoDisabled"));
|
|
4147
4260
|
return;
|
|
4148
4261
|
}
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4262
|
+
if (!et) {
|
|
4263
|
+
r.dialog.hidden = !0, r.stop.hidden = !1, lt(), r.launcher.hidden = !0, V = Li({
|
|
4264
|
+
onStart() {
|
|
4265
|
+
ct(!0);
|
|
4266
|
+
},
|
|
4267
|
+
onStop(t) {
|
|
4268
|
+
H = t, ct(!1), r.stop.hidden = !0, jt(), r.dialog.hidden = !1, vt(), ot(), S(p(t ? "status.videoAttached" : "status.recordingCancelled"));
|
|
4269
|
+
},
|
|
4270
|
+
onError(t) {
|
|
4271
|
+
ct(!1), S(t.message);
|
|
4272
|
+
}
|
|
4273
|
+
});
|
|
4274
|
+
try {
|
|
4275
|
+
await V.start();
|
|
4276
|
+
} catch (t) {
|
|
4277
|
+
ct(!1), r.stop.hidden = !0, jt(), r.dialog.hidden = !1, S(t.message);
|
|
4157
4278
|
}
|
|
4158
|
-
});
|
|
4159
|
-
try {
|
|
4160
|
-
await le.start();
|
|
4161
|
-
} catch (e) {
|
|
4162
|
-
n.stop.hidden = !0, Se(), n.dialog.hidden = !1, S(e.message);
|
|
4163
4279
|
}
|
|
4164
4280
|
}
|
|
4165
|
-
function
|
|
4166
|
-
if (
|
|
4167
|
-
|
|
4281
|
+
function ot() {
|
|
4282
|
+
if (r.shot = null, !I()) {
|
|
4283
|
+
r.canvas.style.removeProperty("--nf-shot-aspect"), r.canvas.style.removeProperty("aspect-ratio"), r.canvas.innerHTML = H ? `<video class="nf-recording-preview" controls src="${URL.createObjectURL(H)}"></video>` : "", Lt();
|
|
4168
4284
|
return;
|
|
4169
4285
|
}
|
|
4170
|
-
|
|
4171
|
-
const
|
|
4172
|
-
|
|
4173
|
-
const
|
|
4174
|
-
|
|
4286
|
+
r.canvas.innerHTML = `<div class="nf-shot"><img alt="${M(p("shot.alt"))}" src="${q}" draggable="false"></div>`, r.shot = r.canvas.querySelector(".nf-shot");
|
|
4287
|
+
const t = r.shot.querySelector("img");
|
|
4288
|
+
t.draggable = !1, t.addEventListener("dragstart", (a) => a.preventDefault());
|
|
4289
|
+
const e = () => {
|
|
4290
|
+
bs(t), D();
|
|
4175
4291
|
};
|
|
4176
|
-
|
|
4292
|
+
t.addEventListener("load", e), t.complete && t.naturalWidth && e(), Lt();
|
|
4177
4293
|
}
|
|
4178
|
-
function
|
|
4179
|
-
const
|
|
4180
|
-
if (
|
|
4294
|
+
function bs(t) {
|
|
4295
|
+
const e = t.naturalWidth || _.w, a = t.naturalHeight || _.h;
|
|
4296
|
+
if (e && a && (_ = { w: e, h: a }, r.canvas.style.setProperty("--nf-shot-aspect", String(e / a)), r.canvas.style.aspectRatio = `${e} / ${a}`), !r.shot || !_.w || !_.h)
|
|
4181
4297
|
return;
|
|
4182
|
-
const o = A.crop(),
|
|
4183
|
-
|
|
4298
|
+
const o = A.crop(), i = _.w / _.h, s = o.w / o.h * i, n = Math.min(1, s / i), l = Math.min(1, i / s);
|
|
4299
|
+
r.shot.style.left = `${(1 - n) / 2 * 100}%`, r.shot.style.top = `${(1 - l) / 2 * 100}%`, r.shot.style.width = `${n * 100}%`, r.shot.style.height = `${l * 100}%`, 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}%`;
|
|
4184
4300
|
}
|
|
4185
|
-
function
|
|
4186
|
-
return
|
|
4301
|
+
function ws(t) {
|
|
4302
|
+
return t.type === "arrow" ? {
|
|
4187
4303
|
id: "preview",
|
|
4188
4304
|
type: "arrow",
|
|
4189
4305
|
number: "",
|
|
4190
|
-
x:
|
|
4191
|
-
y:
|
|
4192
|
-
x2:
|
|
4193
|
-
y2:
|
|
4194
|
-
w: Math.abs(
|
|
4195
|
-
h: Math.abs(
|
|
4306
|
+
x: t.start.x,
|
|
4307
|
+
y: t.start.y,
|
|
4308
|
+
x2: t.current.x,
|
|
4309
|
+
y2: t.current.y,
|
|
4310
|
+
w: Math.abs(t.current.x - t.start.x),
|
|
4311
|
+
h: Math.abs(t.current.y - t.start.y)
|
|
4196
4312
|
} : {
|
|
4197
4313
|
id: "preview",
|
|
4198
|
-
type:
|
|
4314
|
+
type: t.type,
|
|
4199
4315
|
number: "",
|
|
4200
|
-
...
|
|
4316
|
+
...Ft(t.start, t.current)
|
|
4201
4317
|
};
|
|
4202
4318
|
}
|
|
4203
|
-
function
|
|
4204
|
-
if ((
|
|
4205
|
-
|
|
4319
|
+
function D() {
|
|
4320
|
+
if ((r.shot || r.canvas).querySelectorAll(".nf-sticker, .nf-crop").forEach((s) => s.remove()), !I() || !r.shot) {
|
|
4321
|
+
Lt();
|
|
4206
4322
|
return;
|
|
4207
4323
|
}
|
|
4208
|
-
const
|
|
4209
|
-
if (
|
|
4210
|
-
const
|
|
4211
|
-
|
|
4324
|
+
const e = A.crop(), a = yt(), o = Ge(a.clientWidth || 400);
|
|
4325
|
+
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`), (R == null ? void 0 : R.kind) === "crop") {
|
|
4326
|
+
const s = document.createElement("div");
|
|
4327
|
+
s.className = "nf-crop", Ee(s, Ft(R.start, R.current), { x: 0, y: 0, w: 1, h: 1 }), r.shot.appendChild(s);
|
|
4212
4328
|
}
|
|
4213
|
-
const
|
|
4214
|
-
if ((
|
|
4215
|
-
const
|
|
4216
|
-
if (u.className = `nf-sticker nf-${
|
|
4217
|
-
const
|
|
4218
|
-
|
|
4329
|
+
const i = A.list().slice();
|
|
4330
|
+
if ((R == null ? void 0 : R.kind) === "sticker" && i.push(ws(R)), i.forEach((s) => {
|
|
4331
|
+
const n = s.id === "preview", l = !n && s.id === O, u = document.createElement("div");
|
|
4332
|
+
if (u.className = `nf-sticker nf-${s.type}`, u.dataset.id = s.id, l && (u.dataset.selected = "true"), n && (u.dataset.preview = "true"), s.type === "arrow" ? Ss(u, s, e, l, o) : (Ee(u, s, e), l && ["nw", "ne", "sw", "se"].forEach((d) => qt(u, d))), !n && s.number) {
|
|
4333
|
+
const d = document.createElement("span");
|
|
4334
|
+
d.className = "nf-badge", d.textContent = String(s.number), u.appendChild(d);
|
|
4219
4335
|
}
|
|
4220
|
-
|
|
4221
|
-
}),
|
|
4222
|
-
const
|
|
4223
|
-
|
|
4336
|
+
r.shot.appendChild(u);
|
|
4337
|
+
}), r.canvas.querySelectorAll(":scope > .nf-recording-preview").forEach((s) => s.remove()), H) {
|
|
4338
|
+
const s = document.createElement("video");
|
|
4339
|
+
s.className = "nf-recording-preview", s.controls = !0, s.src = URL.createObjectURL(H), s.style.position = "absolute", s.style.right = "8px", s.style.bottom = "8px", s.style.width = "160px", r.canvas.appendChild(s);
|
|
4224
4340
|
}
|
|
4225
|
-
|
|
4341
|
+
Lt();
|
|
4226
4342
|
}
|
|
4227
|
-
function
|
|
4228
|
-
const
|
|
4229
|
-
|
|
4230
|
-
<line class="nf-arrow-hit" x1="${T}" y1="${
|
|
4231
|
-
<line class="nf-arrow-shaft" x1="${T}" y1="${
|
|
4343
|
+
function Ss(t, e, a, o, i = Ge(400)) {
|
|
4344
|
+
const s = yt(), n = s.clientWidth, l = s.clientHeight, u = (e.x - a.x) / a.w * n, d = (e.y - a.y) / a.h * l, g = ((e.x2 ?? e.x + e.w) - a.x) / a.w * n, k = ((e.y2 ?? e.y) - a.y) / a.h * l, v = Math.max(18, i.arrowHead + i.stroke * 2), w = Math.min(u, g) - v, b = Math.min(d, k) - v, z = Math.max(2, Math.abs(g - u)) + v * 2, j = Math.max(2, Math.abs(k - d)) + v * 2, T = u - w, N = d - b, P = g - w, m = k - b, C = Di(T, N, P, m, i), tt = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
4345
|
+
t.style.left = `${w}px`, t.style.top = `${b}px`, t.style.width = `${z}px`, t.style.height = `${j}px`, tt.setAttribute("class", "nf-arrow-svg"), tt.setAttribute("viewBox", `0 0 ${z} ${j}`), tt.setAttribute("width", String(z)), tt.setAttribute("height", String(j)), tt.innerHTML = `
|
|
4346
|
+
<line class="nf-arrow-hit" x1="${T}" y1="${N}" x2="${P}" y2="${m}" />
|
|
4347
|
+
<line class="nf-arrow-shaft" x1="${T}" y1="${N}" x2="${C.shaftEnd.x}" y2="${C.shaftEnd.y}" />
|
|
4232
4348
|
<polygon class="nf-arrow-head" points="${C.tipX},${C.tipY} ${C.left.x},${C.left.y} ${C.right.x},${C.right.y}" />
|
|
4233
|
-
`,
|
|
4349
|
+
`, t.appendChild(tt), o && (qt(t, "start", { left: T - 5, top: N - 5 }), qt(t, "end", { left: P - 5, top: m - 5 }));
|
|
4234
4350
|
}
|
|
4235
|
-
function
|
|
4351
|
+
function qt(t, e, a) {
|
|
4236
4352
|
const o = document.createElement("span");
|
|
4237
|
-
o.className = "nf-handle", o.dataset.dir =
|
|
4353
|
+
o.className = "nf-handle", o.dataset.dir = e, a && (o.style.left = `${a.left}px`, o.style.top = `${a.top}px`), t.appendChild(o);
|
|
4238
4354
|
}
|
|
4239
|
-
function
|
|
4240
|
-
|
|
4355
|
+
function Ee(t, e, a) {
|
|
4356
|
+
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}%`;
|
|
4241
4357
|
}
|
|
4242
|
-
function
|
|
4358
|
+
function na() {
|
|
4243
4359
|
try {
|
|
4244
|
-
return String(localStorage.getItem(
|
|
4360
|
+
return String(localStorage.getItem(Ze) || "").trim();
|
|
4245
4361
|
} catch {
|
|
4246
4362
|
return "";
|
|
4247
4363
|
}
|
|
4248
4364
|
}
|
|
4249
|
-
function
|
|
4250
|
-
const
|
|
4251
|
-
if (!(!
|
|
4365
|
+
function As(t) {
|
|
4366
|
+
const e = String(t || "").trim();
|
|
4367
|
+
if (!(!e || e === _t()))
|
|
4252
4368
|
try {
|
|
4253
|
-
localStorage.setItem(
|
|
4369
|
+
localStorage.setItem(Ze, e);
|
|
4254
4370
|
} catch {
|
|
4255
4371
|
}
|
|
4256
4372
|
}
|
|
4257
|
-
function
|
|
4373
|
+
function la() {
|
|
4258
4374
|
try {
|
|
4259
|
-
const
|
|
4260
|
-
if (!
|
|
4375
|
+
const t = localStorage.getItem(Ye);
|
|
4376
|
+
if (!t)
|
|
4261
4377
|
return { diagnostics: !1, logs: !1 };
|
|
4262
|
-
const
|
|
4378
|
+
const e = JSON.parse(t);
|
|
4263
4379
|
return {
|
|
4264
|
-
diagnostics: !!(
|
|
4265
|
-
logs: !!(
|
|
4380
|
+
diagnostics: !!(e != null && e.diagnostics),
|
|
4381
|
+
logs: !!(e != null && e.logs)
|
|
4266
4382
|
};
|
|
4267
4383
|
} catch {
|
|
4268
4384
|
return { diagnostics: !1, logs: !1 };
|
|
4269
4385
|
}
|
|
4270
4386
|
}
|
|
4271
|
-
function
|
|
4272
|
-
const
|
|
4273
|
-
...
|
|
4274
|
-
...
|
|
4387
|
+
function Re(t = {}) {
|
|
4388
|
+
const e = {
|
|
4389
|
+
...la(),
|
|
4390
|
+
...t
|
|
4275
4391
|
};
|
|
4276
4392
|
try {
|
|
4277
|
-
localStorage.setItem(
|
|
4278
|
-
diagnostics: !!
|
|
4279
|
-
logs: !!
|
|
4393
|
+
localStorage.setItem(Ye, JSON.stringify({
|
|
4394
|
+
diagnostics: !!e.diagnostics,
|
|
4395
|
+
logs: !!e.logs
|
|
4280
4396
|
}));
|
|
4281
4397
|
} catch {
|
|
4282
4398
|
}
|
|
4283
4399
|
}
|
|
4284
|
-
function
|
|
4285
|
-
return !!(String(
|
|
4400
|
+
function ua() {
|
|
4401
|
+
return !!(String(K.userId || "").trim() || String(K.email || "").trim() || String(K.displayName || "").trim());
|
|
4286
4402
|
}
|
|
4287
|
-
function
|
|
4403
|
+
function ca() {
|
|
4288
4404
|
return String(
|
|
4289
|
-
|
|
4405
|
+
K.displayName || K.email || K.userId || ""
|
|
4290
4406
|
).trim();
|
|
4291
4407
|
}
|
|
4292
|
-
function
|
|
4408
|
+
function _t() {
|
|
4293
4409
|
return p("form.authorPlaceholder");
|
|
4294
4410
|
}
|
|
4295
|
-
function
|
|
4296
|
-
var
|
|
4297
|
-
if (
|
|
4298
|
-
return
|
|
4299
|
-
const
|
|
4300
|
-
return
|
|
4411
|
+
function Cs() {
|
|
4412
|
+
var e;
|
|
4413
|
+
if (ua())
|
|
4414
|
+
return ca() || _t();
|
|
4415
|
+
const t = String(((e = r.author) == null ? void 0 : e.value) || "").trim();
|
|
4416
|
+
return t ? (As(t), t) : _t();
|
|
4301
4417
|
}
|
|
4302
|
-
function
|
|
4303
|
-
if (!
|
|
4418
|
+
function da() {
|
|
4419
|
+
if (!r.author)
|
|
4304
4420
|
return;
|
|
4305
|
-
const
|
|
4306
|
-
if (
|
|
4307
|
-
|
|
4421
|
+
const t = ua();
|
|
4422
|
+
if (r.author.hidden = t, t) {
|
|
4423
|
+
r.author.value = "";
|
|
4308
4424
|
return;
|
|
4309
4425
|
}
|
|
4310
|
-
|
|
4311
|
-
}
|
|
4312
|
-
function
|
|
4313
|
-
const a = Number(
|
|
4314
|
-
return Number.isFinite(a) ? Math.min(
|
|
4315
|
-
}
|
|
4316
|
-
function
|
|
4317
|
-
|
|
4318
|
-
}
|
|
4319
|
-
function
|
|
4320
|
-
|
|
4321
|
-
const
|
|
4322
|
-
|
|
4323
|
-
...
|
|
4324
|
-
endpoint: String(
|
|
4325
|
-
projectKey:
|
|
4326
|
-
version:
|
|
4327
|
-
name:
|
|
4328
|
-
targets:
|
|
4329
|
-
hideLauncher:
|
|
4330
|
-
theme:
|
|
4331
|
-
video:
|
|
4332
|
-
consoleLogLimit:
|
|
4333
|
-
kinds:
|
|
4334
|
-
kindsCustom:
|
|
4335
|
-
capture:
|
|
4336
|
-
onBeforeCapture:
|
|
4337
|
-
onOpen:
|
|
4338
|
-
onClose:
|
|
4339
|
-
displayLink:
|
|
4340
|
-
locale:
|
|
4341
|
-
translations:
|
|
4426
|
+
r.author.value = na();
|
|
4427
|
+
}
|
|
4428
|
+
function pa(t, e = We) {
|
|
4429
|
+
const a = Number(t);
|
|
4430
|
+
return Number.isFinite(a) ? Math.min(Qi, Math.max(0, Math.floor(a))) : e;
|
|
4431
|
+
}
|
|
4432
|
+
function ga(t) {
|
|
4433
|
+
t.key !== "Escape" || !r.dialog || r.dialog.hidden || gt && !mt || at();
|
|
4434
|
+
}
|
|
4435
|
+
function ma(t = {}) {
|
|
4436
|
+
wi(t);
|
|
4437
|
+
const e = Object.prototype.hasOwnProperty.call(t, "kinds");
|
|
4438
|
+
c = {
|
|
4439
|
+
...c,
|
|
4440
|
+
endpoint: String(t.endpoint || c.endpoint || "").replace(/\/$/, ""),
|
|
4441
|
+
projectKey: t.projectKey == null ? c.projectKey : String(t.projectKey),
|
|
4442
|
+
version: t.version == null ? c.version : String(t.version),
|
|
4443
|
+
name: t.name == null ? c.name : String(t.name || ""),
|
|
4444
|
+
targets: t.targets === void 0 ? c.targets : t.targets,
|
|
4445
|
+
hideLauncher: t.hideLauncher == null ? c.hideLauncher : !!t.hideLauncher,
|
|
4446
|
+
theme: Xe(t.theme ?? c.theme),
|
|
4447
|
+
video: t.video == null ? c.video : !!t.video,
|
|
4448
|
+
consoleLogLimit: t.consoleLogLimit == null ? c.consoleLogLimit : pa(t.consoleLogLimit, c.consoleLogLimit),
|
|
4449
|
+
kinds: e ? Zi(t.kinds) : c.kinds,
|
|
4450
|
+
kindsCustom: e ? !0 : c.kindsCustom,
|
|
4451
|
+
capture: t.capture === void 0 ? c.capture : t.capture,
|
|
4452
|
+
onBeforeCapture: t.onBeforeCapture === void 0 ? c.onBeforeCapture : t.onBeforeCapture,
|
|
4453
|
+
onOpen: t.onOpen === void 0 ? c.onOpen : t.onOpen,
|
|
4454
|
+
onClose: t.onClose === void 0 ? c.onClose : t.onClose,
|
|
4455
|
+
displayLink: t.displayLink == null ? c.displayLink : !!t.displayLink,
|
|
4456
|
+
locale: t.locale === void 0 ? c.locale : t.locale == null || t.locale === "" ? null : String(t.locale),
|
|
4457
|
+
translations: t.translations === void 0 ? c.translations : t.translations && typeof t.translations == "object" ? t.translations : null
|
|
4342
4458
|
};
|
|
4343
4459
|
}
|
|
4344
|
-
function
|
|
4345
|
-
const
|
|
4346
|
-
if (typeof
|
|
4460
|
+
function ha(t) {
|
|
4461
|
+
const e = c[t];
|
|
4462
|
+
if (typeof e == "function")
|
|
4347
4463
|
try {
|
|
4348
|
-
|
|
4464
|
+
e();
|
|
4349
4465
|
} catch (a) {
|
|
4350
|
-
console.warn(`Notefully.${
|
|
4466
|
+
console.warn(`Notefully.${t} failed:`, a);
|
|
4351
4467
|
}
|
|
4352
4468
|
}
|
|
4353
|
-
function
|
|
4354
|
-
return
|
|
4469
|
+
function zs() {
|
|
4470
|
+
return pt;
|
|
4355
4471
|
}
|
|
4356
|
-
function
|
|
4357
|
-
return
|
|
4472
|
+
function Es() {
|
|
4473
|
+
return At();
|
|
4358
4474
|
}
|
|
4359
|
-
function
|
|
4360
|
-
return
|
|
4475
|
+
function Rs(t, e) {
|
|
4476
|
+
return c.locale = t == null || t === "" ? null : String(t), e !== void 0 && (c.translations = e && typeof e == "object" ? e : null), y ? lt() : Qe(), Mt;
|
|
4361
4477
|
}
|
|
4362
|
-
function
|
|
4363
|
-
return
|
|
4478
|
+
function ae(t = {}) {
|
|
4479
|
+
return ma(t), y && lt(), Mt;
|
|
4364
4480
|
}
|
|
4365
|
-
function
|
|
4366
|
-
return
|
|
4481
|
+
function js(t = {}) {
|
|
4482
|
+
return ma(t), Xt(), lt(), Mt;
|
|
4367
4483
|
}
|
|
4368
|
-
function
|
|
4369
|
-
return
|
|
4484
|
+
function Ps(t) {
|
|
4485
|
+
return ae({ theme: t });
|
|
4370
4486
|
}
|
|
4371
|
-
function
|
|
4372
|
-
const
|
|
4373
|
-
return !
|
|
4487
|
+
function xs(t) {
|
|
4488
|
+
const e = !!t;
|
|
4489
|
+
return !e && y && r.dialog && !r.dialog.hidden && at(), ae({ hideLauncher: !e });
|
|
4374
4490
|
}
|
|
4375
|
-
function
|
|
4376
|
-
const
|
|
4377
|
-
...
|
|
4378
|
-
displayName:
|
|
4491
|
+
function Ls() {
|
|
4492
|
+
const t = ca() || na() || void 0, e = ki({
|
|
4493
|
+
...K,
|
|
4494
|
+
displayName: K.displayName || t
|
|
4379
4495
|
});
|
|
4380
|
-
|
|
4381
|
-
|
|
4496
|
+
B = Ki(e), $ = Hi(
|
|
4497
|
+
_e.snapshot().slice(-pa(c.consoleLogLimit))
|
|
4382
4498
|
);
|
|
4383
|
-
const a =
|
|
4384
|
-
a.diagnostics &&
|
|
4499
|
+
const a = la();
|
|
4500
|
+
a.diagnostics && Rt(B, !0), a.logs && $.length && Rt($, !0), Z = !1;
|
|
4385
4501
|
}
|
|
4386
|
-
function
|
|
4387
|
-
|
|
4502
|
+
function oe(t) {
|
|
4503
|
+
Z = !!t, r.privacyPanel && (r.privacyPanel.hidden = !Z), r.privacyStack && (r.privacyStack.dataset.open = String(Z)), r.privacyChange && (r.privacyChange.setAttribute("aria-expanded", Z ? "true" : "false"), r.privacyChange.dataset.active = String(Z)), Z && se();
|
|
4388
4504
|
}
|
|
4389
|
-
function
|
|
4390
|
-
if (!
|
|
4505
|
+
function ie() {
|
|
4506
|
+
if (!r.privacy || !r.privacyText || !r.privacyChange)
|
|
4391
4507
|
return;
|
|
4392
|
-
const
|
|
4393
|
-
diagnostics:
|
|
4394
|
-
logs:
|
|
4508
|
+
const t = qi({
|
|
4509
|
+
diagnostics: B,
|
|
4510
|
+
logs: $
|
|
4395
4511
|
});
|
|
4396
|
-
|
|
4397
|
-
const
|
|
4398
|
-
|
|
4399
|
-
}
|
|
4400
|
-
function
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
<
|
|
4512
|
+
r.privacyText.textContent = t, r.privacyText.hidden = !t;
|
|
4513
|
+
const e = B.length === 0 && $.length === 0;
|
|
4514
|
+
r.privacySummary && (r.privacySummary.hidden = e), r.privacy.hidden = e, r.privacyChange.hidden = !1;
|
|
4515
|
+
}
|
|
4516
|
+
function fa(t, e, a) {
|
|
4517
|
+
const i = `${p(t ? "privacy.included" : "privacy.redacted")} ${a}`;
|
|
4518
|
+
return `<label class="nf-privacy-toggle" data-included="${t ? "true" : "false"}">
|
|
4519
|
+
<span class="nf-privacy-check">
|
|
4520
|
+
<input type="checkbox" ${t ? "checked" : ""} ${e ? 'data-indeterminate="true"' : ""} aria-label="${M(i)}">
|
|
4521
|
+
</span>
|
|
4404
4522
|
</label>`;
|
|
4405
4523
|
}
|
|
4406
|
-
function
|
|
4407
|
-
const
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
<
|
|
4413
|
-
</div>
|
|
4414
|
-
${r}
|
|
4415
|
-
</div>`;
|
|
4416
|
-
}
|
|
4417
|
-
const u = i ?? x(l);
|
|
4418
|
-
return `<div class="nf-privacy-row" data-kind="${x(e)}" data-id="${x(t)}">
|
|
4419
|
-
<div class="nf-privacy-row-text">
|
|
4420
|
-
<div class="nf-privacy-row-title">${x(a)}</div>
|
|
4421
|
-
<div class="nf-privacy-row-detail">${u}</div>
|
|
4524
|
+
function je(t, e, a, o, i, s = null) {
|
|
4525
|
+
const n = fa(!i, !1, a), l = typeof o == "string" ? o : String(o || ""), u = i ? M(l) : s ?? M(l), d = l ? `${a}: ${l}` : a;
|
|
4526
|
+
return `<div class="nf-privacy-row" data-kind="${M(t)}" data-id="${M(e)}"${i ? ' data-redacted="true"' : ""}>
|
|
4527
|
+
${n}
|
|
4528
|
+
<div class="nf-privacy-row-text"${i ? ` title="${M(d)}"` : ""}>
|
|
4529
|
+
<span class="nf-privacy-row-title">${M(a)}</span>
|
|
4530
|
+
<span class="nf-privacy-row-detail">${u}</span>
|
|
4422
4531
|
</div>
|
|
4423
|
-
${r}
|
|
4424
4532
|
</div>`;
|
|
4425
4533
|
}
|
|
4426
|
-
function
|
|
4534
|
+
function Pe(t, e, a, o) {
|
|
4427
4535
|
if (!a.length)
|
|
4428
4536
|
return "";
|
|
4429
|
-
const
|
|
4430
|
-
return `<section class="nf-privacy-section" data-section="${
|
|
4537
|
+
const i = Gi(a), s = !i.checked && !i.indeterminate;
|
|
4538
|
+
return `<section class="nf-privacy-section" data-section="${M(t)}"${s ? ' data-redacted="true"' : ""}>
|
|
4431
4539
|
<div class="nf-privacy-section-head">
|
|
4432
|
-
|
|
4433
|
-
|
|
4540
|
+
${fa(i.checked, i.indeterminate, e)}
|
|
4541
|
+
<h3 class="nf-privacy-section-title">${M(e)}</h3>
|
|
4434
4542
|
</div>
|
|
4435
|
-
<div class="nf-privacy-rows"${
|
|
4543
|
+
<div class="nf-privacy-rows"${s ? " hidden" : ""}>${o}</div>
|
|
4436
4544
|
</section>`;
|
|
4437
4545
|
}
|
|
4438
|
-
function
|
|
4439
|
-
if (!
|
|
4546
|
+
function se() {
|
|
4547
|
+
if (!r.privacyScroll)
|
|
4440
4548
|
return;
|
|
4441
|
-
const
|
|
4549
|
+
const t = B.map((a) => je(
|
|
4442
4550
|
"diagnostic",
|
|
4443
4551
|
a.key,
|
|
4444
4552
|
a.label,
|
|
4445
|
-
|
|
4553
|
+
_i(a.value),
|
|
4446
4554
|
a.redacted
|
|
4447
|
-
)).join(""),
|
|
4448
|
-
const o =
|
|
4449
|
-
return
|
|
4555
|
+
)).join(""), e = $.map((a) => {
|
|
4556
|
+
const o = zi(a);
|
|
4557
|
+
return je(
|
|
4450
4558
|
"log",
|
|
4451
4559
|
a.id,
|
|
4452
4560
|
a.level,
|
|
4453
4561
|
o,
|
|
4454
4562
|
a.redacted,
|
|
4455
|
-
a.redacted ? null :
|
|
4563
|
+
a.redacted ? null : Ei(a)
|
|
4456
4564
|
);
|
|
4457
4565
|
}).join("");
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
].join(""),
|
|
4566
|
+
r.privacyScroll.innerHTML = [
|
|
4567
|
+
Pe("diagnostics", p("privacy.section.diagnostics"), B, t),
|
|
4568
|
+
$.length ? Pe("logs", p("privacy.section.logs"), $, e) : ""
|
|
4569
|
+
].join(""), r.privacyScroll.querySelectorAll('input[data-indeterminate="true"]').forEach((a) => {
|
|
4462
4570
|
a.indeterminate = !0, a.removeAttribute("data-indeterminate");
|
|
4463
|
-
}),
|
|
4571
|
+
}), ie();
|
|
4464
4572
|
}
|
|
4465
|
-
function
|
|
4466
|
-
const
|
|
4467
|
-
if (!(
|
|
4573
|
+
function Us(t) {
|
|
4574
|
+
const e = t.target;
|
|
4575
|
+
if (!(e instanceof HTMLInputElement) || e.type !== "checkbox")
|
|
4468
4576
|
return;
|
|
4469
|
-
const a =
|
|
4577
|
+
const a = e.closest("[data-section]"), o = e.closest(".nf-privacy-row"), i = !e.checked;
|
|
4470
4578
|
if (o) {
|
|
4471
|
-
const
|
|
4472
|
-
if (
|
|
4473
|
-
const l =
|
|
4474
|
-
l && (l.redacted =
|
|
4475
|
-
} else if (
|
|
4476
|
-
const l =
|
|
4477
|
-
l && (l.redacted =
|
|
4579
|
+
const s = o.dataset.kind, n = o.dataset.id;
|
|
4580
|
+
if (s === "diagnostic") {
|
|
4581
|
+
const l = B.find((u) => u.key === n);
|
|
4582
|
+
l && (l.redacted = i);
|
|
4583
|
+
} else if (s === "log") {
|
|
4584
|
+
const l = $.find((u) => u.id === n);
|
|
4585
|
+
l && (l.redacted = i);
|
|
4478
4586
|
}
|
|
4479
4587
|
} else if (a) {
|
|
4480
|
-
const
|
|
4481
|
-
|
|
4588
|
+
const s = a.dataset.section;
|
|
4589
|
+
s === "diagnostics" ? (Rt(B, i), Re({ diagnostics: i })) : s === "logs" && (Rt($, i), Re({ logs: i }));
|
|
4482
4590
|
} else
|
|
4483
4591
|
return;
|
|
4484
|
-
|
|
4592
|
+
se();
|
|
4485
4593
|
}
|
|
4486
|
-
async function
|
|
4487
|
-
|
|
4594
|
+
async function ya() {
|
|
4595
|
+
Xt(), pt || (pt = !0, ha("onOpen")), va(), lt(), r.launcher.hidden = !0, A = Yt(), _ = { w: 0, h: 0 }, H = null, q = "", nt = "", O = null, R = null, E = null, G = rs(), Qt(G), ht(null), ft(!1), r.text.value = "", da(), S(""), Ls();
|
|
4488
4596
|
try {
|
|
4489
|
-
|
|
4490
|
-
} catch (
|
|
4491
|
-
|
|
4597
|
+
ra(await Ne(sa())), S("");
|
|
4598
|
+
} catch (e) {
|
|
4599
|
+
q = "", S((e == null ? void 0 : e.message) || p("status.screenshotFailed"));
|
|
4492
4600
|
}
|
|
4493
|
-
|
|
4601
|
+
vt(), oe(!1), ie(), r.dialog.hidden = !1, ot(), r.text.focus();
|
|
4494
4602
|
}
|
|
4495
|
-
function
|
|
4496
|
-
if (!
|
|
4603
|
+
function at() {
|
|
4604
|
+
if (!y)
|
|
4497
4605
|
return;
|
|
4498
|
-
const
|
|
4499
|
-
|
|
4606
|
+
const t = pt;
|
|
4607
|
+
W == null || W.stop(), ft(!1), et && (V == null || V.stop()), ct(!1), oa(), R = null, E = null, ee(!1), va(), oe(!1), r.dialog.hidden = !0, r.stop.hidden = !0, jt(), t && (pt = !1, ha("onClose"));
|
|
4500
4608
|
}
|
|
4501
|
-
function
|
|
4502
|
-
const
|
|
4503
|
-
if (!
|
|
4609
|
+
function Ts(t = "") {
|
|
4610
|
+
const e = r.dialog, a = r.panel, o = r.panelBody, i = r.successMsg, s = r.successLink, n = String(t || "").trim(), l = !!(c.displayLink && n);
|
|
4611
|
+
if (!e || !a || !o || !i)
|
|
4504
4612
|
return Promise.resolve(!1);
|
|
4505
|
-
|
|
4506
|
-
const u = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches,
|
|
4507
|
-
if (o.hidden = !0,
|
|
4613
|
+
gt = !0, mt = l, S("");
|
|
4614
|
+
const u = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion: reduce)").matches, d = a.getBoundingClientRect();
|
|
4615
|
+
if (o.hidden = !0, i.hidden = !1, e.classList.add("nf-success"), e.classList.toggle("nf-success-sticky", l), e.style.opacity = "1", s && (l ? (s.hidden = !1, s.href = n) : (s.hidden = !0, s.removeAttribute("href"))), l) {
|
|
4508
4616
|
if (u)
|
|
4509
4617
|
return Promise.resolve(!0);
|
|
4510
|
-
const w = a.getBoundingClientRect(), b = w.width > 0 ?
|
|
4511
|
-
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${b}, ${z})`, a.getBoundingClientRect(), new Promise((
|
|
4618
|
+
const w = a.getBoundingClientRect(), b = w.width > 0 ? d.width / w.width : 1, z = w.height > 0 ? d.height / w.height : 1;
|
|
4619
|
+
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${b}, ${z})`, a.getBoundingClientRect(), new Promise((j) => {
|
|
4512
4620
|
let T = !1;
|
|
4513
|
-
const
|
|
4514
|
-
T || (T = !0, a.removeEventListener("transitionend", P),
|
|
4621
|
+
const N = () => {
|
|
4622
|
+
T || (T = !0, a.removeEventListener("transitionend", P), j(!0));
|
|
4515
4623
|
}, P = (m) => {
|
|
4516
|
-
m.target !== a || m.propertyName !== "transform" ||
|
|
4624
|
+
m.target !== a || m.propertyName !== "transform" || N();
|
|
4517
4625
|
};
|
|
4518
4626
|
a.addEventListener("transitionend", P), requestAnimationFrame(() => {
|
|
4519
4627
|
a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
|
|
4520
|
-
}), window.setTimeout(
|
|
4628
|
+
}), window.setTimeout(N, 700);
|
|
4521
4629
|
});
|
|
4522
4630
|
}
|
|
4523
4631
|
if (u)
|
|
4524
4632
|
return new Promise((w) => {
|
|
4525
4633
|
window.setTimeout(() => w(!1), 1e3);
|
|
4526
4634
|
});
|
|
4527
|
-
const g = a.getBoundingClientRect(),
|
|
4528
|
-
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${
|
|
4635
|
+
const g = a.getBoundingClientRect(), k = g.width > 0 ? d.width / g.width : 1, v = g.height > 0 ? d.height / g.height : 1;
|
|
4636
|
+
return a.style.transformOrigin = "center center", a.style.transition = "none", a.style.transform = `scale(${k}, ${v})`, a.getBoundingClientRect(), new Promise((w) => {
|
|
4529
4637
|
let b = !1;
|
|
4530
4638
|
const z = () => {
|
|
4531
|
-
b || (b = !0, a.removeEventListener("transitionend",
|
|
4532
|
-
|
|
4639
|
+
b || (b = !0, a.removeEventListener("transitionend", j), window.setTimeout(() => {
|
|
4640
|
+
e.style.transition = "opacity 0.28s ease", e.style.opacity = "0", window.setTimeout(() => w(!1), 280);
|
|
4533
4641
|
}, 1e3));
|
|
4534
|
-
},
|
|
4642
|
+
}, j = (T) => {
|
|
4535
4643
|
T.target !== a || T.propertyName !== "transform" || z();
|
|
4536
4644
|
};
|
|
4537
|
-
a.addEventListener("transitionend",
|
|
4645
|
+
a.addEventListener("transitionend", j), requestAnimationFrame(() => {
|
|
4538
4646
|
a.style.transition = "transform 0.48s cubic-bezier(0.22, 1, 0.36, 1)", a.style.transform = "scale(1)";
|
|
4539
4647
|
}), window.setTimeout(z, 700);
|
|
4540
4648
|
});
|
|
4541
4649
|
}
|
|
4542
|
-
function
|
|
4543
|
-
|
|
4650
|
+
function va() {
|
|
4651
|
+
gt = !1, mt = !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")));
|
|
4544
4652
|
}
|
|
4545
|
-
function
|
|
4546
|
-
|
|
4653
|
+
function Fs(t = {}) {
|
|
4654
|
+
K = { ...K, ...bi(t) }, da();
|
|
4547
4655
|
}
|
|
4548
|
-
async function
|
|
4549
|
-
var
|
|
4550
|
-
if (
|
|
4656
|
+
async function ka() {
|
|
4657
|
+
var e, a;
|
|
4658
|
+
if (Xt(), $t)
|
|
4551
4659
|
return null;
|
|
4552
|
-
const
|
|
4553
|
-
if (!
|
|
4660
|
+
const t = r.text.value.trim();
|
|
4661
|
+
if (!t && !I() && !H)
|
|
4554
4662
|
return S(p("status.emptyReport")), null;
|
|
4555
|
-
if (!
|
|
4663
|
+
if (!c.endpoint || !c.projectKey)
|
|
4556
4664
|
return S(p("status.missingConfig")), null;
|
|
4557
|
-
|
|
4665
|
+
$t = !0, xe(!0), S(p("status.submitting"), !0);
|
|
4558
4666
|
try {
|
|
4559
|
-
const o =
|
|
4667
|
+
const o = Cs(), i = A.crop(), s = A.list(), n = A.isCropped(), l = n ? Ti(s, i) : s, u = n ? { x: 0, y: 0, w: 1, h: 1 } : i, d = Wi({
|
|
4560
4668
|
author: o,
|
|
4561
|
-
diagnostics:
|
|
4562
|
-
logs:
|
|
4669
|
+
diagnostics: B,
|
|
4670
|
+
logs: $
|
|
4563
4671
|
}), g = {
|
|
4564
4672
|
width: typeof screen < "u" ? screen.width : null,
|
|
4565
4673
|
height: typeof screen < "u" ? screen.height : null,
|
|
4566
4674
|
dpr: window.devicePixelRatio || 1
|
|
4567
|
-
},
|
|
4568
|
-
let
|
|
4569
|
-
|
|
4570
|
-
crop:
|
|
4571
|
-
maxEdge:
|
|
4675
|
+
}, k = [];
|
|
4676
|
+
let v = 2048, w = null, b = null;
|
|
4677
|
+
I() && (b = await we(q, {
|
|
4678
|
+
crop: n ? i : { x: 0, y: 0, w: 1, h: 1 },
|
|
4679
|
+
maxEdge: v
|
|
4572
4680
|
}));
|
|
4573
4681
|
for (let z = 1; z <= 3; z += 1) {
|
|
4574
|
-
const
|
|
4682
|
+
const j = z === 3 || !b, T = j ? {
|
|
4575
4683
|
...b ? { width: b.width, height: b.height, mime: b.mime } : {},
|
|
4576
4684
|
attempt: z,
|
|
4577
4685
|
omitted: !0
|
|
@@ -4580,22 +4688,22 @@ async function ha() {
|
|
|
4580
4688
|
height: b.height,
|
|
4581
4689
|
mime: b.mime,
|
|
4582
4690
|
attempt: z
|
|
4583
|
-
},
|
|
4584
|
-
...
|
|
4691
|
+
}, N = {
|
|
4692
|
+
...d,
|
|
4585
4693
|
screen: g,
|
|
4586
4694
|
screenshotMeta: T
|
|
4587
4695
|
};
|
|
4588
|
-
|
|
4696
|
+
j && I() && (N.screenshotError = {
|
|
4589
4697
|
message: (w == null ? void 0 : w.message) || "Screenshot omitted after failed uploads",
|
|
4590
|
-
attempts: [...
|
|
4698
|
+
attempts: [...k]
|
|
4591
4699
|
});
|
|
4592
4700
|
const P = new FormData();
|
|
4593
|
-
P.append("message",
|
|
4701
|
+
P.append("message", t), P.append("kind", G), P.append("version", c.version || "0.0.0"), P.append("author", o), c.name && P.append("name", c.name), P.append("context", JSON.stringify(N)), P.append("annotations", JSON.stringify(l)), P.append("crop", JSON.stringify(u)), Array.isArray(c.targets) && P.append("targets", JSON.stringify(c.targets)), !j && b && P.append("screenshot", b.blob, `screenshot.${b.ext}`), H && P.append("recording", H, "recording.webm");
|
|
4594
4702
|
try {
|
|
4595
|
-
const m = await fetch(`${
|
|
4703
|
+
const m = await fetch(`${c.endpoint}/v1/reports`, {
|
|
4596
4704
|
method: "POST",
|
|
4597
4705
|
headers: {
|
|
4598
|
-
"X-Notefully-Key":
|
|
4706
|
+
"X-Notefully-Key": c.projectKey
|
|
4599
4707
|
},
|
|
4600
4708
|
body: P
|
|
4601
4709
|
});
|
|
@@ -4606,25 +4714,25 @@ async function ha() {
|
|
|
4606
4714
|
C = null;
|
|
4607
4715
|
}
|
|
4608
4716
|
if (!m.ok) {
|
|
4609
|
-
const
|
|
4610
|
-
throw
|
|
4717
|
+
const ut = new Error((C == null ? void 0 : C.error) || `${p("status.submitFailed")} (${m.status})`);
|
|
4718
|
+
throw ut.status = m.status, ut.code = C == null ? void 0 : C.code, ut.json = C, ut;
|
|
4611
4719
|
}
|
|
4612
|
-
return
|
|
4720
|
+
return j && I() && S(p("status.submitWithoutImage"), !0), await Ts((C == null ? void 0 : C.trackerUrl) || "") || at(), C;
|
|
4613
4721
|
} catch (m) {
|
|
4614
|
-
if (w = m,
|
|
4722
|
+
if (w = m, k.push({
|
|
4615
4723
|
attempt: z,
|
|
4616
|
-
maxEdge:
|
|
4724
|
+
maxEdge: j ? null : v,
|
|
4617
4725
|
status: (m == null ? void 0 : m.status) || null,
|
|
4618
4726
|
code: (m == null ? void 0 : m.code) || null,
|
|
4619
4727
|
message: String((m == null ? void 0 : m.message) || m)
|
|
4620
|
-
}),
|
|
4621
|
-
throw S(((
|
|
4622
|
-
if (!
|
|
4728
|
+
}), j || !b)
|
|
4729
|
+
throw S(((e = m == null ? void 0 : m.json) == null ? void 0 : e.error) || (m == null ? void 0 : m.message) || p("status.submitFailed")), m;
|
|
4730
|
+
if (!Vi(m, (m == null ? void 0 : m.json) || null))
|
|
4623
4731
|
throw S(((a = m == null ? void 0 : m.json) == null ? void 0 : a.error) || (m == null ? void 0 : m.message) || p("status.submitFailed")), m;
|
|
4624
4732
|
if (z === 1) {
|
|
4625
|
-
S(p("status.submitTooLarge"), !0),
|
|
4626
|
-
crop:
|
|
4627
|
-
maxEdge:
|
|
4733
|
+
S(p("status.submitTooLarge"), !0), v = Ii(v), b = await we(q, {
|
|
4734
|
+
crop: n ? i : { x: 0, y: 0, w: 1, h: 1 },
|
|
4735
|
+
maxEdge: v
|
|
4628
4736
|
});
|
|
4629
4737
|
continue;
|
|
4630
4738
|
}
|
|
@@ -4633,42 +4741,42 @@ async function ha() {
|
|
|
4633
4741
|
}
|
|
4634
4742
|
throw w || new Error(p("status.submitFailed"));
|
|
4635
4743
|
} finally {
|
|
4636
|
-
|
|
4744
|
+
$t = !1, xe(!1);
|
|
4637
4745
|
}
|
|
4638
4746
|
}
|
|
4639
|
-
function
|
|
4640
|
-
|
|
4641
|
-
}
|
|
4642
|
-
function
|
|
4643
|
-
|
|
4644
|
-
}
|
|
4645
|
-
const
|
|
4646
|
-
init:
|
|
4647
|
-
configure:
|
|
4648
|
-
setTheme:
|
|
4649
|
-
setVisible:
|
|
4650
|
-
open:
|
|
4651
|
-
close:
|
|
4652
|
-
isOpen:
|
|
4653
|
-
getLocale:
|
|
4654
|
-
setLocale:
|
|
4655
|
-
identify:
|
|
4656
|
-
submit:
|
|
4657
|
-
destroy:
|
|
4747
|
+
function xe(t) {
|
|
4748
|
+
r.submit && (r.submit.disabled = !!t, r.submit.setAttribute("aria-busy", t ? "true" : "false"));
|
|
4749
|
+
}
|
|
4750
|
+
function Ms() {
|
|
4751
|
+
at(), document.removeEventListener("keydown", ga), y == null || y.remove(), y = null, r = {};
|
|
4752
|
+
}
|
|
4753
|
+
const Mt = {
|
|
4754
|
+
init: js,
|
|
4755
|
+
configure: ae,
|
|
4756
|
+
setTheme: Ps,
|
|
4757
|
+
setVisible: xs,
|
|
4758
|
+
open: ya,
|
|
4759
|
+
close: at,
|
|
4760
|
+
isOpen: zs,
|
|
4761
|
+
getLocale: Es,
|
|
4762
|
+
setLocale: Rs,
|
|
4763
|
+
identify: Fs,
|
|
4764
|
+
submit: ka,
|
|
4765
|
+
destroy: Ms
|
|
4658
4766
|
};
|
|
4659
|
-
typeof window < "u" && (window.Notefully =
|
|
4767
|
+
typeof window < "u" && (window.Notefully = Mt);
|
|
4660
4768
|
export {
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4769
|
+
at as close,
|
|
4770
|
+
ae as configure,
|
|
4771
|
+
Mt as default,
|
|
4772
|
+
Ms as destroy,
|
|
4773
|
+
Es as getLocaleTag,
|
|
4774
|
+
Fs as identify,
|
|
4775
|
+
js as init,
|
|
4776
|
+
zs as isOpen,
|
|
4777
|
+
ya as open,
|
|
4778
|
+
Rs as setLocale,
|
|
4779
|
+
Ps as setTheme,
|
|
4780
|
+
xs as setVisible,
|
|
4781
|
+
ka as submit
|
|
4674
4782
|
};
|