@ohbug/extension-feedback 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +19 -19
- package/dist/index.mjs +406 -420
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,133 +1,114 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
3
|
-
|
|
1
|
+
const _ = {};
|
|
2
|
+
function Te(e) {
|
|
3
|
+
_.context = e;
|
|
4
4
|
}
|
|
5
|
-
const
|
|
6
|
-
equals:
|
|
5
|
+
const Pe = (e, t) => e === t, T = Symbol("solid-proxy"), fe = Symbol("solid-track"), K = {
|
|
6
|
+
equals: Pe
|
|
7
7
|
};
|
|
8
|
-
let
|
|
9
|
-
const
|
|
8
|
+
let ge = ve;
|
|
9
|
+
const N = 1, W = 2, be = {
|
|
10
10
|
owned: null,
|
|
11
11
|
cleanups: null,
|
|
12
12
|
context: null,
|
|
13
13
|
owner: null
|
|
14
14
|
};
|
|
15
15
|
var y = null;
|
|
16
|
-
let
|
|
17
|
-
function
|
|
18
|
-
const n = b, o = y,
|
|
16
|
+
let C = null, b = null, $ = null, A = null, ie = 0;
|
|
17
|
+
function Le(e, t) {
|
|
18
|
+
const n = b, o = y, s = e.length === 0, l = s ? be : {
|
|
19
19
|
owned: null,
|
|
20
20
|
cleanups: null,
|
|
21
21
|
context: null,
|
|
22
22
|
owner: t || o
|
|
23
|
-
},
|
|
24
|
-
y =
|
|
23
|
+
}, r = s ? e : () => e(() => te(() => ce(l)));
|
|
24
|
+
y = l, b = null;
|
|
25
25
|
try {
|
|
26
|
-
return
|
|
26
|
+
return M(r, !0);
|
|
27
27
|
} finally {
|
|
28
28
|
b = n, y = o;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
function F(e, t) {
|
|
32
|
-
t = t ? Object.assign({},
|
|
32
|
+
t = t ? Object.assign({}, K, t) : K;
|
|
33
33
|
const n = {
|
|
34
34
|
value: e,
|
|
35
35
|
observers: null,
|
|
36
36
|
observerSlots: null,
|
|
37
|
-
pending: H,
|
|
38
37
|
comparator: t.equals || void 0
|
|
39
|
-
}, o = (
|
|
40
|
-
return [
|
|
38
|
+
}, o = (s) => (typeof s == "function" && (s = s(n.value)), $e(n, s));
|
|
39
|
+
return [ye.bind(n), o];
|
|
41
40
|
}
|
|
42
41
|
function j(e, t, n) {
|
|
43
|
-
const o = re(e, t, !1,
|
|
44
|
-
|
|
42
|
+
const o = re(e, t, !1, N);
|
|
43
|
+
G(o);
|
|
45
44
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
const o = re(e, t, !1,
|
|
49
|
-
o.user = !0,
|
|
45
|
+
function pe(e, t, n) {
|
|
46
|
+
ge = De;
|
|
47
|
+
const o = re(e, t, !1, N);
|
|
48
|
+
o.user = !0, A ? A.push(o) : G(o);
|
|
50
49
|
}
|
|
51
|
-
function
|
|
52
|
-
n = n ? Object.assign({},
|
|
50
|
+
function ae(e, t, n) {
|
|
51
|
+
n = n ? Object.assign({}, K, n) : K;
|
|
53
52
|
const o = re(e, t, !0, 0);
|
|
54
|
-
return o.
|
|
53
|
+
return o.observers = null, o.observerSlots = null, o.comparator = n.equals || void 0, G(o), ye.bind(o);
|
|
55
54
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
return e();
|
|
59
|
-
let t;
|
|
60
|
-
const n = B = [];
|
|
61
|
-
try {
|
|
62
|
-
t = e();
|
|
63
|
-
} finally {
|
|
64
|
-
B = null;
|
|
65
|
-
}
|
|
66
|
-
return ce(() => {
|
|
67
|
-
for (let o = 0; o < n.length; o += 1) {
|
|
68
|
-
const l = n[o];
|
|
69
|
-
if (l.pending !== H) {
|
|
70
|
-
const s = l.pending;
|
|
71
|
-
l.pending = H, ie(l, s);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}, !1), t;
|
|
55
|
+
function ze(e) {
|
|
56
|
+
return M(e, !1);
|
|
75
57
|
}
|
|
76
|
-
function
|
|
58
|
+
function te(e) {
|
|
77
59
|
let t, n = b;
|
|
78
60
|
return b = null, t = e(), b = n, t;
|
|
79
61
|
}
|
|
80
|
-
function
|
|
62
|
+
function He(e) {
|
|
81
63
|
return y === null || (y.cleanups === null ? y.cleanups = [e] : y.cleanups.push(e)), e;
|
|
82
64
|
}
|
|
83
|
-
function
|
|
65
|
+
function we() {
|
|
84
66
|
return b;
|
|
85
67
|
}
|
|
86
|
-
function
|
|
87
|
-
const e =
|
|
88
|
-
if (this.sources && (this.state || e))
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
68
|
+
function ye() {
|
|
69
|
+
const e = C;
|
|
70
|
+
if (this.sources && (this.state || e))
|
|
71
|
+
if (this.state === N || e)
|
|
72
|
+
G(this);
|
|
73
|
+
else {
|
|
74
|
+
const t = $;
|
|
75
|
+
$ = null, M(() => Y(this), !1), $ = t;
|
|
76
|
+
}
|
|
92
77
|
if (b) {
|
|
93
78
|
const t = this.observers ? this.observers.length : 0;
|
|
94
79
|
b.sources ? (b.sources.push(this), b.sourceSlots.push(t)) : (b.sources = [this], b.sourceSlots = [t]), this.observers ? (this.observers.push(b), this.observerSlots.push(b.sources.length - 1)) : (this.observers = [b], this.observerSlots = [b.sources.length - 1]);
|
|
95
80
|
}
|
|
96
81
|
return this.value;
|
|
97
82
|
}
|
|
98
|
-
function
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
return e.value = t, e.observers && e.observers.length && ce(() => {
|
|
105
|
-
for (let l = 0; l < e.observers.length; l += 1) {
|
|
106
|
-
const s = e.observers[l];
|
|
107
|
-
o && G.disposed.has(s), (o && !s.tState || !o && !s.state) && (s.pure ? $.push(s) : E.push(s), s.observers && xe(s)), o || (s.state = O);
|
|
83
|
+
function $e(e, t, n) {
|
|
84
|
+
let o = e.value;
|
|
85
|
+
return (!e.comparator || !e.comparator(o, t)) && (e.value = t, e.observers && e.observers.length && M(() => {
|
|
86
|
+
for (let s = 0; s < e.observers.length; s += 1) {
|
|
87
|
+
const l = e.observers[s], r = C && C.running;
|
|
88
|
+
r && C.disposed.has(l), (r && !l.tState || !r && !l.state) && (l.pure ? $.push(l) : A.push(l), l.observers && me(l)), r || (l.state = N);
|
|
108
89
|
}
|
|
109
90
|
if ($.length > 1e6)
|
|
110
91
|
throw $ = [], new Error();
|
|
111
|
-
}, !1), t;
|
|
92
|
+
}, !1)), t;
|
|
112
93
|
}
|
|
113
|
-
function
|
|
94
|
+
function G(e) {
|
|
114
95
|
if (!e.fn)
|
|
115
96
|
return;
|
|
116
|
-
|
|
117
|
-
const t = y, n = b, o =
|
|
118
|
-
b = y = e,
|
|
97
|
+
ce(e);
|
|
98
|
+
const t = y, n = b, o = ie;
|
|
99
|
+
b = y = e, je(e, e.value, o), b = n, y = t;
|
|
119
100
|
}
|
|
120
|
-
function
|
|
101
|
+
function je(e, t, n) {
|
|
121
102
|
let o;
|
|
122
103
|
try {
|
|
123
104
|
o = e.fn(t);
|
|
124
|
-
} catch (
|
|
125
|
-
|
|
105
|
+
} catch (s) {
|
|
106
|
+
e.pure && (e.state = N), xe(s);
|
|
126
107
|
}
|
|
127
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.
|
|
108
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? $e(e, o) : e.value = o, e.updatedAt = n);
|
|
128
109
|
}
|
|
129
|
-
function re(e, t, n, o =
|
|
130
|
-
const
|
|
110
|
+
function re(e, t, n, o = N, s) {
|
|
111
|
+
const l = {
|
|
131
112
|
fn: e,
|
|
132
113
|
state: o,
|
|
133
114
|
updatedAt: null,
|
|
@@ -140,89 +121,86 @@ function re(e, t, n, o = O, l) {
|
|
|
140
121
|
context: null,
|
|
141
122
|
pure: n
|
|
142
123
|
};
|
|
143
|
-
return y === null || y !==
|
|
124
|
+
return y === null || y !== be && (y.owned ? y.owned.push(l) : y.owned = [l]), l;
|
|
144
125
|
}
|
|
145
|
-
function
|
|
146
|
-
const t =
|
|
126
|
+
function X(e) {
|
|
127
|
+
const t = C;
|
|
147
128
|
if (e.state === 0 || t)
|
|
148
129
|
return;
|
|
149
|
-
if (e.state ===
|
|
130
|
+
if (e.state === W || t)
|
|
150
131
|
return Y(e);
|
|
151
|
-
if (e.suspense &&
|
|
132
|
+
if (e.suspense && te(e.suspense.inFallback))
|
|
152
133
|
return e.suspense.effects.push(e);
|
|
153
134
|
const n = [e];
|
|
154
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
135
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < ie); )
|
|
155
136
|
(e.state || t) && n.push(e);
|
|
156
137
|
for (let o = n.length - 1; o >= 0; o--)
|
|
157
|
-
if (e = n[o], e.state ===
|
|
158
|
-
|
|
159
|
-
else if (e.state ===
|
|
160
|
-
const
|
|
161
|
-
$ = null, Y(e, n[0]), $ =
|
|
138
|
+
if (e = n[o], e.state === N || t)
|
|
139
|
+
G(e);
|
|
140
|
+
else if (e.state === W || t) {
|
|
141
|
+
const s = $;
|
|
142
|
+
$ = null, M(() => Y(e, n[0]), !1), $ = s;
|
|
162
143
|
}
|
|
163
144
|
}
|
|
164
|
-
function
|
|
145
|
+
function M(e, t) {
|
|
165
146
|
if ($)
|
|
166
147
|
return e();
|
|
167
148
|
let n = !1;
|
|
168
|
-
t || ($ = []),
|
|
149
|
+
t || ($ = []), A ? n = !0 : A = [], ie++;
|
|
169
150
|
try {
|
|
170
151
|
const o = e();
|
|
171
|
-
return
|
|
152
|
+
return Me(n), o;
|
|
172
153
|
} catch (o) {
|
|
173
|
-
$ || (
|
|
154
|
+
$ || (A = null), xe(o);
|
|
174
155
|
}
|
|
175
156
|
}
|
|
176
|
-
function
|
|
177
|
-
$ && (
|
|
178
|
-
|
|
179
|
-
|
|
157
|
+
function Me(e) {
|
|
158
|
+
if ($ && (ve($), $ = null), e)
|
|
159
|
+
return;
|
|
160
|
+
const t = A;
|
|
161
|
+
A = null, t.length && M(() => ge(t), !1);
|
|
180
162
|
}
|
|
181
|
-
function
|
|
163
|
+
function ve(e) {
|
|
182
164
|
for (let t = 0; t < e.length; t++)
|
|
183
|
-
|
|
165
|
+
X(e[t]);
|
|
184
166
|
}
|
|
185
|
-
function
|
|
167
|
+
function De(e) {
|
|
186
168
|
let t, n = 0;
|
|
187
169
|
for (t = 0; t < e.length; t++) {
|
|
188
|
-
const
|
|
189
|
-
|
|
170
|
+
const o = e[t];
|
|
171
|
+
o.user ? e[n++] = o : X(o);
|
|
190
172
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
for (t = 0; t < n; t++)
|
|
194
|
-
R(e[t]);
|
|
195
|
-
for (t = o; t < e.length; t++)
|
|
196
|
-
R(e[t]);
|
|
173
|
+
for (_.context && Te(), t = 0; t < n; t++)
|
|
174
|
+
X(e[t]);
|
|
197
175
|
}
|
|
198
176
|
function Y(e, t) {
|
|
199
|
-
const n =
|
|
177
|
+
const n = C;
|
|
200
178
|
e.state = 0;
|
|
201
179
|
for (let o = 0; o < e.sources.length; o += 1) {
|
|
202
|
-
const
|
|
203
|
-
|
|
180
|
+
const s = e.sources[o];
|
|
181
|
+
s.sources && (s.state === N || n ? s !== t && X(s) : (s.state === W || n) && Y(s, t));
|
|
204
182
|
}
|
|
205
183
|
}
|
|
206
|
-
function
|
|
207
|
-
const t =
|
|
184
|
+
function me(e) {
|
|
185
|
+
const t = C;
|
|
208
186
|
for (let n = 0; n < e.observers.length; n += 1) {
|
|
209
187
|
const o = e.observers[n];
|
|
210
|
-
(!o.state || t) && (o.state =
|
|
188
|
+
(!o.state || t) && (o.state = W, o.pure ? $.push(o) : A.push(o), o.observers && me(o));
|
|
211
189
|
}
|
|
212
190
|
}
|
|
213
|
-
function
|
|
191
|
+
function ce(e) {
|
|
214
192
|
let t;
|
|
215
193
|
if (e.sources)
|
|
216
194
|
for (; e.sources.length; ) {
|
|
217
|
-
const n = e.sources.pop(), o = e.sourceSlots.pop(),
|
|
218
|
-
if (
|
|
219
|
-
const
|
|
220
|
-
o <
|
|
195
|
+
const n = e.sources.pop(), o = e.sourceSlots.pop(), s = n.observers;
|
|
196
|
+
if (s && s.length) {
|
|
197
|
+
const l = s.pop(), r = n.observerSlots.pop();
|
|
198
|
+
o < s.length && (l.sourceSlots[r] = o, s[o] = l, n.observerSlots[o] = r);
|
|
221
199
|
}
|
|
222
200
|
}
|
|
223
201
|
if (e.owned) {
|
|
224
202
|
for (t = 0; t < e.owned.length; t++)
|
|
225
|
-
|
|
203
|
+
ce(e.owned[t]);
|
|
226
204
|
e.owned = null;
|
|
227
205
|
}
|
|
228
206
|
if (e.cleanups) {
|
|
@@ -232,97 +210,100 @@ function ue(e) {
|
|
|
232
210
|
}
|
|
233
211
|
e.state = 0, e.context = null;
|
|
234
212
|
}
|
|
235
|
-
function
|
|
236
|
-
|
|
213
|
+
function Be(e) {
|
|
214
|
+
return e instanceof Error || typeof e == "string" ? e : new Error("Unknown error");
|
|
215
|
+
}
|
|
216
|
+
function xe(e) {
|
|
217
|
+
throw e = Be(e), e;
|
|
237
218
|
}
|
|
238
219
|
function x(e, t) {
|
|
239
|
-
return
|
|
220
|
+
return te(() => e(t || {}));
|
|
240
221
|
}
|
|
241
|
-
function
|
|
222
|
+
function R(e) {
|
|
242
223
|
let t = !1;
|
|
243
|
-
const n =
|
|
244
|
-
equals: (
|
|
224
|
+
const n = e.keyed, o = ae(() => e.when, void 0, {
|
|
225
|
+
equals: (s, l) => t ? s === l : !s == !l
|
|
245
226
|
});
|
|
246
|
-
return
|
|
247
|
-
const
|
|
248
|
-
if (
|
|
249
|
-
const l = e.children;
|
|
250
|
-
return
|
|
227
|
+
return ae(() => {
|
|
228
|
+
const s = o();
|
|
229
|
+
if (s) {
|
|
230
|
+
const l = e.children, r = typeof l == "function" && l.length > 0;
|
|
231
|
+
return t = n || r, r ? te(() => l(s)) : l;
|
|
251
232
|
}
|
|
252
233
|
return e.fallback;
|
|
253
234
|
});
|
|
254
235
|
}
|
|
255
|
-
function
|
|
256
|
-
let o = n.length,
|
|
257
|
-
for (;
|
|
258
|
-
if (t[
|
|
259
|
-
|
|
236
|
+
function Fe(e, t, n) {
|
|
237
|
+
let o = n.length, s = t.length, l = o, r = 0, i = 0, c = t[s - 1].nextSibling, f = null;
|
|
238
|
+
for (; r < s || i < l; ) {
|
|
239
|
+
if (t[r] === n[i]) {
|
|
240
|
+
r++, i++;
|
|
260
241
|
continue;
|
|
261
242
|
}
|
|
262
|
-
for (; t[
|
|
263
|
-
|
|
264
|
-
if (
|
|
265
|
-
const a =
|
|
266
|
-
for (; r < s; )
|
|
267
|
-
e.insertBefore(n[r++], a);
|
|
268
|
-
} else if (s === r)
|
|
243
|
+
for (; t[s - 1] === n[l - 1]; )
|
|
244
|
+
s--, l--;
|
|
245
|
+
if (s === r) {
|
|
246
|
+
const a = l < o ? i ? n[i - 1].nextSibling : n[l - i] : c;
|
|
269
247
|
for (; i < l; )
|
|
270
|
-
|
|
271
|
-
else if (
|
|
272
|
-
|
|
273
|
-
|
|
248
|
+
e.insertBefore(n[i++], a);
|
|
249
|
+
} else if (l === i)
|
|
250
|
+
for (; r < s; )
|
|
251
|
+
(!f || !f.has(t[r])) && t[r].remove(), r++;
|
|
252
|
+
else if (t[r] === n[l - 1] && n[i] === t[s - 1]) {
|
|
253
|
+
const a = t[--s].nextSibling;
|
|
254
|
+
e.insertBefore(n[i++], t[r++].nextSibling), e.insertBefore(n[--l], a), t[s] = n[l];
|
|
274
255
|
} else {
|
|
275
256
|
if (!f) {
|
|
276
257
|
f = /* @__PURE__ */ new Map();
|
|
277
|
-
let h =
|
|
278
|
-
for (; h <
|
|
258
|
+
let h = i;
|
|
259
|
+
for (; h < l; )
|
|
279
260
|
f.set(n[h], h++);
|
|
280
261
|
}
|
|
281
|
-
const a = f.get(t[
|
|
262
|
+
const a = f.get(t[r]);
|
|
282
263
|
if (a != null)
|
|
283
|
-
if (
|
|
284
|
-
let h =
|
|
285
|
-
for (; ++h <
|
|
264
|
+
if (i < a && a < l) {
|
|
265
|
+
let h = r, v = 1, E;
|
|
266
|
+
for (; ++h < s && h < l && !((E = f.get(t[h])) == null || E !== a + v); )
|
|
286
267
|
v++;
|
|
287
|
-
if (v > a -
|
|
288
|
-
const
|
|
289
|
-
for (;
|
|
290
|
-
e.insertBefore(n[
|
|
268
|
+
if (v > a - i) {
|
|
269
|
+
const P = t[r];
|
|
270
|
+
for (; i < a; )
|
|
271
|
+
e.insertBefore(n[i++], P);
|
|
291
272
|
} else
|
|
292
|
-
e.replaceChild(n[
|
|
273
|
+
e.replaceChild(n[i++], t[r++]);
|
|
293
274
|
} else
|
|
294
|
-
|
|
275
|
+
r++;
|
|
295
276
|
else
|
|
296
|
-
t[
|
|
277
|
+
t[r++].remove();
|
|
297
278
|
}
|
|
298
279
|
}
|
|
299
280
|
}
|
|
300
|
-
const
|
|
301
|
-
function
|
|
281
|
+
const de = "_$DX_DELEGATE";
|
|
282
|
+
function Re(e, t, n) {
|
|
302
283
|
let o;
|
|
303
|
-
return
|
|
304
|
-
o =
|
|
284
|
+
return Le((s) => {
|
|
285
|
+
o = s, t === document ? e() : m(t, e(), t.firstChild ? null : void 0, n);
|
|
305
286
|
}), () => {
|
|
306
287
|
o(), t.textContent = "";
|
|
307
288
|
};
|
|
308
289
|
}
|
|
309
|
-
function
|
|
290
|
+
function k(e, t, n) {
|
|
310
291
|
const o = document.createElement("template");
|
|
311
292
|
o.innerHTML = e;
|
|
312
|
-
let
|
|
313
|
-
return n && (
|
|
314
|
-
}
|
|
315
|
-
function
|
|
316
|
-
const n = t[
|
|
317
|
-
for (let o = 0,
|
|
318
|
-
const
|
|
319
|
-
n.has(
|
|
293
|
+
let s = o.content.firstChild;
|
|
294
|
+
return n && (s = s.firstChild), s;
|
|
295
|
+
}
|
|
296
|
+
function _e(e, t = window.document) {
|
|
297
|
+
const n = t[de] || (t[de] = /* @__PURE__ */ new Set());
|
|
298
|
+
for (let o = 0, s = e.length; o < s; o++) {
|
|
299
|
+
const l = e[o];
|
|
300
|
+
n.has(l) || (n.add(l), t.addEventListener(l, Ue));
|
|
320
301
|
}
|
|
321
302
|
}
|
|
322
303
|
function m(e, t, n, o) {
|
|
323
304
|
if (n !== void 0 && !o && (o = []), typeof t != "function")
|
|
324
305
|
return J(e, t, o, n);
|
|
325
|
-
j((
|
|
306
|
+
j((s) => J(e, t(), s, n), o);
|
|
326
307
|
}
|
|
327
308
|
function Ue(e) {
|
|
328
309
|
const t = `$$${e.type}`;
|
|
@@ -335,64 +316,66 @@ function Ue(e) {
|
|
|
335
316
|
get() {
|
|
336
317
|
return n || document;
|
|
337
318
|
}
|
|
338
|
-
}),
|
|
319
|
+
}), _.registry && !_.done && (_.done = !0, document.querySelectorAll("[id^=pl-]").forEach((o) => o.remove())); n !== null; ) {
|
|
339
320
|
const o = n[t];
|
|
340
321
|
if (o && !n.disabled) {
|
|
341
|
-
const
|
|
342
|
-
if (
|
|
322
|
+
const s = n[`${t}Data`];
|
|
323
|
+
if (s !== void 0 ? o.call(n, s, e) : o.call(n, e), e.cancelBubble)
|
|
343
324
|
return;
|
|
344
325
|
}
|
|
345
326
|
n = n.host && n.host !== n && n.host instanceof Node ? n.host : n.parentNode;
|
|
346
327
|
}
|
|
347
328
|
}
|
|
348
|
-
function J(e, t, n, o,
|
|
349
|
-
for (
|
|
329
|
+
function J(e, t, n, o, s) {
|
|
330
|
+
for (_.context && !n && (n = [...e.childNodes]); typeof n == "function"; )
|
|
350
331
|
n = n();
|
|
351
332
|
if (t === n)
|
|
352
333
|
return n;
|
|
353
|
-
const
|
|
354
|
-
if (e =
|
|
355
|
-
if (
|
|
334
|
+
const l = typeof t, r = o !== void 0;
|
|
335
|
+
if (e = r && n[0] && n[0].parentNode || e, l === "string" || l === "number") {
|
|
336
|
+
if (_.context)
|
|
356
337
|
return n;
|
|
357
|
-
if (
|
|
358
|
-
let
|
|
359
|
-
|
|
338
|
+
if (l === "number" && (t = t.toString()), r) {
|
|
339
|
+
let i = n[0];
|
|
340
|
+
i && i.nodeType === 3 ? i.data = t : i = document.createTextNode(t), n = z(e, n, o, i);
|
|
360
341
|
} else
|
|
361
342
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
362
|
-
} else if (t == null ||
|
|
363
|
-
if (
|
|
343
|
+
} else if (t == null || l === "boolean") {
|
|
344
|
+
if (_.context)
|
|
364
345
|
return n;
|
|
365
|
-
n =
|
|
346
|
+
n = z(e, n, o);
|
|
366
347
|
} else {
|
|
367
|
-
if (
|
|
348
|
+
if (l === "function")
|
|
368
349
|
return j(() => {
|
|
369
|
-
let
|
|
370
|
-
for (; typeof
|
|
371
|
-
|
|
372
|
-
n = J(e,
|
|
350
|
+
let i = t();
|
|
351
|
+
for (; typeof i == "function"; )
|
|
352
|
+
i = i();
|
|
353
|
+
n = J(e, i, n, o);
|
|
373
354
|
}), () => n;
|
|
374
355
|
if (Array.isArray(t)) {
|
|
375
|
-
const
|
|
376
|
-
if (
|
|
377
|
-
return j(() => n = J(e,
|
|
378
|
-
if (
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
356
|
+
const i = [], c = n && Array.isArray(n);
|
|
357
|
+
if (ne(i, t, n, s))
|
|
358
|
+
return j(() => n = J(e, i, n, o, !0)), () => n;
|
|
359
|
+
if (_.context) {
|
|
360
|
+
if (!i.length)
|
|
361
|
+
return n;
|
|
362
|
+
for (let f = 0; f < i.length; f++)
|
|
363
|
+
if (i[f].parentNode)
|
|
364
|
+
return n = i;
|
|
382
365
|
}
|
|
383
|
-
if (
|
|
384
|
-
if (n =
|
|
366
|
+
if (i.length === 0) {
|
|
367
|
+
if (n = z(e, n, o), r)
|
|
385
368
|
return n;
|
|
386
369
|
} else
|
|
387
|
-
c ? n.length === 0 ?
|
|
388
|
-
n =
|
|
370
|
+
c ? n.length === 0 ? he(e, i, o) : Fe(e, n, i) : (n && z(e), he(e, i));
|
|
371
|
+
n = i;
|
|
389
372
|
} else if (t instanceof Node) {
|
|
390
|
-
if (
|
|
391
|
-
return n =
|
|
373
|
+
if (_.context && t.parentNode)
|
|
374
|
+
return n = r ? [t] : t;
|
|
392
375
|
if (Array.isArray(n)) {
|
|
393
|
-
if (
|
|
394
|
-
return n =
|
|
395
|
-
|
|
376
|
+
if (r)
|
|
377
|
+
return n = z(e, n, o, t);
|
|
378
|
+
z(e, n, null, t);
|
|
396
379
|
} else
|
|
397
380
|
n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
398
381
|
n = t;
|
|
@@ -400,100 +383,99 @@ function J(e, t, n, o, l) {
|
|
|
400
383
|
}
|
|
401
384
|
return n;
|
|
402
385
|
}
|
|
403
|
-
function
|
|
404
|
-
let
|
|
405
|
-
for (let
|
|
406
|
-
let
|
|
407
|
-
if (
|
|
408
|
-
e.push(
|
|
409
|
-
else if (!(
|
|
410
|
-
if (Array.isArray(
|
|
411
|
-
|
|
412
|
-
else if (typeof
|
|
386
|
+
function ne(e, t, n, o) {
|
|
387
|
+
let s = !1;
|
|
388
|
+
for (let l = 0, r = t.length; l < r; l++) {
|
|
389
|
+
let i = t[l], c = n && n[l];
|
|
390
|
+
if (i instanceof Node)
|
|
391
|
+
e.push(i);
|
|
392
|
+
else if (!(i == null || i === !0 || i === !1))
|
|
393
|
+
if (Array.isArray(i))
|
|
394
|
+
s = ne(e, i, c) || s;
|
|
395
|
+
else if (typeof i == "function")
|
|
413
396
|
if (o) {
|
|
414
|
-
for (; typeof
|
|
415
|
-
|
|
416
|
-
|
|
397
|
+
for (; typeof i == "function"; )
|
|
398
|
+
i = i();
|
|
399
|
+
s = ne(e, Array.isArray(i) ? i : [i], Array.isArray(c) ? c : [c]) || s;
|
|
417
400
|
} else
|
|
418
|
-
e.push(
|
|
401
|
+
e.push(i), s = !0;
|
|
419
402
|
else {
|
|
420
|
-
const f = String(
|
|
403
|
+
const f = String(i);
|
|
421
404
|
c && c.nodeType === 3 && c.data === f ? e.push(c) : e.push(document.createTextNode(f));
|
|
422
405
|
}
|
|
423
406
|
}
|
|
424
|
-
return
|
|
407
|
+
return s;
|
|
425
408
|
}
|
|
426
|
-
function
|
|
427
|
-
for (let o = 0,
|
|
409
|
+
function he(e, t, n) {
|
|
410
|
+
for (let o = 0, s = t.length; o < s; o++)
|
|
428
411
|
e.insertBefore(t[o], n);
|
|
429
412
|
}
|
|
430
|
-
function
|
|
413
|
+
function z(e, t, n, o) {
|
|
431
414
|
if (n === void 0)
|
|
432
415
|
return e.textContent = "";
|
|
433
|
-
const
|
|
416
|
+
const s = o || document.createTextNode("");
|
|
434
417
|
if (t.length) {
|
|
435
|
-
let
|
|
436
|
-
for (let
|
|
437
|
-
const
|
|
438
|
-
if (
|
|
439
|
-
const c =
|
|
440
|
-
!
|
|
418
|
+
let l = !1;
|
|
419
|
+
for (let r = t.length - 1; r >= 0; r--) {
|
|
420
|
+
const i = t[r];
|
|
421
|
+
if (s !== i) {
|
|
422
|
+
const c = i.parentNode === e;
|
|
423
|
+
!l && !r ? c ? e.replaceChild(s, i) : e.insertBefore(s, n) : c && i.remove();
|
|
441
424
|
} else
|
|
442
|
-
|
|
425
|
+
l = !0;
|
|
443
426
|
}
|
|
444
427
|
} else
|
|
445
|
-
e.insertBefore(
|
|
446
|
-
return [
|
|
428
|
+
e.insertBefore(s, n);
|
|
429
|
+
return [s];
|
|
447
430
|
}
|
|
448
|
-
function
|
|
431
|
+
function Ve(e, t, ...n) {
|
|
449
432
|
if (t === void 0)
|
|
450
433
|
throw new Error("`Ohbug warning(condition, format, ...args)` requires a warning message argument");
|
|
451
434
|
if (!e) {
|
|
452
435
|
let o = 0;
|
|
453
|
-
const
|
|
454
|
-
throw new Error(`Ohbug ${
|
|
436
|
+
const s = t.replace(/%s/g, () => n[o++]);
|
|
437
|
+
throw new Error(`Ohbug ${s}`);
|
|
455
438
|
}
|
|
456
439
|
}
|
|
457
|
-
var
|
|
440
|
+
var Ge = {};
|
|
458
441
|
function qe() {
|
|
459
|
-
return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self :
|
|
442
|
+
return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : Ge;
|
|
460
443
|
}
|
|
461
|
-
function
|
|
444
|
+
function Ie() {
|
|
462
445
|
const e = qe();
|
|
463
|
-
return
|
|
446
|
+
return Ve(
|
|
464
447
|
Boolean(e.__OHBUG__),
|
|
465
448
|
"Failed to get `OhbugObject`, please confirm if `Ohbug.setup`"
|
|
466
449
|
), e.__OHBUG__;
|
|
467
450
|
}
|
|
468
|
-
function
|
|
469
|
-
e.parentNode && (t.push(e.parentNode),
|
|
451
|
+
function Ee(e, t) {
|
|
452
|
+
e.parentNode && (t.push(e.parentNode), Ee(e.parentNode, t));
|
|
470
453
|
}
|
|
471
|
-
function
|
|
454
|
+
function Ke(e) {
|
|
472
455
|
const t = [];
|
|
473
|
-
return t.push(e),
|
|
456
|
+
return t.push(e), Ee(e, t), t;
|
|
474
457
|
}
|
|
475
|
-
var
|
|
458
|
+
var We = (e) => {
|
|
476
459
|
const t = e.target || e.srcElement;
|
|
477
460
|
let n = e.target || e.srcElement;
|
|
478
461
|
const o = [];
|
|
479
|
-
for (let
|
|
480
|
-
|
|
481
|
-
const
|
|
482
|
-
return
|
|
462
|
+
for (let r = 0; n && n.nodeType === Node.ELEMENT_NODE && n.nodeType !== Node.DOCUMENT_TYPE_NODE; n = n.previousSibling)
|
|
463
|
+
r && o.push(n), r += 1;
|
|
464
|
+
const s = typeof e.path > "u" ? Ke(e.target) : e.path, { outerHTML: l } = t;
|
|
465
|
+
return s.reverse().map((r) => (r.localName || "") + (r.id ? `#${r.id}` : "") + (r.className ? `.${r.className}` : "") + (r.outerHTML === l ? `:nth-child(${o.length})` : "")).filter((r) => Boolean(r)).join(" > ");
|
|
483
466
|
};
|
|
484
|
-
const
|
|
485
|
-
function
|
|
486
|
-
let n = e[
|
|
487
|
-
if (!n
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
Object.defineProperty(e, r, {
|
|
467
|
+
const oe = Symbol("store-raw"), U = Symbol("store-node"), Xe = Symbol("store-name");
|
|
468
|
+
function Se(e, t) {
|
|
469
|
+
let n = e[T];
|
|
470
|
+
if (!n && (Object.defineProperty(e, T, {
|
|
471
|
+
value: n = new Proxy(e, Qe)
|
|
472
|
+
}), !Array.isArray(e))) {
|
|
473
|
+
const o = Object.keys(e), s = Object.getOwnPropertyDescriptors(e);
|
|
474
|
+
for (let l = 0, r = o.length; l < r; l++) {
|
|
475
|
+
const i = o[l];
|
|
476
|
+
if (s[i].get) {
|
|
477
|
+
const c = s[i].get.bind(n);
|
|
478
|
+
Object.defineProperty(e, i, {
|
|
497
479
|
get: c
|
|
498
480
|
});
|
|
499
481
|
}
|
|
@@ -501,76 +483,80 @@ function Ne(e, t) {
|
|
|
501
483
|
}
|
|
502
484
|
return n;
|
|
503
485
|
}
|
|
504
|
-
function
|
|
486
|
+
function Q(e) {
|
|
505
487
|
let t;
|
|
506
|
-
return e != null && typeof e == "object" && (e[
|
|
488
|
+
return e != null && typeof e == "object" && (e[T] || !(t = Object.getPrototypeOf(e)) || t === Object.prototype || Array.isArray(e));
|
|
507
489
|
}
|
|
508
|
-
function
|
|
509
|
-
let n, o,
|
|
510
|
-
if (n = e != null && e[
|
|
490
|
+
function V(e, t = /* @__PURE__ */ new Set()) {
|
|
491
|
+
let n, o, s, l;
|
|
492
|
+
if (n = e != null && e[oe])
|
|
511
493
|
return n;
|
|
512
|
-
if (!
|
|
494
|
+
if (!Q(e) || t.has(e))
|
|
513
495
|
return e;
|
|
514
496
|
if (Array.isArray(e)) {
|
|
515
497
|
Object.isFrozen(e) ? e = e.slice(0) : t.add(e);
|
|
516
|
-
for (let
|
|
517
|
-
|
|
498
|
+
for (let r = 0, i = e.length; r < i; r++)
|
|
499
|
+
s = e[r], (o = V(s, t)) !== s && (e[r] = o);
|
|
518
500
|
} else {
|
|
519
501
|
Object.isFrozen(e) ? e = Object.assign({}, e) : t.add(e);
|
|
520
|
-
const
|
|
521
|
-
for (let c = 0, f =
|
|
522
|
-
|
|
502
|
+
const r = Object.keys(e), i = Object.getOwnPropertyDescriptors(e);
|
|
503
|
+
for (let c = 0, f = r.length; c < f; c++)
|
|
504
|
+
l = r[c], !i[l].get && (s = e[l], (o = V(s, t)) !== s && (e[l] = o));
|
|
523
505
|
}
|
|
524
506
|
return e;
|
|
525
507
|
}
|
|
526
|
-
function
|
|
527
|
-
let t = e[
|
|
528
|
-
return t || Object.defineProperty(e,
|
|
508
|
+
function Z(e) {
|
|
509
|
+
let t = e[U];
|
|
510
|
+
return t || Object.defineProperty(e, U, {
|
|
529
511
|
value: t = {}
|
|
530
512
|
}), t;
|
|
531
513
|
}
|
|
532
|
-
function
|
|
533
|
-
return e[t] || (e[t] =
|
|
514
|
+
function se(e, t, n) {
|
|
515
|
+
return e[t] || (e[t] = ke(n));
|
|
534
516
|
}
|
|
535
|
-
function
|
|
517
|
+
function Ye(e, t) {
|
|
536
518
|
const n = Reflect.getOwnPropertyDescriptor(e, t);
|
|
537
|
-
return !n || n.get || !n.configurable || t ===
|
|
519
|
+
return !n || n.get || !n.configurable || t === T || t === U || t === Xe || (delete n.value, delete n.writable, n.get = () => e[T][t]), n;
|
|
538
520
|
}
|
|
539
|
-
function
|
|
540
|
-
if (
|
|
541
|
-
const t =
|
|
542
|
-
(t._ || (t._ =
|
|
521
|
+
function Ae(e) {
|
|
522
|
+
if (we()) {
|
|
523
|
+
const t = Z(e);
|
|
524
|
+
(t._ || (t._ = ke()))();
|
|
543
525
|
}
|
|
544
526
|
}
|
|
545
|
-
function
|
|
546
|
-
return
|
|
527
|
+
function Je(e) {
|
|
528
|
+
return Ae(e), Reflect.ownKeys(e);
|
|
547
529
|
}
|
|
548
|
-
function
|
|
549
|
-
const [
|
|
550
|
-
internal: !0
|
|
551
|
-
} : {
|
|
530
|
+
function ke(e) {
|
|
531
|
+
const [t, n] = F(e, {
|
|
552
532
|
equals: !1,
|
|
553
533
|
internal: !0
|
|
554
534
|
});
|
|
555
|
-
return
|
|
535
|
+
return t.$ = n, t;
|
|
556
536
|
}
|
|
557
|
-
const
|
|
537
|
+
const Qe = {
|
|
558
538
|
get(e, t, n) {
|
|
559
|
-
if (t ===
|
|
539
|
+
if (t === oe)
|
|
560
540
|
return e;
|
|
561
|
-
if (t ===
|
|
541
|
+
if (t === T)
|
|
562
542
|
return n;
|
|
563
|
-
if (t ===
|
|
564
|
-
return
|
|
565
|
-
const o =
|
|
566
|
-
let
|
|
567
|
-
if (t ===
|
|
568
|
-
return
|
|
569
|
-
if (!
|
|
570
|
-
const
|
|
571
|
-
|
|
543
|
+
if (t === fe)
|
|
544
|
+
return Ae(e), n;
|
|
545
|
+
const o = Z(e), s = o.hasOwnProperty(t);
|
|
546
|
+
let l = s ? o[t]() : e[t];
|
|
547
|
+
if (t === U || t === "__proto__")
|
|
548
|
+
return l;
|
|
549
|
+
if (!s) {
|
|
550
|
+
const r = Object.getOwnPropertyDescriptor(e, t);
|
|
551
|
+
we() && (typeof l != "function" || e.hasOwnProperty(t)) && !(r && r.get) && (l = se(o, t, l)());
|
|
572
552
|
}
|
|
573
|
-
return
|
|
553
|
+
return Q(l) ? Se(l) : l;
|
|
554
|
+
},
|
|
555
|
+
has(e, t) {
|
|
556
|
+
if (t === oe || t === T || t === fe || t === U || t === "__proto__")
|
|
557
|
+
return !0;
|
|
558
|
+
const n = Z(e)[t];
|
|
559
|
+
return n && n(), t in e;
|
|
574
560
|
},
|
|
575
561
|
set() {
|
|
576
562
|
return !0;
|
|
@@ -578,120 +564,120 @@ const Ze = {
|
|
|
578
564
|
deleteProperty() {
|
|
579
565
|
return !0;
|
|
580
566
|
},
|
|
581
|
-
ownKeys:
|
|
582
|
-
getOwnPropertyDescriptor:
|
|
567
|
+
ownKeys: Je,
|
|
568
|
+
getOwnPropertyDescriptor: Ye
|
|
583
569
|
};
|
|
584
|
-
function ee(e, t, n) {
|
|
585
|
-
if (e[t] === n)
|
|
570
|
+
function ee(e, t, n, o = !1) {
|
|
571
|
+
if (!o && e[t] === n)
|
|
586
572
|
return;
|
|
587
|
-
const
|
|
573
|
+
const s = e[t], l = e.length;
|
|
588
574
|
n === void 0 ? delete e[t] : e[t] = n;
|
|
589
|
-
let
|
|
590
|
-
(i =
|
|
575
|
+
let r = Z(e), i;
|
|
576
|
+
(i = se(r, t, s)) && i.$(() => n), Array.isArray(e) && e.length !== l && (i = se(r, "length", l)) && i.$(e.length), (i = r._) && i.$();
|
|
591
577
|
}
|
|
592
|
-
function
|
|
578
|
+
function Ne(e, t) {
|
|
593
579
|
const n = Object.keys(t);
|
|
594
580
|
for (let o = 0; o < n.length; o += 1) {
|
|
595
|
-
const
|
|
596
|
-
ee(e,
|
|
581
|
+
const s = n[o];
|
|
582
|
+
ee(e, s, t[s]);
|
|
597
583
|
}
|
|
598
584
|
}
|
|
599
|
-
function
|
|
600
|
-
if (typeof t == "function" && (t = t(e)), t =
|
|
585
|
+
function Ze(e, t) {
|
|
586
|
+
if (typeof t == "function" && (t = t(e)), t = V(t), Array.isArray(t)) {
|
|
601
587
|
if (e === t)
|
|
602
588
|
return;
|
|
603
589
|
let n = 0, o = t.length;
|
|
604
590
|
for (; n < o; n++) {
|
|
605
|
-
const
|
|
606
|
-
e[n] !==
|
|
591
|
+
const s = t[n];
|
|
592
|
+
e[n] !== s && ee(e, n, s);
|
|
607
593
|
}
|
|
608
594
|
ee(e, "length", o);
|
|
609
595
|
} else
|
|
610
|
-
|
|
596
|
+
Ne(e, t);
|
|
611
597
|
}
|
|
612
|
-
function
|
|
613
|
-
let o,
|
|
598
|
+
function B(e, t, n = []) {
|
|
599
|
+
let o, s = e;
|
|
614
600
|
if (t.length > 1) {
|
|
615
601
|
o = t.shift();
|
|
616
|
-
const
|
|
602
|
+
const r = typeof o, i = Array.isArray(e);
|
|
617
603
|
if (Array.isArray(o)) {
|
|
618
604
|
for (let c = 0; c < o.length; c++)
|
|
619
|
-
|
|
605
|
+
B(e, [o[c]].concat(t), n);
|
|
620
606
|
return;
|
|
621
|
-
} else if (
|
|
607
|
+
} else if (i && r === "function") {
|
|
622
608
|
for (let c = 0; c < e.length; c++)
|
|
623
|
-
o(e[c], c) &&
|
|
609
|
+
o(e[c], c) && B(e, [c].concat(t), n);
|
|
624
610
|
return;
|
|
625
|
-
} else if (
|
|
611
|
+
} else if (i && r === "object") {
|
|
626
612
|
const {
|
|
627
613
|
from: c = 0,
|
|
628
614
|
to: f = e.length - 1,
|
|
629
615
|
by: a = 1
|
|
630
616
|
} = o;
|
|
631
617
|
for (let h = c; h <= f; h += a)
|
|
632
|
-
|
|
618
|
+
B(e, [h].concat(t), n);
|
|
633
619
|
return;
|
|
634
620
|
} else if (t.length > 1) {
|
|
635
|
-
|
|
621
|
+
B(e[o], t, [o].concat(n));
|
|
636
622
|
return;
|
|
637
623
|
}
|
|
638
|
-
|
|
624
|
+
s = e[o], n = [o].concat(n);
|
|
639
625
|
}
|
|
640
|
-
let
|
|
641
|
-
typeof
|
|
642
|
-
}
|
|
643
|
-
function
|
|
644
|
-
const n =
|
|
645
|
-
function
|
|
646
|
-
|
|
647
|
-
o &&
|
|
626
|
+
let l = t[0];
|
|
627
|
+
typeof l == "function" && (l = l(s, n), l === s) || o === void 0 && l == null || (l = V(l), o === void 0 || Q(s) && Q(l) && !Array.isArray(l) ? Ne(s, l) : ee(e, o, l));
|
|
628
|
+
}
|
|
629
|
+
function et(...[e, t]) {
|
|
630
|
+
const n = V(e || {}), o = Array.isArray(n), s = Se(n);
|
|
631
|
+
function l(...r) {
|
|
632
|
+
ze(() => {
|
|
633
|
+
o && r.length === 1 ? Ze(n, r[0]) : B(n, r);
|
|
648
634
|
});
|
|
649
635
|
}
|
|
650
|
-
return [
|
|
636
|
+
return [s, l];
|
|
651
637
|
}
|
|
652
|
-
const [p,
|
|
653
|
-
const e =
|
|
638
|
+
const [p, H] = et({ working: !1, selectedElement: null }), tt = /* @__PURE__ */ k('<svg data-ohbug-selector height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" data-ohbug-selector fill="none"></path><path d="M12 10.586l4.95-4.95 1.414 1.414-4.95 4.95 4.95 4.95-1.414 1.414-4.95-4.95-4.95 4.95-1.414-1.414 4.95-4.95-4.95-4.95L7.05 5.636z" data-ohbug-selector fill="rgba(255,255,255,1)"></path></svg>'), nt = /* @__PURE__ */ k('<svg data-ohbug-selector height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" data-ohbug-selector fill="none"></path><path d="M3 3h2v2H3V3zm4 0h2v2H7V3zm4 0h2v2h-2V3zm4 0h2v2h-2V3zm4 0h2v2h-2V3zm0 4h2v2h-2V7zM3 19h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3v-2zm0-4h2v2H3V7zm7.667 4l1.036-1.555A1 1 0 0 1 12.535 9h2.93a1 1 0 0 1 .832.445L17.333 11H20a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1h2.667zM9 19h10v-6h-2.737l-1.333-2h-1.86l-1.333 2H9v6zm5-1a2 2 0 1 1 0-4 2 2 0 0 1 0 4z" data-ohbug-selector></path></svg>'), le = () => tt.cloneNode(!0), ot = () => (() => {
|
|
639
|
+
const e = nt.cloneNode(!0);
|
|
654
640
|
return e.firstChild.nextSibling.style.setProperty("fill", "var(--color)"), e;
|
|
655
641
|
})();
|
|
656
|
-
const st = /* @__PURE__ */
|
|
642
|
+
const st = /* @__PURE__ */ k('<div class="bg-none border-solid border-4 border-blue-500 transition top-0 right-0 bottom-0 left-0 z-10 fixed pointer-events-none" data-ohbug-selector><div class="tips" data-ohbug-selector>Select element on the page<button class="stop-btn" type="button"></button></div></div>'), lt = /* @__PURE__ */ k('<button class="rounded-full cursor-pointer flex bg-red-500 h-6 -top-3 -right-3 w-6 z-10 items-center justify-center absolute pointer-events-auto" data-ohbug-selector type="button"></button>'), it = /* @__PURE__ */ k('<button class="border-solid cursor-pointer font-semibold bg-red-500 border-4 border-red-500 -bottom-full text-white right-0 absolute pointer-events-auto" data-ohbug-selector type="button">Change</button>'), rt = /* @__PURE__ */ k('<div class="-z-1 fixed" data-ohbug-selector><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div class="bg-black bg-opacity-40 transition -z-1 fixed pointer-events-none" data-ohbug-selector></div><div data-ohbug-selector></div></div>'), ct = () => {
|
|
657
643
|
const [e, t] = F();
|
|
658
|
-
let n, o,
|
|
659
|
-
const
|
|
644
|
+
let n, o, s, l, r;
|
|
645
|
+
const i = 2;
|
|
660
646
|
function c(u) {
|
|
661
647
|
if (!u || u.tagName === "HTML")
|
|
662
648
|
return;
|
|
663
649
|
const {
|
|
664
650
|
width: g,
|
|
665
651
|
height: w,
|
|
666
|
-
top:
|
|
667
|
-
right:
|
|
668
|
-
bottom:
|
|
652
|
+
top: S,
|
|
653
|
+
right: L,
|
|
654
|
+
bottom: D,
|
|
669
655
|
left: d
|
|
670
656
|
} = u.getBoundingClientRect();
|
|
671
|
-
|
|
672
|
-
width: ${g +
|
|
673
|
-
height: ${w +
|
|
674
|
-
top: ${
|
|
675
|
-
left: ${d -
|
|
657
|
+
r == null || r.setAttribute("style", `
|
|
658
|
+
width: ${g + i * 2}px;
|
|
659
|
+
height: ${w + i * 2}px;
|
|
660
|
+
top: ${S - i}px;
|
|
661
|
+
left: ${d - i}px;
|
|
676
662
|
`), n == null || n.setAttribute("style", `
|
|
677
|
-
height: ${
|
|
663
|
+
height: ${S}px;
|
|
678
664
|
top: 0;
|
|
679
665
|
right: 0;
|
|
680
666
|
left: 0;
|
|
681
667
|
`), o == null || o.setAttribute("style", `
|
|
682
|
-
top: ${
|
|
668
|
+
top: ${S}px;
|
|
683
669
|
right: 0;
|
|
684
670
|
bottom: 0;
|
|
685
|
-
left: ${
|
|
686
|
-
`),
|
|
671
|
+
left: ${L}px;
|
|
672
|
+
`), s == null || s.setAttribute("style", `
|
|
687
673
|
width: ${g + d}px;
|
|
688
|
-
top: ${
|
|
674
|
+
top: ${D}px;
|
|
689
675
|
bottom: 0;
|
|
690
676
|
left: 0;
|
|
691
|
-
`),
|
|
677
|
+
`), l == null || l.setAttribute("style", `
|
|
692
678
|
width: ${d}px;
|
|
693
679
|
height: ${w}px;
|
|
694
|
-
top: ${
|
|
680
|
+
top: ${S}px;
|
|
695
681
|
left: 0;
|
|
696
682
|
`);
|
|
697
683
|
}
|
|
@@ -701,21 +687,21 @@ const st = /* @__PURE__ */ N('<div class="bg-none border-solid border-4 border-b
|
|
|
701
687
|
const {
|
|
702
688
|
width: g,
|
|
703
689
|
height: w,
|
|
704
|
-
top:
|
|
705
|
-
left:
|
|
690
|
+
top: S,
|
|
691
|
+
left: L
|
|
706
692
|
} = u.getBoundingClientRect();
|
|
707
|
-
|
|
693
|
+
H({
|
|
708
694
|
selectedElement: u
|
|
709
|
-
}),
|
|
710
|
-
width: ${g +
|
|
711
|
-
height: ${w +
|
|
712
|
-
top: ${
|
|
713
|
-
left: ${
|
|
695
|
+
}), r == null || r.setAttribute("style", `
|
|
696
|
+
width: ${g + i * 2}px;
|
|
697
|
+
height: ${w + i * 2}px;
|
|
698
|
+
top: ${S - i}px;
|
|
699
|
+
left: ${L - i}px;
|
|
714
700
|
`);
|
|
715
701
|
}
|
|
716
702
|
function a(u) {
|
|
717
703
|
var w;
|
|
718
|
-
|
|
704
|
+
H({
|
|
719
705
|
working: !0
|
|
720
706
|
});
|
|
721
707
|
const g = document.elementFromPoint(u.clientX, u.clientY);
|
|
@@ -729,87 +715,87 @@ const st = /* @__PURE__ */ N('<div class="bg-none border-solid border-4 border-b
|
|
|
729
715
|
function v() {
|
|
730
716
|
document.removeEventListener("mousemove", a);
|
|
731
717
|
}
|
|
732
|
-
function
|
|
718
|
+
function E(u) {
|
|
733
719
|
var w;
|
|
734
720
|
const g = document.elementFromPoint(u.clientX, u.clientY);
|
|
735
721
|
if (((w = g == null ? void 0 : g.dataset) == null ? void 0 : w.ohbugSelector) !== void 0 || g.tagName === "HTML" || p.selectedElement && p.working)
|
|
736
722
|
return !1;
|
|
737
723
|
t(g), f(e()), v();
|
|
738
724
|
}
|
|
739
|
-
function
|
|
740
|
-
document.addEventListener("mousedown",
|
|
725
|
+
function P() {
|
|
726
|
+
document.addEventListener("mousedown", E);
|
|
741
727
|
}
|
|
742
728
|
function q() {
|
|
743
|
-
document.removeEventListener("mousedown",
|
|
729
|
+
document.removeEventListener("mousedown", E);
|
|
744
730
|
}
|
|
745
|
-
function
|
|
746
|
-
t(null), v(), q(),
|
|
731
|
+
function O() {
|
|
732
|
+
t(null), v(), q(), H({
|
|
747
733
|
working: !1,
|
|
748
734
|
selectedElement: null
|
|
749
735
|
});
|
|
750
736
|
}
|
|
751
|
-
function
|
|
752
|
-
|
|
737
|
+
function I() {
|
|
738
|
+
H({
|
|
753
739
|
working: !0,
|
|
754
740
|
selectedElement: null
|
|
755
741
|
}), t(null), h();
|
|
756
742
|
}
|
|
757
|
-
return
|
|
758
|
-
p.working ? (h(),
|
|
759
|
-
}),
|
|
760
|
-
const u =
|
|
761
|
-
return m(u, x(
|
|
743
|
+
return pe(() => {
|
|
744
|
+
p.working ? (h(), P()) : (v(), q());
|
|
745
|
+
}), He(O), (() => {
|
|
746
|
+
const u = rt.cloneNode(!0), g = u.firstChild, w = g.nextSibling, S = w.nextSibling, L = S.nextSibling, D = L.nextSibling;
|
|
747
|
+
return m(u, x(R, {
|
|
762
748
|
get when() {
|
|
763
749
|
return !p.selectedElement && p.working;
|
|
764
750
|
},
|
|
765
751
|
get children() {
|
|
766
|
-
const d = st.cloneNode(!0),
|
|
767
|
-
return
|
|
752
|
+
const d = st.cloneNode(!0), Oe = d.firstChild, Ce = Oe.firstChild, ue = Ce.nextSibling;
|
|
753
|
+
return ue.$$click = O, m(ue, x(le, {})), d;
|
|
768
754
|
}
|
|
769
755
|
}), g), ((d) => {
|
|
770
756
|
n = d;
|
|
771
757
|
})(g), ((d) => {
|
|
772
758
|
o = d;
|
|
773
759
|
})(w), ((d) => {
|
|
774
|
-
l = d;
|
|
775
|
-
})(A), ((d) => {
|
|
776
760
|
s = d;
|
|
777
|
-
})(
|
|
778
|
-
|
|
779
|
-
})(
|
|
761
|
+
})(S), ((d) => {
|
|
762
|
+
l = d;
|
|
763
|
+
})(L), ((d) => {
|
|
764
|
+
r = d;
|
|
765
|
+
})(D), m(D, x(R, {
|
|
780
766
|
get when() {
|
|
781
767
|
return p.selectedElement && p.working;
|
|
782
768
|
},
|
|
783
769
|
get children() {
|
|
784
770
|
return [(() => {
|
|
785
|
-
const d =
|
|
786
|
-
return d.$$click =
|
|
771
|
+
const d = lt.cloneNode(!0);
|
|
772
|
+
return d.$$click = O, m(d, x(le, {})), d;
|
|
787
773
|
})(), (() => {
|
|
788
|
-
const d =
|
|
789
|
-
return d.$$click =
|
|
774
|
+
const d = it.cloneNode(!0);
|
|
775
|
+
return d.$$click = I, d.style.setProperty("transform", "translate(4px, -8px)"), d;
|
|
790
776
|
})()];
|
|
791
777
|
}
|
|
792
|
-
})), j(() =>
|
|
778
|
+
})), j(() => D.className = `fixed -z-1 bg-black bg-opacity-20 border-4 rounded-sm transition cursor-pointer box-border pointer-events-none ${e() ? "border-red-500 border-solid" : "border-blue-500 border-dashed"}`), u;
|
|
793
779
|
})();
|
|
794
780
|
};
|
|
795
|
-
|
|
796
|
-
const
|
|
781
|
+
_e(["click"]);
|
|
782
|
+
const ut = /* @__PURE__ */ k('<button class="main-btn" data-ohbug-selector type="button"></button>'), ft = /* @__PURE__ */ k('<div class="bg-white flex flex-col h-60 shadow z-max right-8 bottom-20 w-80 fixed" data-ohbug-selector><div class="bg-gray-300 p-4" data-ohbug-selector><textarea autofocus class="bg-transparent outline-none w-full resize-none" data-ohbug-selector maxlength="1000" placeholder="Tell me how you feel..." rows="4"></textarea><button class="cursor-pointer" data-ohbug-selector type="button"></button></div><div class="flex flex-1 p-4 justify-between items-center" data-ohbug-selector><span class="text-sm" data-ohbug-selector>Try<a class="ml-1 underline" data-ohbug-selector href="https://ohbug.net" rel="noreferrer" target="_blank">Ohbug</a>?</span><button class="send-btn" data-ohbug-selector type="button"></button></div><button class="rounded-full cursor-pointer flex bg-blue-500 h-6 -top-2 -right-2 w-6 z-10 items-center justify-center absolute" data-ohbug-selector type="button"></button></div>'), at = /* @__PURE__ */ k('<div class="z-max relative" data-ohbug-selector><div></div></div>'), dt = () => {
|
|
797
783
|
const [e, t] = F(!1), [n, o] = F("");
|
|
798
|
-
function
|
|
799
|
-
|
|
784
|
+
function s() {
|
|
785
|
+
H({
|
|
800
786
|
working: !0
|
|
801
787
|
});
|
|
802
788
|
}
|
|
803
|
-
const [
|
|
804
|
-
async function
|
|
805
|
-
|
|
789
|
+
const [l, r] = F(!1);
|
|
790
|
+
async function i() {
|
|
791
|
+
r(!0);
|
|
806
792
|
let c, f;
|
|
807
|
-
const a =
|
|
793
|
+
const a = Ie().client;
|
|
808
794
|
if (p.selectedElement) {
|
|
809
795
|
const h = {
|
|
810
796
|
target: p.selectedElement
|
|
811
797
|
};
|
|
812
|
-
c =
|
|
798
|
+
c = We(h), f = p.selectedElement.outerHTML;
|
|
813
799
|
const v = a.createEvent({
|
|
814
800
|
category: "feedback",
|
|
815
801
|
type: "feedback",
|
|
@@ -830,39 +816,39 @@ const ft = /* @__PURE__ */ N('<button class="main-btn" data-ohbug-selector type=
|
|
|
830
816
|
});
|
|
831
817
|
await a.notify(h);
|
|
832
818
|
}
|
|
833
|
-
t(!1), o(""),
|
|
819
|
+
t(!1), o(""), H({
|
|
834
820
|
working: !1,
|
|
835
821
|
selectedElement: null
|
|
836
|
-
}),
|
|
822
|
+
}), r(!1);
|
|
837
823
|
}
|
|
838
|
-
return
|
|
824
|
+
return pe(() => {
|
|
839
825
|
p.working === !1 && p.selectedElement === null || p.working && !p.selectedElement ? t(!1) : t(!0);
|
|
840
826
|
}), (() => {
|
|
841
|
-
const c =
|
|
842
|
-
return m(c, x(
|
|
827
|
+
const c = at.cloneNode(!0), f = c.firstChild;
|
|
828
|
+
return m(c, x(R, {
|
|
843
829
|
get when() {
|
|
844
830
|
return p.working;
|
|
845
831
|
},
|
|
846
832
|
get children() {
|
|
847
|
-
return x(
|
|
833
|
+
return x(ct, {});
|
|
848
834
|
}
|
|
849
|
-
}), f), m(f, x(
|
|
835
|
+
}), f), m(f, x(R, {
|
|
850
836
|
get when() {
|
|
851
837
|
return !(p.working && !p.selectedElement);
|
|
852
838
|
},
|
|
853
839
|
get children() {
|
|
854
|
-
const a =
|
|
840
|
+
const a = ut.cloneNode(!0);
|
|
855
841
|
return a.$$click = () => t((h) => !h), m(a, () => e() ? "\u{1F606}" : "\u{1F642}"), a;
|
|
856
842
|
}
|
|
857
|
-
}), null), m(f, x(
|
|
843
|
+
}), null), m(f, x(R, {
|
|
858
844
|
get when() {
|
|
859
845
|
return e();
|
|
860
846
|
},
|
|
861
847
|
get children() {
|
|
862
|
-
const a =
|
|
863
|
-
return v.$$input = (u) => o(u.currentTarget.value),
|
|
864
|
-
const g = p.selectedElement ? "blue" : "gray", w = !n() ||
|
|
865
|
-
return g !== u._v$ &&
|
|
848
|
+
const a = ft.cloneNode(!0), h = a.firstChild, v = h.firstChild, E = v.nextSibling, P = h.nextSibling, q = P.firstChild, O = q.nextSibling, I = P.nextSibling;
|
|
849
|
+
return v.$$input = (u) => o(u.currentTarget.value), E.$$click = s, m(E, x(ot, {})), O.$$click = i, m(O, () => l() ? "Sending..." : "Send"), I.$$click = () => t((u) => !u), m(I, x(le, {})), j((u) => {
|
|
850
|
+
const g = p.selectedElement ? "blue" : "gray", w = !n() || l();
|
|
851
|
+
return g !== u._v$ && E.style.setProperty("--color", u._v$ = g), w !== u._v$2 && (O.disabled = u._v$2 = w), u;
|
|
866
852
|
}, {
|
|
867
853
|
_v$: void 0,
|
|
868
854
|
_v$2: void 0
|
|
@@ -871,12 +857,12 @@ const ft = /* @__PURE__ */ N('<button class="main-btn" data-ohbug-selector type=
|
|
|
871
857
|
}), null), c;
|
|
872
858
|
})();
|
|
873
859
|
};
|
|
874
|
-
|
|
875
|
-
const
|
|
860
|
+
_e(["click", "input"]);
|
|
861
|
+
const ht = {
|
|
876
862
|
name: "OhbugExtensionFeedback",
|
|
877
863
|
onSetup: () => {
|
|
878
864
|
const e = document.createElement("div");
|
|
879
|
-
e.id = "OhbugExtensionFeedback-ROOT", document.body.appendChild(e),
|
|
865
|
+
e.id = "OhbugExtensionFeedback-ROOT", document.body.appendChild(e), Re(() => x(dt, {}), e);
|
|
880
866
|
}
|
|
881
867
|
};
|
|
882
868
|
function styleInject(css,ref){if(ref===void 0){ref={}}var insertAt=ref.insertAt;if(!css||typeof document==="undefined"){return}var head=document.head||document.getElementsByTagName("head")[0];var style=document.createElement("style");style.type="text/css";if(insertAt==="top"){if(head.firstChild){head.insertBefore(style,head.firstChild)}else{head.appendChild(style)}}else{head.appendChild(style)}if(style.styleSheet){style.styleSheet.cssText=css}else{style.appendChild(document.createTextNode(css))}};styleInject(`.main-btn {
|
|
@@ -1348,5 +1334,5 @@ textarea::-ms-input-placeholder {
|
|
|
1348
1334
|
transition-duration: 150ms;
|
|
1349
1335
|
}`);
|
|
1350
1336
|
export {
|
|
1351
|
-
|
|
1337
|
+
ht as default
|
|
1352
1338
|
};
|