@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.
- package/dist/annotorious-react.es11.js.map +1 -1
- package/dist/annotorious-react.es14.js.map +1 -1
- package/dist/annotorious-react.es16.js +188 -187
- package/dist/annotorious-react.es16.js.map +1 -1
- package/dist/annotorious-react.es17.js +113 -93
- package/dist/annotorious-react.es17.js.map +1 -1
- package/dist/annotorious-react.es20.js +97 -97
- package/dist/annotorious-react.es20.js.map +1 -1
- package/dist/annotorious-react.es24.js +66 -68
- package/dist/annotorious-react.es24.js.map +1 -1
- package/dist/annotorious-react.es25.js +214 -214
- package/dist/annotorious-react.es25.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { createCoords as
|
|
3
|
-
import { getOverflowAncestors as z, isElement as v, getDocumentElement as
|
|
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 =
|
|
6
|
-
let
|
|
7
|
-
const i =
|
|
8
|
-
return c && (
|
|
9
|
-
width:
|
|
10
|
-
height:
|
|
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 (!
|
|
20
|
-
return
|
|
21
|
-
const
|
|
22
|
-
width:
|
|
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 ?
|
|
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__ */
|
|
32
|
+
const dt = /* @__PURE__ */ m(0);
|
|
33
33
|
function tt(t) {
|
|
34
|
-
const e =
|
|
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,
|
|
41
|
-
return e === void 0 && (e = !1), !
|
|
40
|
+
function gt(t, e, n) {
|
|
41
|
+
return e === void 0 && (e = !1), !n || e && n !== O(t) ? !1 : e;
|
|
42
42
|
}
|
|
43
|
-
function
|
|
44
|
-
e === void 0 && (e = !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 =
|
|
47
|
-
e && (
|
|
48
|
-
const c = gt(r,
|
|
49
|
-
let
|
|
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 =
|
|
51
|
+
const d = O(r), a = o && v(o) ? O(o) : o;
|
|
52
52
|
let w = d, p = U(w);
|
|
53
|
-
for (; p &&
|
|
54
|
-
const
|
|
55
|
-
|
|
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:
|
|
62
|
-
y:
|
|
61
|
+
x: l,
|
|
62
|
+
y: f
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
function M(t, e) {
|
|
66
|
-
const
|
|
67
|
-
return e ? e.left +
|
|
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
|
|
70
|
+
const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - M(t, n), i = n.top + e.scrollTop;
|
|
71
71
|
return {
|
|
72
|
-
x:
|
|
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:
|
|
80
|
-
offsetParent:
|
|
79
|
+
rect: n,
|
|
80
|
+
offsetParent: o,
|
|
81
81
|
strategy: i
|
|
82
82
|
} = t;
|
|
83
|
-
const r = i === "fixed", s =
|
|
84
|
-
if (
|
|
85
|
-
return
|
|
86
|
-
let
|
|
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
|
-
},
|
|
90
|
-
const u =
|
|
91
|
-
if ((h || !h && !r) && ((_(
|
|
92
|
-
const a =
|
|
93
|
-
|
|
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,
|
|
95
|
+
const d = s && !h && !r ? et(s, l) : m(0);
|
|
96
96
|
return {
|
|
97
|
-
width:
|
|
98
|
-
height:
|
|
99
|
-
x:
|
|
100
|
-
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
|
|
107
|
-
const e =
|
|
108
|
-
let s = -
|
|
109
|
-
const c = -
|
|
110
|
-
return
|
|
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
|
|
119
|
-
const
|
|
120
|
-
let r =
|
|
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,
|
|
124
|
+
(!u || u && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
|
|
125
125
|
}
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
const u =
|
|
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
|
|
130
|
+
} else f <= K && (r += f);
|
|
131
131
|
return {
|
|
132
132
|
width: r,
|
|
133
133
|
height: s,
|
|
134
134
|
x: c,
|
|
135
|
-
y:
|
|
135
|
+
y: l
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
|
|
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:
|
|
145
|
-
y:
|
|
143
|
+
x: l,
|
|
144
|
+
y: f
|
|
146
145
|
};
|
|
147
146
|
}
|
|
148
|
-
function j(t, e,
|
|
149
|
-
let
|
|
147
|
+
function j(t, e, n) {
|
|
148
|
+
let o;
|
|
150
149
|
if (e === "viewport")
|
|
151
|
-
|
|
150
|
+
o = mt(t, n);
|
|
152
151
|
else if (e === "document")
|
|
153
|
-
|
|
152
|
+
o = yt(b(t));
|
|
154
153
|
else if (v(e))
|
|
155
|
-
|
|
154
|
+
o = xt(e, n);
|
|
156
155
|
else {
|
|
157
156
|
const i = tt(t);
|
|
158
|
-
|
|
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(
|
|
164
|
+
return J(o);
|
|
166
165
|
}
|
|
167
166
|
function nt(t, e) {
|
|
168
|
-
const
|
|
169
|
-
return
|
|
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
|
|
172
|
-
const
|
|
173
|
-
if (
|
|
174
|
-
return
|
|
175
|
-
let
|
|
176
|
-
const r =
|
|
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 =
|
|
180
|
-
!
|
|
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,
|
|
181
|
+
return e.set(t, o), o;
|
|
183
182
|
}
|
|
184
183
|
function Rt(t) {
|
|
185
184
|
let {
|
|
186
185
|
element: e,
|
|
187
|
-
boundary:
|
|
188
|
-
rootBoundary:
|
|
186
|
+
boundary: n,
|
|
187
|
+
rootBoundary: o,
|
|
189
188
|
strategy: i
|
|
190
189
|
} = t;
|
|
191
|
-
const s = [...
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
|
197
|
-
height:
|
|
198
|
-
x:
|
|
199
|
-
y:
|
|
197
|
+
width: f - h,
|
|
198
|
+
height: u - l,
|
|
199
|
+
x: h,
|
|
200
|
+
y: l
|
|
200
201
|
};
|
|
201
202
|
}
|
|
202
|
-
function
|
|
203
|
+
function bt(t) {
|
|
203
204
|
const {
|
|
204
205
|
width: e,
|
|
205
|
-
height:
|
|
206
|
+
height: n
|
|
206
207
|
} = Z(t);
|
|
207
208
|
return {
|
|
208
209
|
width: e,
|
|
209
|
-
height:
|
|
210
|
+
height: n
|
|
210
211
|
};
|
|
211
212
|
}
|
|
212
|
-
function
|
|
213
|
-
const
|
|
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
|
|
219
|
-
function
|
|
220
|
-
|
|
219
|
+
const l = m(0);
|
|
220
|
+
function f() {
|
|
221
|
+
l.x = M(i);
|
|
221
222
|
}
|
|
222
|
-
if (
|
|
223
|
-
if ((_(e) !== "body" || q(i)) && (c = I(e)),
|
|
224
|
-
const a =
|
|
225
|
-
|
|
226
|
-
} else i &&
|
|
227
|
-
r && !
|
|
228
|
-
const u = i && !
|
|
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
|
|
238
|
+
return R(t).position === "static";
|
|
238
239
|
}
|
|
239
240
|
function G(t, e) {
|
|
240
|
-
if (!
|
|
241
|
+
if (!T(t) || R(t).position === "fixed")
|
|
241
242
|
return null;
|
|
242
243
|
if (e)
|
|
243
244
|
return e(t);
|
|
244
|
-
let
|
|
245
|
-
return
|
|
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
|
|
249
|
+
const n = O(t);
|
|
249
250
|
if ($(t))
|
|
250
|
-
return
|
|
251
|
-
if (!
|
|
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
|
|
259
|
+
return n;
|
|
259
260
|
}
|
|
260
|
-
let
|
|
261
|
-
for (;
|
|
262
|
-
|
|
263
|
-
return
|
|
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
|
|
266
|
-
const e = this.getOffsetParent || ot,
|
|
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:
|
|
269
|
+
reference: Ct(t.reference, await e(t.floating), t.strategy),
|
|
269
270
|
floating: {
|
|
270
271
|
x: 0,
|
|
271
272
|
y: 0,
|
|
272
|
-
width:
|
|
273
|
-
height:
|
|
273
|
+
width: o.width,
|
|
274
|
+
height: o.height
|
|
274
275
|
}
|
|
275
276
|
};
|
|
276
277
|
};
|
|
277
|
-
function
|
|
278
|
-
return
|
|
278
|
+
function Lt(t) {
|
|
279
|
+
return R(t).direction === "rtl";
|
|
279
280
|
}
|
|
280
|
-
const
|
|
281
|
+
const Tt = {
|
|
281
282
|
convertOffsetParentRelativeRectToViewportRelativeRect: pt,
|
|
282
|
-
getDocumentElement:
|
|
283
|
+
getDocumentElement: b,
|
|
283
284
|
getClippingRect: Rt,
|
|
284
285
|
getOffsetParent: ot,
|
|
285
|
-
getElementRects:
|
|
286
|
+
getElementRects: Ot,
|
|
286
287
|
getClientRects: wt,
|
|
287
|
-
getDimensions:
|
|
288
|
+
getDimensions: bt,
|
|
288
289
|
getScale: F,
|
|
289
290
|
isElement: v,
|
|
290
|
-
isRTL:
|
|
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
|
|
296
|
-
let
|
|
297
|
-
const i =
|
|
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(
|
|
301
|
+
clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
|
|
301
302
|
}
|
|
302
|
-
function s(c,
|
|
303
|
-
c === void 0 && (c = !1),
|
|
304
|
-
const
|
|
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
|
-
} =
|
|
310
|
+
} = f;
|
|
310
311
|
if (c || e(), !d || !a)
|
|
311
312
|
return;
|
|
312
|
-
const w =
|
|
313
|
-
rootMargin: -w + "px " + -p + "px " + -
|
|
314
|
-
threshold: E(0, V(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 !==
|
|
320
|
+
if (B !== l) {
|
|
320
321
|
if (!S)
|
|
321
322
|
return s();
|
|
322
|
-
B ? s(!1, B) :
|
|
323
|
+
B ? s(!1, B) : o = setTimeout(() => {
|
|
323
324
|
s(!1, 1e-7);
|
|
324
325
|
}, 1e3);
|
|
325
326
|
}
|
|
326
|
-
B === 1 && !it(
|
|
327
|
+
B === 1 && !it(f, t.getBoundingClientRect()) && s(), S = !1;
|
|
327
328
|
}
|
|
328
329
|
try {
|
|
329
|
-
|
|
330
|
-
...
|
|
330
|
+
n = new IntersectionObserver(k, {
|
|
331
|
+
...C,
|
|
331
332
|
// Handle <iframe>s
|
|
332
333
|
root: i.ownerDocument
|
|
333
334
|
});
|
|
334
335
|
} catch {
|
|
335
|
-
|
|
336
|
+
n = new IntersectionObserver(k, C);
|
|
336
337
|
}
|
|
337
|
-
|
|
338
|
+
n.observe(t);
|
|
338
339
|
}
|
|
339
340
|
return s(!0), r;
|
|
340
341
|
}
|
|
341
|
-
function
|
|
342
|
-
|
|
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:
|
|
349
|
-
} =
|
|
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",
|
|
352
|
+
i && g.addEventListener("scroll", n, {
|
|
352
353
|
passive: !0
|
|
353
|
-
}), r && g.addEventListener("resize",
|
|
354
|
+
}), r && g.addEventListener("resize", n);
|
|
354
355
|
});
|
|
355
|
-
const h =
|
|
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 ===
|
|
360
|
-
var
|
|
361
|
-
(
|
|
362
|
-
})),
|
|
363
|
-
}),
|
|
364
|
-
let w, p =
|
|
365
|
-
|
|
366
|
-
function
|
|
367
|
-
const g =
|
|
368
|
-
p && !it(p, g) &&
|
|
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
|
|
371
|
+
return n(), () => {
|
|
371
372
|
var g;
|
|
372
373
|
u.forEach((x) => {
|
|
373
|
-
i && x.removeEventListener("scroll",
|
|
374
|
-
}), h == null || h(), (g = a) == null || g.disconnect(), a = null,
|
|
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 =
|
|
378
|
-
const
|
|
379
|
-
platform:
|
|
380
|
-
...
|
|
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:
|
|
384
|
+
_c: o
|
|
384
385
|
};
|
|
385
|
-
return
|
|
386
|
+
return st(t, e, {
|
|
386
387
|
...i,
|
|
387
388
|
platform: r
|
|
388
389
|
});
|
|
389
390
|
};
|
|
390
391
|
export {
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
392
|
+
It as arrow,
|
|
393
|
+
Bt as autoUpdate,
|
|
394
|
+
Nt as computePosition,
|
|
395
|
+
Ht as flip,
|
|
395
396
|
z as getOverflowAncestors,
|
|
396
|
-
|
|
397
|
+
Mt as inline,
|
|
397
398
|
Dt as offset,
|
|
398
|
-
|
|
399
|
-
|
|
399
|
+
Tt as platform,
|
|
400
|
+
At as shift
|
|
400
401
|
};
|
|
401
402
|
//# sourceMappingURL=annotorious-react.es16.js.map
|