@annotorious/react 3.7.20 → 3.7.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,13 @@
1
- import { inline as st, offset as rt, flip as ct, shift as lt, computePosition as ft, arrow as ut } from "./annotorious-react.es25.js";
2
- import { createCoords as y, rectToClientRect as J, round as D, max as E, min as V, floor as A } from "./annotorious-react.es24.js";
3
- import { getOverflowAncestors as z, isElement as v, getDocumentElement as R, getWindow as L, getFrameElement as U, getComputedStyle as b, isHTMLElement as C, isTopLayer as $, getParentNode as W, isLastTraversableNode as H, isTableElement as ht, isContainingBlock as Q, getContainingBlock as at, getNodeName as _, isOverflowElement as q, getNodeScroll as I, isWebKit as Y } from "./annotorious-react.es20.js";
1
+ import { computePosition as st, inline as rt, offset as ct, flip as lt, shift as ft, arrow as ut } from "./annotorious-react.es25.js";
2
+ import { createCoords as m, rectToClientRect as J, round as A, max as E, min as V, floor as D } from "./annotorious-react.es24.js";
3
+ import { getOverflowAncestors as z, isElement as v, getDocumentElement as b, getWindow as O, getFrameElement as U, getComputedStyle as R, isHTMLElement as T, isTopLayer as $, getParentNode as W, isLastTraversableNode as H, isTableElement as at, isContainingBlock as Q, getContainingBlock as ht, getNodeName as _, isOverflowElement as q, getNodeScroll as I, isWebKit as Y } from "./annotorious-react.es20.js";
4
4
  function Z(t) {
5
- const e = b(t);
6
- let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
7
- const i = C(t), r = i ? t.offsetWidth : o, s = i ? t.offsetHeight : n, c = D(o) !== r || D(n) !== s;
8
- return c && (o = r, n = s), {
9
- width: o,
10
- height: n,
5
+ const e = R(t);
6
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
7
+ const i = T(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = A(n) !== r || A(o) !== s;
8
+ return c && (n = r, o = s), {
9
+ width: n,
10
+ height: o,
11
11
  $: c
12
12
  };
13
13
  }
@@ -16,98 +16,98 @@ function X(t) {
16
16
  }
17
17
  function F(t) {
18
18
  const e = X(t);
19
- if (!C(e))
20
- return y(1);
21
- const o = e.getBoundingClientRect(), {
22
- width: n,
19
+ if (!T(e))
20
+ return m(1);
21
+ const n = e.getBoundingClientRect(), {
22
+ width: o,
23
23
  height: i,
24
24
  $: r
25
25
  } = Z(e);
26
- let s = (r ? D(o.width) : o.width) / n, c = (r ? D(o.height) : o.height) / i;
26
+ let s = (r ? A(n.width) : n.width) / o, c = (r ? A(n.height) : n.height) / i;
27
27
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
28
28
  x: s,
29
29
  y: c
30
30
  };
31
31
  }
32
- const dt = /* @__PURE__ */ y(0);
32
+ const dt = /* @__PURE__ */ m(0);
33
33
  function tt(t) {
34
- const e = L(t);
34
+ const e = O(t);
35
35
  return !Y() || !e.visualViewport ? dt : {
36
36
  x: e.visualViewport.offsetLeft,
37
37
  y: e.visualViewport.offsetTop
38
38
  };
39
39
  }
40
- function gt(t, e, o) {
41
- return e === void 0 && (e = !1), !o || e && o !== L(t) ? !1 : e;
40
+ function gt(t, e, n) {
41
+ return e === void 0 && (e = !1), !n || e && n !== O(t) ? !1 : e;
42
42
  }
43
- function T(t, e, o, n) {
44
- e === void 0 && (e = !1), o === void 0 && (o = !1);
43
+ function L(t, e, n, o) {
44
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
45
45
  const i = t.getBoundingClientRect(), r = X(t);
46
- let s = y(1);
47
- e && (n ? v(n) && (s = F(n)) : s = F(t));
48
- const c = gt(r, o, n) ? tt(r) : y(0);
49
- let f = (i.left + c.x) / s.x, l = (i.top + c.y) / s.y, u = i.width / s.x, h = i.height / s.y;
46
+ let s = m(1);
47
+ e && (o ? v(o) && (s = F(o)) : s = F(t));
48
+ const c = gt(r, n, o) ? tt(r) : m(0);
49
+ let l = (i.left + c.x) / s.x, f = (i.top + c.y) / s.y, u = i.width / s.x, h = i.height / s.y;
50
50
  if (r) {
51
- const d = L(r), a = n && v(n) ? L(n) : n;
51
+ const d = O(r), a = o && v(o) ? O(o) : o;
52
52
  let w = d, p = U(w);
53
- for (; p && n && a !== w; ) {
54
- const m = F(p), g = p.getBoundingClientRect(), x = b(p), O = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * m.x, S = g.top + (p.clientTop + parseFloat(x.paddingTop)) * m.y;
55
- f *= m.x, l *= m.y, u *= m.x, h *= m.y, f += O, l += S, w = L(p), p = U(w);
53
+ for (; p && o && a !== w; ) {
54
+ const y = F(p), g = p.getBoundingClientRect(), x = R(p), C = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * y.x, S = g.top + (p.clientTop + parseFloat(x.paddingTop)) * y.y;
55
+ l *= y.x, f *= y.y, u *= y.x, h *= y.y, l += C, f += S, w = O(p), p = U(w);
56
56
  }
57
57
  }
58
58
  return J({
59
59
  width: u,
60
60
  height: h,
61
- x: f,
62
- y: l
61
+ x: l,
62
+ y: f
63
63
  });
64
64
  }
65
65
  function M(t, e) {
66
- const o = I(t).scrollLeft;
67
- return e ? e.left + o : T(R(t)).left + o;
66
+ const n = I(t).scrollLeft;
67
+ return e ? e.left + n : L(b(t)).left + n;
68
68
  }
69
69
  function et(t, e) {
70
- const o = t.getBoundingClientRect(), n = o.left + e.scrollLeft - M(t, o), i = o.top + e.scrollTop;
70
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - M(t, n), i = n.top + e.scrollTop;
71
71
  return {
72
- x: n,
72
+ x: o,
73
73
  y: i
74
74
  };
75
75
  }
76
76
  function pt(t) {
77
77
  let {
78
78
  elements: e,
79
- rect: o,
80
- offsetParent: n,
79
+ rect: n,
80
+ offsetParent: o,
81
81
  strategy: i
82
82
  } = t;
83
- const r = i === "fixed", s = R(n), c = e ? $(e.floating) : !1;
84
- if (n === s || c && r)
85
- return o;
86
- let f = {
83
+ const r = i === "fixed", s = b(o), c = e ? $(e.floating) : !1;
84
+ if (o === s || c && r)
85
+ return n;
86
+ let l = {
87
87
  scrollLeft: 0,
88
88
  scrollTop: 0
89
- }, l = y(1);
90
- const u = y(0), h = C(n);
91
- if ((h || !h && !r) && ((_(n) !== "body" || q(s)) && (f = I(n)), C(n))) {
92
- const a = T(n);
93
- l = F(n), u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
89
+ }, f = m(1);
90
+ const u = m(0), h = T(o);
91
+ if ((h || !h && !r) && ((_(o) !== "body" || q(s)) && (l = I(o)), h)) {
92
+ const a = L(o);
93
+ f = F(o), u.x = a.x + o.clientLeft, u.y = a.y + o.clientTop;
94
94
  }
95
- const d = s && !h && !r ? et(s, f) : y(0);
95
+ const d = s && !h && !r ? et(s, l) : m(0);
96
96
  return {
97
- width: o.width * l.x,
98
- height: o.height * l.y,
99
- x: o.x * l.x - f.scrollLeft * l.x + u.x + d.x,
100
- y: o.y * l.y - f.scrollTop * l.y + u.y + d.y
97
+ width: n.width * f.x,
98
+ height: n.height * f.y,
99
+ x: n.x * f.x - l.scrollLeft * f.x + u.x + d.x,
100
+ y: n.y * f.y - l.scrollTop * f.y + u.y + d.y
101
101
  };
102
102
  }
103
103
  function wt(t) {
104
104
  return Array.from(t.getClientRects());
105
105
  }
106
- function mt(t) {
107
- const e = R(t), o = I(t), n = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = E(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
108
- let s = -o.scrollLeft + M(t);
109
- const c = -o.scrollTop;
110
- return b(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - i), {
106
+ function yt(t) {
107
+ const e = b(t), n = I(t), o = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = E(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
108
+ let s = -n.scrollLeft + M(t);
109
+ const c = -n.scrollTop;
110
+ return R(o).direction === "rtl" && (s += E(e.clientWidth, o.clientWidth) - i), {
111
111
  width: i,
112
112
  height: r,
113
113
  x: s,
@@ -115,117 +115,118 @@ function mt(t) {
115
115
  };
116
116
  }
117
117
  const K = 25;
118
- function yt(t, e) {
119
- const o = L(t), n = R(t), i = o.visualViewport;
120
- let r = n.clientWidth, s = n.clientHeight, c = 0, f = 0;
118
+ function mt(t, e) {
119
+ const n = O(t), o = b(t), i = n.visualViewport;
120
+ let r = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
121
121
  if (i) {
122
122
  r = i.width, s = i.height;
123
123
  const u = Y();
124
- (!u || u && e === "fixed") && (c = i.offsetLeft, f = i.offsetTop);
124
+ (!u || u && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
125
125
  }
126
- const l = M(n);
127
- if (l <= 0) {
128
- const u = n.ownerDocument, h = u.body, d = getComputedStyle(h), a = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, w = Math.abs(n.clientWidth - h.clientWidth - a);
126
+ const f = M(o);
127
+ if (f <= 0) {
128
+ const u = o.ownerDocument, h = u.body, d = getComputedStyle(h), a = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, w = Math.abs(o.clientWidth - h.clientWidth - a);
129
129
  w <= K && (r -= w);
130
- } else l <= K && (r += l);
130
+ } else f <= K && (r += f);
131
131
  return {
132
132
  width: r,
133
133
  height: s,
134
134
  x: c,
135
- y: f
135
+ y: l
136
136
  };
137
137
  }
138
- const xt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
139
- function vt(t, e) {
140
- const o = T(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = C(t) ? F(t) : y(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = i * r.x, l = n * r.y;
138
+ function xt(t, e) {
139
+ const n = L(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = T(t) ? F(t) : m(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = i * r.x, f = o * r.y;
141
140
  return {
142
141
  width: s,
143
142
  height: c,
144
- x: f,
145
- y: l
143
+ x: l,
144
+ y: f
146
145
  };
147
146
  }
148
- function j(t, e, o) {
149
- let n;
147
+ function j(t, e, n) {
148
+ let o;
150
149
  if (e === "viewport")
151
- n = yt(t, o);
150
+ o = mt(t, n);
152
151
  else if (e === "document")
153
- n = mt(R(t));
152
+ o = yt(b(t));
154
153
  else if (v(e))
155
- n = vt(e, o);
154
+ o = xt(e, n);
156
155
  else {
157
156
  const i = tt(t);
158
- n = {
157
+ o = {
159
158
  x: e.x - i.x,
160
159
  y: e.y - i.y,
161
160
  width: e.width,
162
161
  height: e.height
163
162
  };
164
163
  }
165
- return J(n);
164
+ return J(o);
166
165
  }
167
166
  function nt(t, e) {
168
- const o = W(t);
169
- return o === e || !v(o) || H(o) ? !1 : b(o).position === "fixed" || nt(o, e);
167
+ const n = W(t);
168
+ return n === e || !v(n) || H(n) ? !1 : R(n).position === "fixed" || nt(n, e);
170
169
  }
171
- function bt(t, e) {
172
- const o = e.get(t);
173
- if (o)
174
- return o;
175
- let n = z(t, [], !1).filter((c) => v(c) && _(c) !== "body"), i = null;
176
- const r = b(t).position === "fixed";
170
+ function vt(t, e) {
171
+ const n = e.get(t);
172
+ if (n)
173
+ return n;
174
+ let o = z(t, [], !1).filter((c) => v(c) && _(c) !== "body"), i = null;
175
+ const r = R(t).position === "fixed";
177
176
  let s = r ? W(t) : t;
178
177
  for (; v(s) && !H(s); ) {
179
- const c = b(s), f = Q(s);
180
- !f && c.position === "fixed" && (i = null), (r ? !f && !i : !f && c.position === "static" && !!i && xt.has(i.position) || q(s) && !f && nt(t, s)) ? n = n.filter((u) => u !== s) : i = c, s = W(s);
178
+ const c = R(s), l = Q(s);
179
+ !l && c.position === "fixed" && (i = null), (r ? !l && !i : !l && c.position === "static" && !!i && (i.position === "absolute" || i.position === "fixed") || q(s) && !l && nt(t, s)) ? o = o.filter((u) => u !== s) : i = c, s = W(s);
181
180
  }
182
- return e.set(t, n), n;
181
+ return e.set(t, o), o;
183
182
  }
184
183
  function Rt(t) {
185
184
  let {
186
185
  element: e,
187
- boundary: o,
188
- rootBoundary: n,
186
+ boundary: n,
187
+ rootBoundary: o,
189
188
  strategy: i
190
189
  } = t;
191
- const s = [...o === "clippingAncestors" ? $(e) ? [] : bt(e, this._c) : [].concat(o), n], c = s[0], f = s.reduce((l, u) => {
192
- const h = j(e, u, i);
193
- return l.top = E(h.top, l.top), l.right = V(h.right, l.right), l.bottom = V(h.bottom, l.bottom), l.left = E(h.left, l.left), l;
194
- }, j(e, c, i));
190
+ const s = [...n === "clippingAncestors" ? $(e) ? [] : vt(e, this._c) : [].concat(n), o], c = j(e, s[0], i);
191
+ let l = c.top, f = c.right, u = c.bottom, h = c.left;
192
+ for (let d = 1; d < s.length; d++) {
193
+ const a = j(e, s[d], i);
194
+ l = E(a.top, l), f = V(a.right, f), u = V(a.bottom, u), h = E(a.left, h);
195
+ }
195
196
  return {
196
- width: f.right - f.left,
197
- height: f.bottom - f.top,
198
- x: f.left,
199
- y: f.top
197
+ width: f - h,
198
+ height: u - l,
199
+ x: h,
200
+ y: l
200
201
  };
201
202
  }
202
- function Ct(t) {
203
+ function bt(t) {
203
204
  const {
204
205
  width: e,
205
- height: o
206
+ height: n
206
207
  } = Z(t);
207
208
  return {
208
209
  width: e,
209
- height: o
210
+ height: n
210
211
  };
211
212
  }
212
- function Ot(t, e, o) {
213
- const n = C(e), i = R(e), r = o === "fixed", s = T(t, !0, r, e);
213
+ function Ct(t, e, n) {
214
+ const o = T(e), i = b(e), r = n === "fixed", s = L(t, !0, r, e);
214
215
  let c = {
215
216
  scrollLeft: 0,
216
217
  scrollTop: 0
217
218
  };
218
- const f = y(0);
219
- function l() {
220
- f.x = M(i);
219
+ const l = m(0);
220
+ function f() {
221
+ l.x = M(i);
221
222
  }
222
- if (n || !n && !r)
223
- if ((_(e) !== "body" || q(i)) && (c = I(e)), n) {
224
- const a = T(e, !0, r, e);
225
- f.x = a.x + e.clientLeft, f.y = a.y + e.clientTop;
226
- } else i && l();
227
- r && !n && i && l();
228
- const u = i && !n && !r ? et(i, c) : y(0), h = s.left + c.scrollLeft - f.x - u.x, d = s.top + c.scrollTop - f.y - u.y;
223
+ if (o || !o && !r)
224
+ if ((_(e) !== "body" || q(i)) && (c = I(e)), o) {
225
+ const a = L(e, !0, r, e);
226
+ l.x = a.x + e.clientLeft, l.y = a.y + e.clientTop;
227
+ } else i && f();
228
+ r && !o && i && f();
229
+ const u = i && !o && !r ? et(i, c) : m(0), h = s.left + c.scrollLeft - l.x - u.x, d = s.top + c.scrollTop - l.y - u.y;
229
230
  return {
230
231
  x: h,
231
232
  y: d,
@@ -234,168 +235,168 @@ function Ot(t, e, o) {
234
235
  };
235
236
  }
236
237
  function N(t) {
237
- return b(t).position === "static";
238
+ return R(t).position === "static";
238
239
  }
239
240
  function G(t, e) {
240
- if (!C(t) || b(t).position === "fixed")
241
+ if (!T(t) || R(t).position === "fixed")
241
242
  return null;
242
243
  if (e)
243
244
  return e(t);
244
- let o = t.offsetParent;
245
- return R(t) === o && (o = o.ownerDocument.body), o;
245
+ let n = t.offsetParent;
246
+ return b(t) === n && (n = n.ownerDocument.body), n;
246
247
  }
247
248
  function ot(t, e) {
248
- const o = L(t);
249
+ const n = O(t);
249
250
  if ($(t))
250
- return o;
251
- if (!C(t)) {
251
+ return n;
252
+ if (!T(t)) {
252
253
  let i = W(t);
253
254
  for (; i && !H(i); ) {
254
255
  if (v(i) && !N(i))
255
256
  return i;
256
257
  i = W(i);
257
258
  }
258
- return o;
259
+ return n;
259
260
  }
260
- let n = G(t, e);
261
- for (; n && ht(n) && N(n); )
262
- n = G(n, e);
263
- return n && H(n) && N(n) && !Q(n) ? o : n || at(t) || o;
261
+ let o = G(t, e);
262
+ for (; o && at(o) && N(o); )
263
+ o = G(o, e);
264
+ return o && H(o) && N(o) && !Q(o) ? n : o || ht(t) || n;
264
265
  }
265
- const Lt = async function(t) {
266
- const e = this.getOffsetParent || ot, o = this.getDimensions, n = await o(t.floating);
266
+ const Ot = async function(t) {
267
+ const e = this.getOffsetParent || ot, n = this.getDimensions, o = await n(t.floating);
267
268
  return {
268
- reference: Ot(t.reference, await e(t.floating), t.strategy),
269
+ reference: Ct(t.reference, await e(t.floating), t.strategy),
269
270
  floating: {
270
271
  x: 0,
271
272
  y: 0,
272
- width: n.width,
273
- height: n.height
273
+ width: o.width,
274
+ height: o.height
274
275
  }
275
276
  };
276
277
  };
277
- function Tt(t) {
278
- return b(t).direction === "rtl";
278
+ function Lt(t) {
279
+ return R(t).direction === "rtl";
279
280
  }
280
- const Et = {
281
+ const Tt = {
281
282
  convertOffsetParentRelativeRectToViewportRelativeRect: pt,
282
- getDocumentElement: R,
283
+ getDocumentElement: b,
283
284
  getClippingRect: Rt,
284
285
  getOffsetParent: ot,
285
- getElementRects: Lt,
286
+ getElementRects: Ot,
286
287
  getClientRects: wt,
287
- getDimensions: Ct,
288
+ getDimensions: bt,
288
289
  getScale: F,
289
290
  isElement: v,
290
- isRTL: Tt
291
+ isRTL: Lt
291
292
  };
292
293
  function it(t, e) {
293
294
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
294
295
  }
295
- function Ft(t, e) {
296
- let o = null, n;
297
- const i = R(t);
296
+ function Et(t, e) {
297
+ let n = null, o;
298
+ const i = b(t);
298
299
  function r() {
299
300
  var c;
300
- clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
301
+ clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
301
302
  }
302
- function s(c, f) {
303
- c === void 0 && (c = !1), f === void 0 && (f = 1), r();
304
- const l = t.getBoundingClientRect(), {
303
+ function s(c, l) {
304
+ c === void 0 && (c = !1), l === void 0 && (l = 1), r();
305
+ const f = t.getBoundingClientRect(), {
305
306
  left: u,
306
307
  top: h,
307
308
  width: d,
308
309
  height: a
309
- } = l;
310
+ } = f;
310
311
  if (c || e(), !d || !a)
311
312
  return;
312
- const w = A(h), p = A(i.clientWidth - (u + d)), m = A(i.clientHeight - (h + a)), g = A(u), O = {
313
- rootMargin: -w + "px " + -p + "px " + -m + "px " + -g + "px",
314
- threshold: E(0, V(1, f)) || 1
313
+ const w = D(h), p = D(i.clientWidth - (u + d)), y = D(i.clientHeight - (h + a)), g = D(u), C = {
314
+ rootMargin: -w + "px " + -p + "px " + -y + "px " + -g + "px",
315
+ threshold: E(0, V(1, l)) || 1
315
316
  };
316
317
  let S = !0;
317
318
  function k(P) {
318
319
  const B = P[0].intersectionRatio;
319
- if (B !== f) {
320
+ if (B !== l) {
320
321
  if (!S)
321
322
  return s();
322
- B ? s(!1, B) : n = setTimeout(() => {
323
+ B ? s(!1, B) : o = setTimeout(() => {
323
324
  s(!1, 1e-7);
324
325
  }, 1e3);
325
326
  }
326
- B === 1 && !it(l, t.getBoundingClientRect()) && s(), S = !1;
327
+ B === 1 && !it(f, t.getBoundingClientRect()) && s(), S = !1;
327
328
  }
328
329
  try {
329
- o = new IntersectionObserver(k, {
330
- ...O,
330
+ n = new IntersectionObserver(k, {
331
+ ...C,
331
332
  // Handle <iframe>s
332
333
  root: i.ownerDocument
333
334
  });
334
335
  } catch {
335
- o = new IntersectionObserver(k, O);
336
+ n = new IntersectionObserver(k, C);
336
337
  }
337
- o.observe(t);
338
+ n.observe(t);
338
339
  }
339
340
  return s(!0), r;
340
341
  }
341
- function At(t, e, o, n) {
342
- n === void 0 && (n = {});
342
+ function Bt(t, e, n, o) {
343
+ o === void 0 && (o = {});
343
344
  const {
344
345
  ancestorScroll: i = !0,
345
346
  ancestorResize: r = !0,
346
347
  elementResize: s = typeof ResizeObserver == "function",
347
348
  layoutShift: c = typeof IntersectionObserver == "function",
348
- animationFrame: f = !1
349
- } = n, l = X(t), u = i || r ? [...l ? z(l) : [], ...z(e)] : [];
349
+ animationFrame: l = !1
350
+ } = o, f = X(t), u = i || r ? [...f ? z(f) : [], ...e ? z(e) : []] : [];
350
351
  u.forEach((g) => {
351
- i && g.addEventListener("scroll", o, {
352
+ i && g.addEventListener("scroll", n, {
352
353
  passive: !0
353
- }), r && g.addEventListener("resize", o);
354
+ }), r && g.addEventListener("resize", n);
354
355
  });
355
- const h = l && c ? Ft(l, o) : null;
356
+ const h = f && c ? Et(f, n) : null;
356
357
  let d = -1, a = null;
357
358
  s && (a = new ResizeObserver((g) => {
358
359
  let [x] = g;
359
- x && x.target === l && a && (a.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
360
- var O;
361
- (O = a) == null || O.observe(e);
362
- })), o();
363
- }), l && !f && a.observe(l), a.observe(e));
364
- let w, p = f ? T(t) : null;
365
- f && m();
366
- function m() {
367
- const g = T(t);
368
- p && !it(p, g) && o(), p = g, w = requestAnimationFrame(m);
360
+ x && x.target === f && a && e && (a.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
361
+ var C;
362
+ (C = a) == null || C.observe(e);
363
+ })), n();
364
+ }), f && !l && a.observe(f), e && a.observe(e));
365
+ let w, p = l ? L(t) : null;
366
+ l && y();
367
+ function y() {
368
+ const g = L(t);
369
+ p && !it(p, g) && n(), p = g, w = requestAnimationFrame(y);
369
370
  }
370
- return o(), () => {
371
+ return n(), () => {
371
372
  var g;
372
373
  u.forEach((x) => {
373
- i && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
374
- }), h == null || h(), (g = a) == null || g.disconnect(), a = null, f && cancelAnimationFrame(w);
374
+ i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
375
+ }), h == null || h(), (g = a) == null || g.disconnect(), a = null, l && cancelAnimationFrame(w);
375
376
  };
376
377
  }
377
- const Dt = rt, Ht = lt, It = ct, Mt = ut, Nt = st, Vt = (t, e, o) => {
378
- const n = /* @__PURE__ */ new Map(), i = {
379
- platform: Et,
380
- ...o
378
+ const Dt = ct, At = ft, Ht = lt, It = ut, Mt = rt, Nt = (t, e, n) => {
379
+ const o = /* @__PURE__ */ new Map(), i = {
380
+ platform: Tt,
381
+ ...n
381
382
  }, r = {
382
383
  ...i.platform,
383
- _c: n
384
+ _c: o
384
385
  };
385
- return ft(t, e, {
386
+ return st(t, e, {
386
387
  ...i,
387
388
  platform: r
388
389
  });
389
390
  };
390
391
  export {
391
- Mt as arrow,
392
- At as autoUpdate,
393
- Vt as computePosition,
394
- It as flip,
392
+ It as arrow,
393
+ Bt as autoUpdate,
394
+ Nt as computePosition,
395
+ Ht as flip,
395
396
  z as getOverflowAncestors,
396
- Nt as inline,
397
+ Mt as inline,
397
398
  Dt as offset,
398
- Et as platform,
399
- Ht as shift
399
+ Tt as platform,
400
+ At as shift
400
401
  };
401
402
  //# sourceMappingURL=annotorious-react.es16.js.map