@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.
Files changed (3) hide show
  1. package/dist/index.js +19 -19
  2. package/dist/index.mjs +406 -420
  3. package/package.json +3 -3
package/dist/index.mjs CHANGED
@@ -1,133 +1,114 @@
1
- const S = {};
2
- function Le(e) {
3
- S.context = e;
1
+ const _ = {};
2
+ function Te(e) {
3
+ _.context = e;
4
4
  }
5
- const ze = (e, t) => e === t, z = Symbol("solid-proxy"), He = Symbol("solid-track"), W = {
6
- equals: ze
5
+ const Pe = (e, t) => e === t, T = Symbol("solid-proxy"), fe = Symbol("solid-track"), K = {
6
+ equals: Pe
7
7
  };
8
- let be = me;
9
- const H = {}, O = 1, X = 2, pe = {
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 G = null, b = null, B = null, $ = null, E = null, le = 0;
17
- function je(e, t) {
18
- const n = b, o = y, l = e.length === 0, s = l ? pe : {
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
- }, i = l ? e : () => e(() => ue(s));
24
- y = s, b = null;
23
+ }, r = s ? e : () => e(() => te(() => ce(l)));
24
+ y = l, b = null;
25
25
  try {
26
- return ce(i, !0);
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({}, W, t) : W;
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 = (l) => (typeof l == "function" && (l = l(n.pending !== H ? n.pending : n.value)), ie(n, l));
40
- return [ve.bind(n), o];
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, O);
44
- I(o);
42
+ const o = re(e, t, !1, N);
43
+ G(o);
45
44
  }
46
- function we(e, t, n) {
47
- be = Fe;
48
- const o = re(e, t, !1, O);
49
- o.user = !0, E ? E.push(o) : I(o);
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 de(e, t, n) {
52
- n = n ? Object.assign({}, W, n) : W;
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.pending = H, o.observers = null, o.observerSlots = null, o.comparator = n.equals || void 0, I(o), ve.bind(o);
53
+ return o.observers = null, o.observerSlots = null, o.comparator = n.equals || void 0, G(o), ye.bind(o);
55
54
  }
56
- function ye(e) {
57
- if (B)
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 se(e) {
58
+ function te(e) {
77
59
  let t, n = b;
78
60
  return b = null, t = e(), b = n, t;
79
61
  }
80
- function Me(e) {
62
+ function He(e) {
81
63
  return y === null || (y.cleanups === null ? y.cleanups = [e] : y.cleanups.push(e)), e;
82
64
  }
83
- function $e() {
65
+ function we() {
84
66
  return b;
85
67
  }
86
- function ve() {
87
- const e = G;
88
- if (this.sources && (this.state || e)) {
89
- const t = $;
90
- $ = null, this.state === O || e ? I(this) : Y(this), $ = t;
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 ie(e, t, n) {
99
- if (B)
100
- return e.pending === H && B.push(e), e.pending = t, t;
101
- if (e.comparator && e.comparator(e.value, t))
102
- return t;
103
- let o = !1;
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 I(e) {
94
+ function G(e) {
114
95
  if (!e.fn)
115
96
  return;
116
- ue(e);
117
- const t = y, n = b, o = le;
118
- b = y = e, De(e, e.value, o), b = n, y = t;
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 De(e, t, n) {
101
+ function je(e, t, n) {
121
102
  let o;
122
103
  try {
123
104
  o = e.fn(t);
124
- } catch (l) {
125
- Ee(l);
105
+ } catch (s) {
106
+ e.pure && (e.state = N), xe(s);
126
107
  }
127
- (!e.updatedAt || e.updatedAt <= n) && (e.observers && e.observers.length ? ie(e, o) : e.value = o, e.updatedAt = n);
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 = O, l) {
130
- const s = {
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 !== pe && (y.owned ? y.owned.push(s) : y.owned = [s]), s;
124
+ return y === null || y !== be && (y.owned ? y.owned.push(l) : y.owned = [l]), l;
144
125
  }
145
- function R(e) {
146
- const t = G;
126
+ function X(e) {
127
+ const t = C;
147
128
  if (e.state === 0 || t)
148
129
  return;
149
- if (e.state === X || t)
130
+ if (e.state === W || t)
150
131
  return Y(e);
151
- if (e.suspense && se(e.suspense.inFallback))
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 < le); )
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 === O || t)
158
- I(e);
159
- else if (e.state === X || t) {
160
- const l = $;
161
- $ = null, Y(e, n[0]), $ = l;
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 ce(e, t) {
145
+ function M(e, t) {
165
146
  if ($)
166
147
  return e();
167
148
  let n = !1;
168
- t || ($ = []), E ? n = !0 : E = [], le++;
149
+ t || ($ = []), A ? n = !0 : A = [], ie++;
169
150
  try {
170
151
  const o = e();
171
- return Be(n), o;
152
+ return Me(n), o;
172
153
  } catch (o) {
173
- $ || (E = null), Ee(o);
154
+ $ || (A = null), xe(o);
174
155
  }
175
156
  }
176
- function Be(e) {
177
- $ && (me($), $ = null), !e && (E.length ? ye(() => {
178
- be(E), E = null;
179
- }) : E = null);
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 me(e) {
163
+ function ve(e) {
182
164
  for (let t = 0; t < e.length; t++)
183
- R(e[t]);
165
+ X(e[t]);
184
166
  }
185
- function Fe(e) {
167
+ function De(e) {
186
168
  let t, n = 0;
187
169
  for (t = 0; t < e.length; t++) {
188
- const l = e[t];
189
- l.user ? e[n++] = l : R(l);
170
+ const o = e[t];
171
+ o.user ? e[n++] = o : X(o);
190
172
  }
191
- S.context && Le();
192
- const o = e.length;
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 = G;
177
+ const n = C;
200
178
  e.state = 0;
201
179
  for (let o = 0; o < e.sources.length; o += 1) {
202
- const l = e.sources[o];
203
- l.sources && (l.state === O || n ? l !== t && R(l) : (l.state === X || n) && Y(l, t));
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 xe(e) {
207
- const t = G;
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 = X, o.pure ? $.push(o) : E.push(o), o.observers && xe(o));
188
+ (!o.state || t) && (o.state = W, o.pure ? $.push(o) : A.push(o), o.observers && me(o));
211
189
  }
212
190
  }
213
- function ue(e) {
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(), l = n.observers;
218
- if (l && l.length) {
219
- const s = l.pop(), i = n.observerSlots.pop();
220
- o < l.length && (s.sourceSlots[i] = o, l[o] = s, n.observerSlots[o] = i);
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
- ue(e.owned[t]);
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 Ee(e) {
236
- throw e;
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 se(() => e(t || {}));
220
+ return te(() => e(t || {}));
240
221
  }
241
- function V(e) {
222
+ function R(e) {
242
223
  let t = !1;
243
- const n = de(() => e.when, void 0, {
244
- equals: (o, l) => t ? o === l : !o == !l
224
+ const n = e.keyed, o = ae(() => e.when, void 0, {
225
+ equals: (s, l) => t ? s === l : !s == !l
245
226
  });
246
- return de(() => {
247
- const o = n();
248
- if (o) {
249
- const l = e.children;
250
- return (t = typeof l == "function" && l.length > 0) ? se(() => l(o)) : l;
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 Re(e, t, n) {
256
- let o = n.length, l = t.length, s = o, i = 0, r = 0, c = t[l - 1].nextSibling, f = null;
257
- for (; i < l || r < s; ) {
258
- if (t[i] === n[r]) {
259
- i++, r++;
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[l - 1] === n[s - 1]; )
263
- l--, s--;
264
- if (l === i) {
265
- const a = s < o ? r ? n[r - 1].nextSibling : n[s - r] : c;
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
- (!f || !f.has(t[i])) && t[i].remove(), i++;
271
- else if (t[i] === n[s - 1] && n[r] === t[l - 1]) {
272
- const a = t[--l].nextSibling;
273
- e.insertBefore(n[r++], t[i++].nextSibling), e.insertBefore(n[--s], a), t[l] = n[s];
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 = r;
278
- for (; h < s; )
258
+ let h = i;
259
+ for (; h < l; )
279
260
  f.set(n[h], h++);
280
261
  }
281
- const a = f.get(t[i]);
262
+ const a = f.get(t[r]);
282
263
  if (a != null)
283
- if (r < a && a < s) {
284
- let h = i, v = 1, _;
285
- for (; ++h < l && h < s && !((_ = f.get(t[h])) == null || _ !== a + v); )
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 - r) {
288
- const C = t[i];
289
- for (; r < a; )
290
- e.insertBefore(n[r++], C);
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[r++], t[i++]);
273
+ e.replaceChild(n[i++], t[r++]);
293
274
  } else
294
- i++;
275
+ r++;
295
276
  else
296
- t[i++].remove();
277
+ t[r++].remove();
297
278
  }
298
279
  }
299
280
  }
300
- const he = "_$DX_DELEGATE";
301
- function Ve(e, t, n) {
281
+ const de = "_$DX_DELEGATE";
282
+ function Re(e, t, n) {
302
283
  let o;
303
- return je((l) => {
304
- o = l, t === document ? e() : m(t, e(), t.firstChild ? null : void 0, n);
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 N(e, t, n) {
290
+ function k(e, t, n) {
310
291
  const o = document.createElement("template");
311
292
  o.innerHTML = e;
312
- let l = o.content.firstChild;
313
- return n && (l = l.firstChild), l;
314
- }
315
- function Se(e, t = window.document) {
316
- const n = t[he] || (t[he] = /* @__PURE__ */ new Set());
317
- for (let o = 0, l = e.length; o < l; o++) {
318
- const s = e[o];
319
- n.has(s) || (n.add(s), t.addEventListener(s, Ue));
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((l) => J(e, t(), l, n), o);
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
- }), S.registry && !S.done && (S.done = !0, document.querySelectorAll("[id^=pl-]").forEach((o) => o.remove())); n !== null; ) {
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 l = n[`${t}Data`];
342
- if (l !== void 0 ? o.call(n, l, e) : o.call(n, e), e.cancelBubble)
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, l) {
349
- for (S.context && !n && (n = [...e.childNodes]); typeof n == "function"; )
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 s = typeof t, i = o !== void 0;
354
- if (e = i && n[0] && n[0].parentNode || e, s === "string" || s === "number") {
355
- if (S.context)
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 (s === "number" && (t = t.toString()), i) {
358
- let r = n[0];
359
- r && r.nodeType === 3 ? r.data = t : r = document.createTextNode(t), n = P(e, n, o, r);
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 || s === "boolean") {
363
- if (S.context)
343
+ } else if (t == null || l === "boolean") {
344
+ if (_.context)
364
345
  return n;
365
- n = P(e, n, o);
346
+ n = z(e, n, o);
366
347
  } else {
367
- if (s === "function")
348
+ if (l === "function")
368
349
  return j(() => {
369
- let r = t();
370
- for (; typeof r == "function"; )
371
- r = r();
372
- n = J(e, r, n, o);
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 r = [], c = n && Array.isArray(n);
376
- if (te(r, t, n, l))
377
- return j(() => n = J(e, r, n, o, !0)), () => n;
378
- if (S.context) {
379
- for (let f = 0; f < r.length; f++)
380
- if (r[f].parentNode)
381
- return n = r;
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 (r.length === 0) {
384
- if (n = P(e, n, o), i)
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 ? ge(e, r, o) : Re(e, n, r) : (n && P(e), ge(e, r));
388
- n = r;
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 (S.context && t.parentNode)
391
- return n = i ? [t] : t;
373
+ if (_.context && t.parentNode)
374
+ return n = r ? [t] : t;
392
375
  if (Array.isArray(n)) {
393
- if (i)
394
- return n = P(e, n, o, t);
395
- P(e, n, null, t);
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 te(e, t, n, o) {
404
- let l = !1;
405
- for (let s = 0, i = t.length; s < i; s++) {
406
- let r = t[s], c = n && n[s];
407
- if (r instanceof Node)
408
- e.push(r);
409
- else if (!(r == null || r === !0 || r === !1))
410
- if (Array.isArray(r))
411
- l = te(e, r, c) || l;
412
- else if (typeof r == "function")
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 r == "function"; )
415
- r = r();
416
- l = te(e, Array.isArray(r) ? r : [r], c) || l;
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(r), l = !0;
401
+ e.push(i), s = !0;
419
402
  else {
420
- const f = String(r);
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 l;
407
+ return s;
425
408
  }
426
- function ge(e, t, n) {
427
- for (let o = 0, l = t.length; o < l; o++)
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 P(e, t, n, o) {
413
+ function z(e, t, n, o) {
431
414
  if (n === void 0)
432
415
  return e.textContent = "";
433
- const l = o || document.createTextNode("");
416
+ const s = o || document.createTextNode("");
434
417
  if (t.length) {
435
- let s = !1;
436
- for (let i = t.length - 1; i >= 0; i--) {
437
- const r = t[i];
438
- if (l !== r) {
439
- const c = r.parentNode === e;
440
- !s && !i ? c ? e.replaceChild(l, r) : e.insertBefore(l, n) : c && r.remove();
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
- s = !0;
425
+ l = !0;
443
426
  }
444
427
  } else
445
- e.insertBefore(l, n);
446
- return [l];
428
+ e.insertBefore(s, n);
429
+ return [s];
447
430
  }
448
- function Ge(e, t, ...n) {
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 l = t.replace(/%s/g, () => n[o++]);
454
- throw new Error(`Ohbug ${l}`);
436
+ const s = t.replace(/%s/g, () => n[o++]);
437
+ throw new Error(`Ohbug ${s}`);
455
438
  }
456
439
  }
457
- var Ie = {};
440
+ var Ge = {};
458
441
  function qe() {
459
- return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : Ie;
442
+ return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : Ge;
460
443
  }
461
- function Ke() {
444
+ function Ie() {
462
445
  const e = qe();
463
- return Ge(
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 _e(e, t) {
469
- e.parentNode && (t.push(e.parentNode), _e(e.parentNode, t));
451
+ function Ee(e, t) {
452
+ e.parentNode && (t.push(e.parentNode), Ee(e.parentNode, t));
470
453
  }
471
- function We(e) {
454
+ function Ke(e) {
472
455
  const t = [];
473
- return t.push(e), _e(e, t), t;
456
+ return t.push(e), Ee(e, t), t;
474
457
  }
475
- var Xe = (e) => {
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 i = 0; n && n.nodeType === Node.ELEMENT_NODE && n.nodeType !== Node.DOCUMENT_TYPE_NODE; n = n.previousSibling)
480
- i && o.push(n), i += 1;
481
- const l = typeof e.path > "u" ? We(e.target) : e.path, { outerHTML: s } = t;
482
- return l.reverse().map((i) => (i.localName || "") + (i.id ? `#${i.id}` : "") + (i.className ? `.${i.className}` : "") + (i.outerHTML === s ? `:nth-child(${o.length})` : "")).filter((i) => Boolean(i)).join(" > ");
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 Ae = Symbol("store-raw"), Q = Symbol("store-node"), Ye = Symbol("store-name");
485
- function Ne(e, t) {
486
- let n = e[z];
487
- if (!n) {
488
- Object.defineProperty(e, z, {
489
- value: n = new Proxy(e, Ze)
490
- });
491
- const o = Object.keys(e), l = Object.getOwnPropertyDescriptors(e);
492
- for (let s = 0, i = o.length; s < i; s++) {
493
- const r = o[s];
494
- if (l[r].get) {
495
- const c = l[r].get.bind(n);
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 Z(e) {
486
+ function Q(e) {
505
487
  let t;
506
- return e != null && typeof e == "object" && (e[z] || !(t = Object.getPrototypeOf(e)) || t === Object.prototype || Array.isArray(e));
488
+ return e != null && typeof e == "object" && (e[T] || !(t = Object.getPrototypeOf(e)) || t === Object.prototype || Array.isArray(e));
507
489
  }
508
- function U(e, t = /* @__PURE__ */ new Set()) {
509
- let n, o, l, s;
510
- if (n = e != null && e[Ae])
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 (!Z(e) || t.has(e))
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 i = 0, r = e.length; i < r; i++)
517
- l = e[i], (o = U(l, t)) !== l && (e[i] = o);
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 i = Object.keys(e), r = Object.getOwnPropertyDescriptors(e);
521
- for (let c = 0, f = i.length; c < f; c++)
522
- s = i[c], !r[s].get && (l = e[s], (o = U(l, t)) !== l && (e[s] = o));
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 fe(e) {
527
- let t = e[Q];
528
- return t || Object.defineProperty(e, Q, {
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 ne(e, t, n) {
533
- return e[t] || (e[t] = Oe(n, !0));
514
+ function se(e, t, n) {
515
+ return e[t] || (e[t] = ke(n));
534
516
  }
535
- function Je(e, t) {
517
+ function Ye(e, t) {
536
518
  const n = Reflect.getOwnPropertyDescriptor(e, t);
537
- return !n || n.get || !n.configurable || t === z || t === Q || t === Ye || (delete n.value, delete n.writable, n.get = () => e[z][t]), n;
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 ke(e) {
540
- if ($e()) {
541
- const t = fe(e);
542
- (t._ || (t._ = Oe()))();
521
+ function Ae(e) {
522
+ if (we()) {
523
+ const t = Z(e);
524
+ (t._ || (t._ = ke()))();
543
525
  }
544
526
  }
545
- function Qe(e) {
546
- return ke(e), Reflect.ownKeys(e);
527
+ function Je(e) {
528
+ return Ae(e), Reflect.ownKeys(e);
547
529
  }
548
- function Oe(e, t) {
549
- const [n, o] = F(e, t ? {
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 n.$ = o, n;
535
+ return t.$ = n, t;
556
536
  }
557
- const Ze = {
537
+ const Qe = {
558
538
  get(e, t, n) {
559
- if (t === Ae)
539
+ if (t === oe)
560
540
  return e;
561
- if (t === z)
541
+ if (t === T)
562
542
  return n;
563
- if (t === He)
564
- return ke(e);
565
- const o = fe(e), l = o[t];
566
- let s = l ? o[t]() : e[t];
567
- if (t === Q || t === "__proto__")
568
- return s;
569
- if (!l) {
570
- const i = Object.getOwnPropertyDescriptor(e, t);
571
- $e() && (typeof s != "function" || e.hasOwnProperty(t)) && !(i && i.get) && (s = ne(o, t, s)());
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 Z(s) ? Ne(s) : s;
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: Qe,
582
- getOwnPropertyDescriptor: Je
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 o = e[t], l = e.length;
573
+ const s = e[t], l = e.length;
588
574
  n === void 0 ? delete e[t] : e[t] = n;
589
- let s = fe(e), i;
590
- (i = ne(s, t, o)) && i.$(() => n), Array.isArray(e) && e.length !== l && (i = ne(s, "length", l)) && i.$(e.length), (i = s._) && 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 Ce(e, t) {
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 l = n[o];
596
- ee(e, l, t[l]);
581
+ const s = n[o];
582
+ ee(e, s, t[s]);
597
583
  }
598
584
  }
599
- function et(e, t) {
600
- if (typeof t == "function" && (t = t(e)), t = U(t), Array.isArray(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 l = t[n];
606
- e[n] !== l && ee(e, n, l);
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
- Ce(e, t);
596
+ Ne(e, t);
611
597
  }
612
- function D(e, t, n = []) {
613
- let o, l = e;
598
+ function B(e, t, n = []) {
599
+ let o, s = e;
614
600
  if (t.length > 1) {
615
601
  o = t.shift();
616
- const i = typeof o, r = Array.isArray(e);
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
- D(e, [o[c]].concat(t), n);
605
+ B(e, [o[c]].concat(t), n);
620
606
  return;
621
- } else if (r && i === "function") {
607
+ } else if (i && r === "function") {
622
608
  for (let c = 0; c < e.length; c++)
623
- o(e[c], c) && D(e, [c].concat(t), n);
609
+ o(e[c], c) && B(e, [c].concat(t), n);
624
610
  return;
625
- } else if (r && i === "object") {
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
- D(e, [h].concat(t), n);
618
+ B(e, [h].concat(t), n);
633
619
  return;
634
620
  } else if (t.length > 1) {
635
- D(e[o], t, [o].concat(n));
621
+ B(e[o], t, [o].concat(n));
636
622
  return;
637
623
  }
638
- l = e[o], n = [o].concat(n);
624
+ s = e[o], n = [o].concat(n);
639
625
  }
640
- let s = t[0];
641
- typeof s == "function" && (s = s(l, n), s === l) || o === void 0 && s == null || (s = U(s), o === void 0 || Z(l) && Z(s) && !Array.isArray(s) ? Ce(l, s) : ee(e, o, s));
642
- }
643
- function tt(...[e, t]) {
644
- const n = U(e || {}), o = Array.isArray(n), l = Ne(n);
645
- function s(...i) {
646
- ye(() => {
647
- o && i.length === 1 ? et(n, i[0]) : D(n, i);
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 [l, s];
636
+ return [s, l];
651
637
  }
652
- const [p, L] = tt({ working: !1, selectedElement: null }), nt = /* @__PURE__ */ N('<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>'), ot = /* @__PURE__ */ N('<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>'), oe = () => nt.cloneNode(!0), lt = () => (() => {
653
- const e = ot.cloneNode(!0);
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__ */ N('<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>'), it = /* @__PURE__ */ N('<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>'), rt = /* @__PURE__ */ N('<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>'), ct = /* @__PURE__ */ N('<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>'), ut = () => {
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, l, s, i;
659
- const r = 2;
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: A,
667
- right: T,
668
- bottom: M,
652
+ top: S,
653
+ right: L,
654
+ bottom: D,
669
655
  left: d
670
656
  } = u.getBoundingClientRect();
671
- i == null || i.setAttribute("style", `
672
- width: ${g + r * 2}px;
673
- height: ${w + r * 2}px;
674
- top: ${A - r}px;
675
- left: ${d - r}px;
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: ${A}px;
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: ${A}px;
668
+ top: ${S}px;
683
669
  right: 0;
684
670
  bottom: 0;
685
- left: ${T}px;
686
- `), l == null || l.setAttribute("style", `
671
+ left: ${L}px;
672
+ `), s == null || s.setAttribute("style", `
687
673
  width: ${g + d}px;
688
- top: ${M}px;
674
+ top: ${D}px;
689
675
  bottom: 0;
690
676
  left: 0;
691
- `), s == null || s.setAttribute("style", `
677
+ `), l == null || l.setAttribute("style", `
692
678
  width: ${d}px;
693
679
  height: ${w}px;
694
- top: ${A}px;
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: A,
705
- left: T
690
+ top: S,
691
+ left: L
706
692
  } = u.getBoundingClientRect();
707
- L({
693
+ H({
708
694
  selectedElement: u
709
- }), i == null || i.setAttribute("style", `
710
- width: ${g + r * 2}px;
711
- height: ${w + r * 2}px;
712
- top: ${A - r}px;
713
- left: ${T - r}px;
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
- L({
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 _(u) {
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 C() {
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 k() {
746
- t(null), v(), q(), L({
731
+ function O() {
732
+ t(null), v(), q(), H({
747
733
  working: !1,
748
734
  selectedElement: null
749
735
  });
750
736
  }
751
- function K() {
752
- L({
737
+ function I() {
738
+ H({
753
739
  working: !0,
754
740
  selectedElement: null
755
741
  }), t(null), h();
756
742
  }
757
- return we(() => {
758
- p.working ? (h(), C()) : (v(), q());
759
- }), Me(k), (() => {
760
- const u = ct.cloneNode(!0), g = u.firstChild, w = g.nextSibling, A = w.nextSibling, T = A.nextSibling, M = T.nextSibling;
761
- return m(u, x(V, {
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), Te = d.firstChild, Pe = Te.firstChild, ae = Pe.nextSibling;
767
- return ae.$$click = k, m(ae, x(oe, {})), d;
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
- })(T), ((d) => {
778
- i = d;
779
- })(M), m(M, x(V, {
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 = it.cloneNode(!0);
786
- return d.$$click = k, m(d, x(oe, {})), d;
771
+ const d = lt.cloneNode(!0);
772
+ return d.$$click = O, m(d, x(le, {})), d;
787
773
  })(), (() => {
788
- const d = rt.cloneNode(!0);
789
- return d.$$click = K, d.style.setProperty("transform", "translate(4px, -8px)"), d;
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(() => M.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;
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
- Se(["click"]);
796
- const ft = /* @__PURE__ */ N('<button class="main-btn" data-ohbug-selector type="button"></button>'), at = /* @__PURE__ */ N('<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>'), dt = /* @__PURE__ */ N('<div class="z-max relative" data-ohbug-selector><div></div></div>'), ht = () => {
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 l() {
799
- L({
784
+ function s() {
785
+ H({
800
786
  working: !0
801
787
  });
802
788
  }
803
- const [s, i] = F(!1);
804
- async function r() {
805
- i(!0);
789
+ const [l, r] = F(!1);
790
+ async function i() {
791
+ r(!0);
806
792
  let c, f;
807
- const a = Ke().client;
793
+ const a = Ie().client;
808
794
  if (p.selectedElement) {
809
795
  const h = {
810
796
  target: p.selectedElement
811
797
  };
812
- c = Xe(h), f = p.selectedElement.outerHTML;
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(""), L({
819
+ t(!1), o(""), H({
834
820
  working: !1,
835
821
  selectedElement: null
836
- }), i(!1);
822
+ }), r(!1);
837
823
  }
838
- return we(() => {
824
+ return pe(() => {
839
825
  p.working === !1 && p.selectedElement === null || p.working && !p.selectedElement ? t(!1) : t(!0);
840
826
  }), (() => {
841
- const c = dt.cloneNode(!0), f = c.firstChild;
842
- return m(c, x(V, {
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(ut, {});
833
+ return x(ct, {});
848
834
  }
849
- }), f), m(f, x(V, {
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 = ft.cloneNode(!0);
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(V, {
843
+ }), null), m(f, x(R, {
858
844
  get when() {
859
845
  return e();
860
846
  },
861
847
  get children() {
862
- const a = at.cloneNode(!0), h = a.firstChild, v = h.firstChild, _ = v.nextSibling, C = h.nextSibling, q = C.firstChild, k = q.nextSibling, K = C.nextSibling;
863
- return v.$$input = (u) => o(u.currentTarget.value), _.$$click = l, m(_, x(lt, {})), k.$$click = r, m(k, () => s() ? "Sending..." : "Send"), K.$$click = () => t((u) => !u), m(K, x(oe, {})), j((u) => {
864
- const g = p.selectedElement ? "blue" : "gray", w = !n() || s();
865
- return g !== u._v$ && _.style.setProperty("--color", u._v$ = g), w !== u._v$2 && (k.disabled = u._v$2 = w), u;
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
- Se(["click", "input"]);
875
- const gt = {
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), Ve(() => x(ht, {}), 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
- gt as default
1337
+ ht as default
1352
1338
  };