@readerseye2/cr_viewer 1.0.33 → 1.0.34
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/CR_Viewer.d.ts.map +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.js +757 -710
- package/dist/recording/DirectPlaybackController.d.ts.map +1 -1
- package/dist/recording/WordDistanceObserver.d.ts +10 -0
- package/dist/recording/WordDistanceObserver.d.ts.map +1 -0
- package/dist/stores/eventBridge/viewerEventBridge.store.d.ts +2 -0
- package/dist/stores/eventBridge/viewerEventBridge.store.d.ts.map +1 -1
- package/dist/utils/wordDistance.util.d.ts +8 -0
- package/dist/utils/wordDistance.util.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
var qi = Object.defineProperty;
|
|
3
3
|
var ji = (e, t, n) => t in e ? qi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var Gr = (e, t, n) => ji(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
|
-
import { jsx as x, jsxs as
|
|
5
|
+
import { jsx as x, jsxs as ee, Fragment as xt } from "react/jsx-runtime";
|
|
6
6
|
import * as Ye from "react";
|
|
7
|
-
import
|
|
7
|
+
import W, { createContext as Ft, useContext as Ue, useMemo as he, useLayoutEffect as Rt, useRef as se, useEffect as me, useCallback as te, createElement as gn, memo as Dt, useState as pt, useId as Ui } from "react";
|
|
8
8
|
import Ki from "react-dom";
|
|
9
9
|
const vr = Ft(void 0);
|
|
10
10
|
var an = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -25,7 +25,7 @@ var Lr;
|
|
|
25
25
|
function Xi() {
|
|
26
26
|
if (Lr) return Pn;
|
|
27
27
|
Lr = 1;
|
|
28
|
-
var e =
|
|
28
|
+
var e = W;
|
|
29
29
|
function t(h, p) {
|
|
30
30
|
return h === p && (h !== 0 || 1 / h === 1 / p) || h !== h && p !== p;
|
|
31
31
|
}
|
|
@@ -62,7 +62,7 @@ function Xi() {
|
|
|
62
62
|
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? l : u;
|
|
63
63
|
return Pn.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, Pn;
|
|
64
64
|
}
|
|
65
|
-
var
|
|
65
|
+
var An = {};
|
|
66
66
|
/**
|
|
67
67
|
* @license React
|
|
68
68
|
* use-sync-external-store-shim.development.js
|
|
@@ -121,9 +121,9 @@ function Yi() {
|
|
|
121
121
|
return v();
|
|
122
122
|
}
|
|
123
123
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
124
|
-
var o =
|
|
125
|
-
|
|
126
|
-
})()),
|
|
124
|
+
var o = W, i = typeof Object.is == "function" ? Object.is : e, s = o.useState, u = o.useEffect, a = o.useLayoutEffect, l = o.useDebugValue, d = !1, h = !1, p = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
|
|
125
|
+
An.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : p, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
126
|
+
})()), An;
|
|
127
127
|
}
|
|
128
128
|
var Nr;
|
|
129
129
|
function Uo() {
|
|
@@ -142,7 +142,7 @@ var Fr;
|
|
|
142
142
|
function Qi() {
|
|
143
143
|
if (Fr) return zn;
|
|
144
144
|
Fr = 1;
|
|
145
|
-
var e =
|
|
145
|
+
var e = W, t = Uo();
|
|
146
146
|
function n(l, d) {
|
|
147
147
|
return l === d && (l !== 0 || 1 / l === 1 / d) || l !== l && d !== d;
|
|
148
148
|
}
|
|
@@ -189,7 +189,7 @@ function Qi() {
|
|
|
189
189
|
), a(c), c;
|
|
190
190
|
}, zn;
|
|
191
191
|
}
|
|
192
|
-
var
|
|
192
|
+
var Bn = {};
|
|
193
193
|
/**
|
|
194
194
|
* @license React
|
|
195
195
|
* use-sync-external-store-shim/with-selector.development.js
|
|
@@ -199,15 +199,15 @@ var An = {};
|
|
|
199
199
|
* This source code is licensed under the MIT license found in the
|
|
200
200
|
* LICENSE file in the root directory of this source tree.
|
|
201
201
|
*/
|
|
202
|
-
var
|
|
202
|
+
var Dr;
|
|
203
203
|
function Zi() {
|
|
204
|
-
return
|
|
204
|
+
return Dr || (Dr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
205
205
|
function e(l, d) {
|
|
206
206
|
return l === d && (l !== 0 || 1 / l === 1 / d) || l !== l && d !== d;
|
|
207
207
|
}
|
|
208
208
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
209
|
-
var t =
|
|
210
|
-
|
|
209
|
+
var t = W, n = Uo(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, i = t.useRef, s = t.useEffect, u = t.useMemo, a = t.useDebugValue;
|
|
210
|
+
Bn.useSyncExternalStoreWithSelector = function(l, d, h, p, m) {
|
|
211
211
|
var v = i(null);
|
|
212
212
|
if (v.current === null) {
|
|
213
213
|
var y = { hasValue: !1, value: null };
|
|
@@ -249,11 +249,11 @@ function Zi() {
|
|
|
249
249
|
[c]
|
|
250
250
|
), a(c), c;
|
|
251
251
|
}, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
252
|
-
})()),
|
|
252
|
+
})()), Bn;
|
|
253
253
|
}
|
|
254
|
-
var
|
|
254
|
+
var Wr;
|
|
255
255
|
function Ji() {
|
|
256
|
-
return
|
|
256
|
+
return Wr || (Wr = 1, process.env.NODE_ENV === "production" ? cn.exports = Qi() : cn.exports = Zi()), cn.exports;
|
|
257
257
|
}
|
|
258
258
|
var es = Ji();
|
|
259
259
|
const ts = /* @__PURE__ */ jo(es), $r = (e) => {
|
|
@@ -275,9 +275,9 @@ function Tn(e, t = rs, n) {
|
|
|
275
275
|
t,
|
|
276
276
|
n
|
|
277
277
|
);
|
|
278
|
-
return
|
|
278
|
+
return W.useDebugValue(r), r;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function X(e, t) {
|
|
281
281
|
const n = Ue(vr);
|
|
282
282
|
if (!n)
|
|
283
283
|
throw new Error("useCRViewerScopedStore must be used inside <InternalCRViewerProvider>");
|
|
@@ -289,7 +289,7 @@ function kn() {
|
|
|
289
289
|
throw new Error("useCRViewerStoreApi must be used inside <InternalCRViewerProvider>");
|
|
290
290
|
return e;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
292
|
+
const Ot = Ft(
|
|
293
293
|
void 0
|
|
294
294
|
), Ko = Ft(void 0);
|
|
295
295
|
function os() {
|
|
@@ -300,6 +300,7 @@ function os() {
|
|
|
300
300
|
playbackScale: 1,
|
|
301
301
|
dispatchHandler: null,
|
|
302
302
|
applySnapshotHandler: null,
|
|
303
|
+
wordAvgDistancePx: 0,
|
|
303
304
|
// ========== Actions ==========
|
|
304
305
|
setEmitCallback: (n) => e({ emitCallback: n }),
|
|
305
306
|
emit: (n, r) => {
|
|
@@ -339,22 +340,22 @@ function is({
|
|
|
339
340
|
viewerRef: o
|
|
340
341
|
}) {
|
|
341
342
|
const i = he(() => os(), []);
|
|
342
|
-
return
|
|
343
|
+
return Rt(() => (i.getState().setEmitCallback(t ?? null), () => i.getState().setEmitCallback(null)), [t, i]), Rt(() => {
|
|
343
344
|
i.getState().setPlaybackMode(n);
|
|
344
|
-
}, [n, i]),
|
|
345
|
+
}, [n, i]), Rt(() => {
|
|
345
346
|
i.getState().setPlaybackScale(r);
|
|
346
|
-
}, [r, i]),
|
|
347
|
+
}, [r, i]), Rt(() => () => {
|
|
347
348
|
o && (o.current = null);
|
|
348
|
-
}, [o]), /* @__PURE__ */ x(
|
|
349
|
+
}, [o]), /* @__PURE__ */ x(Ot.Provider, { value: i, children: /* @__PURE__ */ x(Ko.Provider, { value: o, children: e }) });
|
|
349
350
|
}
|
|
350
|
-
function
|
|
351
|
-
const e = Ue(
|
|
351
|
+
function wt() {
|
|
352
|
+
const e = Ue(Ot);
|
|
352
353
|
if (!e)
|
|
353
354
|
throw new Error("useViewerEventBridgeStoreApi must be used inside <ViewerEventBridgeProvider>");
|
|
354
355
|
return e;
|
|
355
356
|
}
|
|
356
357
|
const Sr = Ft(void 0);
|
|
357
|
-
function
|
|
358
|
+
function Mt() {
|
|
358
359
|
const e = Ue(Sr);
|
|
359
360
|
if (!e)
|
|
360
361
|
throw new Error("useProgressStoreApi must be used within InternalCRViewerProgressProvider");
|
|
@@ -607,7 +608,7 @@ function as(e) {
|
|
|
607
608
|
setViewportSize: (i, s) => r({ viewportWidth: i, viewportHeight: s })
|
|
608
609
|
}));
|
|
609
610
|
}
|
|
610
|
-
const Rn = 0,
|
|
611
|
+
const Rn = 0, It = 1, Wt = 2, Yo = 4;
|
|
611
612
|
function Vr(e) {
|
|
612
613
|
return () => e;
|
|
613
614
|
}
|
|
@@ -643,13 +644,13 @@ function Ee(...e) {
|
|
|
643
644
|
return e;
|
|
644
645
|
}
|
|
645
646
|
function Ie(e, t) {
|
|
646
|
-
return e(
|
|
647
|
+
return e(It, t);
|
|
647
648
|
}
|
|
648
649
|
function fe(e, t) {
|
|
649
650
|
e(Rn, t);
|
|
650
651
|
}
|
|
651
652
|
function xr(e) {
|
|
652
|
-
e(
|
|
653
|
+
e(Wt);
|
|
653
654
|
}
|
|
654
655
|
function Pe(e) {
|
|
655
656
|
return e(Yo);
|
|
@@ -658,7 +659,7 @@ function oe(e, t) {
|
|
|
658
659
|
return Ie(e, us(t, Rn));
|
|
659
660
|
}
|
|
660
661
|
function at(e, t) {
|
|
661
|
-
const n = e(
|
|
662
|
+
const n = e(It, (r) => {
|
|
662
663
|
n(), t(r);
|
|
663
664
|
});
|
|
664
665
|
return n;
|
|
@@ -685,7 +686,7 @@ function ae(e) {
|
|
|
685
686
|
e(n) && t(n);
|
|
686
687
|
};
|
|
687
688
|
}
|
|
688
|
-
function
|
|
689
|
+
function Q(e) {
|
|
689
690
|
return (t) => Qo(t, e);
|
|
690
691
|
}
|
|
691
692
|
function ft(e) {
|
|
@@ -697,10 +698,10 @@ function H(e, ...t) {
|
|
|
697
698
|
const n = ps(...t);
|
|
698
699
|
return ((r, o) => {
|
|
699
700
|
switch (r) {
|
|
700
|
-
case
|
|
701
|
+
case Wt:
|
|
701
702
|
xr(e);
|
|
702
703
|
return;
|
|
703
|
-
case
|
|
704
|
+
case It:
|
|
704
705
|
return Ie(e, n(o));
|
|
705
706
|
}
|
|
706
707
|
});
|
|
@@ -710,7 +711,7 @@ function gt(e, t) {
|
|
|
710
711
|
n(t = e(t, r));
|
|
711
712
|
};
|
|
712
713
|
}
|
|
713
|
-
function
|
|
714
|
+
function Et(e) {
|
|
714
715
|
return (t) => (n) => {
|
|
715
716
|
e > 0 ? e-- : t(n);
|
|
716
717
|
};
|
|
@@ -748,15 +749,15 @@ function gs(e) {
|
|
|
748
749
|
const r = () => t == null ? void 0 : t();
|
|
749
750
|
return function(o, i) {
|
|
750
751
|
switch (o) {
|
|
751
|
-
case
|
|
752
|
+
case It:
|
|
752
753
|
return i ? n === i ? void 0 : (r(), n = i, t = Ie(e, i), t) : (r(), $t);
|
|
753
|
-
case
|
|
754
|
+
case Wt:
|
|
754
755
|
r(), n = null;
|
|
755
756
|
return;
|
|
756
757
|
}
|
|
757
758
|
};
|
|
758
759
|
}
|
|
759
|
-
function
|
|
760
|
+
function D(e) {
|
|
760
761
|
let t = e;
|
|
761
762
|
const n = ve();
|
|
762
763
|
return ((r, o) => {
|
|
@@ -764,7 +765,7 @@ function W(e) {
|
|
|
764
765
|
case Rn:
|
|
765
766
|
t = o;
|
|
766
767
|
break;
|
|
767
|
-
case
|
|
768
|
+
case It: {
|
|
768
769
|
o(t);
|
|
769
770
|
break;
|
|
770
771
|
}
|
|
@@ -775,7 +776,7 @@ function W(e) {
|
|
|
775
776
|
});
|
|
776
777
|
}
|
|
777
778
|
function je(e, t) {
|
|
778
|
-
return _n(
|
|
779
|
+
return _n(D(t), (n) => oe(e, n));
|
|
779
780
|
}
|
|
780
781
|
function ve() {
|
|
781
782
|
const e = [];
|
|
@@ -786,10 +787,10 @@ function ve() {
|
|
|
786
787
|
r(n);
|
|
787
788
|
});
|
|
788
789
|
return;
|
|
789
|
-
case
|
|
790
|
+
case Wt:
|
|
790
791
|
e.splice(0, e.length);
|
|
791
792
|
return;
|
|
792
|
-
case
|
|
793
|
+
case It:
|
|
793
794
|
return e.push(n), () => {
|
|
794
795
|
const r = e.indexOf(n);
|
|
795
796
|
r > -1 && e.splice(r, 1);
|
|
@@ -829,11 +830,11 @@ function Ne(...e) {
|
|
|
829
830
|
});
|
|
830
831
|
}), function(i, s) {
|
|
831
832
|
switch (i) {
|
|
832
|
-
case
|
|
833
|
+
case Wt: {
|
|
833
834
|
xr(t);
|
|
834
835
|
return;
|
|
835
836
|
}
|
|
836
|
-
case
|
|
837
|
+
case It:
|
|
837
838
|
return r === o && s(n), Ie(t, s);
|
|
838
839
|
}
|
|
839
840
|
};
|
|
@@ -844,9 +845,9 @@ function le(e, t = Zo) {
|
|
|
844
845
|
function dr(...e) {
|
|
845
846
|
return function(t, n) {
|
|
846
847
|
switch (t) {
|
|
847
|
-
case
|
|
848
|
+
case Wt:
|
|
848
849
|
return;
|
|
849
|
-
case
|
|
850
|
+
case It:
|
|
850
851
|
return ds(...e.map((r) => Ie(r, n)));
|
|
851
852
|
}
|
|
852
853
|
};
|
|
@@ -857,14 +858,14 @@ const bs = {
|
|
|
857
858
|
3: "error",
|
|
858
859
|
1: "log",
|
|
859
860
|
2: "warn"
|
|
860
|
-
}, vs = () => typeof globalThis > "u" ? window : globalThis,
|
|
861
|
+
}, vs = () => typeof globalThis > "u" ? window : globalThis, Ct = ye(
|
|
861
862
|
() => {
|
|
862
|
-
const e =
|
|
863
|
+
const e = D(
|
|
863
864
|
3
|
|
864
865
|
/* ERROR */
|
|
865
866
|
);
|
|
866
867
|
return {
|
|
867
|
-
log:
|
|
868
|
+
log: D((t, n, r = 1) => {
|
|
868
869
|
var o;
|
|
869
870
|
const i = (o = vs().VIRTUOSO_LOG_LEVEL) != null ? o : Pe(e);
|
|
870
871
|
r >= i && console[bs[r]](
|
|
@@ -885,10 +886,10 @@ function zt(e, t, n) {
|
|
|
885
886
|
return wr(e, t, n).callbackRef;
|
|
886
887
|
}
|
|
887
888
|
function wr(e, t, n) {
|
|
888
|
-
const r =
|
|
889
|
+
const r = W.useRef(null);
|
|
889
890
|
let o = (s) => {
|
|
890
891
|
};
|
|
891
|
-
const i =
|
|
892
|
+
const i = W.useMemo(() => typeof ResizeObserver < "u" ? new ResizeObserver((s) => {
|
|
892
893
|
const u = () => {
|
|
893
894
|
const a = s[0].target;
|
|
894
895
|
a.offsetParent !== null && e(a);
|
|
@@ -900,7 +901,7 @@ function wr(e, t, n) {
|
|
|
900
901
|
}, { callbackRef: o, ref: r };
|
|
901
902
|
}
|
|
902
903
|
function Ss(e, t, n, r, o, i, s, u, a) {
|
|
903
|
-
const l =
|
|
904
|
+
const l = W.useCallback(
|
|
904
905
|
(d) => {
|
|
905
906
|
const h = ys(d.children, t, u ? "offsetWidth" : "offsetHeight", o);
|
|
906
907
|
let p = d.parentElement;
|
|
@@ -943,7 +944,7 @@ function Ur(e, t, n) {
|
|
|
943
944
|
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Qe.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
944
945
|
}
|
|
945
946
|
function Jo(e, t, n) {
|
|
946
|
-
const r =
|
|
947
|
+
const r = W.useRef(null), o = W.useCallback(
|
|
947
948
|
(a) => {
|
|
948
949
|
if (!(a != null && a.offsetParent))
|
|
949
950
|
return;
|
|
@@ -964,10 +965,10 @@ function Jo(e, t, n) {
|
|
|
964
965
|
},
|
|
965
966
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
966
967
|
[e, t]
|
|
967
|
-
), { callbackRef: i, ref: s } = wr(o, !0, n), u =
|
|
968
|
+
), { callbackRef: i, ref: s } = wr(o, !0, n), u = W.useCallback(() => {
|
|
968
969
|
o(s.current);
|
|
969
970
|
}, [o, s]);
|
|
970
|
-
return
|
|
971
|
+
return W.useEffect(() => {
|
|
971
972
|
var a;
|
|
972
973
|
if (t) {
|
|
973
974
|
t.addEventListener("scroll", u);
|
|
@@ -987,17 +988,17 @@ function Jo(e, t, n) {
|
|
|
987
988
|
}
|
|
988
989
|
const Ke = ye(
|
|
989
990
|
() => {
|
|
990
|
-
const e = ve(), t = ve(), n =
|
|
991
|
+
const e = ve(), t = ve(), n = D(0), r = ve(), o = D(0), i = ve(), s = ve(), u = D(0), a = D(0), l = D(0), d = D(0), h = ve(), p = ve(), m = D(!1), v = D(!1), y = D(!1);
|
|
991
992
|
return oe(
|
|
992
993
|
H(
|
|
993
994
|
e,
|
|
994
|
-
|
|
995
|
+
Q(({ scrollTop: c }) => c)
|
|
995
996
|
),
|
|
996
997
|
t
|
|
997
998
|
), oe(
|
|
998
999
|
H(
|
|
999
1000
|
e,
|
|
1000
|
-
|
|
1001
|
+
Q(({ scrollHeight: c }) => c)
|
|
1001
1002
|
),
|
|
1002
1003
|
s
|
|
1003
1004
|
), oe(t, o), {
|
|
@@ -1056,7 +1057,7 @@ function ct(e, t, n = "k") {
|
|
|
1056
1057
|
return ct(e.l, t, n);
|
|
1057
1058
|
}
|
|
1058
1059
|
function et(e, t, n) {
|
|
1059
|
-
return Te(e) ? ri(t, n, 1) : t === e.k ?
|
|
1060
|
+
return Te(e) ? ri(t, n, 1) : t === e.k ? We(e, { k: t, v: n }) : t < e.k ? Kr(We(e, { l: et(e.l, t, n) })) : Kr(We(e, { r: et(e.r, t, n) }));
|
|
1060
1061
|
}
|
|
1061
1062
|
function Lt() {
|
|
1062
1063
|
return Xt;
|
|
@@ -1077,12 +1078,12 @@ function fr(e, t) {
|
|
|
1077
1078
|
return r;
|
|
1078
1079
|
{
|
|
1079
1080
|
const [i, s] = ni(r);
|
|
1080
|
-
return hn(
|
|
1081
|
+
return hn(We(e, { k: i, l: ti(r), v: s }));
|
|
1081
1082
|
}
|
|
1082
|
-
} else return t < n ? hn(
|
|
1083
|
+
} else return t < n ? hn(We(e, { l: fr(r, t) })) : hn(We(e, { r: fr(o, t) }));
|
|
1083
1084
|
}
|
|
1084
|
-
function
|
|
1085
|
-
return Te(e) ? [] : [...
|
|
1085
|
+
function _t(e) {
|
|
1086
|
+
return Te(e) ? [] : [..._t(e.l), { k: e.k, v: e.v }, ..._t(e.r)];
|
|
1086
1087
|
}
|
|
1087
1088
|
function pr(e, t, n) {
|
|
1088
1089
|
if (Te(e))
|
|
@@ -1097,12 +1098,12 @@ function hn(e) {
|
|
|
1097
1098
|
return e;
|
|
1098
1099
|
if (n > r.lvl + 1) {
|
|
1099
1100
|
if (Fn(t))
|
|
1100
|
-
return oi(
|
|
1101
|
+
return oi(We(e, { lvl: n - 1 }));
|
|
1101
1102
|
if (!Te(t) && !Te(t.r))
|
|
1102
|
-
return
|
|
1103
|
-
l:
|
|
1103
|
+
return We(t.r, {
|
|
1104
|
+
l: We(t, { r: t.r.l }),
|
|
1104
1105
|
lvl: n,
|
|
1105
|
-
r:
|
|
1106
|
+
r: We(e, {
|
|
1106
1107
|
l: t.r.r,
|
|
1107
1108
|
lvl: n - 1
|
|
1108
1109
|
})
|
|
@@ -1110,22 +1111,22 @@ function hn(e) {
|
|
|
1110
1111
|
throw new Error("Unexpected empty nodes");
|
|
1111
1112
|
} else {
|
|
1112
1113
|
if (Fn(e))
|
|
1113
|
-
return gr(
|
|
1114
|
+
return gr(We(e, { lvl: n - 1 }));
|
|
1114
1115
|
if (!Te(r) && !Te(r.l)) {
|
|
1115
1116
|
const o = r.l, i = Fn(o) ? r.lvl - 1 : r.lvl;
|
|
1116
|
-
return
|
|
1117
|
-
l:
|
|
1117
|
+
return We(o, {
|
|
1118
|
+
l: We(e, {
|
|
1118
1119
|
lvl: n - 1,
|
|
1119
1120
|
r: o.l
|
|
1120
1121
|
}),
|
|
1121
1122
|
lvl: o.lvl + 1,
|
|
1122
|
-
r: gr(
|
|
1123
|
+
r: gr(We(r, { l: o.r, lvl: i }))
|
|
1123
1124
|
});
|
|
1124
1125
|
} else
|
|
1125
1126
|
throw new Error("Unexpected empty nodes");
|
|
1126
1127
|
}
|
|
1127
1128
|
}
|
|
1128
|
-
function
|
|
1129
|
+
function We(e, t) {
|
|
1129
1130
|
return ri(
|
|
1130
1131
|
t.k !== void 0 ? t.k : e.k,
|
|
1131
1132
|
t.v !== void 0 ? t.v : e.v,
|
|
@@ -1135,7 +1136,7 @@ function De(e, t) {
|
|
|
1135
1136
|
);
|
|
1136
1137
|
}
|
|
1137
1138
|
function ti(e) {
|
|
1138
|
-
return Te(e.r) ? e.l : hn(
|
|
1139
|
+
return Te(e.r) ? e.l : hn(We(e, { r: ti(e.r) }));
|
|
1139
1140
|
}
|
|
1140
1141
|
function Fn(e) {
|
|
1141
1142
|
return Te(e) || e.lvl > e.r.lvl;
|
|
@@ -1151,11 +1152,11 @@ function Kr(e) {
|
|
|
1151
1152
|
}
|
|
1152
1153
|
function oi(e) {
|
|
1153
1154
|
const { l: t } = e;
|
|
1154
|
-
return !Te(t) && t.lvl === e.lvl ?
|
|
1155
|
+
return !Te(t) && t.lvl === e.lvl ? We(t, { r: We(e, { l: t.r }) }) : e;
|
|
1155
1156
|
}
|
|
1156
1157
|
function gr(e) {
|
|
1157
1158
|
const { lvl: t, r: n } = e;
|
|
1158
|
-
return !Te(n) && !Te(n.r) && n.lvl === t && n.r.lvl === t ?
|
|
1159
|
+
return !Te(n) && !Te(n.r) && n.lvl === t && n.r.lvl === t ? We(n, { l: We(e, { r: n.l }), lvl: t + 1 }) : e;
|
|
1159
1160
|
}
|
|
1160
1161
|
function xs(e) {
|
|
1161
1162
|
return ei(e, ({ k: t, v: n }) => ({ index: t, value: n }));
|
|
@@ -1167,7 +1168,7 @@ function Qt(e, t) {
|
|
|
1167
1168
|
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
1168
1169
|
}
|
|
1169
1170
|
const Ir = ye(
|
|
1170
|
-
() => ({ recalcInProgress:
|
|
1171
|
+
() => ({ recalcInProgress: D(!1) }),
|
|
1171
1172
|
[],
|
|
1172
1173
|
{ singleton: !0 }
|
|
1173
1174
|
);
|
|
@@ -1289,7 +1290,7 @@ function _s(e, [t, n, r, o]) {
|
|
|
1289
1290
|
};
|
|
1290
1291
|
}
|
|
1291
1292
|
function Ms(e) {
|
|
1292
|
-
return
|
|
1293
|
+
return _t(e).map(({ k: t, v: n }, r, o) => {
|
|
1293
1294
|
const i = o[r + 1];
|
|
1294
1295
|
return { endIndex: i ? i.k - 1 : 1 / 0, size: n, startIndex: t };
|
|
1295
1296
|
});
|
|
@@ -1335,7 +1336,7 @@ const zs = {
|
|
|
1335
1336
|
offsetWidth: "width"
|
|
1336
1337
|
}, ht = ye(
|
|
1337
1338
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
1338
|
-
const n = ve(), r = ve(), o = je(r, 0), i = ve(), s = ve(), u =
|
|
1339
|
+
const n = ve(), r = ve(), o = je(r, 0), i = ve(), s = ve(), u = D(0), a = D([]), l = D(void 0), d = D(void 0), h = D(void 0), p = D(void 0), m = D((b, S) => yt(b, zs[S])), v = D(void 0), y = D(0), c = Is(), f = je(
|
|
1339
1340
|
H(n, ge(a, e, y), gt(_s, c), Me()),
|
|
1340
1341
|
c
|
|
1341
1342
|
), g = je(
|
|
@@ -1346,7 +1347,7 @@ const zs = {
|
|
|
1346
1347
|
current: [],
|
|
1347
1348
|
prev: []
|
|
1348
1349
|
}),
|
|
1349
|
-
|
|
1350
|
+
Q(({ prev: b }) => b)
|
|
1350
1351
|
),
|
|
1351
1352
|
[]
|
|
1352
1353
|
);
|
|
@@ -1355,7 +1356,7 @@ const zs = {
|
|
|
1355
1356
|
a,
|
|
1356
1357
|
ae((b) => b.length > 0),
|
|
1357
1358
|
ge(f, y),
|
|
1358
|
-
|
|
1359
|
+
Q(([b, S, k]) => {
|
|
1359
1360
|
const T = b.reduce((O, P, I) => et(O, P, Zt(P, S.offsetTree, k) || I), Lt());
|
|
1360
1361
|
return {
|
|
1361
1362
|
...S,
|
|
@@ -1370,7 +1371,7 @@ const zs = {
|
|
|
1370
1371
|
r,
|
|
1371
1372
|
ge(f),
|
|
1372
1373
|
ae(([b, { lastIndex: S }]) => b < S),
|
|
1373
|
-
|
|
1374
|
+
Q(([b, { lastIndex: S, lastSize: k }]) => [
|
|
1374
1375
|
{
|
|
1375
1376
|
endIndex: S,
|
|
1376
1377
|
size: k,
|
|
@@ -1383,7 +1384,7 @@ const zs = {
|
|
|
1383
1384
|
const w = je(
|
|
1384
1385
|
H(
|
|
1385
1386
|
l,
|
|
1386
|
-
|
|
1387
|
+
Q((b) => b === void 0)
|
|
1387
1388
|
),
|
|
1388
1389
|
!0
|
|
1389
1390
|
);
|
|
@@ -1391,7 +1392,7 @@ const zs = {
|
|
|
1391
1392
|
H(
|
|
1392
1393
|
d,
|
|
1393
1394
|
ae((b) => b !== void 0 && Te(Pe(f).sizeTree)),
|
|
1394
|
-
|
|
1395
|
+
Q((b) => {
|
|
1395
1396
|
const S = Pe(h), k = Pe(a).length > 0;
|
|
1396
1397
|
return S ? k ? [
|
|
1397
1398
|
{ endIndex: 0, size: S, startIndex: 0 },
|
|
@@ -1404,7 +1405,7 @@ const zs = {
|
|
|
1404
1405
|
H(
|
|
1405
1406
|
p,
|
|
1406
1407
|
ae((b) => b !== void 0 && b.length > 0 && Te(Pe(f).sizeTree)),
|
|
1407
|
-
|
|
1408
|
+
Q((b) => {
|
|
1408
1409
|
const S = [];
|
|
1409
1410
|
let k = b[0], T = 0;
|
|
1410
1411
|
for (let O = 1; O < b.length; O++) {
|
|
@@ -1428,7 +1429,7 @@ const zs = {
|
|
|
1428
1429
|
a,
|
|
1429
1430
|
ge(h, d),
|
|
1430
1431
|
ae(([, b, S]) => b !== void 0 && S !== void 0),
|
|
1431
|
-
|
|
1432
|
+
Q(([b, S, k]) => {
|
|
1432
1433
|
const T = [];
|
|
1433
1434
|
for (let O = 0; O < b.length; O++) {
|
|
1434
1435
|
const P = b[O], I = b[O + 1];
|
|
@@ -1458,7 +1459,7 @@ const zs = {
|
|
|
1458
1459
|
}),
|
|
1459
1460
|
{ changed: !1, sizes: c }
|
|
1460
1461
|
),
|
|
1461
|
-
|
|
1462
|
+
Q((b) => b.changed)
|
|
1462
1463
|
)
|
|
1463
1464
|
);
|
|
1464
1465
|
Ie(
|
|
@@ -1468,7 +1469,7 @@ const zs = {
|
|
|
1468
1469
|
(b, S) => ({ diff: b.prev - S, prev: S }),
|
|
1469
1470
|
{ diff: 0, prev: 0 }
|
|
1470
1471
|
),
|
|
1471
|
-
|
|
1472
|
+
Q((b) => b.diff)
|
|
1472
1473
|
),
|
|
1473
1474
|
(b) => {
|
|
1474
1475
|
const { groupIndices: S } = Pe(f);
|
|
@@ -1491,36 +1492,36 @@ const zs = {
|
|
|
1491
1492
|
H(
|
|
1492
1493
|
i,
|
|
1493
1494
|
ge(f),
|
|
1494
|
-
|
|
1495
|
+
Q(([b, S]) => {
|
|
1495
1496
|
const k = S.groupIndices.length > 0, T = [], O = S.lastSize;
|
|
1496
1497
|
if (k) {
|
|
1497
1498
|
const P = Yt(S.sizeTree, 0);
|
|
1498
1499
|
let I = 0, R = 0;
|
|
1499
1500
|
for (; I < b; ) {
|
|
1500
|
-
const N = S.groupIndices[R],
|
|
1501
|
+
const N = S.groupIndices[R], A = S.groupIndices.length === R + 1 ? 1 / 0 : S.groupIndices[R + 1] - N - 1;
|
|
1501
1502
|
T.push({
|
|
1502
1503
|
endIndex: N,
|
|
1503
1504
|
size: P,
|
|
1504
1505
|
startIndex: N
|
|
1505
1506
|
}), T.push({
|
|
1506
|
-
endIndex: N + 1 +
|
|
1507
|
+
endIndex: N + 1 + A - 1,
|
|
1507
1508
|
size: O,
|
|
1508
1509
|
startIndex: N + 1
|
|
1509
|
-
}), R++, I +=
|
|
1510
|
+
}), R++, I += A + 1;
|
|
1510
1511
|
}
|
|
1511
|
-
const z =
|
|
1512
|
+
const z = _t(S.sizeTree);
|
|
1512
1513
|
return I !== b && z.shift(), z.reduce(
|
|
1513
|
-
(N, { k:
|
|
1514
|
+
(N, { k: A, v: V }) => {
|
|
1514
1515
|
let re = N.ranges;
|
|
1515
1516
|
return N.prevSize !== 0 && (re = [
|
|
1516
1517
|
...N.ranges,
|
|
1517
1518
|
{
|
|
1518
|
-
endIndex:
|
|
1519
|
+
endIndex: A + b - 1,
|
|
1519
1520
|
size: N.prevSize,
|
|
1520
1521
|
startIndex: N.prevIndex
|
|
1521
1522
|
}
|
|
1522
1523
|
]), {
|
|
1523
|
-
prevIndex:
|
|
1524
|
+
prevIndex: A + b,
|
|
1524
1525
|
prevSize: V,
|
|
1525
1526
|
ranges: re
|
|
1526
1527
|
};
|
|
@@ -1532,7 +1533,7 @@ const zs = {
|
|
|
1532
1533
|
}
|
|
1533
1534
|
).ranges;
|
|
1534
1535
|
}
|
|
1535
|
-
return
|
|
1536
|
+
return _t(S.sizeTree).reduce(
|
|
1536
1537
|
(P, { k: I, v: R }) => ({
|
|
1537
1538
|
prevIndex: I + b,
|
|
1538
1539
|
prevSize: R,
|
|
@@ -1552,7 +1553,7 @@ const zs = {
|
|
|
1552
1553
|
H(
|
|
1553
1554
|
s,
|
|
1554
1555
|
ge(f, y),
|
|
1555
|
-
|
|
1556
|
+
Q(([b, { offsetTree: S }, k]) => {
|
|
1556
1557
|
const T = -b;
|
|
1557
1558
|
return Zt(T, S, k);
|
|
1558
1559
|
})
|
|
@@ -1562,7 +1563,7 @@ const zs = {
|
|
|
1562
1563
|
H(
|
|
1563
1564
|
s,
|
|
1564
1565
|
ge(f, y),
|
|
1565
|
-
|
|
1566
|
+
Q(([b, S, k]) => {
|
|
1566
1567
|
if (S.groupIndices.length > 0) {
|
|
1567
1568
|
if (Te(S.sizeTree))
|
|
1568
1569
|
return S;
|
|
@@ -1574,7 +1575,7 @@ const zs = {
|
|
|
1574
1575
|
const z = O[I + 1] - R - 1;
|
|
1575
1576
|
I++, P += z + 1;
|
|
1576
1577
|
}
|
|
1577
|
-
if (T =
|
|
1578
|
+
if (T = _t(S.sizeTree).reduce((z, { k: N, v: A }) => et(z, Math.max(0, N + b), A), T), P !== -b) {
|
|
1578
1579
|
const z = Yt(S.sizeTree, R);
|
|
1579
1580
|
T = et(T, 0, z);
|
|
1580
1581
|
const N = ct(S.sizeTree, -b + 1)[1];
|
|
@@ -1586,7 +1587,7 @@ const zs = {
|
|
|
1586
1587
|
...hr(S.offsetTree, 0, T, k)
|
|
1587
1588
|
};
|
|
1588
1589
|
} else {
|
|
1589
|
-
const T =
|
|
1590
|
+
const T = _t(S.sizeTree).reduce((O, { k: P, v: I }) => et(O, Math.max(0, P + b), I), Lt());
|
|
1590
1591
|
return {
|
|
1591
1592
|
...S,
|
|
1592
1593
|
sizeTree: T,
|
|
@@ -1620,7 +1621,7 @@ const zs = {
|
|
|
1620
1621
|
unshiftWith: i
|
|
1621
1622
|
};
|
|
1622
1623
|
},
|
|
1623
|
-
Ee(
|
|
1624
|
+
Ee(Ct, Ir),
|
|
1624
1625
|
{ singleton: !0 }
|
|
1625
1626
|
);
|
|
1626
1627
|
function Ps(e) {
|
|
@@ -1634,34 +1635,34 @@ function Ps(e) {
|
|
|
1634
1635
|
}
|
|
1635
1636
|
const ci = ye(
|
|
1636
1637
|
([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
|
|
1637
|
-
const i = ve(), s = ve(), u = tt(H(i,
|
|
1638
|
+
const i = ve(), s = ve(), u = tt(H(i, Q(Ps)));
|
|
1638
1639
|
return oe(
|
|
1639
1640
|
H(
|
|
1640
1641
|
u,
|
|
1641
|
-
|
|
1642
|
+
Q((a) => a.totalCount)
|
|
1642
1643
|
),
|
|
1643
1644
|
n
|
|
1644
1645
|
), oe(
|
|
1645
1646
|
H(
|
|
1646
1647
|
u,
|
|
1647
|
-
|
|
1648
|
+
Q((a) => a.groupIndices)
|
|
1648
1649
|
),
|
|
1649
1650
|
e
|
|
1650
1651
|
), oe(
|
|
1651
1652
|
H(
|
|
1652
1653
|
Ne(o, t, r),
|
|
1653
1654
|
ae(([a, l]) => Mn(l)),
|
|
1654
|
-
|
|
1655
|
+
Q(([a, l, d]) => ct(l.groupOffsetTree, Math.max(a - d, 0), "v")[0]),
|
|
1655
1656
|
Me(),
|
|
1656
|
-
|
|
1657
|
+
Q((a) => [a])
|
|
1657
1658
|
),
|
|
1658
1659
|
s
|
|
1659
1660
|
), { groupCounts: i, topItemsIndexes: s };
|
|
1660
1661
|
},
|
|
1661
1662
|
Ee(ht, Ke)
|
|
1662
|
-
),
|
|
1663
|
+
), Tt = ye(
|
|
1663
1664
|
([{ log: e }]) => {
|
|
1664
|
-
const t =
|
|
1665
|
+
const t = D(!1), n = tt(
|
|
1665
1666
|
H(
|
|
1666
1667
|
t,
|
|
1667
1668
|
ae((r) => r),
|
|
@@ -1672,12 +1673,12 @@ const ci = ye(
|
|
|
1672
1673
|
r && Pe(e)("props updated", {}, Qe.DEBUG);
|
|
1673
1674
|
}), { didMount: n, propsReady: t };
|
|
1674
1675
|
},
|
|
1675
|
-
Ee(
|
|
1676
|
+
Ee(Ct),
|
|
1676
1677
|
{ singleton: !0 }
|
|
1677
|
-
),
|
|
1678
|
+
), As = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
1678
1679
|
function ui(e) {
|
|
1679
1680
|
const t = typeof e == "number" ? { index: e } : e;
|
|
1680
|
-
return t.align || (t.align = "start"), (!t.behavior || !
|
|
1681
|
+
return t.align || (t.align = "start"), (!t.behavior || !As) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
|
|
1681
1682
|
}
|
|
1682
1683
|
const on = ye(
|
|
1683
1684
|
([
|
|
@@ -1694,7 +1695,7 @@ const on = ye(
|
|
|
1694
1695
|
},
|
|
1695
1696
|
{ log: p }
|
|
1696
1697
|
]) => {
|
|
1697
|
-
const m = ve(), v = ve(), y =
|
|
1698
|
+
const m = ve(), v = ve(), y = D(0);
|
|
1698
1699
|
let c = null, f = null, g = null;
|
|
1699
1700
|
function w() {
|
|
1700
1701
|
c && (c(), c = null), g && (g(), g = null), f && (clearTimeout(f), f = null), fe(a, !1);
|
|
@@ -1704,20 +1705,20 @@ const on = ye(
|
|
|
1704
1705
|
m,
|
|
1705
1706
|
ge(n, h, r, y, u, s, p),
|
|
1706
1707
|
ge(e, i, o),
|
|
1707
|
-
|
|
1708
|
+
Q(
|
|
1708
1709
|
([
|
|
1709
1710
|
[C, _, M, b, S, k, T, O],
|
|
1710
1711
|
P,
|
|
1711
1712
|
I,
|
|
1712
1713
|
R
|
|
1713
1714
|
]) => {
|
|
1714
|
-
const z = ui(C), { align: N, behavior:
|
|
1715
|
+
const z = ui(C), { align: N, behavior: A, offset: V } = z, re = b - 1, be = ai(z, _, re);
|
|
1715
1716
|
let Se = Zt(be, _.offsetTree, P) + k;
|
|
1716
1717
|
N === "end" ? (Se += I + ct(_.sizeTree, be)[1] - M + R, be === re && (Se += T)) : N === "center" ? Se += (I + ct(_.sizeTree, be)[1] - M + R) / 2 : Se -= S, V && (Se += V);
|
|
1717
1718
|
const Ce = (xe) => {
|
|
1718
1719
|
w(), xe ? (O("retrying to scroll to", { location: C }, Qe.DEBUG), fe(m, C)) : (fe(v, !0), O("list did not change, scroll successful", {}, Qe.DEBUG));
|
|
1719
1720
|
};
|
|
1720
|
-
if (w(),
|
|
1721
|
+
if (w(), A === "smooth") {
|
|
1721
1722
|
let xe = !1;
|
|
1722
1723
|
g = Ie(t, (Fe) => {
|
|
1723
1724
|
xe = xe || Fe;
|
|
@@ -1725,10 +1726,10 @@ const on = ye(
|
|
|
1725
1726
|
Ce(xe);
|
|
1726
1727
|
});
|
|
1727
1728
|
} else
|
|
1728
|
-
c = at(H(t,
|
|
1729
|
+
c = at(H(t, Bs(150)), Ce);
|
|
1729
1730
|
return f = setTimeout(() => {
|
|
1730
1731
|
w();
|
|
1731
|
-
}, 1200), fe(a, !0), O("scrolling from index to", { behavior:
|
|
1732
|
+
}, 1200), fe(a, !0), O("scrolling from index to", { behavior: A, index: be, top: Se }, Qe.DEBUG), { behavior: A, top: Se };
|
|
1732
1733
|
}
|
|
1733
1734
|
)
|
|
1734
1735
|
),
|
|
@@ -1739,10 +1740,10 @@ const on = ye(
|
|
|
1739
1740
|
topListHeight: y
|
|
1740
1741
|
};
|
|
1741
1742
|
},
|
|
1742
|
-
Ee(ht, Ke,
|
|
1743
|
+
Ee(ht, Ke, Ct),
|
|
1743
1744
|
{ singleton: !0 }
|
|
1744
1745
|
);
|
|
1745
|
-
function
|
|
1746
|
+
function Bs(e) {
|
|
1746
1747
|
return (t) => {
|
|
1747
1748
|
const n = setTimeout(() => {
|
|
1748
1749
|
t(!1);
|
|
@@ -1763,7 +1764,7 @@ function kr(e, t) {
|
|
|
1763
1764
|
}
|
|
1764
1765
|
const sn = ye(
|
|
1765
1766
|
([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: i }, { didMount: s }]) => {
|
|
1766
|
-
const u =
|
|
1767
|
+
const u = D(!0), a = D(0), l = D(!0);
|
|
1767
1768
|
return oe(
|
|
1768
1769
|
H(
|
|
1769
1770
|
s,
|
|
@@ -1802,7 +1803,7 @@ const sn = ye(
|
|
|
1802
1803
|
scrolledToInitialItem: u
|
|
1803
1804
|
};
|
|
1804
1805
|
},
|
|
1805
|
-
Ee(ht, Ke, on,
|
|
1806
|
+
Ee(ht, Ke, on, Tt),
|
|
1806
1807
|
{ singleton: !0 }
|
|
1807
1808
|
);
|
|
1808
1809
|
function di(e, t) {
|
|
@@ -1818,9 +1819,9 @@ const Jt = "up", Ut = "down", Gs = "none", Ls = {
|
|
|
1818
1819
|
viewportHeight: 0
|
|
1819
1820
|
}
|
|
1820
1821
|
}, Hs = 0, ln = ye(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: i }]) => {
|
|
1821
|
-
const s =
|
|
1822
|
+
const s = D(!1), u = D(!0), a = ve(), l = ve(), d = D(4), h = D(Hs), p = je(
|
|
1822
1823
|
H(
|
|
1823
|
-
dr(H(le(o),
|
|
1824
|
+
dr(H(le(o), Et(1), ft(!0)), H(le(o), Et(1), ft(!1), jr(100))),
|
|
1824
1825
|
Me()
|
|
1825
1826
|
),
|
|
1826
1827
|
!1
|
|
@@ -1831,7 +1832,7 @@ const Jt = "up", Ut = "down", Gs = "none", Ls = {
|
|
|
1831
1832
|
oe(
|
|
1832
1833
|
H(
|
|
1833
1834
|
Ne(le(o), le(h)),
|
|
1834
|
-
|
|
1835
|
+
Q(([g, w]) => g <= w),
|
|
1835
1836
|
Me()
|
|
1836
1837
|
),
|
|
1837
1838
|
u
|
|
@@ -1893,32 +1894,32 @@ const Jt = "up", Ut = "down", Gs = "none", Ls = {
|
|
|
1893
1894
|
{ changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
|
|
1894
1895
|
),
|
|
1895
1896
|
ae((g) => g.changed),
|
|
1896
|
-
|
|
1897
|
+
Q((g) => g.jump)
|
|
1897
1898
|
),
|
|
1898
1899
|
0
|
|
1899
1900
|
);
|
|
1900
1901
|
oe(
|
|
1901
1902
|
H(
|
|
1902
1903
|
v,
|
|
1903
|
-
|
|
1904
|
+
Q((g) => g.atBottom)
|
|
1904
1905
|
),
|
|
1905
1906
|
s
|
|
1906
1907
|
), oe(H(s, mt(50)), a);
|
|
1907
|
-
const c =
|
|
1908
|
+
const c = D(Ut);
|
|
1908
1909
|
oe(
|
|
1909
1910
|
H(
|
|
1910
1911
|
r,
|
|
1911
|
-
|
|
1912
|
+
Q(({ scrollTop: g }) => g),
|
|
1912
1913
|
Me(),
|
|
1913
1914
|
gt(
|
|
1914
1915
|
(g, w) => Pe(m) ? { direction: g.direction, prevScrollTop: w } : { direction: w < g.prevScrollTop ? Jt : Ut, prevScrollTop: w },
|
|
1915
1916
|
{ direction: Ut, prevScrollTop: 0 }
|
|
1916
1917
|
),
|
|
1917
|
-
|
|
1918
|
+
Q((g) => g.direction)
|
|
1918
1919
|
),
|
|
1919
1920
|
c
|
|
1920
1921
|
), oe(H(r, mt(50), ft(Gs)), c);
|
|
1921
|
-
const f =
|
|
1922
|
+
const f = D(0);
|
|
1922
1923
|
return oe(
|
|
1923
1924
|
H(
|
|
1924
1925
|
p,
|
|
@@ -1933,7 +1934,7 @@ const Jt = "up", Ut = "down", Gs = "none", Ls = {
|
|
|
1933
1934
|
ge(p),
|
|
1934
1935
|
ae(([g, w]) => w),
|
|
1935
1936
|
gt(([g, w], [C]) => [w, C], [0, 0]),
|
|
1936
|
-
|
|
1937
|
+
Q(([g, w]) => w - g)
|
|
1937
1938
|
),
|
|
1938
1939
|
f
|
|
1939
1940
|
), {
|
|
@@ -1959,7 +1960,7 @@ function Zr(e, t) {
|
|
|
1959
1960
|
}
|
|
1960
1961
|
const Rr = ye(
|
|
1961
1962
|
([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
|
|
1962
|
-
const i = ve(), s =
|
|
1963
|
+
const i = ve(), s = D(0), u = D(0), a = D(0), l = je(
|
|
1963
1964
|
H(
|
|
1964
1965
|
Ne(
|
|
1965
1966
|
le(r),
|
|
@@ -1972,7 +1973,7 @@ const Rr = ye(
|
|
|
1972
1973
|
le(e),
|
|
1973
1974
|
le(u)
|
|
1974
1975
|
),
|
|
1975
|
-
|
|
1976
|
+
Q(
|
|
1976
1977
|
([
|
|
1977
1978
|
d,
|
|
1978
1979
|
h,
|
|
@@ -2021,7 +2022,7 @@ function Ns(e, t, n) {
|
|
|
2021
2022
|
}
|
|
2022
2023
|
return [{ data: n == null ? void 0 : n[0], index: e, offset: 0, size: 0 }];
|
|
2023
2024
|
}
|
|
2024
|
-
const
|
|
2025
|
+
const Dn = {
|
|
2025
2026
|
bottom: 0,
|
|
2026
2027
|
firstItemIndex: 0,
|
|
2027
2028
|
items: [],
|
|
@@ -2110,7 +2111,7 @@ const Pt = ye(
|
|
|
2110
2111
|
{ didMount: m },
|
|
2111
2112
|
{ recalcInProgress: v }
|
|
2112
2113
|
]) => {
|
|
2113
|
-
const y =
|
|
2114
|
+
const y = D([]), c = D(0), f = ve(), g = D(0);
|
|
2114
2115
|
oe(i.topItemsIndexes, y);
|
|
2115
2116
|
const w = je(
|
|
2116
2117
|
H(
|
|
@@ -2132,7 +2133,7 @@ const Pt = ye(
|
|
|
2132
2133
|
const O = T && T.length !== k;
|
|
2133
2134
|
return b && !S && !O;
|
|
2134
2135
|
}),
|
|
2135
|
-
|
|
2136
|
+
Q(
|
|
2136
2137
|
([
|
|
2137
2138
|
,
|
|
2138
2139
|
,
|
|
@@ -2145,17 +2146,17 @@ const Pt = ye(
|
|
|
2145
2146
|
R,
|
|
2146
2147
|
z,
|
|
2147
2148
|
N,
|
|
2148
|
-
|
|
2149
|
+
A
|
|
2149
2150
|
]) => {
|
|
2150
2151
|
var V, re, be, Se;
|
|
2151
2152
|
const Ce = T, { offsetTree: xe, sizeTree: Fe } = Ce, K = Pe(c);
|
|
2152
2153
|
if (k === 0)
|
|
2153
|
-
return { ...
|
|
2154
|
+
return { ...Dn, totalCount: k };
|
|
2154
2155
|
if (b === 0 && S === 0)
|
|
2155
|
-
return K === 0 ? { ...
|
|
2156
|
+
return K === 0 ? { ...Dn, totalCount: k } : fi(K, O, T, R, z, A || []);
|
|
2156
2157
|
if (Te(Fe))
|
|
2157
2158
|
return K > 0 ? null : mn(
|
|
2158
|
-
Ns(kr(O, k), Ce,
|
|
2159
|
+
Ns(kr(O, k), Ce, A),
|
|
2159
2160
|
[],
|
|
2160
2161
|
k,
|
|
2161
2162
|
z,
|
|
@@ -2164,12 +2165,12 @@ const Pt = ye(
|
|
|
2164
2165
|
);
|
|
2165
2166
|
const $ = [];
|
|
2166
2167
|
if (I.length > 0) {
|
|
2167
|
-
const F = I[0],
|
|
2168
|
+
const F = I[0], Y = I[I.length - 1];
|
|
2168
2169
|
let ne = 0;
|
|
2169
|
-
for (const
|
|
2170
|
-
const ce =
|
|
2170
|
+
for (const J of Ht(Fe, F, Y)) {
|
|
2171
|
+
const ce = J.value, ie = Math.max(J.start, F), we = Math.min(J.end, Y);
|
|
2171
2172
|
for (let pe = ie; pe <= we; pe++)
|
|
2172
|
-
$.push({ data:
|
|
2173
|
+
$.push({ data: A == null ? void 0 : A[pe], index: pe, offset: ne, size: ce }), ne += ce;
|
|
2173
2174
|
}
|
|
2174
2175
|
}
|
|
2175
2176
|
if (!P)
|
|
@@ -2178,38 +2179,38 @@ const Pt = ye(
|
|
|
2178
2179
|
if (E.length === 0)
|
|
2179
2180
|
return null;
|
|
2180
2181
|
const L = k - 1, q = _n([], (F) => {
|
|
2181
|
-
for (const
|
|
2182
|
-
const ne =
|
|
2183
|
-
let
|
|
2182
|
+
for (const Y of E) {
|
|
2183
|
+
const ne = Y.value;
|
|
2184
|
+
let J = ne.offset, ce = Y.start;
|
|
2184
2185
|
const ie = ne.size;
|
|
2185
2186
|
if (ne.offset < b) {
|
|
2186
2187
|
ce += Math.floor((b - ne.offset + z) / (ie + z));
|
|
2187
|
-
const pe = ce -
|
|
2188
|
-
|
|
2188
|
+
const pe = ce - Y.start;
|
|
2189
|
+
J += pe * ie + pe * z;
|
|
2189
2190
|
}
|
|
2190
|
-
ce < G && (
|
|
2191
|
-
const we = Math.min(
|
|
2192
|
-
for (let pe = ce; pe <= we && !(
|
|
2193
|
-
F.push({ data:
|
|
2191
|
+
ce < G && (J += (G - ce) * ie, ce = G);
|
|
2192
|
+
const we = Math.min(Y.end, L);
|
|
2193
|
+
for (let pe = ce; pe <= we && !(J >= S); pe++)
|
|
2194
|
+
F.push({ data: A == null ? void 0 : A[pe], index: pe, offset: J, size: ie }), J += ie + z;
|
|
2194
2195
|
}
|
|
2195
|
-
}),
|
|
2196
|
-
if (q.length > 0 && (
|
|
2197
|
-
const F = q[0],
|
|
2198
|
-
if (
|
|
2199
|
-
const ne = Math.min(
|
|
2196
|
+
}), B = eo(N, en), Z = eo(N, tn);
|
|
2197
|
+
if (q.length > 0 && (B > 0 || Z > 0)) {
|
|
2198
|
+
const F = q[0], Y = q[q.length - 1];
|
|
2199
|
+
if (B > 0 && F.index > G) {
|
|
2200
|
+
const ne = Math.min(B, F.index - G), J = [];
|
|
2200
2201
|
let ce = F.offset;
|
|
2201
2202
|
for (let ie = F.index - 1; ie >= F.index - ne; ie--) {
|
|
2202
2203
|
const we = (re = (V = Ht(Fe, ie, ie)[0]) == null ? void 0 : V.value) != null ? re : F.size;
|
|
2203
|
-
ce -= we + z,
|
|
2204
|
+
ce -= we + z, J.unshift({ data: A == null ? void 0 : A[ie], index: ie, offset: ce, size: we });
|
|
2204
2205
|
}
|
|
2205
|
-
q.unshift(...
|
|
2206
|
+
q.unshift(...J);
|
|
2206
2207
|
}
|
|
2207
|
-
if (
|
|
2208
|
-
const ne = Math.min(
|
|
2209
|
-
let
|
|
2210
|
-
for (let ce =
|
|
2211
|
-
const ie = (Se = (be = Ht(Fe, ce, ce)[0]) == null ? void 0 : be.value) != null ? Se :
|
|
2212
|
-
q.push({ data:
|
|
2208
|
+
if (Z > 0 && Y.index < L) {
|
|
2209
|
+
const ne = Math.min(Z, L - Y.index);
|
|
2210
|
+
let J = Y.offset + Y.size + z;
|
|
2211
|
+
for (let ce = Y.index + 1; ce <= Y.index + ne; ce++) {
|
|
2212
|
+
const ie = (Se = (be = Ht(Fe, ce, ce)[0]) == null ? void 0 : be.value) != null ? Se : Y.size;
|
|
2213
|
+
q.push({ data: A == null ? void 0 : A[ce], index: ce, offset: J, size: ie }), J += ie + z;
|
|
2213
2214
|
}
|
|
2214
2215
|
}
|
|
2215
2216
|
}
|
|
@@ -2220,31 +2221,31 @@ const Pt = ye(
|
|
|
2220
2221
|
ae((b) => b !== null),
|
|
2221
2222
|
Me()
|
|
2222
2223
|
),
|
|
2223
|
-
|
|
2224
|
+
Dn
|
|
2224
2225
|
);
|
|
2225
2226
|
oe(
|
|
2226
2227
|
H(
|
|
2227
2228
|
e,
|
|
2228
2229
|
ae(yr),
|
|
2229
|
-
|
|
2230
|
+
Q((b) => b == null ? void 0 : b.length)
|
|
2230
2231
|
),
|
|
2231
2232
|
o
|
|
2232
2233
|
), oe(
|
|
2233
2234
|
H(
|
|
2234
2235
|
w,
|
|
2235
|
-
|
|
2236
|
+
Q((b) => b.topListHeight)
|
|
2236
2237
|
),
|
|
2237
2238
|
h
|
|
2238
2239
|
), oe(h, u), oe(
|
|
2239
2240
|
H(
|
|
2240
2241
|
w,
|
|
2241
|
-
|
|
2242
|
+
Q((b) => [b.top, b.bottom])
|
|
2242
2243
|
),
|
|
2243
2244
|
s
|
|
2244
2245
|
), oe(
|
|
2245
2246
|
H(
|
|
2246
2247
|
w,
|
|
2247
|
-
|
|
2248
|
+
Q((b) => b.items)
|
|
2248
2249
|
),
|
|
2249
2250
|
f
|
|
2250
2251
|
);
|
|
@@ -2254,23 +2255,23 @@ const Pt = ye(
|
|
|
2254
2255
|
ae(({ items: b }) => b.length > 0),
|
|
2255
2256
|
ge(o, e),
|
|
2256
2257
|
ae(([{ items: b }, S]) => b[b.length - 1].originalIndex === S - 1),
|
|
2257
|
-
|
|
2258
|
+
Q(([, b, S]) => [b - 1, S]),
|
|
2258
2259
|
Me(Qt),
|
|
2259
|
-
|
|
2260
|
+
Q(([b]) => b)
|
|
2260
2261
|
)
|
|
2261
2262
|
), _ = tt(
|
|
2262
2263
|
H(
|
|
2263
2264
|
w,
|
|
2264
2265
|
mt(200),
|
|
2265
2266
|
ae(({ items: b, topItems: S }) => b.length > 0 && b[0].originalIndex === S.length),
|
|
2266
|
-
|
|
2267
|
+
Q(({ items: b }) => b[0].index),
|
|
2267
2268
|
Me()
|
|
2268
2269
|
)
|
|
2269
2270
|
), M = tt(
|
|
2270
2271
|
H(
|
|
2271
2272
|
w,
|
|
2272
2273
|
ae(({ items: b }) => b.length > 0),
|
|
2273
|
-
|
|
2274
|
+
Q(({ items: b }) => {
|
|
2274
2275
|
let S = 0, k = b.length - 1;
|
|
2275
2276
|
for (; b[S].type === "group" && S < k; )
|
|
2276
2277
|
S++;
|
|
@@ -2303,7 +2304,7 @@ const Pt = ye(
|
|
|
2303
2304
|
sn,
|
|
2304
2305
|
on,
|
|
2305
2306
|
ln,
|
|
2306
|
-
|
|
2307
|
+
Tt,
|
|
2307
2308
|
Ir
|
|
2308
2309
|
),
|
|
2309
2310
|
{ singleton: !0 }
|
|
@@ -2312,7 +2313,7 @@ const Pt = ye(
|
|
|
2312
2313
|
const i = ve(), s = je(
|
|
2313
2314
|
H(
|
|
2314
2315
|
Ne(n, e, r, t, o),
|
|
2315
|
-
|
|
2316
|
+
Q(([u, a, l, d, h]) => u + a + l + d + h.offsetBottom + h.bottom)
|
|
2316
2317
|
),
|
|
2317
2318
|
0
|
|
2318
2319
|
);
|
|
@@ -2322,11 +2323,11 @@ const Pt = ye(
|
|
|
2322
2323
|
{ singleton: !0 }
|
|
2323
2324
|
), Fs = ye(
|
|
2324
2325
|
([{ viewportHeight: e }, { totalListHeight: t }]) => {
|
|
2325
|
-
const n =
|
|
2326
|
+
const n = D(!1), r = je(
|
|
2326
2327
|
H(
|
|
2327
2328
|
Ne(n, e, t),
|
|
2328
2329
|
ae(([o]) => o),
|
|
2329
|
-
|
|
2330
|
+
Q(([, o, i]) => Math.max(0, o - i)),
|
|
2330
2331
|
mt(0),
|
|
2331
2332
|
Me()
|
|
2332
2333
|
),
|
|
@@ -2337,8 +2338,8 @@ const Pt = ye(
|
|
|
2337
2338
|
Ee(Ke, pi),
|
|
2338
2339
|
{ singleton: !0 }
|
|
2339
2340
|
), gi = ye(() => ({
|
|
2340
|
-
context:
|
|
2341
|
-
})),
|
|
2341
|
+
context: D(null)
|
|
2342
|
+
})), Ds = ({
|
|
2342
2343
|
itemBottom: e,
|
|
2343
2344
|
itemTop: t,
|
|
2344
2345
|
locationParams: { align: n, behavior: r, ...o },
|
|
@@ -2356,8 +2357,8 @@ const Pt = ye(
|
|
|
2356
2357
|
d,
|
|
2357
2358
|
ge(t, a, n, i, o, r, u),
|
|
2358
2359
|
ge(e),
|
|
2359
|
-
|
|
2360
|
-
const { align: C, behavior: _, calculateViewLocation: M =
|
|
2360
|
+
Q(([[h, p, m, v, y, c, f, g], w]) => {
|
|
2361
|
+
const { align: C, behavior: _, calculateViewLocation: M = Ds, done: b, ...S } = h, k = ai(h, p, v - 1), T = Zt(k, p.offsetTree, w) + y + c, O = T + ct(p.sizeTree, k)[1], P = g + c, I = g + m - f, R = M({
|
|
2361
2362
|
itemBottom: O,
|
|
2362
2363
|
itemTop: T,
|
|
2363
2364
|
locationParams: { align: C, behavior: _, ...S },
|
|
@@ -2370,7 +2371,7 @@ const Pt = ye(
|
|
|
2370
2371
|
ae((z) => !z),
|
|
2371
2372
|
// skips the initial publish of false, and the cleanup call.
|
|
2372
2373
|
// but if scrollingInProgress is true, we skip the initial publish.
|
|
2373
|
-
|
|
2374
|
+
Et(Pe(s) ? 1 : 2)
|
|
2374
2375
|
),
|
|
2375
2376
|
b
|
|
2376
2377
|
) : b == null || b(), R;
|
|
@@ -2382,13 +2383,13 @@ const Pt = ye(
|
|
|
2382
2383
|
scrollIntoView: d
|
|
2383
2384
|
};
|
|
2384
2385
|
},
|
|
2385
|
-
Ee(ht, Ke, on, Pt,
|
|
2386
|
+
Ee(ht, Ke, on, Pt, Ct),
|
|
2386
2387
|
{ singleton: !0 }
|
|
2387
2388
|
);
|
|
2388
2389
|
function to(e) {
|
|
2389
2390
|
return e ? e === "smooth" ? "smooth" : "auto" : !1;
|
|
2390
2391
|
}
|
|
2391
|
-
const
|
|
2392
|
+
const Ws = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
2392
2393
|
([
|
|
2393
2394
|
{ listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
|
|
2394
2395
|
{ atBottomState: o, isAtBottom: i },
|
|
@@ -2400,7 +2401,7 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2400
2401
|
{ context: p },
|
|
2401
2402
|
{ scrollIntoView: m }
|
|
2402
2403
|
]) => {
|
|
2403
|
-
const v =
|
|
2404
|
+
const v = D(!1), y = ve();
|
|
2404
2405
|
let c = null;
|
|
2405
2406
|
function f(_) {
|
|
2406
2407
|
fe(s, {
|
|
@@ -2411,11 +2412,11 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2411
2412
|
}
|
|
2412
2413
|
Ie(
|
|
2413
2414
|
H(
|
|
2414
|
-
Ne(H(le(t),
|
|
2415
|
+
Ne(H(le(t), Et(1)), a),
|
|
2415
2416
|
ge(le(v), i, u, h),
|
|
2416
|
-
|
|
2417
|
+
Q(([[_, M], b, S, k, T]) => {
|
|
2417
2418
|
let O = M && k, P = "auto";
|
|
2418
|
-
return O && (P =
|
|
2419
|
+
return O && (P = Ws(b, S || T), O = O && !!P), { followOutputBehavior: P, shouldFollow: O, totalCount: _ };
|
|
2419
2420
|
}),
|
|
2420
2421
|
ae(({ shouldFollow: _ }) => _)
|
|
2421
2422
|
),
|
|
@@ -2452,12 +2453,12 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2452
2453
|
}), Ie(Ne(le(v), o), ([_, M]) => {
|
|
2453
2454
|
_ && !M.atBottom && M.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
|
|
2454
2455
|
});
|
|
2455
|
-
const w =
|
|
2456
|
+
const w = D(null), C = ve();
|
|
2456
2457
|
return oe(
|
|
2457
2458
|
dr(
|
|
2458
2459
|
H(
|
|
2459
2460
|
le(r),
|
|
2460
|
-
|
|
2461
|
+
Q((_) => {
|
|
2461
2462
|
var M;
|
|
2462
2463
|
return (M = _ == null ? void 0 : _.length) != null ? M : 0;
|
|
2463
2464
|
})
|
|
@@ -2467,9 +2468,9 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2467
2468
|
C
|
|
2468
2469
|
), Ie(
|
|
2469
2470
|
H(
|
|
2470
|
-
Ne(H(C,
|
|
2471
|
+
Ne(H(C, Et(1)), a),
|
|
2471
2472
|
ge(le(w), u, h, p),
|
|
2472
|
-
|
|
2473
|
+
Q(([[_, M], b, S, k, T]) => M && S && (b == null ? void 0 : b({ context: T, totalCount: _, scrollingInProgress: k }))),
|
|
2473
2474
|
ae((_) => !!_),
|
|
2474
2475
|
mt(0)
|
|
2475
2476
|
),
|
|
@@ -2487,8 +2488,8 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2487
2488
|
ln,
|
|
2488
2489
|
on,
|
|
2489
2490
|
sn,
|
|
2491
|
+
Tt,
|
|
2490
2492
|
Ct,
|
|
2491
|
-
It,
|
|
2492
2493
|
Ke,
|
|
2493
2494
|
gi,
|
|
2494
2495
|
hi
|
|
@@ -2500,27 +2501,27 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2500
2501
|
ge(i),
|
|
2501
2502
|
ae(([, a]) => a !== 0),
|
|
2502
2503
|
ge(o, r, t, n, e),
|
|
2503
|
-
|
|
2504
|
+
Q(([[, a], l, d, h, p, m = []]) => fi(a, l, d, h, p, m))
|
|
2504
2505
|
),
|
|
2505
2506
|
s
|
|
2506
2507
|
), {}),
|
|
2507
|
-
Ee(ht, sn, Pt,
|
|
2508
|
+
Ee(ht, sn, Pt, Tt),
|
|
2508
2509
|
{ singleton: !0 }
|
|
2509
2510
|
), qs = ye(
|
|
2510
2511
|
([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
|
|
2511
|
-
const r =
|
|
2512
|
+
const r = D(0);
|
|
2512
2513
|
return Ie(
|
|
2513
2514
|
H(
|
|
2514
2515
|
e,
|
|
2515
2516
|
ge(r),
|
|
2516
2517
|
ae(([, o]) => o !== 0),
|
|
2517
|
-
|
|
2518
|
+
Q(([, o]) => ({ top: o }))
|
|
2518
2519
|
),
|
|
2519
2520
|
(o) => {
|
|
2520
2521
|
at(
|
|
2521
2522
|
H(
|
|
2522
2523
|
n,
|
|
2523
|
-
|
|
2524
|
+
Et(1),
|
|
2524
2525
|
ae((i) => i.items.length > 1)
|
|
2525
2526
|
),
|
|
2526
2527
|
() => {
|
|
@@ -2534,17 +2535,17 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2534
2535
|
initialScrollTop: r
|
|
2535
2536
|
};
|
|
2536
2537
|
},
|
|
2537
|
-
Ee(
|
|
2538
|
+
Ee(Tt, Ke, Pt),
|
|
2538
2539
|
{ singleton: !0 }
|
|
2539
2540
|
), mi = ye(
|
|
2540
2541
|
([{ scrollVelocity: e }]) => {
|
|
2541
|
-
const t =
|
|
2542
|
+
const t = D(!1), n = ve(), r = D(!1);
|
|
2542
2543
|
return oe(
|
|
2543
2544
|
H(
|
|
2544
2545
|
e,
|
|
2545
2546
|
ge(r, t, n),
|
|
2546
2547
|
ae(([o, i]) => !!i),
|
|
2547
|
-
|
|
2548
|
+
Q(([o, i, s, u]) => {
|
|
2548
2549
|
const { enter: a, exit: l } = i;
|
|
2549
2550
|
if (s) {
|
|
2550
2551
|
if (l(o, u))
|
|
@@ -2566,11 +2567,11 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2566
2567
|
Ee(ln),
|
|
2567
2568
|
{ singleton: !0 }
|
|
2568
2569
|
), _r = ye(([{ scrollContainerState: e, scrollTo: t }]) => {
|
|
2569
|
-
const n = ve(), r = ve(), o = ve(), i =
|
|
2570
|
+
const n = ve(), r = ve(), o = ve(), i = D(!1), s = D(void 0);
|
|
2570
2571
|
return oe(
|
|
2571
2572
|
H(
|
|
2572
2573
|
Ne(n, r),
|
|
2573
|
-
|
|
2574
|
+
Q(([{ scrollHeight: u, scrollTop: a, viewportHeight: l }, { offsetTop: d }]) => ({
|
|
2574
2575
|
scrollHeight: u,
|
|
2575
2576
|
scrollTop: Math.max(0, a - d),
|
|
2576
2577
|
viewportHeight: l
|
|
@@ -2581,7 +2582,7 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2581
2582
|
H(
|
|
2582
2583
|
t,
|
|
2583
2584
|
ge(r),
|
|
2584
|
-
|
|
2585
|
+
Q(([u, { offsetTop: a }]) => ({
|
|
2585
2586
|
...u,
|
|
2586
2587
|
top: u.top + a
|
|
2587
2588
|
}))
|
|
@@ -2605,7 +2606,7 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2605
2606
|
{ didMount: i },
|
|
2606
2607
|
{ useWindowScroll: s, windowScrollContainerState: u, windowViewportRect: a }
|
|
2607
2608
|
]) => {
|
|
2608
|
-
const l = ve(), d =
|
|
2609
|
+
const l = ve(), d = D(void 0), h = D(null), p = D(null);
|
|
2609
2610
|
return oe(u, h), oe(a, p), Ie(
|
|
2610
2611
|
H(
|
|
2611
2612
|
l,
|
|
@@ -2615,13 +2616,13 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2615
2616
|
const C = Ms(v.sizeTree);
|
|
2616
2617
|
c && f !== null && g !== null && (y = f.scrollTop - g.offsetTop), y -= w, m({ ranges: C, scrollTop: y });
|
|
2617
2618
|
}
|
|
2618
|
-
), oe(H(d, ae(yr),
|
|
2619
|
+
), oe(H(d, ae(yr), Q(Us)), o), oe(
|
|
2619
2620
|
H(
|
|
2620
2621
|
i,
|
|
2621
2622
|
ge(d),
|
|
2622
2623
|
ae(([, m]) => m !== void 0),
|
|
2623
2624
|
Me(),
|
|
2624
|
-
|
|
2625
|
+
Q(([, m]) => m.ranges)
|
|
2625
2626
|
),
|
|
2626
2627
|
e
|
|
2627
2628
|
), {
|
|
@@ -2629,18 +2630,18 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = ye(
|
|
|
2629
2630
|
restoreStateFrom: d
|
|
2630
2631
|
};
|
|
2631
2632
|
},
|
|
2632
|
-
Ee(ht, Ke, sn,
|
|
2633
|
+
Ee(ht, Ke, sn, Tt, _r)
|
|
2633
2634
|
);
|
|
2634
2635
|
function Us(e) {
|
|
2635
2636
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
2636
2637
|
}
|
|
2637
2638
|
const Ks = ye(([{ topItemsIndexes: e }]) => {
|
|
2638
|
-
const t =
|
|
2639
|
+
const t = D(0);
|
|
2639
2640
|
return oe(
|
|
2640
2641
|
H(
|
|
2641
2642
|
t,
|
|
2642
2643
|
ae((n) => n >= 0),
|
|
2643
|
-
|
|
2644
|
+
Q((n) => Array.from({ length: n }).map((r, o) => o))
|
|
2644
2645
|
),
|
|
2645
2646
|
e
|
|
2646
2647
|
), { topItemCount: t };
|
|
@@ -2673,7 +2674,7 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2673
2674
|
ae(([f]) => f !== 0),
|
|
2674
2675
|
ge(r, u, n, o, m, v),
|
|
2675
2676
|
ae(([, f, g, w, , , C]) => !C && !w && f !== 0 && g === Jt),
|
|
2676
|
-
|
|
2677
|
+
Q(([[f], , , , , g]) => (g("Upward scrolling compensation", { amount: f }, Qe.DEBUG), f))
|
|
2677
2678
|
)
|
|
2678
2679
|
);
|
|
2679
2680
|
function c(f) {
|
|
@@ -2685,21 +2686,21 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2685
2686
|
H(
|
|
2686
2687
|
Ne(je(i, !1), e, v),
|
|
2687
2688
|
ae(([f, g, w]) => !f && !w && g !== 0),
|
|
2688
|
-
|
|
2689
|
+
Q(([f, g]) => g),
|
|
2689
2690
|
mt(1)
|
|
2690
2691
|
),
|
|
2691
2692
|
c
|
|
2692
2693
|
), oe(
|
|
2693
2694
|
H(
|
|
2694
2695
|
h,
|
|
2695
|
-
|
|
2696
|
+
Q((f) => ({ top: -f }))
|
|
2696
2697
|
),
|
|
2697
2698
|
t
|
|
2698
2699
|
), Ie(
|
|
2699
2700
|
H(
|
|
2700
2701
|
l,
|
|
2701
2702
|
ge(p, d),
|
|
2702
|
-
|
|
2703
|
+
Q(([f, { groupIndices: g, lastSize: w, sizeTree: C }, _]) => {
|
|
2703
2704
|
function M(b) {
|
|
2704
2705
|
return b * (w + _);
|
|
2705
2706
|
}
|
|
@@ -2727,7 +2728,7 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2727
2728
|
}
|
|
2728
2729
|
), { deviation: e };
|
|
2729
2730
|
},
|
|
2730
|
-
Ee(Ke, ln, Pt, ht,
|
|
2731
|
+
Ee(Ke, ln, Pt, ht, Ct, Ir)
|
|
2731
2732
|
), Qs = ye(
|
|
2732
2733
|
([
|
|
2733
2734
|
e,
|
|
@@ -2757,14 +2758,14 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2757
2758
|
Ee(
|
|
2758
2759
|
Rr,
|
|
2759
2760
|
Vs,
|
|
2760
|
-
|
|
2761
|
+
Tt,
|
|
2761
2762
|
mi,
|
|
2762
2763
|
pi,
|
|
2763
2764
|
qs,
|
|
2764
2765
|
Fs,
|
|
2765
2766
|
_r,
|
|
2766
2767
|
hi,
|
|
2767
|
-
|
|
2768
|
+
Ct,
|
|
2768
2769
|
gi
|
|
2769
2770
|
)
|
|
2770
2771
|
), vi = ye(
|
|
@@ -2800,7 +2801,7 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2800
2801
|
return oe(I, k.scrollSeekRangeChanged), oe(
|
|
2801
2802
|
H(
|
|
2802
2803
|
k.windowViewportRect,
|
|
2803
|
-
|
|
2804
|
+
Q((z) => z.visibleHeight)
|
|
2804
2805
|
),
|
|
2805
2806
|
f.viewportHeight
|
|
2806
2807
|
), {
|
|
@@ -2863,9 +2864,9 @@ function Zs(e, t) {
|
|
|
2863
2864
|
Object.hasOwn(r, s) || (n[s] = t[s]);
|
|
2864
2865
|
return n;
|
|
2865
2866
|
}
|
|
2866
|
-
const dn = typeof document < "u" ?
|
|
2867
|
+
const dn = typeof document < "u" ? W.useLayoutEffect : W.useEffect;
|
|
2867
2868
|
function Si(e, t, n) {
|
|
2868
|
-
const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), i = Object.keys(t.methods || {}), s = Object.keys(t.events || {}), u =
|
|
2869
|
+
const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), i = Object.keys(t.methods || {}), s = Object.keys(t.events || {}), u = W.createContext({});
|
|
2869
2870
|
function a(c, f) {
|
|
2870
2871
|
c.propsReady && fe(c.propsReady, !1);
|
|
2871
2872
|
for (const g of r) {
|
|
@@ -2888,10 +2889,10 @@ function Si(e, t, n) {
|
|
|
2888
2889
|
function d(c) {
|
|
2889
2890
|
return s.reduce((f, g) => (f[g] = gs(c[t.events[g]]), f), {});
|
|
2890
2891
|
}
|
|
2891
|
-
const h =
|
|
2892
|
-
const { children: g, ...w } = c, [C] =
|
|
2892
|
+
const h = W.forwardRef((c, f) => {
|
|
2893
|
+
const { children: g, ...w } = c, [C] = W.useState(() => _n(ms(e), (b) => {
|
|
2893
2894
|
a(b, w);
|
|
2894
|
-
})), [_] =
|
|
2895
|
+
})), [_] = W.useState(qr(d, C));
|
|
2895
2896
|
dn(() => {
|
|
2896
2897
|
for (const b of s)
|
|
2897
2898
|
b in w && Ie(_[b], w[b]);
|
|
@@ -2900,60 +2901,60 @@ function Si(e, t, n) {
|
|
|
2900
2901
|
};
|
|
2901
2902
|
}, [w, _, C]), dn(() => {
|
|
2902
2903
|
a(C, w);
|
|
2903
|
-
}),
|
|
2904
|
+
}), W.useImperativeHandle(f, Vr(l(C)));
|
|
2904
2905
|
const M = n;
|
|
2905
2906
|
return /* @__PURE__ */ x(u.Provider, { value: C, children: n ? /* @__PURE__ */ x(M, { ...Zs([...r, ...o, ...s], w), children: g }) : g });
|
|
2906
2907
|
}), p = (c) => {
|
|
2907
|
-
const f =
|
|
2908
|
-
return
|
|
2908
|
+
const f = W.useContext(u);
|
|
2909
|
+
return W.useCallback(
|
|
2909
2910
|
(g) => {
|
|
2910
2911
|
fe(f[c], g);
|
|
2911
2912
|
},
|
|
2912
2913
|
[f, c]
|
|
2913
2914
|
);
|
|
2914
2915
|
}, m = (c) => {
|
|
2915
|
-
const f =
|
|
2916
|
+
const f = W.useContext(u)[c], g = W.useCallback(
|
|
2916
2917
|
(w) => Ie(f, w),
|
|
2917
2918
|
[f]
|
|
2918
2919
|
);
|
|
2919
|
-
return
|
|
2920
|
+
return W.useSyncExternalStore(
|
|
2920
2921
|
g,
|
|
2921
2922
|
() => Pe(f),
|
|
2922
2923
|
() => Pe(f)
|
|
2923
2924
|
);
|
|
2924
2925
|
}, v = (c) => {
|
|
2925
|
-
const f =
|
|
2926
|
+
const f = W.useContext(u)[c], [g, w] = W.useState(qr(Pe, f));
|
|
2926
2927
|
return dn(
|
|
2927
2928
|
() => Ie(f, (C) => {
|
|
2928
2929
|
C !== g && w(Vr(C));
|
|
2929
2930
|
}),
|
|
2930
2931
|
[f, g]
|
|
2931
2932
|
), g;
|
|
2932
|
-
}, y =
|
|
2933
|
+
}, y = W.version.startsWith("18") ? m : v;
|
|
2933
2934
|
return {
|
|
2934
2935
|
Component: h,
|
|
2935
2936
|
useEmitter: (c, f) => {
|
|
2936
|
-
const g =
|
|
2937
|
+
const g = W.useContext(u)[c];
|
|
2937
2938
|
dn(() => Ie(g, f), [f, g]);
|
|
2938
2939
|
},
|
|
2939
2940
|
useEmitterValue: y,
|
|
2940
2941
|
usePublisher: p
|
|
2941
2942
|
};
|
|
2942
2943
|
}
|
|
2943
|
-
const yi =
|
|
2944
|
-
function
|
|
2944
|
+
const yi = W.createContext(void 0), xi = W.createContext(void 0), wi = typeof document < "u" ? W.useLayoutEffect : W.useEffect;
|
|
2945
|
+
function Wn(e) {
|
|
2945
2946
|
return "self" in e;
|
|
2946
2947
|
}
|
|
2947
2948
|
function Js(e) {
|
|
2948
2949
|
return "body" in e;
|
|
2949
2950
|
}
|
|
2950
2951
|
function Ii(e, t, n, r = $t, o, i) {
|
|
2951
|
-
const s =
|
|
2952
|
+
const s = W.useRef(null), u = W.useRef(null), a = W.useRef(null), l = W.useCallback(
|
|
2952
2953
|
(p) => {
|
|
2953
2954
|
let m, v, y;
|
|
2954
2955
|
const c = p.target;
|
|
2955
|
-
if (Js(c) ||
|
|
2956
|
-
const g =
|
|
2956
|
+
if (Js(c) || Wn(c)) {
|
|
2957
|
+
const g = Wn(c) ? c : c.defaultView;
|
|
2957
2958
|
y = i ? g.scrollX : g.scrollY, m = i ? g.document.documentElement.scrollWidth : g.document.documentElement.scrollHeight, v = i ? g.innerWidth : g.innerHeight;
|
|
2958
2959
|
} else
|
|
2959
2960
|
y = i ? c.scrollLeft : c.scrollTop, m = i ? c.scrollWidth : c.scrollHeight, v = i ? c.offsetWidth : c.offsetHeight;
|
|
@@ -2968,7 +2969,7 @@ function Ii(e, t, n, r = $t, o, i) {
|
|
|
2968
2969
|
},
|
|
2969
2970
|
[e, t, i]
|
|
2970
2971
|
);
|
|
2971
|
-
|
|
2972
|
+
W.useEffect(() => {
|
|
2972
2973
|
const p = o || s.current;
|
|
2973
2974
|
return r(o || s.current), l({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", l, { passive: !0 }), () => {
|
|
2974
2975
|
r(null), p.removeEventListener("scroll", l);
|
|
@@ -2980,7 +2981,7 @@ function Ii(e, t, n, r = $t, o, i) {
|
|
|
2980
2981
|
return;
|
|
2981
2982
|
const v = p.behavior === "smooth";
|
|
2982
2983
|
let y, c, f;
|
|
2983
|
-
|
|
2984
|
+
Wn(m) ? (c = Math.max(
|
|
2984
2985
|
yt(m.document.documentElement, i ? "width" : "height"),
|
|
2985
2986
|
i ? m.document.documentElement.scrollWidth : m.document.documentElement.scrollHeight
|
|
2986
2987
|
), y = i ? m.innerWidth : m.innerHeight, f = i ? window.scrollX : window.scrollY) : (c = m[i ? "scrollWidth" : "scrollHeight"], y = yt(m, i ? "width" : "height"), f = m[i ? "scrollLeft" : "scrollTop"]);
|
|
@@ -3008,10 +3009,10 @@ function Er(e) {
|
|
|
3008
3009
|
return e;
|
|
3009
3010
|
}
|
|
3010
3011
|
const el = /* @__PURE__ */ ye(() => {
|
|
3011
|
-
const e =
|
|
3012
|
+
const e = D((u) => `Item ${u}`), t = D((u) => `Group ${u}`), n = D({}), r = D(Er), o = D("div"), i = D($t), s = (u, a = null) => je(
|
|
3012
3013
|
H(
|
|
3013
3014
|
n,
|
|
3014
|
-
|
|
3015
|
+
Q((l) => l[u]),
|
|
3015
3016
|
Me()
|
|
3016
3017
|
),
|
|
3017
3018
|
a
|
|
@@ -3036,7 +3037,7 @@ const el = /* @__PURE__ */ ye(() => {
|
|
|
3036
3037
|
}), tl = /* @__PURE__ */ ye(
|
|
3037
3038
|
([e, t]) => ({ ...e, ...t }),
|
|
3038
3039
|
Ee(vi, el)
|
|
3039
|
-
), nl = ({ height: e }) => /* @__PURE__ */ x("div", { style: { height: e } }), rl = { overflowAnchor: "none", position: Mr(), zIndex: 1 }, Ci = { overflowAnchor: "none" }, ol = { ...Ci, display: "inline-block", height: "100%" }, ro = /* @__PURE__ */
|
|
3040
|
+
), nl = ({ height: e }) => /* @__PURE__ */ x("div", { style: { height: e } }), rl = { overflowAnchor: "none", position: Mr(), zIndex: 1 }, Ci = { overflowAnchor: "none" }, ol = { ...Ci, display: "inline-block", height: "100%" }, ro = /* @__PURE__ */ W.memo(function({ showTopList: e = !1 }) {
|
|
3040
3041
|
const t = ue("listState"), n = ot("sizeRanges"), r = ue("useWindowScroll"), o = ue("customScrollParent"), i = ot("windowScrollContainerState"), s = ot("scrollContainerState"), u = o || r ? i : s, a = ue("itemContent"), l = ue("context"), d = ue("groupContent"), h = ue("trackItemSizes"), p = ue("itemSize"), m = ue("log"), v = ot("gap"), y = ue("horizontalDirection"), { callbackRef: c } = Ss(
|
|
3041
3042
|
n,
|
|
3042
3043
|
p,
|
|
@@ -3047,7 +3048,7 @@ const el = /* @__PURE__ */ ye(() => {
|
|
|
3047
3048
|
o,
|
|
3048
3049
|
y,
|
|
3049
3050
|
ue("skipAnimationFrameInResizeObserver")
|
|
3050
|
-
), [f, g] =
|
|
3051
|
+
), [f, g] = W.useState(0);
|
|
3051
3052
|
Or("deviation", (R) => {
|
|
3052
3053
|
f !== R && g(R);
|
|
3053
3054
|
});
|
|
@@ -3143,9 +3144,9 @@ function qe(e, t) {
|
|
|
3143
3144
|
function al(e, t) {
|
|
3144
3145
|
return { item: typeof e == "string" ? void 0 : t };
|
|
3145
3146
|
}
|
|
3146
|
-
const cl = /* @__PURE__ */
|
|
3147
|
+
const cl = /* @__PURE__ */ W.memo(function() {
|
|
3147
3148
|
const e = ue("HeaderComponent"), t = ot("headerHeight"), n = ue("HeaderFooterTag"), r = zt(
|
|
3148
|
-
|
|
3149
|
+
W.useMemo(
|
|
3149
3150
|
() => (i) => {
|
|
3150
3151
|
t(yt(i, "height"));
|
|
3151
3152
|
},
|
|
@@ -3155,9 +3156,9 @@ const cl = /* @__PURE__ */ D.memo(function() {
|
|
|
3155
3156
|
ue("skipAnimationFrameInResizeObserver")
|
|
3156
3157
|
), o = ue("context");
|
|
3157
3158
|
return e ? /* @__PURE__ */ x(n, { ref: r, children: /* @__PURE__ */ x(e, { ...qe(e, o) }) }) : null;
|
|
3158
|
-
}), ul = /* @__PURE__ */
|
|
3159
|
+
}), ul = /* @__PURE__ */ W.memo(function() {
|
|
3159
3160
|
const e = ue("FooterComponent"), t = ot("footerHeight"), n = ue("HeaderFooterTag"), r = zt(
|
|
3160
|
-
|
|
3161
|
+
W.useMemo(
|
|
3161
3162
|
() => (i) => {
|
|
3162
3163
|
t(yt(i, "height"));
|
|
3163
3164
|
},
|
|
@@ -3169,7 +3170,7 @@ const cl = /* @__PURE__ */ D.memo(function() {
|
|
|
3169
3170
|
return e ? /* @__PURE__ */ x(n, { ref: r, children: /* @__PURE__ */ x(e, { ...qe(e, o) }) }) : null;
|
|
3170
3171
|
});
|
|
3171
3172
|
function Ti({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
3172
|
-
return
|
|
3173
|
+
return W.memo(function({ children: r, style: o, context: i, ...s }) {
|
|
3173
3174
|
const u = n("scrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("scrollerRef"), h = t("horizontalDirection") || !1, { scrollByCallback: p, scrollerRef: m, scrollToCallback: v } = Ii(
|
|
3174
3175
|
u,
|
|
3175
3176
|
l,
|
|
@@ -3194,8 +3195,8 @@ function Ti({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
3194
3195
|
});
|
|
3195
3196
|
}
|
|
3196
3197
|
function ki({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
3197
|
-
return
|
|
3198
|
-
const u = n("windowScrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("totalListHeight"), h = t("deviation"), p = t("customScrollParent"), m =
|
|
3198
|
+
return W.memo(function({ children: r, style: o, context: i, ...s }) {
|
|
3199
|
+
const u = n("windowScrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("totalListHeight"), h = t("deviation"), p = t("customScrollParent"), m = W.useRef(null), v = t("scrollerRef"), { scrollByCallback: y, scrollerRef: c, scrollToCallback: f } = Ii(
|
|
3199
3200
|
u,
|
|
3200
3201
|
l,
|
|
3201
3202
|
a,
|
|
@@ -3221,30 +3222,30 @@ function ki({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
3221
3222
|
});
|
|
3222
3223
|
}
|
|
3223
3224
|
const dl = ({ children: e }) => {
|
|
3224
|
-
const t =
|
|
3225
|
+
const t = W.useContext(yi), n = ot("viewportHeight"), r = ot("fixedItemHeight"), o = ue("alignToBottom"), i = ue("horizontalDirection"), s = W.useMemo(
|
|
3225
3226
|
() => Qo(n, (a) => yt(a, i ? "width" : "height")),
|
|
3226
3227
|
[n, i]
|
|
3227
3228
|
), u = zt(s, !0, ue("skipAnimationFrameInResizeObserver"));
|
|
3228
|
-
return
|
|
3229
|
+
return W.useEffect(() => {
|
|
3229
3230
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
3230
3231
|
}, [t, n, r]), /* @__PURE__ */ x("div", { "data-viewport-type": "element", ref: u, style: En(o), children: e });
|
|
3231
3232
|
}, fl = ({ children: e }) => {
|
|
3232
|
-
const t =
|
|
3233
|
+
const t = W.useContext(yi), n = ot("windowViewportRect"), r = ot("fixedItemHeight"), o = ue("customScrollParent"), i = Jo(
|
|
3233
3234
|
n,
|
|
3234
3235
|
o,
|
|
3235
3236
|
ue("skipAnimationFrameInResizeObserver")
|
|
3236
3237
|
), s = ue("alignToBottom");
|
|
3237
|
-
return
|
|
3238
|
+
return W.useEffect(() => {
|
|
3238
3239
|
t && (r(t.itemHeight), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
|
|
3239
3240
|
}, [t, n, r]), /* @__PURE__ */ x("div", { "data-viewport-type": "window", ref: i, style: En(s), children: e });
|
|
3240
3241
|
}, pl = ({ children: e }) => {
|
|
3241
3242
|
const t = ue("TopItemListComponent") || "div", n = ue("headerHeight"), r = { ...ll, marginTop: `${n}px` }, o = ue("context");
|
|
3242
3243
|
return /* @__PURE__ */ x(t, { style: r, ...qe(t, o), children: e });
|
|
3243
|
-
}, gl = /* @__PURE__ */
|
|
3244
|
+
}, gl = /* @__PURE__ */ W.memo(function(e) {
|
|
3244
3245
|
const t = ue("useWindowScroll"), n = ue("topItemsIndexes").length > 0, r = ue("customScrollParent"), o = ue("context");
|
|
3245
|
-
return /* @__PURE__ */
|
|
3246
|
+
return /* @__PURE__ */ ee(r || t ? bl : ml, { ...e, context: o, children: [
|
|
3246
3247
|
n && /* @__PURE__ */ x(pl, { children: /* @__PURE__ */ x(ro, { showTopList: !0 }) }),
|
|
3247
|
-
/* @__PURE__ */
|
|
3248
|
+
/* @__PURE__ */ ee(r || t ? fl : dl, { children: [
|
|
3248
3249
|
/* @__PURE__ */ x(cl, {}),
|
|
3249
3250
|
/* @__PURE__ */ x(ro, {}),
|
|
3250
3251
|
/* @__PURE__ */ x(ul, {})
|
|
@@ -3319,16 +3320,16 @@ const dl = ({ children: e }) => {
|
|
|
3319
3320
|
},
|
|
3320
3321
|
gl
|
|
3321
3322
|
), ml = /* @__PURE__ */ Ti({ useEmitter: Or, useEmitterValue: ue, usePublisher: ot }), bl = /* @__PURE__ */ ki({ useEmitter: Or, useEmitterValue: ue, usePublisher: ot }), vl = hl, Sl = /* @__PURE__ */ ye(() => {
|
|
3322
|
-
const e =
|
|
3323
|
+
const e = D((l) => /* @__PURE__ */ ee("td", { children: [
|
|
3323
3324
|
"Item $",
|
|
3324
3325
|
l
|
|
3325
|
-
] })), t =
|
|
3326
|
+
] })), t = D(null), n = D((l) => /* @__PURE__ */ ee("td", { colSpan: 1e3, children: [
|
|
3326
3327
|
"Group ",
|
|
3327
3328
|
l
|
|
3328
|
-
] })), r =
|
|
3329
|
+
] })), r = D(null), o = D(null), i = D({}), s = D(Er), u = D($t), a = (l, d = null) => je(
|
|
3329
3330
|
H(
|
|
3330
3331
|
i,
|
|
3331
|
-
|
|
3332
|
+
Q((h) => h[l]),
|
|
3332
3333
|
Me()
|
|
3333
3334
|
),
|
|
3334
3335
|
d
|
|
@@ -3398,7 +3399,7 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3398
3399
|
{ customScrollParent: c, useWindowScroll: f, windowScrollContainerState: g, windowScrollTo: w, windowViewportRect: C },
|
|
3399
3400
|
_
|
|
3400
3401
|
]) => {
|
|
3401
|
-
const M =
|
|
3402
|
+
const M = D(0), b = D(0), S = D(oo), k = D({ height: 0, width: 0 }), T = D({ height: 0, width: 0 }), O = ve(), P = ve(), I = D(0), R = D(null), z = D({ column: 0, row: 0 }), N = ve(), A = ve(), V = D(!1), re = D(0), be = D(!0), Se = D(!1), Ce = D(!1);
|
|
3402
3403
|
Ie(
|
|
3403
3404
|
H(
|
|
3404
3405
|
v,
|
|
@@ -3411,7 +3412,7 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3411
3412
|
), Ie(
|
|
3412
3413
|
H(
|
|
3413
3414
|
Ne(v, be, T, k, re, Se),
|
|
3414
|
-
ae(([E, L, q,
|
|
3415
|
+
ae(([E, L, q, B, , Z]) => E && !L && q.height !== 0 && B.height !== 0 && !Z)
|
|
3415
3416
|
),
|
|
3416
3417
|
([, , , , E]) => {
|
|
3417
3418
|
fe(Se, !0), Tr(1, () => {
|
|
@@ -3422,7 +3423,7 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3422
3423
|
}
|
|
3423
3424
|
), oe(
|
|
3424
3425
|
H(
|
|
3425
|
-
|
|
3426
|
+
A,
|
|
3426
3427
|
ae((E) => E != null && E.scrollTop > 0),
|
|
3427
3428
|
ft(0)
|
|
3428
3429
|
),
|
|
@@ -3430,18 +3431,18 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3430
3431
|
), Ie(
|
|
3431
3432
|
H(
|
|
3432
3433
|
v,
|
|
3433
|
-
ge(
|
|
3434
|
+
ge(A),
|
|
3434
3435
|
ae(([, E]) => E != null)
|
|
3435
3436
|
),
|
|
3436
3437
|
([, E]) => {
|
|
3437
|
-
E && (fe(k, E.viewport), fe(T, E.item), fe(z, E.gap), E.scrollTop > 0 && (fe(V, !0), at(H(l,
|
|
3438
|
+
E && (fe(k, E.viewport), fe(T, E.item), fe(z, E.gap), E.scrollTop > 0 && (fe(V, !0), at(H(l, Et(1)), (L) => {
|
|
3438
3439
|
fe(V, !1);
|
|
3439
3440
|
}), fe(a, { top: E.scrollTop })));
|
|
3440
3441
|
}
|
|
3441
3442
|
), oe(
|
|
3442
3443
|
H(
|
|
3443
3444
|
k,
|
|
3444
|
-
|
|
3445
|
+
Q(({ height: E }) => E)
|
|
3445
3446
|
),
|
|
3446
3447
|
h
|
|
3447
3448
|
), oe(
|
|
@@ -3452,10 +3453,10 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3452
3453
|
le(z, (E, L) => E && E.column === L.column && E.row === L.row),
|
|
3453
3454
|
le(l)
|
|
3454
3455
|
),
|
|
3455
|
-
|
|
3456
|
+
Q(([E, L, q, B]) => ({
|
|
3456
3457
|
gap: q,
|
|
3457
3458
|
item: L,
|
|
3458
|
-
scrollTop:
|
|
3459
|
+
scrollTop: B,
|
|
3459
3460
|
viewport: E
|
|
3460
3461
|
}))
|
|
3461
3462
|
),
|
|
@@ -3475,30 +3476,30 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3475
3476
|
le(re)
|
|
3476
3477
|
),
|
|
3477
3478
|
ae(([, , , , , , , E]) => !E),
|
|
3478
|
-
|
|
3479
|
+
Q(
|
|
3479
3480
|
([
|
|
3480
3481
|
E,
|
|
3481
3482
|
[L, q],
|
|
3482
|
-
|
|
3483
|
-
|
|
3483
|
+
B,
|
|
3484
|
+
Z,
|
|
3484
3485
|
F,
|
|
3485
|
-
|
|
3486
|
+
Y,
|
|
3486
3487
|
ne,
|
|
3487
3488
|
,
|
|
3488
|
-
|
|
3489
|
+
J,
|
|
3489
3490
|
ce
|
|
3490
3491
|
]) => {
|
|
3491
|
-
const { column: ie, row: we } =
|
|
3492
|
+
const { column: ie, row: we } = B, { height: pe, width: ke } = Z, { width: Oe } = F;
|
|
3492
3493
|
if (ne === 0 && (E === 0 || Oe === 0))
|
|
3493
3494
|
return oo;
|
|
3494
3495
|
if (ke === 0) {
|
|
3495
3496
|
const bt = kr(ce, E), Vt = bt + Math.max(ne - 1, 0);
|
|
3496
|
-
return xl(lo(bt, Vt,
|
|
3497
|
+
return xl(lo(bt, Vt, Y));
|
|
3497
3498
|
}
|
|
3498
3499
|
const He = Ri(Oe, ke, ie);
|
|
3499
|
-
let
|
|
3500
|
-
|
|
3501
|
-
const ut = lo(
|
|
3500
|
+
let Be, $e;
|
|
3501
|
+
J ? L === 0 && q === 0 && ne > 0 ? (Be = 0, $e = ne - 1) : (Be = He * Sn((L + we) / (pe + we)), $e = He * io((q + we) / (pe + we)) - 1, $e = Vn(E - 1, Kt($e, He - 1)), Be = Vn($e, Kt(0, Be))) : (Be = 0, $e = -1);
|
|
3502
|
+
const ut = lo(Be, $e, Y), { bottom: Xe, top: Ge } = ao(F, B, Z, ut), st = io(E / He), nt = st * pe + (st - 1) * we - Xe;
|
|
3502
3503
|
return { bottom: Xe, itemHeight: pe, items: ut, itemWidth: ke, offsetBottom: nt, offsetTop: Ge, top: Ge };
|
|
3503
3504
|
}
|
|
3504
3505
|
)
|
|
@@ -3508,27 +3509,27 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3508
3509
|
H(
|
|
3509
3510
|
R,
|
|
3510
3511
|
ae((E) => E !== null),
|
|
3511
|
-
|
|
3512
|
+
Q((E) => E.length)
|
|
3512
3513
|
),
|
|
3513
3514
|
M
|
|
3514
3515
|
), oe(
|
|
3515
3516
|
H(
|
|
3516
3517
|
Ne(k, T, S, z),
|
|
3517
3518
|
ae(([E, L, { items: q }]) => q.length > 0 && L.height !== 0 && E.height !== 0),
|
|
3518
|
-
|
|
3519
|
-
const { bottom:
|
|
3520
|
-
return [F,
|
|
3519
|
+
Q(([E, L, { items: q }, B]) => {
|
|
3520
|
+
const { bottom: Z, top: F } = ao(E, B, L, q);
|
|
3521
|
+
return [F, Z];
|
|
3521
3522
|
}),
|
|
3522
3523
|
Me(Qt)
|
|
3523
3524
|
),
|
|
3524
3525
|
t
|
|
3525
3526
|
);
|
|
3526
|
-
const xe =
|
|
3527
|
+
const xe = D(!1);
|
|
3527
3528
|
oe(
|
|
3528
3529
|
H(
|
|
3529
3530
|
l,
|
|
3530
3531
|
ge(xe),
|
|
3531
|
-
|
|
3532
|
+
Q(([E, L]) => L || E !== 0)
|
|
3532
3533
|
),
|
|
3533
3534
|
xe
|
|
3534
3535
|
);
|
|
@@ -3538,10 +3539,10 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3538
3539
|
ae(([{ items: E }]) => E.length > 0),
|
|
3539
3540
|
ge(xe),
|
|
3540
3541
|
ae(([[E, L], q]) => {
|
|
3541
|
-
const
|
|
3542
|
-
return (q || E.bottom > 0 && E.itemHeight > 0 && E.offsetBottom === 0 && E.items.length === L) &&
|
|
3542
|
+
const B = E.items[E.items.length - 1].index === L - 1;
|
|
3543
|
+
return (q || E.bottom > 0 && E.itemHeight > 0 && E.offsetBottom === 0 && E.items.length === L) && B;
|
|
3543
3544
|
}),
|
|
3544
|
-
|
|
3545
|
+
Q(([[, E]]) => E - 1),
|
|
3545
3546
|
Me()
|
|
3546
3547
|
)
|
|
3547
3548
|
), K = tt(
|
|
@@ -3556,7 +3557,7 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3556
3557
|
le(S),
|
|
3557
3558
|
ge(V),
|
|
3558
3559
|
ae(([{ items: E }, L]) => E.length > 0 && !L),
|
|
3559
|
-
|
|
3560
|
+
Q(([{ items: E }]) => ({
|
|
3560
3561
|
endIndex: E[E.length - 1].index,
|
|
3561
3562
|
startIndex: E[0].index
|
|
3562
3563
|
})),
|
|
@@ -3568,12 +3569,12 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3568
3569
|
H(
|
|
3569
3570
|
O,
|
|
3570
3571
|
ge(k, T, M, z),
|
|
3571
|
-
|
|
3572
|
-
const F = ui(E), { align:
|
|
3572
|
+
Q(([E, L, q, B, Z]) => {
|
|
3573
|
+
const F = ui(E), { align: Y, behavior: ne, offset: J } = F;
|
|
3573
3574
|
let ce = F.index;
|
|
3574
|
-
ce === "LAST" && (ce =
|
|
3575
|
-
let ie = mr(L,
|
|
3576
|
-
return
|
|
3575
|
+
ce === "LAST" && (ce = B - 1), ce = Kt(0, ce, Vn(B - 1, ce));
|
|
3576
|
+
let ie = mr(L, Z, q, ce);
|
|
3577
|
+
return Y === "end" ? ie = so(ie - L.height + q.height) : Y === "center" && (ie = so(ie - L.height / 2 + q.height / 2)), J && (ie += J), { behavior: ne, top: ie };
|
|
3577
3578
|
})
|
|
3578
3579
|
),
|
|
3579
3580
|
a
|
|
@@ -3581,14 +3582,14 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3581
3582
|
const G = je(
|
|
3582
3583
|
H(
|
|
3583
3584
|
S,
|
|
3584
|
-
|
|
3585
|
+
Q((E) => E.offsetBottom + E.bottom)
|
|
3585
3586
|
),
|
|
3586
3587
|
0
|
|
3587
3588
|
);
|
|
3588
3589
|
return oe(
|
|
3589
3590
|
H(
|
|
3590
3591
|
C,
|
|
3591
|
-
|
|
3592
|
+
Q((E) => ({ height: E.visibleHeight, width: E.visibleWidth }))
|
|
3592
3593
|
),
|
|
3593
3594
|
k
|
|
3594
3595
|
), {
|
|
@@ -3603,7 +3604,7 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3603
3604
|
initialItemCount: b,
|
|
3604
3605
|
itemDimensions: T,
|
|
3605
3606
|
overscan: n,
|
|
3606
|
-
restoreStateFrom:
|
|
3607
|
+
restoreStateFrom: A,
|
|
3607
3608
|
scrollBy: s,
|
|
3608
3609
|
scrollContainerState: u,
|
|
3609
3610
|
scrollHeight: P,
|
|
@@ -3633,7 +3634,7 @@ const Il = /* @__PURE__ */ ye(
|
|
|
3633
3634
|
..._
|
|
3634
3635
|
};
|
|
3635
3636
|
},
|
|
3636
|
-
Ee(Rr, Ke, ln, mi,
|
|
3637
|
+
Ee(Rr, Ke, ln, mi, Tt, _r, Ct)
|
|
3637
3638
|
);
|
|
3638
3639
|
function Ri(e, t, n) {
|
|
3639
3640
|
return Kt(1, Sn((e + n) / (Sn(t) + n)));
|
|
@@ -3650,14 +3651,14 @@ function mr(e, t, n, r) {
|
|
|
3650
3651
|
return s > 0 ? s + t.row : s;
|
|
3651
3652
|
}
|
|
3652
3653
|
const Cl = /* @__PURE__ */ ye(() => {
|
|
3653
|
-
const e =
|
|
3654
|
+
const e = D((h) => `Item ${h}`), t = D({}), n = D(null), r = D("virtuoso-grid-item"), o = D("virtuoso-grid-list"), i = D(Er), s = D("div"), u = D($t), a = (h, p = null) => je(
|
|
3654
3655
|
H(
|
|
3655
3656
|
t,
|
|
3656
|
-
|
|
3657
|
+
Q((m) => m[h]),
|
|
3657
3658
|
Me()
|
|
3658
3659
|
),
|
|
3659
3660
|
p
|
|
3660
|
-
), l =
|
|
3661
|
+
), l = D(!1), d = D(!1);
|
|
3661
3662
|
return oe(le(d), l), {
|
|
3662
3663
|
components: t,
|
|
3663
3664
|
computeItemKey: i,
|
|
@@ -3679,9 +3680,9 @@ const Cl = /* @__PURE__ */ ye(() => {
|
|
|
3679
3680
|
}), Tl = /* @__PURE__ */ ye(
|
|
3680
3681
|
([e, t]) => ({ ...e, ...t }),
|
|
3681
3682
|
Ee(Il, Cl)
|
|
3682
|
-
), kl = /* @__PURE__ */
|
|
3683
|
+
), kl = /* @__PURE__ */ W.memo(function() {
|
|
3683
3684
|
const e = ze("gridState"), t = ze("listClassName"), n = ze("itemClassName"), r = ze("itemContent"), o = ze("computeItemKey"), i = ze("isSeeking"), s = it("scrollHeight"), u = ze("ItemComponent"), a = ze("ListComponent"), l = ze("ScrollSeekPlaceholder"), d = ze("context"), h = it("itemDimensions"), p = it("gap"), m = ze("log"), v = ze("stateRestoreInProgress"), y = it("reportReadyState"), c = zt(
|
|
3684
|
-
|
|
3685
|
+
W.useMemo(
|
|
3685
3686
|
() => (f) => {
|
|
3686
3687
|
const g = f.parentElement.parentElement.scrollHeight;
|
|
3687
3688
|
s(g);
|
|
@@ -3734,9 +3735,9 @@ const Cl = /* @__PURE__ */ ye(() => {
|
|
|
3734
3735
|
})
|
|
3735
3736
|
}
|
|
3736
3737
|
);
|
|
3737
|
-
}), Rl =
|
|
3738
|
+
}), Rl = W.memo(function() {
|
|
3738
3739
|
const e = ze("HeaderComponent"), t = it("headerHeight"), n = ze("headerFooterTag"), r = zt(
|
|
3739
|
-
|
|
3740
|
+
W.useMemo(
|
|
3740
3741
|
() => (i) => {
|
|
3741
3742
|
t(yt(i, "height"));
|
|
3742
3743
|
},
|
|
@@ -3746,9 +3747,9 @@ const Cl = /* @__PURE__ */ ye(() => {
|
|
|
3746
3747
|
!1
|
|
3747
3748
|
), o = ze("context");
|
|
3748
3749
|
return e ? /* @__PURE__ */ x(n, { ref: r, children: /* @__PURE__ */ x(e, { ...qe(e, o) }) }) : null;
|
|
3749
|
-
}), _l =
|
|
3750
|
+
}), _l = W.memo(function() {
|
|
3750
3751
|
const e = ze("FooterComponent"), t = it("footerHeight"), n = ze("headerFooterTag"), r = zt(
|
|
3751
|
-
|
|
3752
|
+
W.useMemo(
|
|
3752
3753
|
() => (i) => {
|
|
3753
3754
|
t(yt(i, "height"));
|
|
3754
3755
|
},
|
|
@@ -3759,8 +3760,8 @@ const Cl = /* @__PURE__ */ ye(() => {
|
|
|
3759
3760
|
), o = ze("context");
|
|
3760
3761
|
return e ? /* @__PURE__ */ x(n, { ref: r, children: /* @__PURE__ */ x(e, { ...qe(e, o) }) }) : null;
|
|
3761
3762
|
}), Ml = ({ children: e }) => {
|
|
3762
|
-
const t =
|
|
3763
|
-
|
|
3763
|
+
const t = W.useContext(xi), n = it("itemDimensions"), r = it("viewportDimensions"), o = zt(
|
|
3764
|
+
W.useMemo(
|
|
3764
3765
|
() => (i) => {
|
|
3765
3766
|
r(i.getBoundingClientRect());
|
|
3766
3767
|
},
|
|
@@ -3769,17 +3770,17 @@ const Cl = /* @__PURE__ */ ye(() => {
|
|
|
3769
3770
|
!0,
|
|
3770
3771
|
!1
|
|
3771
3772
|
);
|
|
3772
|
-
return
|
|
3773
|
+
return W.useEffect(() => {
|
|
3773
3774
|
t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
|
|
3774
3775
|
}, [t, r, n]), /* @__PURE__ */ x("div", { ref: o, style: En(!1), children: e });
|
|
3775
3776
|
}, El = ({ children: e }) => {
|
|
3776
|
-
const t =
|
|
3777
|
-
return
|
|
3777
|
+
const t = W.useContext(xi), n = it("windowViewportRect"), r = it("itemDimensions"), o = ze("customScrollParent"), i = Jo(n, o, !1);
|
|
3778
|
+
return W.useEffect(() => {
|
|
3778
3779
|
t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
|
|
3779
3780
|
}, [t, n, r]), /* @__PURE__ */ x("div", { ref: i, style: En(!1), children: e });
|
|
3780
|
-
}, Ol = /* @__PURE__ */
|
|
3781
|
+
}, Ol = /* @__PURE__ */ W.memo(function({ ...e }) {
|
|
3781
3782
|
const t = ze("useWindowScroll"), n = ze("customScrollParent"), r = n || t ? Pl : zl, o = n || t ? El : Ml, i = ze("context");
|
|
3782
|
-
return /* @__PURE__ */ x(r, { ...e, ...qe(r, i), children: /* @__PURE__ */
|
|
3783
|
+
return /* @__PURE__ */ x(r, { ...e, ...qe(r, i), children: /* @__PURE__ */ ee(o, { children: [
|
|
3783
3784
|
/* @__PURE__ */ x(Rl, {}),
|
|
3784
3785
|
/* @__PURE__ */ x(kl, {}),
|
|
3785
3786
|
/* @__PURE__ */ x(_l, {})
|
|
@@ -3845,16 +3846,16 @@ function yn() {
|
|
|
3845
3846
|
throw new Error("useAudioStoreApi must be used within CRAudioProvider");
|
|
3846
3847
|
return e;
|
|
3847
3848
|
}
|
|
3848
|
-
const
|
|
3849
|
-
run:
|
|
3850
|
-
runWrap:
|
|
3849
|
+
const Al = "_run_zzb61_3", Bl = "_runWrap_zzb61_7", Gl = "_highlight_zzb61_13", Ll = "_highlightleft_zzb61_14", Hl = "_highlightright_zzb61_15", Nl = "_highlightcenter_zzb61_16", Fl = "_underline_zzb61_48", Dl = "_underlineleft_zzb61_49", Wl = "_underlineright_zzb61_50", $l = "_underlinecenter_zzb61_51", dt = {
|
|
3850
|
+
run: Al,
|
|
3851
|
+
runWrap: Bl,
|
|
3851
3852
|
highlight: Gl,
|
|
3852
3853
|
highlightleft: Ll,
|
|
3853
3854
|
highlightright: Hl,
|
|
3854
3855
|
highlightcenter: Nl,
|
|
3855
3856
|
underline: Fl,
|
|
3856
|
-
underlineleft:
|
|
3857
|
-
underlineright:
|
|
3857
|
+
underlineleft: Dl,
|
|
3858
|
+
underlineright: Wl,
|
|
3858
3859
|
underlinecenter: $l
|
|
3859
3860
|
}, uo = (e) => Symbol.iterator in e, fo = (e) => (
|
|
3860
3861
|
// HACK: avoid checking entries type
|
|
@@ -3884,7 +3885,7 @@ function ql(e, t) {
|
|
|
3884
3885
|
);
|
|
3885
3886
|
}
|
|
3886
3887
|
function nn(e) {
|
|
3887
|
-
const t =
|
|
3888
|
+
const t = W.useRef(void 0);
|
|
3888
3889
|
return (n) => {
|
|
3889
3890
|
const r = e(n);
|
|
3890
3891
|
return ql(t.current, r) ? t.current : t.current = r;
|
|
@@ -3902,7 +3903,7 @@ const Kl = Object.freeze({
|
|
|
3902
3903
|
showPointer: void 0,
|
|
3903
3904
|
pointerStyle: void 0,
|
|
3904
3905
|
pointerColor: void 0
|
|
3905
|
-
}), Mi =
|
|
3906
|
+
}), Mi = W.memo(
|
|
3906
3907
|
function({ runs: t, ns: n, baseIndex: r, preGroups: o }) {
|
|
3907
3908
|
const i = _e((O) => O.setClipIndex), s = _e((O) => O.seek), u = U((O) => O.setCurrentGlobalRunIndex), a = yn(), l = U((O) => O.rangeStartGI), d = U((O) => O.rangeEndGI), h = U((O) => O.setRange), p = l != null && d != null, m = te(
|
|
3908
3909
|
(O) => {
|
|
@@ -3914,8 +3915,8 @@ const Kl = Object.freeze({
|
|
|
3914
3915
|
const z = t[R], N = z.text ?? "";
|
|
3915
3916
|
if (!N.trim() || !/[가-힣a-zA-Z0-9]/.test(N)) return;
|
|
3916
3917
|
u(I, "program");
|
|
3917
|
-
const
|
|
3918
|
-
|
|
3918
|
+
const A = z.audioChunkIndex, V = z.audioTimeMs;
|
|
3919
|
+
A != null && V != null && (i(A), s(V));
|
|
3919
3920
|
},
|
|
3920
3921
|
[t, r, s, i, u]
|
|
3921
3922
|
), v = se(null), y = se(!1), c = se({ x: 0, y: 0 }), f = te(
|
|
@@ -3980,18 +3981,18 @@ const Kl = Object.freeze({
|
|
|
3980
3981
|
);
|
|
3981
3982
|
},
|
|
3982
3983
|
(e, t) => e.ns === t.ns && e.baseIndex === t.baseIndex && e.runs === t.runs && e.sectionId === t.sectionId
|
|
3983
|
-
), Xl =
|
|
3984
|
+
), Xl = W.memo(function() {
|
|
3984
3985
|
const t = te((r) => ({
|
|
3985
3986
|
showSplit: r.showSplit,
|
|
3986
3987
|
slash: r.breakMarks.slash,
|
|
3987
3988
|
breakGapPx: r.breakGapPx
|
|
3988
|
-
}), []), n =
|
|
3989
|
-
return n.showSplit ? /* @__PURE__ */
|
|
3989
|
+
}), []), n = X(nn(t));
|
|
3990
|
+
return n.showSplit ? /* @__PURE__ */ ee(xt, { children: [
|
|
3990
3991
|
/* @__PURE__ */ x("span", { style: { display: "inline-block", width: n.breakGapPx / 2 } }),
|
|
3991
3992
|
n.slash && /* @__PURE__ */ x("span", { children: " / " }),
|
|
3992
3993
|
/* @__PURE__ */ x("span", { style: { display: "inline-block", width: n.breakGapPx / 2 } })
|
|
3993
3994
|
] }) : null;
|
|
3994
|
-
}), Yl =
|
|
3995
|
+
}), Yl = W.memo(
|
|
3995
3996
|
function({
|
|
3996
3997
|
ns: t,
|
|
3997
3998
|
group: n,
|
|
@@ -4013,7 +4014,7 @@ const Kl = Object.freeze({
|
|
|
4013
4014
|
pointerColor: c.pointerColor
|
|
4014
4015
|
} : Kl,
|
|
4015
4016
|
[a]
|
|
4016
|
-
), d =
|
|
4017
|
+
), d = X(nn(l)), h = n.r0 ?? 0, p = n.len ?? Math.max(0, n.endG - n.startG + 1), m = a && d.showPointer && d.pointerStyle !== "underline", v = a && d.showPointer && d.pointerStyle === "underline", y = m || v ? {
|
|
4017
4018
|
// 배경색(하이라이트)
|
|
4018
4019
|
"--hl-color": d.pointerColor,
|
|
4019
4020
|
// 밑줄 색/두께/오프셋
|
|
@@ -4024,7 +4025,7 @@ const Kl = Object.freeze({
|
|
|
4024
4025
|
return /* @__PURE__ */ x(xt, { children: Array.from({ length: p }).map((c, f) => {
|
|
4025
4026
|
const w = r[h + f], C = n.startG + f, _ = `${t}/run:${C}`, M = !!w.split && C !== o;
|
|
4026
4027
|
let b = `${dt.runWrap}`;
|
|
4027
|
-
return m && (p === 1 ? b += ` ${dt.highlight}` : f === 0 ? b += ` ${dt.highlightleft}` : f + 1 === p ? b += ` ${dt.highlightright}` : b += ` ${dt.highlightcenter}`), v && (p === 1 ? b += ` ${dt.underline}` : f === 0 ? b += ` ${dt.underlineleft}` : f + 1 === p ? b += ` ${dt.underlineright}` : b += ` ${dt.underlinecenter}`), /* @__PURE__ */
|
|
4028
|
+
return m && (p === 1 ? b += ` ${dt.highlight}` : f === 0 ? b += ` ${dt.highlightleft}` : f + 1 === p ? b += ` ${dt.highlightright}` : b += ` ${dt.highlightcenter}`), v && (p === 1 ? b += ` ${dt.underline}` : f === 0 ? b += ` ${dt.underlineleft}` : f + 1 === p ? b += ` ${dt.underlineright}` : b += ` ${dt.underlinecenter}`), /* @__PURE__ */ ee(W.Fragment, { children: [
|
|
4028
4029
|
/* @__PURE__ */ x("span", { className: b, style: y, children: /* @__PURE__ */ x(
|
|
4029
4030
|
Ql,
|
|
4030
4031
|
{
|
|
@@ -4043,7 +4044,7 @@ const Kl = Object.freeze({
|
|
|
4043
4044
|
(e, t) => e.group === t.group && // 그룹 메타 참조 동일
|
|
4044
4045
|
e.runs === t.runs && // 원본 runs 참조 동일
|
|
4045
4046
|
e.ns === t.ns && e.rangeStartGI === t.rangeStartGI && e.rangeEndGI === t.rangeEndGI
|
|
4046
|
-
), Ql =
|
|
4047
|
+
), Ql = W.memo(
|
|
4047
4048
|
function({
|
|
4048
4049
|
gi: t,
|
|
4049
4050
|
g: n,
|
|
@@ -4090,7 +4091,7 @@ function Zl({
|
|
|
4090
4091
|
}) {
|
|
4091
4092
|
var l;
|
|
4092
4093
|
const s = e.list ? e.list.level * 24 : 0, u = ((l = e.list) == null ? void 0 : l.kind) === "bullet" ? e.list.glyph ?? "•" : void 0, a = t ?? u;
|
|
4093
|
-
return /* @__PURE__ */
|
|
4094
|
+
return /* @__PURE__ */ ee(
|
|
4094
4095
|
"p",
|
|
4095
4096
|
{
|
|
4096
4097
|
style: {
|
|
@@ -4129,7 +4130,7 @@ function Zl({
|
|
|
4129
4130
|
}
|
|
4130
4131
|
);
|
|
4131
4132
|
}
|
|
4132
|
-
const Jl =
|
|
4133
|
+
const Jl = W.memo(Zl, (e, t) => e.block === t.block && // block 참조 안정화 중요
|
|
4133
4134
|
e.computedMarker === t.computedMarker && e.baseIndex === t.baseIndex && e.ns === t.ns);
|
|
4134
4135
|
function ea(e, t) {
|
|
4135
4136
|
switch ((t || "decimal").toLowerCase().replace(/[\s_-]+/g, "")) {
|
|
@@ -4236,7 +4237,7 @@ function oa(e, t) {
|
|
|
4236
4237
|
}
|
|
4237
4238
|
const ia = "_scroller_kqkmq_3", sa = {
|
|
4238
4239
|
scroller: ia
|
|
4239
|
-
}, la =
|
|
4240
|
+
}, la = W.forwardRef(function({ className: t, style: n, ...r }, o) {
|
|
4240
4241
|
return /* @__PURE__ */ x(
|
|
4241
4242
|
"div",
|
|
4242
4243
|
{
|
|
@@ -4318,15 +4319,15 @@ const qn = async (e, t, { topPaddingRatio: n = 0.15, behavior: r = "smooth", qui
|
|
|
4318
4319
|
requestAnimationFrame(() => {
|
|
4319
4320
|
requestAnimationFrame(() => e());
|
|
4320
4321
|
});
|
|
4321
|
-
}),
|
|
4322
|
+
}), Ar = Ft(null);
|
|
4322
4323
|
function Oi() {
|
|
4323
|
-
const e = Ue(
|
|
4324
|
+
const e = Ue(Ar);
|
|
4324
4325
|
if (!e)
|
|
4325
4326
|
throw new Error("useQuizStoreApi must be used within QuizProgressProvider");
|
|
4326
4327
|
return e;
|
|
4327
4328
|
}
|
|
4328
4329
|
function Je(e, t) {
|
|
4329
|
-
const n = Ue(
|
|
4330
|
+
const n = Ue(Ar);
|
|
4330
4331
|
if (!n)
|
|
4331
4332
|
throw new Error("useQuizStore must be used within QuizProgressProvider");
|
|
4332
4333
|
return Tn(n, e, t);
|
|
@@ -4336,7 +4337,7 @@ const zi = () => {
|
|
|
4336
4337
|
if (!i || !i.length)
|
|
4337
4338
|
return null;
|
|
4338
4339
|
const s = o ? n ? `퀴즈 다시 풀기 (${i.length})` : "퀴즈 결과 보기" : `퀴즈 풀기 (${i.length})`;
|
|
4339
|
-
return /* @__PURE__ */
|
|
4340
|
+
return /* @__PURE__ */ ee(
|
|
4340
4341
|
"button",
|
|
4341
4342
|
{
|
|
4342
4343
|
onClick: () => {
|
|
@@ -4357,7 +4358,7 @@ const zi = () => {
|
|
|
4357
4358
|
},
|
|
4358
4359
|
children: [
|
|
4359
4360
|
s,
|
|
4360
|
-
o && !n && /* @__PURE__ */
|
|
4361
|
+
o && !n && /* @__PURE__ */ ee("div", { style: { fontSize: "12px", fontWeight: 400, marginTop: "4px", opacity: 0.8 }, children: [
|
|
4361
4362
|
"이미 풀었습니다 (",
|
|
4362
4363
|
r.rate,
|
|
4363
4364
|
"%)"
|
|
@@ -4376,7 +4377,7 @@ var Pi = {
|
|
|
4376
4377
|
className: void 0,
|
|
4377
4378
|
style: void 0,
|
|
4378
4379
|
attr: void 0
|
|
4379
|
-
}, bo =
|
|
4380
|
+
}, bo = W.createContext && /* @__PURE__ */ W.createContext(Pi), ha = ["attr", "size", "title"];
|
|
4380
4381
|
function ma(e, t) {
|
|
4381
4382
|
if (e == null) return {};
|
|
4382
4383
|
var n = ba(e, t), r, o;
|
|
@@ -4445,15 +4446,15 @@ function ya(e, t) {
|
|
|
4445
4446
|
}
|
|
4446
4447
|
return (t === "string" ? String : Number)(e);
|
|
4447
4448
|
}
|
|
4448
|
-
function
|
|
4449
|
-
return e && e.map((t, n) => /* @__PURE__ */
|
|
4449
|
+
function Ai(e) {
|
|
4450
|
+
return e && e.map((t, n) => /* @__PURE__ */ W.createElement(t.tag, In({
|
|
4450
4451
|
key: n
|
|
4451
|
-
}, t.attr),
|
|
4452
|
+
}, t.attr), Ai(t.child)));
|
|
4452
4453
|
}
|
|
4453
4454
|
function Ze(e) {
|
|
4454
|
-
return (t) => /* @__PURE__ */
|
|
4455
|
+
return (t) => /* @__PURE__ */ W.createElement(xa, wn({
|
|
4455
4456
|
attr: In({}, e.attr)
|
|
4456
|
-
}, t),
|
|
4457
|
+
}, t), Ai(e.child));
|
|
4457
4458
|
}
|
|
4458
4459
|
function xa(e) {
|
|
4459
4460
|
var t = (n) => {
|
|
@@ -4462,7 +4463,7 @@ function xa(e) {
|
|
|
4462
4463
|
size: o,
|
|
4463
4464
|
title: i
|
|
4464
4465
|
} = e, s = ma(e, ha), u = o || n.size || "1em", a;
|
|
4465
|
-
return n.className && (a = n.className), e.className && (a = (a ? a + " " : "") + e.className), /* @__PURE__ */
|
|
4466
|
+
return n.className && (a = n.className), e.className && (a = (a ? a + " " : "") + e.className), /* @__PURE__ */ W.createElement("svg", wn({
|
|
4466
4467
|
stroke: "currentColor",
|
|
4467
4468
|
fill: "currentColor",
|
|
4468
4469
|
strokeWidth: "0"
|
|
@@ -4474,9 +4475,9 @@ function xa(e) {
|
|
|
4474
4475
|
height: u,
|
|
4475
4476
|
width: u,
|
|
4476
4477
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4477
|
-
}), i && /* @__PURE__ */
|
|
4478
|
+
}), i && /* @__PURE__ */ W.createElement("title", null, i), e.children);
|
|
4478
4479
|
};
|
|
4479
|
-
return bo !== void 0 ? /* @__PURE__ */
|
|
4480
|
+
return bo !== void 0 ? /* @__PURE__ */ W.createElement(bo.Consumer, null, (n) => t(n)) : t(Pi);
|
|
4480
4481
|
}
|
|
4481
4482
|
function So(e) {
|
|
4482
4483
|
return Ze({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M18.464 2.114a.998.998 0 0 0-1.033.063l-13 9a1.003 1.003 0 0 0 0 1.645l13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-.536-.886zM17 19.091 6.757 12 17 4.909v14.182z" }, child: [] }] })(e);
|
|
@@ -4491,7 +4492,7 @@ const wa = ({ isIcon: e = !0 }) => {
|
|
|
4491
4492
|
},
|
|
4492
4493
|
[t, n]
|
|
4493
4494
|
), i = t ? "이전 섹션으로" : "이전 섹션 없음";
|
|
4494
|
-
return e ? /* @__PURE__ */
|
|
4495
|
+
return e ? /* @__PURE__ */ ee(
|
|
4495
4496
|
"button",
|
|
4496
4497
|
{
|
|
4497
4498
|
type: "button",
|
|
@@ -4532,7 +4533,7 @@ const wa = ({ isIcon: e = !0 }) => {
|
|
|
4532
4533
|
transition: "all 0.15s ease",
|
|
4533
4534
|
opacity: r ? 0.5 : 1
|
|
4534
4535
|
},
|
|
4535
|
-
children: r ? "첫섹션입니다" : /* @__PURE__ */
|
|
4536
|
+
children: r ? "첫섹션입니다" : /* @__PURE__ */ ee(xt, { children: [
|
|
4536
4537
|
/* @__PURE__ */ x(
|
|
4537
4538
|
So,
|
|
4538
4539
|
{
|
|
@@ -4555,7 +4556,7 @@ const wa = ({ isIcon: e = !0 }) => {
|
|
|
4555
4556
|
},
|
|
4556
4557
|
[t, n]
|
|
4557
4558
|
), i = t ? "다음 섹션으로" : "다음 섹션 없음";
|
|
4558
|
-
return e ? /* @__PURE__ */
|
|
4559
|
+
return e ? /* @__PURE__ */ ee(
|
|
4559
4560
|
"button",
|
|
4560
4561
|
{
|
|
4561
4562
|
type: "button",
|
|
@@ -4596,7 +4597,7 @@ const wa = ({ isIcon: e = !0 }) => {
|
|
|
4596
4597
|
transition: "all 0.15s ease",
|
|
4597
4598
|
opacity: r ? 0.5 : 1
|
|
4598
4599
|
},
|
|
4599
|
-
children: r ? "마지막섹션입니다" : /* @__PURE__ */
|
|
4600
|
+
children: r ? "마지막섹션입니다" : /* @__PURE__ */ ee(xt, { children: [
|
|
4600
4601
|
"NextSection",
|
|
4601
4602
|
/* @__PURE__ */ x(
|
|
4602
4603
|
yo,
|
|
@@ -4613,7 +4614,7 @@ const wa = ({ isIcon: e = !0 }) => {
|
|
|
4613
4614
|
}
|
|
4614
4615
|
);
|
|
4615
4616
|
};
|
|
4616
|
-
function
|
|
4617
|
+
function Bi(e, t) {
|
|
4617
4618
|
let n = 0, r = e.length - 1;
|
|
4618
4619
|
for (; n < r; ) {
|
|
4619
4620
|
const o = Math.floor((n + r + 1) / 2);
|
|
@@ -4637,15 +4638,15 @@ function Ia({
|
|
|
4637
4638
|
}), i = U((k) => {
|
|
4638
4639
|
var T;
|
|
4639
4640
|
return ((T = k.derivedNav) == null ? void 0 : T.splitGroupsPerBlock) ?? [];
|
|
4640
|
-
}), s =
|
|
4641
|
+
}), s = X((k) => k.marginX), u = X((k) => k.viewportHeight), a = se({
|
|
4641
4642
|
start: 0,
|
|
4642
4643
|
end: 0
|
|
4643
4644
|
}), l = te(
|
|
4644
4645
|
(k) => {
|
|
4645
4646
|
const T = t[k], O = `${n}blk-${T.id}`;
|
|
4646
4647
|
if (T.type === "image") {
|
|
4647
|
-
const { src: R, alt: z, width: N, height:
|
|
4648
|
-
return /* @__PURE__ */
|
|
4648
|
+
const { src: R, alt: z, width: N, height: A } = T, V = N && A ? `${N} / ${A}` : "4 / 3", re = k >= a.current.start && k <= a.current.end, be = u > 80 ? Math.floor((u - 80) * 0.6) : void 0;
|
|
4649
|
+
return /* @__PURE__ */ ee("div", { style: { margin: "12px 0", textAlign: "center", width: "100%" }, children: [
|
|
4649
4650
|
/* @__PURE__ */ x(
|
|
4650
4651
|
"div",
|
|
4651
4652
|
{
|
|
@@ -4704,7 +4705,7 @@ function Ia({
|
|
|
4704
4705
|
), d = se(null), h = te((k) => {
|
|
4705
4706
|
d.current = k;
|
|
4706
4707
|
}, []), p = he(
|
|
4707
|
-
() =>
|
|
4708
|
+
() => Dt((k) => {
|
|
4708
4709
|
const { style: T, children: O, ...P } = k;
|
|
4709
4710
|
return /* @__PURE__ */ x("div", { ...P, style: T, children: /* @__PURE__ */ x(
|
|
4710
4711
|
"div",
|
|
@@ -4735,11 +4736,11 @@ function Ia({
|
|
|
4735
4736
|
if (!y)
|
|
4736
4737
|
return /* @__PURE__ */ x("div", { style: { height: 40 } });
|
|
4737
4738
|
const k = e.quizzes, T = Math.max(80, Math.floor(u * 0.5));
|
|
4738
|
-
return k && k.length ? /* @__PURE__ */
|
|
4739
|
+
return k && k.length ? /* @__PURE__ */ ee("div", { style: { display: "block" }, children: [
|
|
4739
4740
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(zi, {}) }),
|
|
4740
4741
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Cn, { isIcon: !1 }) }),
|
|
4741
4742
|
/* @__PURE__ */ x("div", { style: { height: T, width: "100%" } })
|
|
4742
|
-
] }) : /* @__PURE__ */
|
|
4743
|
+
] }) : /* @__PURE__ */ ee("div", { children: [
|
|
4743
4744
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Cn, { isIcon: !1 }) }),
|
|
4744
4745
|
/* @__PURE__ */ x("div", { style: { height: 40 } })
|
|
4745
4746
|
] });
|
|
@@ -4757,13 +4758,13 @@ function Ia({
|
|
|
4757
4758
|
// , ScrollPlaceholder
|
|
4758
4759
|
]
|
|
4759
4760
|
// CustomScroller는 고정이면 deps에 안 넣어도 OK
|
|
4760
|
-
), C = te((k) => v[k], [v]), _ =
|
|
4761
|
+
), C = te((k) => v[k], [v]), _ = Mt(), [M] = pt(() => _.getState().progress.currentGlobalRunIndex ?? 0), b = he(() => {
|
|
4761
4762
|
if (!o.length) return 0;
|
|
4762
4763
|
const k = o[o.length - 1], T = Math.max(0, Math.min(M, k));
|
|
4763
|
-
return
|
|
4764
|
+
return Bi(o, T);
|
|
4764
4765
|
}, [o, M]);
|
|
4765
4766
|
console.log("SectionRenderVirtuoso확인");
|
|
4766
|
-
const S =
|
|
4767
|
+
const S = Mt();
|
|
4767
4768
|
return me(() => {
|
|
4768
4769
|
let k = !1;
|
|
4769
4770
|
return (async () => {
|
|
@@ -4780,7 +4781,7 @@ function Ia({
|
|
|
4780
4781
|
})(), () => {
|
|
4781
4782
|
k = !0;
|
|
4782
4783
|
};
|
|
4783
|
-
}, [d, S]), /* @__PURE__ */
|
|
4784
|
+
}, [d, S]), /* @__PURE__ */ ee(xt, { children: [
|
|
4784
4785
|
/* @__PURE__ */ x(
|
|
4785
4786
|
vl,
|
|
4786
4787
|
{
|
|
@@ -4818,7 +4819,7 @@ const Ca = ({
|
|
|
4818
4819
|
virtRef: t,
|
|
4819
4820
|
prefix: n
|
|
4820
4821
|
}) => {
|
|
4821
|
-
const r = U((I) => I.setCurrentGlobalRunIndex), o = U((I) => I.registerSectionScrollApi), i = U((I) => I.currentGlobalRunIndex), s = _e((I) => I.scrollLock), u = _e((I) => I.syncToGI), a =
|
|
4822
|
+
const r = U((I) => I.setCurrentGlobalRunIndex), o = U((I) => I.registerSectionScrollApi), i = U((I) => I.currentGlobalRunIndex), s = _e((I) => I.scrollLock), u = _e((I) => I.syncToGI), a = wt(), l = se(!1), d = se(null), h = se(null), p = se(null), m = se(-1), v = te(() => {
|
|
4822
4823
|
if (s) return;
|
|
4823
4824
|
d.current = null;
|
|
4824
4825
|
const I = h.current;
|
|
@@ -4836,7 +4837,7 @@ const Ca = ({
|
|
|
4836
4837
|
p.current = null, v();
|
|
4837
4838
|
const R = m.current;
|
|
4838
4839
|
if (R === -1) return;
|
|
4839
|
-
const z = I.scrollTop, N = I.scrollHeight - I.clientHeight,
|
|
4840
|
+
const z = I.scrollTop, N = I.scrollHeight - I.clientHeight, A = N > 0 ? z / N : 0;
|
|
4840
4841
|
let V = 0;
|
|
4841
4842
|
const re = I.querySelector(`[data-g="${R}"]`);
|
|
4842
4843
|
if (re) {
|
|
@@ -4847,7 +4848,7 @@ const Ca = ({
|
|
|
4847
4848
|
type: "scroll",
|
|
4848
4849
|
payload: {
|
|
4849
4850
|
scrollTop: z,
|
|
4850
|
-
scrollRatio:
|
|
4851
|
+
scrollRatio: A,
|
|
4851
4852
|
anchorGI: R,
|
|
4852
4853
|
anchorOffsetRatio: V
|
|
4853
4854
|
}
|
|
@@ -4882,12 +4883,12 @@ const Ca = ({
|
|
|
4882
4883
|
V.preventDefault(), V.stopPropagation(), l.current = !1;
|
|
4883
4884
|
}, N = (V) => {
|
|
4884
4885
|
["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "].includes(V.key) && (V.preventDefault(), V.stopPropagation(), l.current = !1);
|
|
4885
|
-
},
|
|
4886
|
+
}, A = {
|
|
4886
4887
|
overscrollBehavior: I.style.overscrollBehavior,
|
|
4887
4888
|
touchAction: I.style.touchAction
|
|
4888
4889
|
};
|
|
4889
4890
|
return I.style.overscrollBehavior = "contain", I.style.touchAction = "none", I.addEventListener("wheel", R, { passive: !1 }), I.addEventListener("touchmove", z, { passive: !1 }), window.addEventListener("keydown", N, { passive: !1 }), () => {
|
|
4890
|
-
I.removeEventListener("wheel", R), I.removeEventListener("touchmove", z), window.removeEventListener("keydown", N), I.style.overscrollBehavior =
|
|
4891
|
+
I.removeEventListener("wheel", R), I.removeEventListener("touchmove", z), window.removeEventListener("keydown", N), I.style.overscrollBehavior = A.overscrollBehavior, I.style.touchAction = A.touchAction;
|
|
4891
4892
|
};
|
|
4892
4893
|
}, [s, e]);
|
|
4893
4894
|
const b = se({
|
|
@@ -4937,7 +4938,7 @@ const Ca = ({
|
|
|
4937
4938
|
return;
|
|
4938
4939
|
}
|
|
4939
4940
|
if (i < R || i > z) {
|
|
4940
|
-
async function
|
|
4941
|
+
async function A() {
|
|
4941
4942
|
if (!I) return;
|
|
4942
4943
|
const V = I.scrollTop <= 1 ? 0 : 0.2;
|
|
4943
4944
|
return await qn(I, i, {
|
|
@@ -4945,7 +4946,7 @@ const Ca = ({
|
|
|
4945
4946
|
topPaddingRatio: V
|
|
4946
4947
|
});
|
|
4947
4948
|
}
|
|
4948
|
-
|
|
4949
|
+
A().then((V) => {
|
|
4949
4950
|
V ? k() : O();
|
|
4950
4951
|
});
|
|
4951
4952
|
}
|
|
@@ -4960,20 +4961,20 @@ const Ca = ({
|
|
|
4960
4961
|
const I = e.current;
|
|
4961
4962
|
if (!I) return;
|
|
4962
4963
|
function R(G, E, L = 0.2, q = 0.8) {
|
|
4963
|
-
const
|
|
4964
|
-
if (!
|
|
4965
|
-
const
|
|
4966
|
-
if (F.height <= 0 ||
|
|
4967
|
-
const
|
|
4968
|
-
return
|
|
4964
|
+
const B = G.querySelector(`[data-g="${E}"]`);
|
|
4965
|
+
if (!B) return !1;
|
|
4966
|
+
const Z = G.getBoundingClientRect(), F = B.getBoundingClientRect();
|
|
4967
|
+
if (F.height <= 0 || Z.height <= 0) return !1;
|
|
4968
|
+
const Y = (F.top + F.height / 2 - Z.top) / Z.height;
|
|
4969
|
+
return Y >= L && Y <= q;
|
|
4969
4970
|
}
|
|
4970
4971
|
const z = (G) => G === "instant" ? "auto" : G, N = (G) => {
|
|
4971
4972
|
const E = I.scrollTop, L = I.scrollHeight - I.clientHeight, q = L > 0 ? E / L : 0;
|
|
4972
|
-
let
|
|
4973
|
-
const
|
|
4974
|
-
if (
|
|
4973
|
+
let B = 0;
|
|
4974
|
+
const Z = I.querySelector(`[data-g="${G}"]`);
|
|
4975
|
+
if (Z) {
|
|
4975
4976
|
const F = I.getBoundingClientRect();
|
|
4976
|
-
|
|
4977
|
+
B = (Z.getBoundingClientRect().top - F.top) / F.height;
|
|
4977
4978
|
}
|
|
4978
4979
|
a.getState().emit({
|
|
4979
4980
|
type: "scroll",
|
|
@@ -4981,12 +4982,12 @@ const Ca = ({
|
|
|
4981
4982
|
scrollTop: E,
|
|
4982
4983
|
scrollRatio: q,
|
|
4983
4984
|
anchorGI: G,
|
|
4984
|
-
anchorOffsetRatio:
|
|
4985
|
+
anchorOffsetRatio: B
|
|
4985
4986
|
}
|
|
4986
4987
|
});
|
|
4987
|
-
},
|
|
4988
|
+
}, A = async (G, E = "smooth") => {
|
|
4988
4989
|
var q;
|
|
4989
|
-
const L =
|
|
4990
|
+
const L = Bi(n, G);
|
|
4990
4991
|
(q = t.current) == null || q.scrollToIndex({
|
|
4991
4992
|
index: L,
|
|
4992
4993
|
align: "start",
|
|
@@ -4999,14 +5000,14 @@ const Ca = ({
|
|
|
4999
5000
|
const E = I.querySelector(`[data-g="${G}"]`), L = I.getBoundingClientRect();
|
|
5000
5001
|
let q = I.scrollTop <= 1 ? 0 : 0.1;
|
|
5001
5002
|
if (E) {
|
|
5002
|
-
const
|
|
5003
|
-
q = ((
|
|
5003
|
+
const Z = E.getBoundingClientRect();
|
|
5004
|
+
q = ((Z.top + Z.height / 2 - L.top) / L.height > 0.5, 0.15);
|
|
5004
5005
|
}
|
|
5005
|
-
const
|
|
5006
|
-
return
|
|
5006
|
+
const B = !!E;
|
|
5007
|
+
return B ? (await qn(I, G, {
|
|
5007
5008
|
behavior: "smooth",
|
|
5008
5009
|
topPaddingRatio: q
|
|
5009
|
-
}), await V()) :
|
|
5010
|
+
}), await V()) : B || await A(G, "auto"), f.current = !1, N(G), R(I, G, 0.1, 0.7);
|
|
5010
5011
|
}, be = async (G) => re(G);
|
|
5011
5012
|
return {
|
|
5012
5013
|
ensureVisibleGI: re,
|
|
@@ -5023,10 +5024,10 @@ const Ca = ({
|
|
|
5023
5024
|
return (L.top - q.top) / q.height;
|
|
5024
5025
|
},
|
|
5025
5026
|
scrollToGIAtOffset: async (G, E) => {
|
|
5026
|
-
await be(G), await new Promise((
|
|
5027
|
+
await be(G), await new Promise((J) => requestAnimationFrame(() => requestAnimationFrame(J)));
|
|
5027
5028
|
const L = I.querySelector(`[data-g="${G}"]`);
|
|
5028
5029
|
if (!L) return;
|
|
5029
|
-
const q = L.getBoundingClientRect(),
|
|
5030
|
+
const q = L.getBoundingClientRect(), B = I.getBoundingClientRect(), Z = B.height > 0 ? B.height / I.clientHeight : 1, F = (q.top - B.top) / Z, Y = E * I.clientHeight, ne = F - Y;
|
|
5030
5031
|
I.scrollTop = I.scrollTop + ne;
|
|
5031
5032
|
},
|
|
5032
5033
|
getScrollRatio: () => {
|
|
@@ -5045,7 +5046,7 @@ function Ta(e) {
|
|
|
5045
5046
|
return !!(["a", "button", "input", "textarea", "select", "label"].includes(n) || t.isContentEditable);
|
|
5046
5047
|
}
|
|
5047
5048
|
function ka() {
|
|
5048
|
-
const e = U((v) => v.section), t =
|
|
5049
|
+
const e = U((v) => v.section), t = X((v) => v.theme), n = X((v) => v.fontFamily), r = X((v) => v.fontSizePx), o = X((v) => v.lineHeight), i = bn[t], { blocks: s, nsPrefix: u } = he(() => ({
|
|
5049
5050
|
sectionId: e.section_id,
|
|
5050
5051
|
blocks: e.ast.blocks,
|
|
5051
5052
|
nsPrefix: `sec-${e.section_id ?? "0"}/`
|
|
@@ -5099,16 +5100,16 @@ function za(e) {
|
|
|
5099
5100
|
function Pa(e) {
|
|
5100
5101
|
return Ze({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, child: [] }, { tag: "path", attr: { d: "M4 8v-2a2 2 0 0 1 2 -2h2" }, child: [] }, { tag: "path", attr: { d: "M4 16v2a2 2 0 0 0 2 2h2" }, child: [] }, { tag: "path", attr: { d: "M16 4h2a2 2 0 0 1 2 2v2" }, child: [] }, { tag: "path", attr: { d: "M16 20h2a2 2 0 0 0 2 -2v-2" }, child: [] }] })(e);
|
|
5101
5102
|
}
|
|
5102
|
-
const
|
|
5103
|
-
wrap:
|
|
5104
|
-
visible:
|
|
5103
|
+
const Aa = "_wrap_1hfub_4", Ba = "_visible_1hfub_25", Ga = "_compact_1hfub_31", La = "_row2_1hfub_34", Ha = "_controls_1hfub_44", Na = "_row1_1hfub_52", Fa = "_groupExpand_1hfub_80", Da = "_groupPlayback_1hfub_81", Wa = "_groupSpeed_1hfub_82", $a = "_groupFeatures_1hfub_83", Va = "_groupNav_1hfub_84", qa = "_btn_1hfub_116", ja = "_btnForbidden_1hfub_141", Ua = "_btnActive_1hfub_147", Ka = "_label_1hfub_158", Xa = "_compactBtn_1hfub_168", Re = {
|
|
5104
|
+
wrap: Aa,
|
|
5105
|
+
visible: Ba,
|
|
5105
5106
|
compact: Ga,
|
|
5106
5107
|
row2: La,
|
|
5107
5108
|
controls: Ha,
|
|
5108
5109
|
row1: Na,
|
|
5109
5110
|
groupExpand: Fa,
|
|
5110
|
-
groupPlayback:
|
|
5111
|
-
groupSpeed:
|
|
5111
|
+
groupPlayback: Da,
|
|
5112
|
+
groupSpeed: Wa,
|
|
5112
5113
|
groupFeatures: $a,
|
|
5113
5114
|
groupNav: Va,
|
|
5114
5115
|
btn: qa,
|
|
@@ -5116,8 +5117,8 @@ const Ba = "_wrap_1hfub_4", Aa = "_visible_1hfub_25", Ga = "_compact_1hfub_31",
|
|
|
5116
5117
|
btnActive: Ua,
|
|
5117
5118
|
label: Ka,
|
|
5118
5119
|
compactBtn: Xa
|
|
5119
|
-
}, Ya =
|
|
5120
|
-
const t = se(null), n = Ue(
|
|
5120
|
+
}, Ya = Dt(function() {
|
|
5121
|
+
const t = se(null), n = Ue(Ot), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = _e((S) => S.status), i = _e((S) => S.currentTimeMs), s = _e((S) => S.currentClip), u = _e((S) => S.playbackKind), a = X((S) => S.muteAudio), l = X((S) => S.audioSpeed), d = _e((S) => S.getClipSrc), h = _e((S) => S._onTime), p = _e((S) => S._onEnded), m = _e((S) => S._onError), v = U((S) => S.setCurrentGlobalRunIndex), y = U((S) => S.getSectionScrollApi), c = U((S) => S.snapToReadable), f = U((S) => S.edgeReadable), g = se(null), w = se(null), C = se(!1), _ = se(null);
|
|
5121
5122
|
me(() => {
|
|
5122
5123
|
u === "real" && (C.current = !0);
|
|
5123
5124
|
}, [u]);
|
|
@@ -5259,7 +5260,7 @@ const Ba = "_wrap_1hfub_4", Aa = "_visible_1hfub_25", Ga = "_compact_1hfub_31",
|
|
|
5259
5260
|
function Qa() {
|
|
5260
5261
|
return /* @__PURE__ */ x(Ya, {});
|
|
5261
5262
|
}
|
|
5262
|
-
const Za = "_scrubberWrap_uw0cd_2", Ja = "_labels_uw0cd_9", ec = "_index_uw0cd_15", tc = "_controls_uw0cd_19", nc = "_percent_uw0cd_25", rc = "_range_uw0cd_46",
|
|
5263
|
+
const Za = "_scrubberWrap_uw0cd_2", Ja = "_labels_uw0cd_9", ec = "_index_uw0cd_15", tc = "_controls_uw0cd_19", nc = "_percent_uw0cd_25", rc = "_range_uw0cd_46", Bt = {
|
|
5263
5264
|
scrubberWrap: Za,
|
|
5264
5265
|
labels: Ja,
|
|
5265
5266
|
index: ec,
|
|
@@ -5268,7 +5269,7 @@ const Za = "_scrubberWrap_uw0cd_2", Ja = "_labels_uw0cd_9", ec = "_index_uw0cd_1
|
|
|
5268
5269
|
range: rc
|
|
5269
5270
|
};
|
|
5270
5271
|
function oc() {
|
|
5271
|
-
const e =
|
|
5272
|
+
const e = X((_) => _.isDev), t = U((_) => _.currentGlobalRunIndex), n = U((_) => _.totalRuns), r = U((_) => _.setCurrentGlobalRunIndex), o = U((_) => _.getSectionScrollApi), i = U((_) => _.giToPercentTotal), s = U((_) => _.percentToGITotal), u = U((_) => _.snapToReadable), a = _e((_) => _.scrollLock), l = _e((_) => _.pause), d = _e((_) => _.play), h = _e((_) => _.syncToGI), [p, m] = pt(() => i(t || 0));
|
|
5272
5273
|
me(() => {
|
|
5273
5274
|
m(i(t || 0));
|
|
5274
5275
|
}, [t, i]);
|
|
@@ -5285,18 +5286,18 @@ function oc() {
|
|
|
5285
5286
|
() => ({ "--pct": `${p}%` }),
|
|
5286
5287
|
[p]
|
|
5287
5288
|
), C = he(() => Math.round(p), [p]);
|
|
5288
|
-
return /* @__PURE__ */
|
|
5289
|
-
e && /* @__PURE__ */ x("div", { className:
|
|
5289
|
+
return /* @__PURE__ */ ee("div", { className: Bt.scrubberWrap, children: [
|
|
5290
|
+
e && /* @__PURE__ */ x("div", { className: Bt.labels, children: /* @__PURE__ */ ee("span", { className: Bt.index, children: [
|
|
5290
5291
|
y,
|
|
5291
5292
|
" / ",
|
|
5292
5293
|
n || 0
|
|
5293
5294
|
] }) }),
|
|
5294
|
-
/* @__PURE__ */
|
|
5295
|
+
/* @__PURE__ */ ee("div", { className: Bt.controls, children: [
|
|
5295
5296
|
/* @__PURE__ */ x(
|
|
5296
5297
|
"input",
|
|
5297
5298
|
{
|
|
5298
5299
|
type: "range",
|
|
5299
|
-
className:
|
|
5300
|
+
className: Bt.range,
|
|
5300
5301
|
min: 0,
|
|
5301
5302
|
max: 100,
|
|
5302
5303
|
step: 0.5,
|
|
@@ -5315,15 +5316,15 @@ function oc() {
|
|
|
5315
5316
|
"aria-label": "진행률"
|
|
5316
5317
|
}
|
|
5317
5318
|
),
|
|
5318
|
-
/* @__PURE__ */
|
|
5319
|
+
/* @__PURE__ */ ee("span", { className: Bt.percent, children: [
|
|
5319
5320
|
C,
|
|
5320
5321
|
"%"
|
|
5321
5322
|
] })
|
|
5322
5323
|
] })
|
|
5323
5324
|
] });
|
|
5324
5325
|
}
|
|
5325
|
-
const ic =
|
|
5326
|
-
const t = Ue(
|
|
5326
|
+
const ic = W.memo(oc), sc = Dt(function() {
|
|
5327
|
+
const t = Ue(Ot), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r = _e((S) => S.playbackKind), o = _e((S) => S.status), i = _e((S) => S.fake), s = X((S) => S.audioSpeed), u = _e((S) => S.pause), a = U((S) => S.totalRuns), l = U((S) => S.currentGlobalRunIndex), d = U((S) => S.setCurrentGlobalRunIndex), h = U((S) => S.getSectionScrollApi), p = U((S) => S.nextReadableFrom), m = U((S) => S.edgeReadable), v = se(null), y = se(null), c = se(0), f = se(-1), g = !n && r === "fake" && o === "playing", w = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1), C = he(() => {
|
|
5327
5328
|
const S = 200 * s;
|
|
5328
5329
|
return w / S * 6e4;
|
|
5329
5330
|
}, [w, s]), _ = he(() => !a || a <= 1 || C <= 0 ? 0 : (a - 1) / C, [a, C]);
|
|
@@ -5344,7 +5345,7 @@ const ic = D.memo(oc), sc = Wt(function() {
|
|
|
5344
5345
|
const b = te(
|
|
5345
5346
|
(S) => {
|
|
5346
5347
|
(async () => {
|
|
5347
|
-
var N,
|
|
5348
|
+
var N, A;
|
|
5348
5349
|
if (!g) {
|
|
5349
5350
|
v.current = null;
|
|
5350
5351
|
return;
|
|
@@ -5364,7 +5365,7 @@ const ic = D.memo(oc), sc = Wt(function() {
|
|
|
5364
5365
|
return;
|
|
5365
5366
|
}
|
|
5366
5367
|
const z = R;
|
|
5367
|
-
z !== f.current && (f.current = z, d(z, "audio"), z % 5 === 0 && await ((
|
|
5368
|
+
z !== f.current && (f.current = z, d(z, "audio"), z % 5 === 0 && await ((A = I == null ? void 0 : I.ensureVisibleGI) == null ? void 0 : A.call(I, z))), v.current = requestAnimationFrame(b);
|
|
5368
5369
|
})().catch(console.error);
|
|
5369
5370
|
},
|
|
5370
5371
|
[g, a, _, p, d, h, u]
|
|
@@ -5372,15 +5373,15 @@ const ic = D.memo(oc), sc = Wt(function() {
|
|
|
5372
5373
|
return me(() => (g ? v.current == null && (v.current = requestAnimationFrame(b)) : (v.current && (cancelAnimationFrame(v.current), v.current = null), y.current = null), () => {
|
|
5373
5374
|
v.current && (cancelAnimationFrame(v.current), v.current = null);
|
|
5374
5375
|
}), [g, b]), null;
|
|
5375
|
-
}), lc =
|
|
5376
|
+
}), lc = Dt(function() {
|
|
5376
5377
|
return /* @__PURE__ */ x(sc, {});
|
|
5377
5378
|
}), ac = "data:image/svg+xml,%3csvg%20width='111'%20height='111'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20overflow='hidden'%3e%3cg%20transform='translate(-435%2011)'%3e%3cpath%20d='M532.723%2046.8125C530.242%2046.8292%20527.8%2047.4292%20525.593%2048.5642%20523.298%2049.7713%20520.952%2050.8767%20518.608%2051.8815%20517.451%2031.9953%20500.391%2016.8128%20480.505%2017.9704%20462.359%2019.0268%20447.834%2033.4215%20446.615%2051.5578L438.476%2048.1353%20438.476%2049.9344C438.473%2054.7251%20441.432%2059.0185%20445.91%2060.721%20446.509%2060.9604%20447.138%2061.1708%20447.767%2061.3801%20448.053%2061.4761%20448.339%2061.5709%20448.622%2061.6692L447.745%2066.7254C447.463%2068.2415%20447.818%2069.8071%20448.728%2071.0521%20449.635%2072.2874%20450.984%2073.1242%20452.493%2073.3877L452.768%2073.4282C453.011%2073.488%20453.259%2073.5198%20453.509%2073.523%20456.31%2073.5182%20458.699%2071.4953%20459.166%2068.7338L459.781%2064.8673C468.886%2066.8727%20478.184%2067.875%20487.508%2067.8562%20493.267%2067.8674%20499.021%2067.5125%20504.736%2066.7937%20504.893%2066.7613%20505.041%2066.7405%20505.184%2066.7231L505.562%2068.8379C505.986%2071.6231%20508.396%2073.6706%20511.213%2073.6375%20511.583%2073.648%20511.953%2073.5977%20512.307%2073.4883%20515.422%2072.958%20517.518%2070.0024%20516.988%2066.8869%20516.984%2066.8688%20516.981%2066.8509%20516.978%2066.833L516.758%2065.6767C522.066%2065.3125%20527.42%2065.3125%20532.607%2065.3125L532.723%2065.3125C537.831%2065.6255%20542.226%2061.7378%20542.539%2056.6292%20542.852%2051.5205%20538.965%2047.1255%20533.856%2046.8125%20533.479%2046.7894%20533.1%2046.7894%20532.723%2046.8125ZM516.326%2052.7256C511.914%2054.5082%20507.352%2055.8913%20502.693%2056.858L492.697%2041.007%20501.916%2026.3469C510.579%2032.4029%20515.911%2042.1631%20516.326%2052.7256ZM500.254%2057.3217C497.133%2057.8531%20493.977%2058.1542%20490.811%2058.2224L487.449%2058.2224C480.061%2058.2766%20472.682%2057.6921%20465.394%2056.4753L474.504%2042.1644%20490.692%2042.1644ZM482.602%2020.2188C488.73%2020.2155%20494.742%2021.8953%20499.981%2025.075L490.693%2039.8507%20474.491%2039.8195%20465.194%2025.0415C470.449%2021.8782%20476.468%2020.2107%20482.602%2020.2188ZM463.254%2026.2995%20472.504%2041.0023%20462.938%2056.0267C458.169%2055.1133%20453.47%2053.8672%20448.875%2052.2977%20449.378%2041.8709%20454.689%2032.2672%20463.254%2026.2995ZM456.876%2068.3719C456.595%2070.0115%20455.173%2071.2097%20453.509%2071.2094%20453.431%2071.2042%20453.354%2071.191%20453.278%2071.1701%20453.133%2071.1343%20452.984%2071.1101%20452.835%2071.0972%20451.94%2070.9264%20451.142%2070.4243%20450.601%2069.6912%20450.063%2068.9533%20449.853%2068.0254%20450.023%2067.1278L450.844%2062.3872%20457.525%2064.2962ZM514.123%2069.8103C513.566%2070.5637%20512.74%2071.0728%20511.817%2071.2313L511.657%2071.2718C511.514%2071.32%20511.363%2071.3392%20511.213%2071.3285%20509.525%2071.3698%20508.075%2070.1378%20507.844%2068.4656L507.486%2066.4688%20514.501%2065.8548%20514.701%2067.2527C514.87%2068.1485%20514.661%2069.0742%20514.123%2069.8103ZM532.723%2063%20532.607%2063C526.955%2063%20521.113%2063%20515.284%2063.4625L515.276%2063.4625%20515.276%2063.4625%20505.9%2064.2904%20504.36%2064.5078C498.77%2065.2064%20493.141%2065.5509%20487.508%2065.5391%20477.952%2065.5601%20468.425%2064.4858%20459.114%2062.3375L450.263%2059.8168%20446.738%2058.5658C443.792%2057.4525%20441.62%2054.9086%20440.982%2051.8237%20454.33%2057.5309%20470.023%2060.5383%20486.577%2060.5383%20486.868%2060.5383%20487.161%2060.5383%20487.452%2060.5383L490.828%2060.5383C500.421%2060.2575%20509.874%2058.1665%20518.689%2054.3755L518.797%2054.3304C521.437%2053.2216%20524.086%2051.9728%20526.649%2050.6235%20528.526%2049.6491%20530.608%2049.1354%20532.723%2049.125%20536.554%2048.8199%20539.908%2051.6785%20540.213%2055.5099%20540.518%2059.3414%20537.659%2062.6949%20533.828%2063%20533.46%2063.0293%20533.091%2063.0293%20532.723%2063Z'/%3e%3cpath%20d='M534.442%2053.75C534.442%2055.0272%20533.407%2056.0625%20532.13%2056.0625%20530.852%2056.0625%20529.817%2055.0272%20529.817%2053.75%20529.817%2052.4728%20530.852%2051.4375%20532.13%2051.4375%20533.407%2051.4375%20534.442%2052.4728%20534.442%2053.75Z'/%3e%3c/g%3e%3c/svg%3e", cc = "data:image/svg+xml,%3csvg%20width='159'%20height='159'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20overflow='hidden'%3e%3cg%20transform='translate(-392%20-84)'%3e%3cpath%20d='M496.776%20189.601C496.122%20189.934%20495.77%20190.663%20495.916%20191.383L499.911%20210.219C500.074%20210.985%20500.75%20211.532%20501.533%20211.531L501.929%20211.531C503.729%20211.515%20505.222%20212.919%20505.319%20214.716%20505.389%20216.544%20503.964%20218.083%20502.136%20218.154%20502.093%20218.155%20502.05%20218.156%20502.006%20218.156L497.503%20218.156C495.941%20218.15%20494.594%20217.058%20494.263%20215.531L490.363%20197.147C490.174%20196.252%20489.294%20195.68%20488.4%20195.87%20488.399%20195.87%20488.399%20195.87%20488.399%20195.87%20488.174%20195.918%20487.962%20196.014%20487.776%20196.15L481.184%20200.898C479.925%20201.758%20478.809%20202.45%20477.776%20203.015%20476.998%20203.429%20476.669%20204.372%20477.022%20205.18%20477.402%20206.011%20478.385%20206.378%20479.217%20205.998%20479.253%20205.981%20479.288%20205.964%20479.322%20205.945%20480.618%20205.229%20481.877%20204.447%20483.094%20203.604L487.657%20200.313%20491.031%20216.213C491.677%20219.273%20494.376%20221.464%20497.503%20221.469L501.882%20221.469C505.577%20221.473%20508.587%20218.502%20508.631%20214.807%20508.608%20211.503%20506.158%20208.719%20502.883%20208.277L499.416%20191.93C502.051%20190.581%20506.719%20188.344%20509.619%20188.344%20515.225%20188.346%20520.812%20187.662%20526.252%20186.307%20530.081%20185.36%20533.152%20182.51%20534.381%20178.762L534.535%20178.295C535.676%20175.09%20535.323%20171.542%20533.573%20168.624L525.126%20154.2C522.254%20149.369%20517.625%20145.835%20512.207%20144.337%20512.364%20138.624%20511.516%20132.927%20509.7%20127.508%20504.714%20113.244%20488.452%20105.977%20487.761%20105.669%20487.336%20105.48%20486.851%20105.48%20486.426%20105.669%20485.959%20105.876%20484.987%20106.308%20483.1%20111.962%20482.811%20112.832%20483.281%20113.77%20484.15%20114.059%20485.019%20114.348%20485.958%20113.878%20486.247%20113.009%20486.649%20111.744%20487.129%20110.505%20487.685%20109.299%20491.474%20111.245%20502.818%20117.831%20506.566%20128.543%20508.418%20133.972%20509.183%20139.713%20508.815%20145.437%20508.734%20146.277%20509.297%20147.043%20510.122%20147.217%20515.212%20148.269%20519.626%20151.41%20522.287%20155.875L530.744%20170.299C532.007%20172.379%20532.256%20174.921%20531.42%20177.207L531.254%20177.727C530.378%20180.388%20528.194%20182.41%20525.474%20183.079%20520.288%20184.375%20514.964%20185.031%20509.619%20185.031%20505.93%20185.031%20501.061%20187.35%20496.776%20189.601Z'/%3e%3cpath%20d='M422.439%20192.966C421.946%20190.791%20421.681%20188.571%20421.649%20186.341%20421.7%20185.427%20421.001%20184.643%20420.086%20184.592%20419.171%20184.54%20418.388%20185.239%20418.336%20186.154%20418.324%20187.879%20418.47%20189.602%20418.772%20191.3%20412.577%20189.633%20408.907%20183.26%20410.574%20177.065%20411.942%20171.981%20416.559%20168.453%20421.824%20168.469%20422.661%20168.473%20423.491%20168.611%20424.284%20168.88%20425.056%20169.133%20425.898%20168.787%20426.271%20168.065%20435.26%20150.783%20455.639%20142.806%20473.971%20149.392%20474.837%20150.636%20475.5%20151.557%20475.559%20151.638%20476.094%20152.38%20477.129%20152.549%20477.872%20152.014%20478.614%20151.479%20478.782%20150.444%20478.248%20149.702%20478.216%20149.657%20475.101%20145.338%20473.444%20142.62%20467.845%20132.798%20470.283%20120.115%20471.358%20115.817%20475.617%20117.014%20487.816%20121.194%20493.442%20131.039%20496.082%20135.531%20497.921%20140.449%20498.876%20145.571%20499.017%20146.361%20499.705%20146.936%20500.508%20146.936L503.929%20146.936C504.816%20146.948%20505.561%20146.274%20505.639%20145.391%20505.7%20144.478%20505.01%20143.688%20504.097%20143.627%20504.059%20143.624%20504.021%20143.623%20503.982%20143.623L501.871%20143.623C500.778%20138.613%20498.902%20133.806%20496.312%20129.38%20488.742%20116.13%20471.271%20112.337%20470.533%20112.183%20469.704%20112.01%20468.879%20112.489%20468.618%20113.294%20468.385%20114.011%20463.013%20131.036%20470.568%20144.256%20470.579%20144.276%20470.745%20144.576%20470.978%20144.973%20470.99%20144.991%20470.978%20145.003%20470.96%20144.998%20452.498%20140.481%20433.287%20148.811%20423.966%20165.375%20423.261%20165.231%20422.543%20165.158%20421.824%20165.156%20413.582%20165.183%20406.923%20171.886%20406.95%20180.128%20406.974%20187.414%20412.256%20193.618%20419.446%20194.803L419.446%20194.803C419.532%20195.194%20419.611%20195.585%20419.706%20195.972L419.8%20196.329C422.428%20206.56%20428.796%20215.436%20437.646%20221.204%20437.917%20221.379%20438.232%20221.473%20438.554%20221.474L473.068%20221.474C476.748%20221.495%20479.756%20218.542%20479.801%20214.862%20479.847%20211.242%20476.95%20208.27%20473.329%20208.224%20473.278%20208.223%20473.227%20208.223%20473.176%20208.224L465.158%20208.224C474.765%20201.216%20476.873%20187.747%20469.866%20178.14%20465.812%20172.583%20459.348%20169.297%20452.47%20169.297%20450.573%20169.261%20448.682%20169.507%20446.858%20170.029%20445.981%20170.293%20445.484%20171.219%20445.749%20172.096%20446.013%20172.973%20446.938%20173.47%20447.816%20173.206%20449.328%20172.775%20450.897%20172.574%20452.47%20172.609%20462.532%20172.632%20470.67%20180.807%20470.648%20190.869%20470.63%20198.914%20465.337%20205.995%20457.626%20208.29%20456.784%20208.543%20456.286%20209.408%20456.491%20210.263%20456.686%20211.016%20457.369%20211.54%20458.147%20211.533L473.107%20211.533C474.951%20211.521%20476.458%20213.001%20476.48%20214.845%20476.52%20216.635%20475.102%20218.118%20473.312%20218.158%20473.264%20218.159%20473.216%20218.159%20473.168%20218.158L439.054%20218.158C431.004%20212.776%20425.251%20204.584%20422.922%20195.184%20422.853%20194.889%20422.795%20194.619%20422.733%20194.339Z'/%3e%3cpath%20d='M519.521%20163.831C519.708%20162.011%20518.383%20160.385%20516.563%20160.199%20514.743%20160.012%20513.117%20161.337%20512.931%20163.157%20512.744%20164.977%20514.069%20166.603%20515.889%20166.789%20516.113%20166.812%20516.339%20166.812%20516.563%20166.789%20518.126%20166.629%20519.361%20165.394%20519.521%20163.831Z'/%3e%3c/g%3e%3c/svg%3e", uc = "_WPMSpeedButtonsWrap_r3byt_1", dc = "_btnWrap_r3byt_7", fc = "_label_r3byt_14", pc = "_iconBtn_r3byt_22", qt = {
|
|
5378
5379
|
WPMSpeedButtonsWrap: uc,
|
|
5379
5380
|
btnWrap: dc,
|
|
5380
5381
|
label: fc,
|
|
5381
5382
|
iconBtn: pc
|
|
5382
|
-
}, xo = 350, gc = 40, hc = 0.85, mc =
|
|
5383
|
-
const t =
|
|
5383
|
+
}, xo = 350, gc = 40, hc = 0.85, mc = Dt(function() {
|
|
5384
|
+
const t = X((p) => p.audioSpeed), n = X((p) => p.incAudioSpeed), r = X((p) => p.decAudioSpeed), o = se(null), i = se(xo), s = se(null), u = te(
|
|
5384
5385
|
(p) => {
|
|
5385
5386
|
const m = t;
|
|
5386
5387
|
if (p === "inc") {
|
|
@@ -5415,7 +5416,7 @@ const ic = D.memo(oc), sc = Wt(function() {
|
|
|
5415
5416
|
{
|
|
5416
5417
|
onMouseLeave: a,
|
|
5417
5418
|
className: qt.WPMSpeedButtonsWrap,
|
|
5418
|
-
children: /* @__PURE__ */
|
|
5419
|
+
children: /* @__PURE__ */ ee("div", { className: qt.btnWrap, children: [
|
|
5419
5420
|
/* @__PURE__ */ x(
|
|
5420
5421
|
"button",
|
|
5421
5422
|
{
|
|
@@ -5524,7 +5525,7 @@ function Tc(e) {
|
|
|
5524
5525
|
}
|
|
5525
5526
|
function kc() {
|
|
5526
5527
|
var k;
|
|
5527
|
-
const e =
|
|
5528
|
+
const e = X((T) => T.showOverlays), t = U((T) => T.section), n = !!t.ast.isAddedSplit, r = !!((k = t.audios) != null && k.length), o = U((T) => T.canTracking), i = U((T) => T.canToggleShowGaze), s = U((T) => T.showGaze), u = U((T) => T.onToggleShowGaze), a = X((T) => T.muteAudio), l = X((T) => T.showPointer), d = X((T) => T.showSplit), h = X((T) => T.toggleMuteAudio), p = X((T) => T.toggleShowPointer), m = X((T) => T.toggleShowSplit), v = X((T) => T.overlayCompactMode), y = X((T) => T.toggleOverlayCompactMode), c = yn(), f = Mt();
|
|
5528
5529
|
me(() => {
|
|
5529
5530
|
const T = c.getState(), { syncToGI: O, useFake: P, useReal: I } = T, R = T.playbackKind, z = f.getState().progress.currentGlobalRunIndex ?? 0;
|
|
5530
5531
|
if (!r) {
|
|
@@ -5538,7 +5539,7 @@ function kc() {
|
|
|
5538
5539
|
T.stopPropagation(), C === "playing" || C === "loading" ? w() : g();
|
|
5539
5540
|
},
|
|
5540
5541
|
[C, g, w]
|
|
5541
|
-
), M = yn(), b =
|
|
5542
|
+
), M = yn(), b = Mt(), S = te(
|
|
5542
5543
|
async (T) => {
|
|
5543
5544
|
var xe, Fe;
|
|
5544
5545
|
if (T.stopPropagation(), C === "playing" || C === "loading") {
|
|
@@ -5551,16 +5552,16 @@ function kc() {
|
|
|
5551
5552
|
edgeReadable: R,
|
|
5552
5553
|
setCurrentGlobalRunIndex: z,
|
|
5553
5554
|
getSectionScrollApi: N
|
|
5554
|
-
} = O,
|
|
5555
|
+
} = O, A = M.getState(), V = A.currentClip, re = N == null ? void 0 : N(), be = typeof P == "number" ? P : 0, Se = typeof I == "function" ? I(be) : be, Ce = typeof R == "function" ? R(1) : null;
|
|
5555
5556
|
if (Ce != null && Se >= Ce) {
|
|
5556
|
-
z == null || z(Ce, "audio"), await ((xe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : xe.call(re, Ce)),
|
|
5557
|
+
z == null || z(Ce, "audio"), await ((xe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : xe.call(re, Ce)), A.syncToGI(Ce);
|
|
5557
5558
|
return;
|
|
5558
5559
|
}
|
|
5559
|
-
z == null || z(Se, "audio"), await ((Fe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : Fe.call(re, Se)),
|
|
5560
|
+
z == null || z(Se, "audio"), await ((Fe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : Fe.call(re, Se)), A.syncToGI(Se), g(V);
|
|
5560
5561
|
},
|
|
5561
5562
|
[C, w, g, M, b]
|
|
5562
5563
|
);
|
|
5563
|
-
return /* @__PURE__ */
|
|
5564
|
+
return /* @__PURE__ */ ee(
|
|
5564
5565
|
"div",
|
|
5565
5566
|
{
|
|
5566
5567
|
className: `${Re.wrap} ${e ? Re.visible : ""} ${v ? Re.compact : ""}`,
|
|
@@ -5573,8 +5574,8 @@ function kc() {
|
|
|
5573
5574
|
children: [
|
|
5574
5575
|
!v && /* @__PURE__ */ x(ic, {}),
|
|
5575
5576
|
/* @__PURE__ */ x("div", { style: v ? { display: "none" } : void 0, children: r && !a ? /* @__PURE__ */ x(Qa, {}) : /* @__PURE__ */ x(lc, {}) }),
|
|
5576
|
-
/* @__PURE__ */
|
|
5577
|
-
/* @__PURE__ */
|
|
5577
|
+
/* @__PURE__ */ ee("div", { className: Re.controls, children: [
|
|
5578
|
+
/* @__PURE__ */ ee("div", { className: Re.row1, children: [
|
|
5578
5579
|
/* @__PURE__ */ x("div", { className: Re.groupExpand, children: /* @__PURE__ */ x(
|
|
5579
5580
|
"button",
|
|
5580
5581
|
{
|
|
@@ -5587,7 +5588,7 @@ function kc() {
|
|
|
5587
5588
|
children: v ? /* @__PURE__ */ x(Tc, { size: 24 }) : /* @__PURE__ */ x(Cc, { size: 24 })
|
|
5588
5589
|
}
|
|
5589
5590
|
) }),
|
|
5590
|
-
/* @__PURE__ */
|
|
5591
|
+
/* @__PURE__ */ ee("div", { className: Re.groupPlayback, children: [
|
|
5591
5592
|
/* @__PURE__ */ x(wo, { direction: "left" }),
|
|
5592
5593
|
/* @__PURE__ */ x(
|
|
5593
5594
|
Ic,
|
|
@@ -5602,9 +5603,9 @@ function kc() {
|
|
|
5602
5603
|
] }),
|
|
5603
5604
|
/* @__PURE__ */ x("div", { className: Re.groupSpeed, children: /* @__PURE__ */ x(mc, {}) })
|
|
5604
5605
|
] }),
|
|
5605
|
-
/* @__PURE__ */
|
|
5606
|
-
/* @__PURE__ */
|
|
5607
|
-
r && /* @__PURE__ */
|
|
5606
|
+
/* @__PURE__ */ ee("div", { className: Re.row2, children: [
|
|
5607
|
+
/* @__PURE__ */ ee("div", { className: Re.groupFeatures, children: [
|
|
5608
|
+
r && /* @__PURE__ */ ee(
|
|
5608
5609
|
"button",
|
|
5609
5610
|
{
|
|
5610
5611
|
type: "button",
|
|
@@ -5619,7 +5620,7 @@ function kc() {
|
|
|
5619
5620
|
]
|
|
5620
5621
|
}
|
|
5621
5622
|
),
|
|
5622
|
-
/* @__PURE__ */
|
|
5623
|
+
/* @__PURE__ */ ee(
|
|
5623
5624
|
"button",
|
|
5624
5625
|
{
|
|
5625
5626
|
type: "button",
|
|
@@ -5634,7 +5635,7 @@ function kc() {
|
|
|
5634
5635
|
]
|
|
5635
5636
|
}
|
|
5636
5637
|
),
|
|
5637
|
-
n && /* @__PURE__ */
|
|
5638
|
+
n && /* @__PURE__ */ ee(
|
|
5638
5639
|
"button",
|
|
5639
5640
|
{
|
|
5640
5641
|
type: "button",
|
|
@@ -5650,7 +5651,7 @@ function kc() {
|
|
|
5650
5651
|
]
|
|
5651
5652
|
}
|
|
5652
5653
|
),
|
|
5653
|
-
/* @__PURE__ */
|
|
5654
|
+
/* @__PURE__ */ ee(
|
|
5654
5655
|
"button",
|
|
5655
5656
|
{
|
|
5656
5657
|
type: "button",
|
|
@@ -5667,7 +5668,7 @@ function kc() {
|
|
|
5667
5668
|
}
|
|
5668
5669
|
)
|
|
5669
5670
|
] }),
|
|
5670
|
-
/* @__PURE__ */
|
|
5671
|
+
/* @__PURE__ */ ee("div", { className: Re.groupNav, children: [
|
|
5671
5672
|
/* @__PURE__ */ x(wa, {}),
|
|
5672
5673
|
/* @__PURE__ */ x(Cn, {})
|
|
5673
5674
|
] })
|
|
@@ -5677,27 +5678,27 @@ function kc() {
|
|
|
5677
5678
|
}
|
|
5678
5679
|
);
|
|
5679
5680
|
}
|
|
5680
|
-
const Rc =
|
|
5681
|
+
const Rc = W.memo(kc);
|
|
5681
5682
|
function _c(e) {
|
|
5682
5683
|
return Ze({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M262.29 192.31a64 64 0 1 0 57.4 57.4 64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22 155.3 155.3 0 0 1-21.46-12.57 16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22 155.3 155.3 0 0 1 21.46 12.57 16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z" }, child: [] }] })(e);
|
|
5683
5684
|
}
|
|
5684
|
-
const Mc = "_host_gafql_3", Ec = "_topbar_gafql_11", Oc = "_visible_gafql_32", zc = "_backBtn_gafql_37", Pc = "_title_gafql_58",
|
|
5685
|
+
const Mc = "_host_gafql_3", Ec = "_topbar_gafql_11", Oc = "_visible_gafql_32", zc = "_backBtn_gafql_37", Pc = "_title_gafql_58", Ac = "_calibrationBtn_gafql_67", Bc = "_disabled_gafql_87", Gc = "_settingsBtn_gafql_95", vt = {
|
|
5685
5686
|
host: Mc,
|
|
5686
5687
|
topbar: Ec,
|
|
5687
5688
|
visible: Oc,
|
|
5688
5689
|
backBtn: zc,
|
|
5689
5690
|
title: Pc,
|
|
5690
|
-
calibrationBtn:
|
|
5691
|
-
disabled:
|
|
5691
|
+
calibrationBtn: Ac,
|
|
5692
|
+
disabled: Bc,
|
|
5692
5693
|
settingsBtn: Gc
|
|
5693
5694
|
};
|
|
5694
5695
|
function Lc() {
|
|
5695
|
-
const e =
|
|
5696
|
+
const e = X((h) => h.showOverlays), t = X((h) => h.overlayCompactMode), n = U((h) => h.onViewerClose), o = U((h) => h.section).ast.title, i = U((h) => h.canTracking), s = U((h) => h.handleAskCalibration), u = X((h) => h.setSettingsOpen), a = X((h) => h.setShowOverlays), l = te(() => {
|
|
5696
5697
|
n == null || n();
|
|
5697
5698
|
}, [n]), d = te(() => {
|
|
5698
5699
|
u(!0), a(!1);
|
|
5699
5700
|
}, [u, a]);
|
|
5700
|
-
return /* @__PURE__ */ x("div", { className: vt.host, children: /* @__PURE__ */
|
|
5701
|
+
return /* @__PURE__ */ x("div", { className: vt.host, children: /* @__PURE__ */ ee("div", { className: `${vt.topbar} ${e && !t ? vt.visible : ""}`, children: [
|
|
5701
5702
|
/* @__PURE__ */ x("button", { type: "button", className: vt.backBtn, onClick: l, "aria-label": "뒤로가기", children: /* @__PURE__ */ x(Oa, { size: 28 }) }),
|
|
5702
5703
|
/* @__PURE__ */ x("div", { className: vt.title, children: /* @__PURE__ */ x("span", { className: "truncate", children: o || "섹션 없음" }) }),
|
|
5703
5704
|
/* @__PURE__ */ x(
|
|
@@ -5724,11 +5725,11 @@ function Lc() {
|
|
|
5724
5725
|
)
|
|
5725
5726
|
] }) });
|
|
5726
5727
|
}
|
|
5727
|
-
const Hc =
|
|
5728
|
+
const Hc = W.memo(Lc), Nc = "_wrap_62su0_7", Fc = "_wrapHidden_62su0_29", Dc = "_wrapVisible_62su0_35", Wc = "_scrollArea_62su0_71", $c = "_row_62su0_81", Vc = "_label_62su0_89", qc = "_btn_62su0_95", jc = "_btnActive_62su0_106", Uc = "_btnSmall_62su0_110", Kc = "_pill_62su0_122", Xc = "_themeCircle_62su0_133", Yc = "_themeCircleActive_62su0_146", Qc = "_stepRow_62su0_151", Zc = "_stepLabel_62su0_159", Jc = "_levelBox_62su0_172", eu = "_inlineFlex_62su0_177", Ae = {
|
|
5728
5729
|
wrap: Nc,
|
|
5729
5730
|
wrapHidden: Fc,
|
|
5730
|
-
wrapVisible:
|
|
5731
|
-
scrollArea:
|
|
5731
|
+
wrapVisible: Dc,
|
|
5732
|
+
scrollArea: Wc,
|
|
5732
5733
|
row: $c,
|
|
5733
5734
|
label: Vc,
|
|
5734
5735
|
btn: qc,
|
|
@@ -5743,21 +5744,21 @@ const Hc = D.memo(Lc), Nc = "_wrap_62su0_7", Fc = "_wrapHidden_62su0_29", Wc = "
|
|
|
5743
5744
|
inlineFlex: eu
|
|
5744
5745
|
};
|
|
5745
5746
|
function tu({ visible: e }) {
|
|
5746
|
-
const t =
|
|
5747
|
-
return /* @__PURE__ */
|
|
5748
|
-
/* @__PURE__ */
|
|
5749
|
-
/* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */
|
|
5747
|
+
const t = X((b) => b.mode), n = X((b) => b.setMode), r = X((b) => b.theme), o = X((b) => b.setTheme), i = X((b) => b.fontFamily), s = X((b) => b.setFontFamily), u = X((b) => b.resetToDefaults), a = X((b) => b.getFontLevel()), l = X((b) => b.getLineLevel()), d = X((b) => b.getMarginLevel()), h = X((b) => b.setFontLevel), p = X((b) => b.setLineLevel), m = X((b) => b.setMarginLevel), v = X((b) => b.pointerStyle), y = X((b) => b.setPointerStyle), c = X((b) => b.pointerColor), f = X((b) => b.setPointerColor), g = X((b) => b.breakMarks), w = X((b) => b.toggleBreakMark), C = X((b) => b.getBreakGapLevel()), _ = X((b) => b.setBreakGapLevel), M = `${Ae.wrap} ${e ? Ae.wrapVisible : Ae.wrapHidden}`;
|
|
5748
|
+
return /* @__PURE__ */ ee("div", { className: M, role: "dialog", "aria-modal": "true", "aria-label": "뷰어 설정", children: [
|
|
5749
|
+
/* @__PURE__ */ ee("div", { className: Ae.scrollArea, children: [
|
|
5750
|
+
/* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */ ee("div", { className: Ae.inlineFlex, children: [
|
|
5750
5751
|
/* @__PURE__ */ x(Gt, { active: t === "page", onClick: () => n("page"), children: "페이지" }),
|
|
5751
5752
|
/* @__PURE__ */ x(Gt, { active: t === "scroll", onClick: () => n("scroll"), children: "스크롤" })
|
|
5752
5753
|
] }) }),
|
|
5753
|
-
/* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className:
|
|
5754
|
+
/* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: Object.keys(bn).map((b) => {
|
|
5754
5755
|
const S = b, k = bn[S];
|
|
5755
5756
|
return /* @__PURE__ */ x(
|
|
5756
5757
|
"button",
|
|
5757
5758
|
{
|
|
5758
5759
|
type: "button",
|
|
5759
5760
|
onClick: () => o(S),
|
|
5760
|
-
className: `${
|
|
5761
|
+
className: `${Ae.themeCircle} ${r === b ? Ae.themeCircleActive : ""}`,
|
|
5761
5762
|
style: { background: k.bg, color: k.fg, fontFamily: i },
|
|
5762
5763
|
title: String(b),
|
|
5763
5764
|
"aria-label": `테마: ${String(b)}`,
|
|
@@ -5766,7 +5767,7 @@ function tu({ visible: e }) {
|
|
|
5766
5767
|
`${b}_tc_button`
|
|
5767
5768
|
);
|
|
5768
5769
|
}) }) }),
|
|
5769
|
-
/* @__PURE__ */ x(jt, { label: "글꼴", children: /* @__PURE__ */ x("div", { className:
|
|
5770
|
+
/* @__PURE__ */ x(jt, { label: "글꼴", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: Xo.map((b) => /* @__PURE__ */ x(
|
|
5770
5771
|
Gt,
|
|
5771
5772
|
{
|
|
5772
5773
|
active: i === b.value,
|
|
@@ -5809,7 +5810,7 @@ function tu({ visible: e }) {
|
|
|
5809
5810
|
onInc: () => m(Math.min(5, d + 1))
|
|
5810
5811
|
}
|
|
5811
5812
|
),
|
|
5812
|
-
/* @__PURE__ */ x(jt, { label: "포인터", children: /* @__PURE__ */
|
|
5813
|
+
/* @__PURE__ */ x(jt, { label: "포인터", children: /* @__PURE__ */ ee("div", { className: Ae.inlineFlex, children: [
|
|
5813
5814
|
/* @__PURE__ */ x(Gt, { active: v === "highlight", onClick: () => y("highlight"), children: "형광펜" }),
|
|
5814
5815
|
/* @__PURE__ */ x(Gt, { active: v === "underline", onClick: () => y("underline"), children: "밑줄" }),
|
|
5815
5816
|
/* @__PURE__ */ x(
|
|
@@ -5829,7 +5830,7 @@ function tu({ visible: e }) {
|
|
|
5829
5830
|
}
|
|
5830
5831
|
)
|
|
5831
5832
|
] }) }),
|
|
5832
|
-
/* @__PURE__ */ x(jt, { label: "끊기표시", children: /* @__PURE__ */ x("div", { className:
|
|
5833
|
+
/* @__PURE__ */ x(jt, { label: "끊기표시", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: /* @__PURE__ */ x(Gt, { active: g.slash, onClick: () => w("slash"), children: "슬래쉬" }) }) }),
|
|
5833
5834
|
/* @__PURE__ */ x(
|
|
5834
5835
|
pn,
|
|
5835
5836
|
{
|
|
@@ -5842,12 +5843,12 @@ function tu({ visible: e }) {
|
|
|
5842
5843
|
}
|
|
5843
5844
|
)
|
|
5844
5845
|
] }),
|
|
5845
|
-
/* @__PURE__ */ x("div", { className:
|
|
5846
|
+
/* @__PURE__ */ x("div", { className: Ae.inlineFlex, style: { justifyContent: "center" }, children: /* @__PURE__ */ x("button", { type: "button", onClick: u, className: Ae.pill, children: "보기 설정 초기화" }) })
|
|
5846
5847
|
] });
|
|
5847
5848
|
}
|
|
5848
5849
|
function jt({ label: e, children: t }) {
|
|
5849
|
-
return /* @__PURE__ */
|
|
5850
|
-
/* @__PURE__ */ x("label", { className:
|
|
5850
|
+
return /* @__PURE__ */ ee("div", { className: Ae.row, children: [
|
|
5851
|
+
/* @__PURE__ */ x("label", { className: Ae.label, children: e }),
|
|
5851
5852
|
t
|
|
5852
5853
|
] });
|
|
5853
5854
|
}
|
|
@@ -5863,7 +5864,7 @@ function Gt({
|
|
|
5863
5864
|
type: "button",
|
|
5864
5865
|
onClick: t,
|
|
5865
5866
|
title: n,
|
|
5866
|
-
className: `${
|
|
5867
|
+
className: `${Ae.btn} ${e ? Ae.btnActive : ""}`,
|
|
5867
5868
|
children: r
|
|
5868
5869
|
}
|
|
5869
5870
|
);
|
|
@@ -5877,28 +5878,28 @@ function pn({
|
|
|
5877
5878
|
onInc: i
|
|
5878
5879
|
}) {
|
|
5879
5880
|
const s = t <= n, u = t >= r;
|
|
5880
|
-
return /* @__PURE__ */
|
|
5881
|
-
/* @__PURE__ */ x("label", { className:
|
|
5882
|
-
/* @__PURE__ */
|
|
5881
|
+
return /* @__PURE__ */ ee("div", { className: Ae.stepRow, children: [
|
|
5882
|
+
/* @__PURE__ */ x("label", { className: Ae.stepLabel, children: e }),
|
|
5883
|
+
/* @__PURE__ */ ee("div", { className: Ae.inlineFlex, children: [
|
|
5883
5884
|
/* @__PURE__ */ x(
|
|
5884
5885
|
"button",
|
|
5885
5886
|
{
|
|
5886
5887
|
type: "button",
|
|
5887
5888
|
onClick: o,
|
|
5888
5889
|
disabled: s,
|
|
5889
|
-
className:
|
|
5890
|
+
className: Ae.btnSmall,
|
|
5890
5891
|
"aria-label": "감소",
|
|
5891
5892
|
children: "−"
|
|
5892
5893
|
}
|
|
5893
5894
|
),
|
|
5894
|
-
/* @__PURE__ */ x("div", { className:
|
|
5895
|
+
/* @__PURE__ */ x("div", { className: Ae.levelBox, children: t }),
|
|
5895
5896
|
/* @__PURE__ */ x(
|
|
5896
5897
|
"button",
|
|
5897
5898
|
{
|
|
5898
5899
|
type: "button",
|
|
5899
5900
|
onClick: i,
|
|
5900
5901
|
disabled: u,
|
|
5901
|
-
className:
|
|
5902
|
+
className: Ae.btnSmall,
|
|
5902
5903
|
"aria-label": "증가",
|
|
5903
5904
|
children: "+"
|
|
5904
5905
|
}
|
|
@@ -5906,9 +5907,9 @@ function pn({
|
|
|
5906
5907
|
] })
|
|
5907
5908
|
] });
|
|
5908
5909
|
}
|
|
5909
|
-
const nu =
|
|
5910
|
-
const t =
|
|
5911
|
-
return r != null && o != null ? null : /* @__PURE__ */
|
|
5910
|
+
const nu = W.memo(function() {
|
|
5911
|
+
const t = X((s) => s.showOverlays), n = X((s) => s.isSettingsOpen), r = U((s) => s.rangeStartGI), o = U((s) => s.rangeEndGI);
|
|
5912
|
+
return r != null && o != null ? null : /* @__PURE__ */ ee(
|
|
5912
5913
|
"div",
|
|
5913
5914
|
{
|
|
5914
5915
|
"aria-hidden": !0,
|
|
@@ -6181,7 +6182,7 @@ function cu({
|
|
|
6181
6182
|
children: e,
|
|
6182
6183
|
initialState: t
|
|
6183
6184
|
}) {
|
|
6184
|
-
const n = Ue(
|
|
6185
|
+
const n = Ue(Ot) ?? void 0, r = he(() => au({ ...t, recorderStore: n }), [t, n]);
|
|
6185
6186
|
return /* @__PURE__ */ x(On.Provider, { value: r, children: e });
|
|
6186
6187
|
}
|
|
6187
6188
|
function uu(e) {
|
|
@@ -6379,9 +6380,9 @@ function gu(e) {
|
|
|
6379
6380
|
})), p && p.getState().emit({ type: "loading_start", payload: {} });
|
|
6380
6381
|
else {
|
|
6381
6382
|
const q = (G ? E - G : 0) / 1e3;
|
|
6382
|
-
g((
|
|
6383
|
+
g((B) => ({
|
|
6383
6384
|
progress: {
|
|
6384
|
-
...
|
|
6385
|
+
...B.progress,
|
|
6385
6386
|
sectionLoading: !1,
|
|
6386
6387
|
_loadingStartTime: null
|
|
6387
6388
|
}
|
|
@@ -6426,20 +6427,20 @@ function gu(e) {
|
|
|
6426
6427
|
progress: { ...E.progress, rangeEndGI: K }
|
|
6427
6428
|
})) : P());
|
|
6428
6429
|
}, R = () => {
|
|
6429
|
-
var
|
|
6430
|
+
var Z;
|
|
6430
6431
|
const { rangeStartGI: K, rangeEndGI: $, section: G, layout: E } = w().progress;
|
|
6431
6432
|
if (K == null || $ == null || !E) return "";
|
|
6432
|
-
const L = ((
|
|
6433
|
+
const L = ((Z = G.ast) == null ? void 0 : Z.blocks) ?? [], q = E.prefix, B = [];
|
|
6433
6434
|
for (let F = 0; F < L.length; F++) {
|
|
6434
|
-
const
|
|
6435
|
-
if (
|
|
6436
|
-
const ne =
|
|
6435
|
+
const Y = L[F];
|
|
6436
|
+
if (Y.type !== "paragraph") continue;
|
|
6437
|
+
const ne = Y.runs ?? [], J = q[F] ?? 0;
|
|
6437
6438
|
for (let ce = 0; ce < ne.length; ce++) {
|
|
6438
|
-
const ie =
|
|
6439
|
-
ie >= K && ie <= $ &&
|
|
6439
|
+
const ie = J + ce;
|
|
6440
|
+
ie >= K && ie <= $ && B.push(ne[ce].text ?? "");
|
|
6440
6441
|
}
|
|
6441
6442
|
}
|
|
6442
|
-
return
|
|
6443
|
+
return B.join("");
|
|
6443
6444
|
}, z = (K) => {
|
|
6444
6445
|
g(($) => ({
|
|
6445
6446
|
progress: {
|
|
@@ -6464,16 +6465,16 @@ function gu(e) {
|
|
|
6464
6465
|
translateEndGI: void 0
|
|
6465
6466
|
}
|
|
6466
6467
|
}));
|
|
6467
|
-
},
|
|
6468
|
+
}, A = (K) => {
|
|
6468
6469
|
const { totalRuns: $, derivedNav: G } = w().progress, E = G == null ? void 0 : G.readableGi;
|
|
6469
6470
|
if (!E || $ <= 0) return K;
|
|
6470
6471
|
const L = $, q = Math.max(0, Math.min(K, L - 1));
|
|
6471
6472
|
if (E[q]) return q;
|
|
6472
|
-
let
|
|
6473
|
-
for (;
|
|
6474
|
-
if (
|
|
6475
|
-
if (
|
|
6476
|
-
|
|
6473
|
+
let B = q - 1, Z = q + 1;
|
|
6474
|
+
for (; B >= 0 || Z < L; ) {
|
|
6475
|
+
if (Z < L && E[Z]) return Z;
|
|
6476
|
+
if (B >= 0 && E[B]) return B;
|
|
6477
|
+
Z += 1, B -= 1;
|
|
6477
6478
|
}
|
|
6478
6479
|
return q;
|
|
6479
6480
|
}, V = (K, $) => {
|
|
@@ -6514,7 +6515,7 @@ function gu(e) {
|
|
|
6514
6515
|
extendRange: I,
|
|
6515
6516
|
getRangeText: R,
|
|
6516
6517
|
// 네비 API
|
|
6517
|
-
snapToReadable:
|
|
6518
|
+
snapToReadable: A,
|
|
6518
6519
|
nextReadableFrom: V,
|
|
6519
6520
|
edgeReadable: re,
|
|
6520
6521
|
hasReadableInDir: (K, $) => V(K + ($ > 0 ? 1 : -1), $) != null,
|
|
@@ -6523,28 +6524,28 @@ function gu(e) {
|
|
|
6523
6524
|
if (!G || G <= 0) return K;
|
|
6524
6525
|
const L = (E == null ? void 0 : E.groups) ?? [], q = E == null ? void 0 : E.giToGroupIdx;
|
|
6525
6526
|
if (!L.length || !q) {
|
|
6526
|
-
const
|
|
6527
|
-
return
|
|
6527
|
+
const J = G - 1;
|
|
6528
|
+
return A(Math.max(0, Math.min(K + $, J)));
|
|
6528
6529
|
}
|
|
6529
|
-
let
|
|
6530
|
-
if (
|
|
6530
|
+
let B = q[K] ?? -1;
|
|
6531
|
+
if (B < 0 || B >= L.length)
|
|
6531
6532
|
for (let ne = 0; ne < L.length; ne += 1) {
|
|
6532
|
-
const
|
|
6533
|
-
if (K >=
|
|
6534
|
-
|
|
6533
|
+
const J = L[ne];
|
|
6534
|
+
if (K >= J.startG && K <= J.endG) {
|
|
6535
|
+
B = ne;
|
|
6535
6536
|
break;
|
|
6536
6537
|
}
|
|
6537
6538
|
}
|
|
6538
|
-
if (
|
|
6539
|
-
return re($) ??
|
|
6540
|
-
const
|
|
6541
|
-
let F =
|
|
6542
|
-
for (; F >= 0 && F < L.length && !
|
|
6539
|
+
if (B < 0 || B >= L.length)
|
|
6540
|
+
return re($) ?? A(K);
|
|
6541
|
+
const Z = (ne) => ne >= 0 && ne < L.length && (L[ne].firstReadableGI ?? -1) >= 0;
|
|
6542
|
+
let F = B + $;
|
|
6543
|
+
for (; F >= 0 && F < L.length && !Z(F); )
|
|
6543
6544
|
F += $;
|
|
6544
6545
|
if (F < 0 || F >= L.length)
|
|
6545
|
-
return re($) ??
|
|
6546
|
-
const
|
|
6547
|
-
return
|
|
6546
|
+
return re($) ?? A(K + $);
|
|
6547
|
+
const Y = L[F].firstReadableGI;
|
|
6548
|
+
return Y >= 0 ? Y : A(K + $);
|
|
6548
6549
|
},
|
|
6549
6550
|
giToPercentTotal: (K) => {
|
|
6550
6551
|
const $ = w().progress.totalRuns;
|
|
@@ -6565,7 +6566,7 @@ function hu({
|
|
|
6565
6566
|
initialState: t,
|
|
6566
6567
|
gazeSync: n
|
|
6567
6568
|
}) {
|
|
6568
|
-
const r = Ue(
|
|
6569
|
+
const r = Ue(Ot), o = he(
|
|
6569
6570
|
() => gu({
|
|
6570
6571
|
...t,
|
|
6571
6572
|
...n ? n.getSnapshot() : {},
|
|
@@ -6596,7 +6597,7 @@ function mu({
|
|
|
6596
6597
|
children: e,
|
|
6597
6598
|
initialState: t
|
|
6598
6599
|
}) {
|
|
6599
|
-
const n = Ue(
|
|
6600
|
+
const n = Ue(Ot) ?? void 0, r = se(as({ init: t, recorderStore: n }));
|
|
6600
6601
|
return /* @__PURE__ */ x(vr.Provider, { value: r.current, children: e });
|
|
6601
6602
|
}
|
|
6602
6603
|
const bu = ({
|
|
@@ -6608,7 +6609,7 @@ const bu = ({
|
|
|
6608
6609
|
const r = U((g) => g.section), o = he(() => {
|
|
6609
6610
|
var g;
|
|
6610
6611
|
return ((g = r.ast) == null ? void 0 : g.blocks) ?? [];
|
|
6611
|
-
}, [r]), i =
|
|
6612
|
+
}, [r]), i = X((g) => g.marginX), s = X((g) => g.lineHeight), u = X((g) => g.fontSizePx), a = X((g) => g.fontFamily), l = X((g) => g.viewportHeight), d = U((g) => {
|
|
6612
6613
|
var w;
|
|
6613
6614
|
return ((w = g.layout) == null ? void 0 : w.prefix) ?? [];
|
|
6614
6615
|
}), h = U((g) => {
|
|
@@ -6674,7 +6675,7 @@ const bu = ({
|
|
|
6674
6675
|
lineHeight: s,
|
|
6675
6676
|
boxSizing: "border-box"
|
|
6676
6677
|
},
|
|
6677
|
-
children: /* @__PURE__ */
|
|
6678
|
+
children: /* @__PURE__ */ ee(
|
|
6678
6679
|
"div",
|
|
6679
6680
|
{
|
|
6680
6681
|
style: {
|
|
@@ -6705,8 +6706,8 @@ const bu = ({
|
|
|
6705
6706
|
height: "auto"
|
|
6706
6707
|
}, S = `sec-${r.section_id}/blk-${C.id ?? g}`;
|
|
6707
6708
|
if (C.type === "image") {
|
|
6708
|
-
const { src: E, alt: L, width: q, height:
|
|
6709
|
-
return /* @__PURE__ */ x("div", { style: b, children: /* @__PURE__ */
|
|
6709
|
+
const { src: E, alt: L, width: q, height: B } = C, Z = q && B ? `${q} / ${B}` : "4 / 3", F = l > 80 ? Math.floor((l - 80) * 0.6) : void 0;
|
|
6710
|
+
return /* @__PURE__ */ x("div", { style: b, children: /* @__PURE__ */ ee(
|
|
6710
6711
|
"div",
|
|
6711
6712
|
{
|
|
6712
6713
|
style: {
|
|
@@ -6722,7 +6723,7 @@ const bu = ({
|
|
|
6722
6723
|
position: "relative",
|
|
6723
6724
|
width: "100%",
|
|
6724
6725
|
maxHeight: F,
|
|
6725
|
-
aspectRatio:
|
|
6726
|
+
aspectRatio: Z
|
|
6726
6727
|
},
|
|
6727
6728
|
children: /* @__PURE__ */ x(
|
|
6728
6729
|
"img",
|
|
@@ -6756,9 +6757,9 @@ const bu = ({
|
|
|
6756
6757
|
R,
|
|
6757
6758
|
Math.min(p.endOffsetInBlock, z)
|
|
6758
6759
|
));
|
|
6759
|
-
const N = R > 0,
|
|
6760
|
+
const N = R > 0, A = d[g] ?? 0, V = h[g] ?? [], re = A + R, be = A + z;
|
|
6760
6761
|
let Se = f(V, re, be);
|
|
6761
|
-
const Ce =
|
|
6762
|
+
const Ce = A + R;
|
|
6762
6763
|
Se = Se.map((E) => {
|
|
6763
6764
|
const L = Math.max(0, (E.startG ?? re) - Ce), q = E.len ?? Math.max(1, (E.endG ?? be) - (E.startG ?? re) + 1);
|
|
6764
6765
|
return {
|
|
@@ -6768,7 +6769,7 @@ const bu = ({
|
|
|
6768
6769
|
};
|
|
6769
6770
|
});
|
|
6770
6771
|
const xe = R <= z ? P.slice(R, z + 1) : [], Fe = k.list ? k.list.level * 24 : 0, K = ((G = k.list) == null ? void 0 : G.kind) === "bullet" ? k.list.glyph ?? "•" : void 0, $ = N ? void 0 : O ?? K;
|
|
6771
|
-
return /* @__PURE__ */ x("div", { style: b, children: /* @__PURE__ */
|
|
6772
|
+
return /* @__PURE__ */ x("div", { style: b, children: /* @__PURE__ */ ee(
|
|
6772
6773
|
"p",
|
|
6773
6774
|
{
|
|
6774
6775
|
style: {
|
|
@@ -6905,9 +6906,9 @@ function Su(e) {
|
|
|
6905
6906
|
if (c.current.touchId == null) return;
|
|
6906
6907
|
const z = Array.from(R.touches).find((re) => re.identifier === c.current.touchId);
|
|
6907
6908
|
if (!z) return;
|
|
6908
|
-
const N = z.clientX - c.current.startX,
|
|
6909
|
+
const N = z.clientX - c.current.startX, A = Math.abs(N), V = Math.abs(z.clientY - c.current.startY);
|
|
6909
6910
|
if (!c.current.swiping)
|
|
6910
|
-
if (
|
|
6911
|
+
if (A >= y && A > V)
|
|
6911
6912
|
c.current.swiping = !0;
|
|
6912
6913
|
else
|
|
6913
6914
|
return;
|
|
@@ -6919,8 +6920,8 @@ function Su(e) {
|
|
|
6919
6920
|
if (c.current.touchId == null) return;
|
|
6920
6921
|
const z = Array.from(R.changedTouches).find((re) => re.identifier === c.current.touchId);
|
|
6921
6922
|
if (!z) return;
|
|
6922
|
-
const N = z.clientX - c.current.startX,
|
|
6923
|
-
c.current.swiping ? w(N, V) : Math.abs(N) < 10 && Math.abs(
|
|
6923
|
+
const N = z.clientX - c.current.startX, A = z.clientY - c.current.startY, V = R.timeStamp - c.current.startT;
|
|
6924
|
+
c.current.swiping ? w(N, V) : Math.abs(N) < 10 && Math.abs(A) < 10 && g(R.target), c.current.suppressClick = !0, c.current.touchId = null, c.current.swiping = !1;
|
|
6924
6925
|
},
|
|
6925
6926
|
[w, g]
|
|
6926
6927
|
), b = Ye.useCallback(() => {
|
|
@@ -6935,9 +6936,9 @@ function Su(e) {
|
|
|
6935
6936
|
), k = Ye.useCallback(
|
|
6936
6937
|
(R) => {
|
|
6937
6938
|
if (R.pointerType === "touch" || !c.current.mouseDown) return;
|
|
6938
|
-
const z = R.clientX - c.current.mStartX, N = Math.abs(z),
|
|
6939
|
+
const z = R.clientX - c.current.mStartX, N = Math.abs(z), A = Math.abs(R.clientY - c.current.mStartY);
|
|
6939
6940
|
if (!c.current.mouseSwiping)
|
|
6940
|
-
if (N >= y && N >
|
|
6941
|
+
if (N >= y && N > A) {
|
|
6941
6942
|
c.current.mouseSwiping = !0, c.current.suppressClick = !0;
|
|
6942
6943
|
const V = c.current.capturedEl;
|
|
6943
6944
|
if (V != null && V.setPointerCapture)
|
|
@@ -6956,8 +6957,8 @@ function Su(e) {
|
|
|
6956
6957
|
var N;
|
|
6957
6958
|
if (R.pointerType === "touch" || !c.current.mouseDown) return;
|
|
6958
6959
|
if (c.current.mouseSwiping) {
|
|
6959
|
-
const
|
|
6960
|
-
w(
|
|
6960
|
+
const A = R.clientX - c.current.mStartX, V = R.timeStamp - c.current.mStartT;
|
|
6961
|
+
w(A, V), document.body.style.userSelect = c.current.prevUserSelect;
|
|
6961
6962
|
}
|
|
6962
6963
|
const z = c.current.capturedEl;
|
|
6963
6964
|
if ((N = z == null ? void 0 : z.hasPointerCapture) != null && N.call(z, R.pointerId))
|
|
@@ -7095,20 +7096,20 @@ function Tu() {
|
|
|
7095
7096
|
}
|
|
7096
7097
|
return er = n, er;
|
|
7097
7098
|
}
|
|
7098
|
-
var tr,
|
|
7099
|
+
var tr, Ao;
|
|
7099
7100
|
function ku() {
|
|
7100
|
-
if (
|
|
7101
|
-
|
|
7101
|
+
if (Ao) return tr;
|
|
7102
|
+
Ao = 1;
|
|
7102
7103
|
var e = Hi(), t = Cu(), n = Tu(), r = "[object Null]", o = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
|
7103
7104
|
function s(u) {
|
|
7104
7105
|
return u == null ? u === void 0 ? o : r : i && i in Object(u) ? t(u) : n(u);
|
|
7105
7106
|
}
|
|
7106
7107
|
return tr = s, tr;
|
|
7107
7108
|
}
|
|
7108
|
-
var nr,
|
|
7109
|
+
var nr, Bo;
|
|
7109
7110
|
function Ru() {
|
|
7110
|
-
if (
|
|
7111
|
-
|
|
7111
|
+
if (Bo) return nr;
|
|
7112
|
+
Bo = 1;
|
|
7112
7113
|
function e(t) {
|
|
7113
7114
|
return t != null && typeof t == "object";
|
|
7114
7115
|
}
|
|
@@ -7224,9 +7225,9 @@ function Pu(e, t = 200, n, r) {
|
|
|
7224
7225
|
}, [t, r]);
|
|
7225
7226
|
return me(() => () => s.cancel(), [s]), s;
|
|
7226
7227
|
}
|
|
7227
|
-
const
|
|
7228
|
+
const Au = "https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700&family=Noto+Sans+KR:wght@300;400;500;700&family=Noto+Serif+KR:wght@400;700&display=swap";
|
|
7228
7229
|
let sr = !1;
|
|
7229
|
-
function
|
|
7230
|
+
function Bu() {
|
|
7230
7231
|
if (sr || typeof document > "u") return;
|
|
7231
7232
|
if (document.querySelector(
|
|
7232
7233
|
'link[href*="fonts.googleapis.com"][href*="Noto"]'
|
|
@@ -7235,13 +7236,13 @@ function Au() {
|
|
|
7235
7236
|
return;
|
|
7236
7237
|
}
|
|
7237
7238
|
const t = document.createElement("link");
|
|
7238
|
-
t.rel = "stylesheet", t.href =
|
|
7239
|
+
t.rel = "stylesheet", t.href = Au, document.head.appendChild(t), sr = !0;
|
|
7239
7240
|
}
|
|
7240
7241
|
const Ni = /* @__PURE__ */ new Map(), Fi = (e) => Ni.get(e) ?? 0, Gu = (e) => {
|
|
7241
7242
|
const t = Fi(e) + 1;
|
|
7242
7243
|
return Ni.set(e, t), t;
|
|
7243
7244
|
};
|
|
7244
|
-
class
|
|
7245
|
+
class Di extends Error {
|
|
7245
7246
|
constructor() {
|
|
7246
7247
|
super("calcPages canceled due to a newer invocation");
|
|
7247
7248
|
Gr(this, "code", "CALC_PAGES_CANCELED");
|
|
@@ -7249,7 +7250,7 @@ class Wi extends Error {
|
|
|
7249
7250
|
}
|
|
7250
7251
|
}
|
|
7251
7252
|
const rt = (e, t) => {
|
|
7252
|
-
if (e !== Fi(t)) throw new
|
|
7253
|
+
if (e !== Fi(t)) throw new Di();
|
|
7253
7254
|
}, lr = (e) => {
|
|
7254
7255
|
const t = getComputedStyle(e), n = parseFloat(t.marginTop || "0") || 0, r = parseFloat(t.marginBottom || "0") || 0;
|
|
7255
7256
|
return { mt: n, mb: r };
|
|
@@ -7290,7 +7291,7 @@ async function Hu({
|
|
|
7290
7291
|
var f, g, w;
|
|
7291
7292
|
const c = Gu(y);
|
|
7292
7293
|
if (rt(c, y), s && typeof document < "u" && document.fonts) {
|
|
7293
|
-
|
|
7294
|
+
Bu();
|
|
7294
7295
|
try {
|
|
7295
7296
|
const C = `${u}px ${s}`;
|
|
7296
7297
|
await document.fonts.load(C), document.fonts.check(C) || await document.fonts.ready;
|
|
@@ -7309,7 +7310,7 @@ async function Hu({
|
|
|
7309
7310
|
m.toFixed(4),
|
|
7310
7311
|
C ? "(scaled, applying inverse)" : "(no scale)"
|
|
7311
7312
|
), console.log("[calcPages] viewWidth:", M), console.log("[calcPages] pageBoxWidth:", b), console.log("[calcPages] maxPageHeight:", S), console.log("[calcPages] contentArea rect:", n.getBoundingClientRect()), console.log("[calcPages] measureRoot rect:", t.getBoundingClientRect());
|
|
7312
|
-
const k = 1.5, T = (
|
|
7313
|
+
const k = 1.5, T = (B, Z) => Z + B <= S - k, O = getComputedStyle(e), P = {
|
|
7313
7314
|
letterSpacing: O.letterSpacing,
|
|
7314
7315
|
wordSpacing: O.wordSpacing,
|
|
7315
7316
|
fontKerning: O.fontKerning || "normal",
|
|
@@ -7319,24 +7320,24 @@ async function Hu({
|
|
|
7319
7320
|
wordBreak: O.wordBreak || "keep-all",
|
|
7320
7321
|
overflowWrap: O.overflowWrap || O.wordWrap || "break-word",
|
|
7321
7322
|
hyphens: O.hyphens || "manual"
|
|
7322
|
-
}, I = (
|
|
7323
|
-
|
|
7323
|
+
}, I = (B) => {
|
|
7324
|
+
B.style.letterSpacing = P.letterSpacing || "", B.style.wordSpacing = P.wordSpacing || "", B.style.fontKerning = P.fontKerning || "", B.style.fontVariantLigatures = P.fontVariantLigatures || "", B.style.textTransform = P.textTransform || "", B.style.direction = P.direction || "", B.style.wordBreak = P.wordBreak || "", B.style.wordWrap = P.overflowWrap || "", B.style.overflowWrap = P.overflowWrap || "", B.style.hyphens = P.hyphens || "";
|
|
7324
7325
|
}, R = b, z = Math.max(0, R - 2 * (i || 0));
|
|
7325
7326
|
n.innerHTML = "";
|
|
7326
7327
|
const N = document.createElement("div");
|
|
7327
7328
|
N.style.boxSizing = "border-box", N.style.width = `${R}px`, N.style.maxWidth = `${R}px`, N.style.margin = "0 auto", N.style.display = "flex", n.appendChild(N);
|
|
7328
|
-
const
|
|
7329
|
-
|
|
7330
|
-
const V = /* @__PURE__ */ new Map(), re = {}, be = Lu(c, y, r.length), Se = (
|
|
7329
|
+
const A = document.createElement("div");
|
|
7330
|
+
A.style.boxSizing = "border-box", A.style.paddingRight = `${i}px`, A.style.paddingLeft = `${i}px`, A.style.width = `${R}px`, A.style.maxWidth = `${R}px`, A.style.margin = "0 auto", A.style.display = "flex", A.style.justifyContent = "center", A.style.height = "auto", N.appendChild(A);
|
|
7331
|
+
const V = /* @__PURE__ */ new Map(), re = {}, be = Lu(c, y, r.length), Se = (B, Z) => {
|
|
7331
7332
|
const F = document.createElement("p");
|
|
7332
|
-
return F.style.margin = "8px 0", F.style.paddingLeft =
|
|
7333
|
-
}, Ce = (
|
|
7334
|
-
const F =
|
|
7333
|
+
return F.style.margin = "8px 0", F.style.paddingLeft = Z ? `${Z}px` : "0", F.style.textAlign = B.textAlign ?? "start", F.style.whiteSpace = "pre-wrap", F.style.lineHeight = String(a), F.style.fontSize = `${u}px`, F.style.boxSizing = "border-box", F.style.fontFamily = s ?? "", F.style.width = "100%", I(F), F;
|
|
7334
|
+
}, Ce = (B, Z) => {
|
|
7335
|
+
const F = Z ?? [], Y = document.createDocumentFragment();
|
|
7335
7336
|
for (let ne = 0; ne < F.length; ne++) {
|
|
7336
|
-
const
|
|
7337
|
+
const J = F[ne], ce = document.createElement("span");
|
|
7337
7338
|
ce.dataset.runbox = String(ne), ce.style.whiteSpace = "pre-wrap";
|
|
7338
7339
|
const ie = document.createElement("span");
|
|
7339
|
-
if (ie.dataset.run = String(ne), ie.textContent = (
|
|
7340
|
+
if (ie.dataset.run = String(ne), ie.textContent = (J == null ? void 0 : J.text) ?? "", ie.style.whiteSpace = "pre-wrap", J != null && J.bold && (ie.style.fontWeight = "700"), J != null && J.italic && (ie.style.fontStyle = "italic"), J != null && J.underline && (ie.style.textDecoration = "underline"), ce.appendChild(ie), l && (J != null && J.split) && ne !== F.length - 1) {
|
|
7340
7341
|
const we = Math.max(0, (d ?? 0) / 2), pe = document.createElement("span");
|
|
7341
7342
|
pe.style.display = "inline-block", pe.style.width = `${we}px`;
|
|
7342
7343
|
const ke = document.createElement("span");
|
|
@@ -7346,146 +7347,146 @@ async function Hu({
|
|
|
7346
7347
|
}
|
|
7347
7348
|
ce.appendChild(ke);
|
|
7348
7349
|
}
|
|
7349
|
-
|
|
7350
|
+
Y.appendChild(ce);
|
|
7350
7351
|
}
|
|
7351
|
-
|
|
7352
|
-
}, xe = v > 80 ? Math.floor((v - 80) * 0.6) : void 0, Fe = (
|
|
7353
|
-
const
|
|
7352
|
+
B.appendChild(Y);
|
|
7353
|
+
}, xe = v > 80 ? Math.floor((v - 80) * 0.6) : void 0, Fe = (B) => {
|
|
7354
|
+
const Z = B != null && B.width && (B != null && B.height) ? `${B.width} / ${B.height}` : "4 / 3", F = document.createElement("div");
|
|
7354
7355
|
F.style.margin = "12px 0", F.style.textAlign = "center", F.style.width = `${z}px`;
|
|
7355
|
-
const
|
|
7356
|
-
|
|
7356
|
+
const Y = document.createElement("div");
|
|
7357
|
+
Y.style.position = "relative", Y.style.width = "100%", xe && (Y.style.maxHeight = `${xe}px`), Y.style.aspectRatio = Z;
|
|
7357
7358
|
const ne = document.createElement("div");
|
|
7358
|
-
if (ne.style.position = "absolute", ne.style.inset = "0", ne.style.width = "100%", ne.style.height = "100%",
|
|
7359
|
-
const
|
|
7360
|
-
|
|
7359
|
+
if (ne.style.position = "absolute", ne.style.inset = "0", ne.style.width = "100%", ne.style.height = "100%", Y.appendChild(ne), F.appendChild(Y), B != null && B.alt) {
|
|
7360
|
+
const J = document.createElement("div");
|
|
7361
|
+
J.style.fontSize = "12px", J.style.color = "#6B7280", J.style.marginTop = "4px", J.textContent = String(B.alt), I(J), F.appendChild(J);
|
|
7361
7362
|
}
|
|
7362
7363
|
return F;
|
|
7363
7364
|
};
|
|
7364
|
-
for (let
|
|
7365
|
+
for (let B = 0; B < r.length; B++) {
|
|
7365
7366
|
rt(c, y);
|
|
7366
|
-
const
|
|
7367
|
-
if (
|
|
7368
|
-
const ke =
|
|
7369
|
-
|
|
7370
|
-
const He = Oe.getBoundingClientRect(), { mt:
|
|
7371
|
-
re[
|
|
7367
|
+
const Z = r[B];
|
|
7368
|
+
if (A.dataset.block = String(B), A.innerHTML = "", Z.kind === "image") {
|
|
7369
|
+
const ke = Z.block, Oe = Fe(ke);
|
|
7370
|
+
A.appendChild(Oe);
|
|
7371
|
+
const He = Oe.getBoundingClientRect(), { mt: Be, mb: $e } = lr(Oe);
|
|
7372
|
+
re[B] = { contentH: Math.ceil(He.height), mt: Be, mb: $e }, await be(24);
|
|
7372
7373
|
continue;
|
|
7373
7374
|
}
|
|
7374
|
-
const F =
|
|
7375
|
-
if (!!(F.list &&
|
|
7376
|
-
const ke = Se(F,
|
|
7375
|
+
const F = Z.block, Y = F.list ? (F.list.level ?? 0) * 24 : 0, ne = Z.paraIndex ?? 0, J = p[ne] ?? (((f = F.list) == null ? void 0 : f.kind) === "bullet" ? ((g = F.list) == null ? void 0 : g.glyph) ?? "•" : void 0);
|
|
7376
|
+
if (!!(F.list && J)) {
|
|
7377
|
+
const ke = Se(F, Y);
|
|
7377
7378
|
ke.dataset.variant = "with";
|
|
7378
|
-
const Oe = Se(F,
|
|
7379
|
+
const Oe = Se(F, Y);
|
|
7379
7380
|
Oe.dataset.variant = "no";
|
|
7380
7381
|
const He = document.createElement("span");
|
|
7381
|
-
He.textContent = `${
|
|
7382
|
-
const
|
|
7383
|
-
|
|
7382
|
+
He.textContent = `${J} `, He.style.minWidth = "16px", He.style.display = "inline-block", He.style.whiteSpace = "nowrap", He.style.userSelect = "none", ke.appendChild(He), Ce(ke, F.runs), Ce(Oe, F.runs);
|
|
7383
|
+
const Be = document.createDocumentFragment();
|
|
7384
|
+
Be.appendChild(ke), Be.appendChild(Oe), A.appendChild(Be);
|
|
7384
7385
|
} else {
|
|
7385
|
-
const ke = Se(F,
|
|
7386
|
-
ke.dataset.variant = "with", Ce(ke, F.runs),
|
|
7386
|
+
const ke = Se(F, Y);
|
|
7387
|
+
ke.dataset.variant = "with", Ce(ke, F.runs), A.appendChild(ke);
|
|
7387
7388
|
}
|
|
7388
|
-
const ie =
|
|
7389
|
+
const ie = A.querySelector('p[data-variant="with"]'), we = A.querySelector('p[data-variant="no"]'), pe = we ?? ie;
|
|
7389
7390
|
if (ie && pe) {
|
|
7390
|
-
const ke = No(ie), Oe = No(pe), { mt: He, mb:
|
|
7391
|
-
if (
|
|
7391
|
+
const ke = No(ie), Oe = No(pe), { mt: He, mb: Be } = lr(ie), { mt: $e, mb: ut } = lr(pe), Xe = ((w = F.runs) == null ? void 0 : w.length) ?? 0, Ge = we ? Oe : ke, st = we ? $e : He, nt = we ? ut : Be;
|
|
7392
|
+
if (B < 3) {
|
|
7392
7393
|
const bt = ie.getBoundingClientRect().height;
|
|
7393
7394
|
console.log(
|
|
7394
|
-
`[calcPages] para ${
|
|
7395
|
+
`[calcPages] para ${B}: height=${bt.toFixed(2)}, lastBottom=[${ke.slice(-3).map((Vt) => Vt.toFixed(1)).join(",")}], runs=${Xe}`
|
|
7395
7396
|
);
|
|
7396
7397
|
}
|
|
7397
|
-
V.set(
|
|
7398
|
+
V.set(B, {
|
|
7398
7399
|
runsLen: Xe,
|
|
7399
7400
|
lastBottomWith: ke,
|
|
7400
7401
|
lastBottomNo: Ge,
|
|
7401
7402
|
mtWith: He,
|
|
7402
|
-
mbWith:
|
|
7403
|
+
mbWith: Be,
|
|
7403
7404
|
mtNo: st,
|
|
7404
7405
|
mbNo: nt
|
|
7405
7406
|
});
|
|
7406
7407
|
}
|
|
7407
7408
|
await be(24);
|
|
7408
7409
|
}
|
|
7409
|
-
rt(c, y),
|
|
7410
|
-
const K = (
|
|
7411
|
-
if (
|
|
7412
|
-
const ne =
|
|
7410
|
+
rt(c, y), A.innerHTML = "";
|
|
7411
|
+
const K = (B, Z, F, Y) => {
|
|
7412
|
+
if (Z > F) return { top: 0, content: 0, mb: 0 };
|
|
7413
|
+
const ne = Y ? B.lastBottomNo : B.lastBottomWith, J = Y ? B.mtNo : B.mtWith, ce = Y ? B.mbNo : B.mbWith, ie = Y ? 0 : J, we = Z > 0 ? ne[Z - 1] ?? 0 : 0, pe = Math.max(0, (ne[F] ?? 0) - we);
|
|
7413
7414
|
return { top: ie, content: pe, mb: ce };
|
|
7414
7415
|
}, $ = [];
|
|
7415
7416
|
let G = 0, E, L = null, q = null;
|
|
7416
7417
|
for (; G < r.length; ) {
|
|
7417
7418
|
rt(c, y);
|
|
7418
|
-
const
|
|
7419
|
-
let
|
|
7420
|
-
|
|
7421
|
-
let ne = -1,
|
|
7419
|
+
const B = G;
|
|
7420
|
+
let Z = 0, F = 0, Y = E;
|
|
7421
|
+
Y != null && L === G && q != null && (Y = Math.max(Y, q + 1));
|
|
7422
|
+
let ne = -1, J;
|
|
7422
7423
|
for (; G < r.length; ) {
|
|
7423
7424
|
if (rt(c, y), r[G].kind === "image") {
|
|
7424
|
-
const Ge = re[G] ?? { contentH: 0, mt: 0, mb: 0 }, nt = (
|
|
7425
|
-
if (T(nt,
|
|
7426
|
-
|
|
7425
|
+
const Ge = re[G] ?? { contentH: 0, mt: 0, mb: 0 }, nt = (Z === 0 ? Ge.mt : F + Ge.mt) + Ge.contentH;
|
|
7426
|
+
if (T(nt, Z)) {
|
|
7427
|
+
Z += nt, ne = G, J = void 0, F = Ge.mb, G += 1, E = void 0, L = null, q = null;
|
|
7427
7428
|
continue;
|
|
7428
7429
|
}
|
|
7429
|
-
if (
|
|
7430
|
+
if (Z === 0) {
|
|
7430
7431
|
$.push({
|
|
7431
|
-
startBlock:
|
|
7432
|
+
startBlock: B,
|
|
7432
7433
|
endBlock: G,
|
|
7433
|
-
...
|
|
7434
|
+
...Y != null ? { startOffsetInBlock: Y } : {}
|
|
7434
7435
|
// 이미지에는 run 오프셋 개념이 없어 endOffsetInBlock 생략
|
|
7435
7436
|
}), G += 1, E = void 0, L = null, q = null, F = 0;
|
|
7436
7437
|
break;
|
|
7437
7438
|
}
|
|
7438
7439
|
break;
|
|
7439
7440
|
}
|
|
7440
|
-
const ie = V.get(G), we = ie.runsLen, pe = G ===
|
|
7441
|
+
const ie = V.get(G), we = ie.runsLen, pe = G === B && Y != null ? Y : 0;
|
|
7441
7442
|
if (pe >= we) {
|
|
7442
7443
|
G += 1, E = void 0, L = null, q = null;
|
|
7443
7444
|
continue;
|
|
7444
7445
|
}
|
|
7445
|
-
const ke = pe > 0, Oe = K(ie, pe, we - 1, ke),
|
|
7446
|
-
if (T(
|
|
7447
|
-
|
|
7446
|
+
const ke = pe > 0, Oe = K(ie, pe, we - 1, ke), Be = (Z === 0 ? Oe.top : F + Oe.top) + Oe.content;
|
|
7447
|
+
if (T(Be, Z)) {
|
|
7448
|
+
Z += Be, ne = G, J = we - 1, F = Oe.mb, G += 1, E = void 0, L = null, q = null;
|
|
7448
7449
|
continue;
|
|
7449
7450
|
}
|
|
7450
7451
|
let $e = pe, ut = we - 1, Xe = pe - 1;
|
|
7451
7452
|
for (; $e <= ut; ) {
|
|
7452
7453
|
rt(c, y);
|
|
7453
|
-
const Ge = $e + ut >> 1, st = K(ie, pe, Ge, ke), nt = (
|
|
7454
|
-
T(nt,
|
|
7454
|
+
const Ge = $e + ut >> 1, st = K(ie, pe, Ge, ke), nt = (Z === 0 ? st.top : F + st.top) + st.content;
|
|
7455
|
+
T(nt, Z) ? (Xe = Ge, $e = Ge + 1) : ut = Ge - 1;
|
|
7455
7456
|
}
|
|
7456
7457
|
if (Xe >= pe) {
|
|
7457
7458
|
$.push({
|
|
7458
|
-
startBlock:
|
|
7459
|
+
startBlock: B,
|
|
7459
7460
|
endBlock: G,
|
|
7460
|
-
...
|
|
7461
|
+
...Y != null ? { startOffsetInBlock: Y } : {},
|
|
7461
7462
|
endOffsetInBlock: Xe
|
|
7462
7463
|
}), E = Xe + 1, L = G, q = Xe, F = 0;
|
|
7463
7464
|
break;
|
|
7464
7465
|
}
|
|
7465
|
-
if (
|
|
7466
|
+
if (Z > 0) {
|
|
7466
7467
|
$.push({
|
|
7467
|
-
startBlock:
|
|
7468
|
+
startBlock: B,
|
|
7468
7469
|
endBlock: ne >= 0 ? ne : Math.min(G - 1, r.length - 1),
|
|
7469
|
-
...
|
|
7470
|
-
...
|
|
7470
|
+
...Y != null ? { startOffsetInBlock: Y } : {},
|
|
7471
|
+
...J != null ? { endOffsetInBlock: J } : {}
|
|
7471
7472
|
}), F = 0;
|
|
7472
7473
|
break;
|
|
7473
7474
|
} else {
|
|
7474
7475
|
const Ge = pe;
|
|
7475
7476
|
$.push({
|
|
7476
|
-
startBlock:
|
|
7477
|
+
startBlock: B,
|
|
7477
7478
|
endBlock: G,
|
|
7478
|
-
...
|
|
7479
|
+
...Y != null ? { startOffsetInBlock: Y } : {},
|
|
7479
7480
|
endOffsetInBlock: Ge
|
|
7480
7481
|
}), E = Ge + 1, L = G, q = Ge, F = 0;
|
|
7481
7482
|
break;
|
|
7482
7483
|
}
|
|
7483
7484
|
}
|
|
7484
|
-
($.length === 0 || $[$.length - 1].startBlock !==
|
|
7485
|
-
startBlock:
|
|
7485
|
+
($.length === 0 || $[$.length - 1].startBlock !== B) && $.push({
|
|
7486
|
+
startBlock: B,
|
|
7486
7487
|
endBlock: ne >= 0 ? ne : Math.min(G - 1, r.length - 1),
|
|
7487
|
-
...
|
|
7488
|
-
...
|
|
7488
|
+
...Y != null ? { startOffsetInBlock: Y } : {},
|
|
7489
|
+
...J != null ? { endOffsetInBlock: J } : {}
|
|
7489
7490
|
});
|
|
7490
7491
|
}
|
|
7491
7492
|
return N.remove(), C && (t.style.transform = "", t.style.transformOrigin = ""), rt(c, y), { pages: $, pageByRunIndex: null };
|
|
@@ -7530,12 +7531,12 @@ function Fu(e) {
|
|
|
7530
7531
|
const n = ((o = (r = t.tagName) == null ? void 0 : r.toLowerCase) == null ? void 0 : o.call(r)) ?? "";
|
|
7531
7532
|
return !!(["a", "button", "input", "textarea", "select", "label"].includes(n) || t.isContentEditable);
|
|
7532
7533
|
}
|
|
7533
|
-
function
|
|
7534
|
+
function Du(e) {
|
|
7534
7535
|
var n, r;
|
|
7535
7536
|
const t = e;
|
|
7536
7537
|
return t ? ((n = t.style) == null ? void 0 : n.cursor) === "grab" || ((r = t.closest) == null ? void 0 : r.call(t, "[data-range-handle]")) != null : !1;
|
|
7537
7538
|
}
|
|
7538
|
-
function
|
|
7539
|
+
function Wu(e) {
|
|
7539
7540
|
const t = [], n = [];
|
|
7540
7541
|
let r = 0;
|
|
7541
7542
|
return e.forEach((o, i) => {
|
|
@@ -7548,16 +7549,16 @@ function Du(e) {
|
|
|
7548
7549
|
}), { items: t, paraIndexMap: n };
|
|
7549
7550
|
}
|
|
7550
7551
|
function $u() {
|
|
7551
|
-
var
|
|
7552
|
-
const e = Ui(), t = U((j) => j.section), n = U((j) => j.sectionLoading), r = U((j) => j.rangeStartGI), o = U((j) => j.rangeEndGI), i = r != null && o != null, s =
|
|
7552
|
+
var Br;
|
|
7553
|
+
const e = Ui(), t = U((j) => j.section), n = U((j) => j.sectionLoading), r = U((j) => j.rangeStartGI), o = U((j) => j.rangeEndGI), i = r != null && o != null, s = wt(), u = X((j) => j.theme), a = bn[u], l = X((j) => j.fontFamily), d = X((j) => j.fontSizePx), h = X((j) => j.lineHeight), p = X((j) => j.marginX), m = X((j) => j.viewportHeight), v = 860, y = se(null), { items: c } = he(() => {
|
|
7553
7554
|
var j;
|
|
7554
|
-
return
|
|
7555
|
+
return Wu(((j = t == null ? void 0 : t.ast) == null ? void 0 : j.blocks) ?? []);
|
|
7555
7556
|
}, [t]), f = he(() => {
|
|
7556
7557
|
const j = [], Le = zr();
|
|
7557
|
-
return c.forEach((
|
|
7558
|
-
if (
|
|
7559
|
-
const
|
|
7560
|
-
j[
|
|
7558
|
+
return c.forEach((De) => {
|
|
7559
|
+
if (De.kind === "paragraph") {
|
|
7560
|
+
const kt = De.paraIndex;
|
|
7561
|
+
j[kt] = Pr(De.block, Le);
|
|
7561
7562
|
}
|
|
7562
7563
|
}), j;
|
|
7563
7564
|
}, [c]), [g, w] = pt({
|
|
@@ -7584,8 +7585,8 @@ function $u() {
|
|
|
7584
7585
|
), {
|
|
7585
7586
|
showSplit: z,
|
|
7586
7587
|
breakGapPx: N,
|
|
7587
|
-
slash:
|
|
7588
|
-
} =
|
|
7588
|
+
slash: A
|
|
7589
|
+
} = X(
|
|
7589
7590
|
nn((j) => {
|
|
7590
7591
|
var Le;
|
|
7591
7592
|
return {
|
|
@@ -7594,7 +7595,7 @@ function $u() {
|
|
|
7594
7595
|
slash: ((Le = j.breakMarks) == null ? void 0 : Le.slash) ?? !1
|
|
7595
7596
|
};
|
|
7596
7597
|
})
|
|
7597
|
-
), V =
|
|
7598
|
+
), V = Mt();
|
|
7598
7599
|
me(() => {
|
|
7599
7600
|
g && g.pages.length && (console.log("그래서 총 페이지", g.pages.length), V.getState().progress.setTotalPages(g.pages.length + 1), (async () => {
|
|
7600
7601
|
const j = V.getState().progress.setSectionLoading;
|
|
@@ -7603,18 +7604,18 @@ function $u() {
|
|
|
7603
7604
|
}, [g, V]);
|
|
7604
7605
|
const re = te(() => {
|
|
7605
7606
|
console.log("@@@@@@recalc호출");
|
|
7606
|
-
const j = y.current, Le = ie.current,
|
|
7607
|
-
if (console.log("showSplit", z), !j || !Le || !
|
|
7607
|
+
const j = y.current, Le = ie.current, De = we.current;
|
|
7608
|
+
if (console.log("showSplit", z), !j || !Le || !De || c.length === 0) {
|
|
7608
7609
|
w({ pages: [], pageByRunIndex: null }), _(0), V.getState().progress.setTotalPages(0);
|
|
7609
7610
|
return;
|
|
7610
7611
|
}
|
|
7611
7612
|
(async () => {
|
|
7612
|
-
const
|
|
7613
|
+
const kt = performance.now();
|
|
7613
7614
|
try {
|
|
7614
|
-
const lt = s.getState().playbackScale, { pages:
|
|
7615
|
+
const lt = s.getState().playbackScale, { pages: At, pageByRunIndex: $i } = await Hu({
|
|
7615
7616
|
viewHost: j,
|
|
7616
7617
|
measureRoot: Le,
|
|
7617
|
-
contentArea:
|
|
7618
|
+
contentArea: De,
|
|
7618
7619
|
items: c,
|
|
7619
7620
|
cfgMaxWidth: v,
|
|
7620
7621
|
marginX: p,
|
|
@@ -7623,17 +7624,17 @@ function $u() {
|
|
|
7623
7624
|
lineHeight: h,
|
|
7624
7625
|
showSplit: z,
|
|
7625
7626
|
breakGapPx: N,
|
|
7626
|
-
showSlash:
|
|
7627
|
+
showSlash: A,
|
|
7627
7628
|
paragraphMarkers: f,
|
|
7628
7629
|
playbackScale: lt,
|
|
7629
7630
|
viewportHeight: m,
|
|
7630
7631
|
instanceId: e
|
|
7631
7632
|
}), Vi = performance.now();
|
|
7632
7633
|
console.log(
|
|
7633
|
-
`✅ calcPages 완료: ${(Vi -
|
|
7634
|
-
), w({ pages:
|
|
7634
|
+
`✅ calcPages 완료: ${(Vi - kt).toFixed(1)} ms (${At.length} pages)`
|
|
7635
|
+
), w({ pages: At, pageByRunIndex: $i }), _(0);
|
|
7635
7636
|
} catch (lt) {
|
|
7636
|
-
if (lt instanceof
|
|
7637
|
+
if (lt instanceof Di) {
|
|
7637
7638
|
console.log("이젠실행 취소 들어옴!");
|
|
7638
7639
|
return;
|
|
7639
7640
|
}
|
|
@@ -7650,7 +7651,7 @@ function $u() {
|
|
|
7650
7651
|
h,
|
|
7651
7652
|
z,
|
|
7652
7653
|
N,
|
|
7653
|
-
|
|
7654
|
+
A,
|
|
7654
7655
|
f,
|
|
7655
7656
|
s,
|
|
7656
7657
|
m,
|
|
@@ -7660,20 +7661,20 @@ function $u() {
|
|
|
7660
7661
|
return ((Le = j.layout) == null ? void 0 : Le.prefix) ?? [];
|
|
7661
7662
|
}), Ce = _e((j) => j.syncToGI), xe = te(
|
|
7662
7663
|
(j) => {
|
|
7663
|
-
const Le = g.pages.length + 1,
|
|
7664
|
-
if (
|
|
7665
|
-
const
|
|
7666
|
-
if (
|
|
7667
|
-
_(
|
|
7664
|
+
const Le = g.pages.length + 1, De = C + j;
|
|
7665
|
+
if (De < 0 || De >= Le) return;
|
|
7666
|
+
const kt = C === g.pages.length;
|
|
7667
|
+
if (De === g.pages.length) {
|
|
7668
|
+
_(De);
|
|
7668
7669
|
return;
|
|
7669
7670
|
}
|
|
7670
|
-
if (
|
|
7671
|
-
const
|
|
7672
|
-
|
|
7671
|
+
if (kt && j === -1) {
|
|
7672
|
+
const At = Fo(g.pages[De], c, Se);
|
|
7673
|
+
At != null && (be(At, "scrubber-step"), Ce(At)), _(De);
|
|
7673
7674
|
return;
|
|
7674
7675
|
}
|
|
7675
|
-
const lt = Fo(g.pages[
|
|
7676
|
-
lt != null ? (be(lt, "scrubber-step"), Ce(lt)) : _(
|
|
7676
|
+
const lt = Fo(g.pages[De], c, Se);
|
|
7677
|
+
lt != null ? (be(lt, "scrubber-step"), Ce(lt)) : _(De);
|
|
7677
7678
|
},
|
|
7678
7679
|
[C, g.pages, c, Se, be, _, Ce]
|
|
7679
7680
|
), Fe = te(() => {
|
|
@@ -7681,20 +7682,20 @@ function $u() {
|
|
|
7681
7682
|
}, [S, xe]), K = te(() => {
|
|
7682
7683
|
S || M.current !== 0 ? (O("next"), k(!1)) : xe(1);
|
|
7683
7684
|
}, [S, xe]), $ = kn(), G = te(() => {
|
|
7684
|
-
const { isSettingsOpen: j, setSettingsOpen: Le, toggleOverlays:
|
|
7685
|
-
j ? Le(!1) :
|
|
7686
|
-
}, [$]), E = g.pages.length + 1, L = ((
|
|
7685
|
+
const { isSettingsOpen: j, setSettingsOpen: Le, toggleOverlays: De } = $.getState();
|
|
7686
|
+
j ? Le(!1) : De();
|
|
7687
|
+
}, [$]), E = g.pages.length + 1, L = ((Br = y.current) == null ? void 0 : Br.clientWidth) || 400, q = te((j) => {
|
|
7687
7688
|
var lt;
|
|
7688
7689
|
const Le = b.current;
|
|
7689
7690
|
if (!Le) return;
|
|
7690
|
-
const
|
|
7691
|
-
Le.style.transform = `translate3d(${-33.333 +
|
|
7692
|
-
}, []),
|
|
7691
|
+
const De = ((lt = y.current) == null ? void 0 : lt.clientWidth) || 1, kt = j / De * 33.333;
|
|
7692
|
+
Le.style.transform = `translate3d(${-33.333 + kt}%, 0, 0)`;
|
|
7693
|
+
}, []), B = te(
|
|
7693
7694
|
(j) => {
|
|
7694
7695
|
C === 0 && j > 0 || C >= E - 1 && j < 0 || (M.current = j, q(j), S || k(!0));
|
|
7695
7696
|
},
|
|
7696
7697
|
[C, E, q, S]
|
|
7697
|
-
),
|
|
7698
|
+
), Z = te(() => {
|
|
7698
7699
|
M.current = 0, k(!1);
|
|
7699
7700
|
const j = b.current;
|
|
7700
7701
|
j && (j.style.transition = "transform 250ms ease-out", j.style.transform = "translate3d(-33.333%, 0, 0)");
|
|
@@ -7706,19 +7707,19 @@ function $u() {
|
|
|
7706
7707
|
},
|
|
7707
7708
|
[T, xe]
|
|
7708
7709
|
);
|
|
7709
|
-
|
|
7710
|
+
Rt(() => {
|
|
7710
7711
|
P && requestAnimationFrame(() => {
|
|
7711
7712
|
requestAnimationFrame(() => {
|
|
7712
7713
|
I(!1);
|
|
7713
7714
|
});
|
|
7714
7715
|
});
|
|
7715
7716
|
}, [P]);
|
|
7716
|
-
const
|
|
7717
|
-
(j) => i ||
|
|
7717
|
+
const Y = yn(), ne = te(
|
|
7718
|
+
(j) => i || Du(j) ? !0 : Fu(j),
|
|
7718
7719
|
[i]
|
|
7719
|
-
),
|
|
7720
|
-
(j) =>
|
|
7721
|
-
[
|
|
7720
|
+
), J = te(
|
|
7721
|
+
(j) => Y.getState().status === "playing" ? !0 : ne(j),
|
|
7722
|
+
[Y, ne]
|
|
7722
7723
|
), ce = Su({
|
|
7723
7724
|
onPrev: Fe,
|
|
7724
7725
|
onNext: K,
|
|
@@ -7726,13 +7727,13 @@ function $u() {
|
|
|
7726
7727
|
onDouble: () => {
|
|
7727
7728
|
},
|
|
7728
7729
|
shouldIgnoreTarget: ne,
|
|
7729
|
-
shouldIgnoreSwipe:
|
|
7730
|
+
shouldIgnoreSwipe: J,
|
|
7730
7731
|
horizontalThreshold: 120,
|
|
7731
7732
|
velocityThreshold: 0.6,
|
|
7732
7733
|
singleDelayMs: 250,
|
|
7733
7734
|
doubleClickWindowMs: 300,
|
|
7734
|
-
onDragMove:
|
|
7735
|
-
onDragEnd:
|
|
7735
|
+
onDragMove: B,
|
|
7736
|
+
onDragEnd: Z,
|
|
7736
7737
|
pageTransitionThreshold: L * 0.5
|
|
7737
7738
|
}), ie = se(null), we = se(null), pe = te(() => {
|
|
7738
7739
|
const j = V.getState().progress.setSectionLoading;
|
|
@@ -7747,7 +7748,7 @@ function $u() {
|
|
|
7747
7748
|
), Oe = Pu(re, 200, pe, ke), He = se("");
|
|
7748
7749
|
me(() => {
|
|
7749
7750
|
if (m <= 0) return;
|
|
7750
|
-
const j = `${l}|${d}|${h}|${p}|${z}|${N}|${
|
|
7751
|
+
const j = `${l}|${d}|${h}|${p}|${z}|${N}|${A}|${m}|${t == null ? void 0 : t.section_id}`;
|
|
7751
7752
|
He.current !== j && (He.current = j, console.log("debounceRecalc 취소"), Oe.cancel(), pe(), re());
|
|
7752
7753
|
}, [
|
|
7753
7754
|
Oe,
|
|
@@ -7759,12 +7760,12 @@ function $u() {
|
|
|
7759
7760
|
p,
|
|
7760
7761
|
z,
|
|
7761
7762
|
N,
|
|
7762
|
-
|
|
7763
|
+
A,
|
|
7763
7764
|
m,
|
|
7764
7765
|
t == null ? void 0 : t.section_id
|
|
7765
7766
|
]), vu([y], Oe);
|
|
7766
|
-
const
|
|
7767
|
-
me(() => (
|
|
7767
|
+
const Be = U((j) => j.registerSectionScrollApi);
|
|
7768
|
+
me(() => (Be({
|
|
7768
7769
|
// 페이지 모드에서는 GI 기반 스크롤 불필요 - 더미 구현
|
|
7769
7770
|
ensureVisibleGI: () => Promise.resolve(!0),
|
|
7770
7771
|
scrollToGI: () => Promise.resolve(!0),
|
|
@@ -7776,8 +7777,8 @@ function $u() {
|
|
|
7776
7777
|
scrollToGIAtOffset: () => Promise.resolve(),
|
|
7777
7778
|
// 페이지 이동 구현
|
|
7778
7779
|
stepPage: xe
|
|
7779
|
-
}), () =>
|
|
7780
|
-
const $e = t.quizzes && t.quizzes.length > 0, ut = g.pages.length > 0 && C === g.pages.length, Xe = C > 0 ? C - 1 : null, Ge = C < E - 1 ? C + 1 : null, st = he(() => T === "prev" ? "translate3d(0%, 0, 0)" : T === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [T]), nt = (j) => n ? null : j === g.pages.length ? /* @__PURE__ */
|
|
7780
|
+
}), () => Be(void 0)), [Be, xe]);
|
|
7781
|
+
const $e = t.quizzes && t.quizzes.length > 0, ut = g.pages.length > 0 && C === g.pages.length, Xe = C > 0 ? C - 1 : null, Ge = C < E - 1 ? C + 1 : null, st = he(() => T === "prev" ? "translate3d(0%, 0, 0)" : T === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [T]), nt = (j) => n ? null : j === g.pages.length ? /* @__PURE__ */ ee(
|
|
7781
7782
|
"div",
|
|
7782
7783
|
{
|
|
7783
7784
|
style: {
|
|
@@ -7806,8 +7807,8 @@ function $u() {
|
|
|
7806
7807
|
backfaceVisibility: "hidden",
|
|
7807
7808
|
WebkitBackfaceVisibility: "hidden"
|
|
7808
7809
|
}, Vt = !P && (!S || T !== null);
|
|
7809
|
-
return console.log("여기리랜더"), /* @__PURE__ */
|
|
7810
|
-
/* @__PURE__ */
|
|
7810
|
+
return console.log("여기리랜더"), /* @__PURE__ */ ee("div", { ref: y, style: { ...R, touchAction: "none" }, ...ce, children: [
|
|
7811
|
+
/* @__PURE__ */ ee(
|
|
7811
7812
|
"div",
|
|
7812
7813
|
{
|
|
7813
7814
|
ref: b,
|
|
@@ -7859,7 +7860,7 @@ function $u() {
|
|
|
7859
7860
|
pointerEvents: "none",
|
|
7860
7861
|
background: "pink"
|
|
7861
7862
|
},
|
|
7862
|
-
children: /* @__PURE__ */
|
|
7863
|
+
children: /* @__PURE__ */ ee(
|
|
7863
7864
|
"div",
|
|
7864
7865
|
{
|
|
7865
7866
|
style: {
|
|
@@ -7910,22 +7911,22 @@ const Vu = ({ pages: e, items: t, onGotoPage: n, currentPageIndex: r, isOnExtraP
|
|
|
7910
7911
|
const i = U((l) => l.currentGlobalRunIndex), s = U((l) => l.lastUpdateBy), u = U((l) => {
|
|
7911
7912
|
var d;
|
|
7912
7913
|
return ((d = l.layout) == null ? void 0 : d.prefix) ?? [];
|
|
7913
|
-
}), a =
|
|
7914
|
+
}), a = W.useRef(null);
|
|
7914
7915
|
return me(() => {
|
|
7915
7916
|
if (i == null || e.length === 0 || o && !(s === "scrubber-live" || s === "scrubber-commit") || a.current === i) return;
|
|
7916
7917
|
a.current = i;
|
|
7917
7918
|
const l = Nu(i, e, t, u);
|
|
7918
7919
|
l >= 0 && l !== r && n(l);
|
|
7919
7920
|
}, [i, e, t, u, n, r, o, s]), /* @__PURE__ */ x(xt, {});
|
|
7920
|
-
}, qu = "_wrapper_dbk3n_1", ju = "_spinner_dbk3n_10",
|
|
7921
|
+
}, qu = "_wrapper_dbk3n_1", ju = "_spinner_dbk3n_10", Do = {
|
|
7921
7922
|
wrapper: qu,
|
|
7922
7923
|
spinner: ju
|
|
7923
7924
|
};
|
|
7924
7925
|
function Uu({ size: e = 28, speed: t = 0.8 }) {
|
|
7925
|
-
return /* @__PURE__ */ x("div", { className: `${
|
|
7926
|
+
return /* @__PURE__ */ x("div", { className: `${Do.wrapper}`, children: /* @__PURE__ */ x(
|
|
7926
7927
|
"div",
|
|
7927
7928
|
{
|
|
7928
|
-
className:
|
|
7929
|
+
className: Do.spinner,
|
|
7929
7930
|
style: {
|
|
7930
7931
|
width: e,
|
|
7931
7932
|
height: e,
|
|
@@ -7972,7 +7973,7 @@ const Xu = "_Overlay_ybic8_3", Yu = "_Dialog_ybic8_15", Qu = "_Body_ybic8_25", Z
|
|
|
7972
7973
|
function Id(e) {
|
|
7973
7974
|
return e ? e.kind === "temp" ? e.image_blob_url : e.image_cdn_url : null;
|
|
7974
7975
|
}
|
|
7975
|
-
function
|
|
7976
|
+
function Wi(e) {
|
|
7976
7977
|
var t;
|
|
7977
7978
|
return (((t = e.answers) == null ? void 0 : t.length) ?? 0) > 1;
|
|
7978
7979
|
}
|
|
@@ -7983,7 +7984,7 @@ function Cd(e) {
|
|
|
7983
7984
|
o >= 0 && n.push(o);
|
|
7984
7985
|
}), n.sort((r, o) => r - o);
|
|
7985
7986
|
}
|
|
7986
|
-
const Td =
|
|
7987
|
+
const Td = Dt(function() {
|
|
7987
7988
|
const t = Je((c) => c.phase), n = Je((c) => c.quizzes), r = Je((c) => c.order), o = Je((c) => c.currentIndex), i = Je((c) => c.answers), s = Je((c) => c.correctCount), u = Je((c) => c.remainingSec), a = Je((c) => c.uiReveal), l = Je((c) => c.startedAt), d = Je((c) => c.finishedAt), h = Je((c) => c.perQ), p = Oi();
|
|
7988
7989
|
me(() => {
|
|
7989
7990
|
if (t === "idle" || t !== "doing" || u == null) return;
|
|
@@ -7992,10 +7993,10 @@ const Td = Wt(function() {
|
|
|
7992
7993
|
}, [t, u, p]);
|
|
7993
7994
|
const m = t === "doing" ? n[r[o]] : void 0, v = t === "doing" && m ? i[m.qid] ?? [] : [], y = he(() => {
|
|
7994
7995
|
if (t === "idle" || t !== "finished") return;
|
|
7995
|
-
const c = r.map((
|
|
7996
|
+
const c = r.map((A) => n[A]), f = c.length, g = c.reduce((A, V) => A + (V.score ?? 0), 0), w = c.reduce((A, V) => {
|
|
7996
7997
|
const re = h[V.qid];
|
|
7997
|
-
return
|
|
7998
|
-
}, 0), C = c.map((
|
|
7998
|
+
return A + (re != null && re.isCorrect ? V.score ?? 0 : 0);
|
|
7999
|
+
}, 0), C = c.map((A) => h[A.qid]).filter((A) => !!A), _ = typeof l == "number" && typeof d == "number" ? Math.max(0, d - l) : C.reduce((A, V) => A + (V.ms ?? 0), 0), M = f > 0 ? Math.round(_ / f) : 0, b = [...C].sort((A, V) => A.ms - V.ms), S = b[0], k = b[b.length - 1], T = C.filter((A) => !A.multi), O = C.filter((A) => A.multi), P = T.filter((A) => A.isCorrect).length, I = O.filter((A) => A.isCorrect).length, R = C.filter((A) => A.timedOut).length, z = C.filter((A) => A.revealed).length, N = C.filter((A) => !A.isCorrect).sort((A, V) => V.ms - A.ms).slice(0, 3);
|
|
7999
8000
|
return {
|
|
8000
8001
|
total: f,
|
|
8001
8002
|
correct: s,
|
|
@@ -8024,7 +8025,7 @@ const Td = Wt(function() {
|
|
|
8024
8025
|
onSelect: (c) => {
|
|
8025
8026
|
if (a) return;
|
|
8026
8027
|
const f = p.getState();
|
|
8027
|
-
|
|
8028
|
+
Wi(m) ? f.selectToggle(c) : f.selectSingle(c);
|
|
8028
8029
|
},
|
|
8029
8030
|
onBeforeNext: () => p.getState().setReveal(!0),
|
|
8030
8031
|
onNext: () => p.getState().afterRevealNext(),
|
|
@@ -8071,7 +8072,7 @@ function kd(e) {
|
|
|
8071
8072
|
onNext: a,
|
|
8072
8073
|
remainingSec: l,
|
|
8073
8074
|
onClose: d
|
|
8074
|
-
} = e, h =
|
|
8075
|
+
} = e, h = Wi(t), p = he(() => {
|
|
8075
8076
|
const c = t.options.map((f, g) => ({ opt: f, i: g }));
|
|
8076
8077
|
for (let f = c.length - 1; f > 0; f--) {
|
|
8077
8078
|
const g = Math.floor(Math.random() * (f + 1));
|
|
@@ -8084,8 +8085,8 @@ function kd(e) {
|
|
|
8084
8085
|
for (let f = 0; f < c.length; f++) if (c[f] !== v[f]) return !1;
|
|
8085
8086
|
return !0;
|
|
8086
8087
|
}, [o, v]);
|
|
8087
|
-
return /* @__PURE__ */
|
|
8088
|
-
/* @__PURE__ */
|
|
8088
|
+
return /* @__PURE__ */ ee("div", { className: de.Body, children: [
|
|
8089
|
+
/* @__PURE__ */ ee("div", { className: de.Header, children: [
|
|
8089
8090
|
/* @__PURE__ */ x("div", { className: de.Paging, children: `Quiz (${n + 1}/${r})` }),
|
|
8090
8091
|
/* @__PURE__ */ x("button", { type: "button", onClick: d, className: de.CloseBtn, children: "X" })
|
|
8091
8092
|
] }),
|
|
@@ -8118,45 +8119,45 @@ function kd(e) {
|
|
|
8118
8119
|
f
|
|
8119
8120
|
);
|
|
8120
8121
|
}) }),
|
|
8121
|
-
/* @__PURE__ */ x("div", { className: de.Footer, children: i ? /* @__PURE__ */ x("button", { type: "button", onClick: a, className: de.NextBtn, children: n + 1 >= r ? "Complete" : "Next Quiz" }) : /* @__PURE__ */
|
|
8122
|
+
/* @__PURE__ */ x("div", { className: de.Footer, children: i ? /* @__PURE__ */ x("button", { type: "button", onClick: a, className: de.NextBtn, children: n + 1 >= r ? "Complete" : "Next Quiz" }) : /* @__PURE__ */ ee("button", { type: "button", onClick: u, className: `${de.NextBtn}`, children: [
|
|
8122
8123
|
"Submit",
|
|
8123
8124
|
typeof l == "number" && /* @__PURE__ */ x("span", { className: `${de.Remaining} ${l <= 5 ? de.RemainingDanger : ""}`, children: ` (${l} s )` })
|
|
8124
8125
|
] }) })
|
|
8125
8126
|
] });
|
|
8126
8127
|
}
|
|
8127
|
-
function
|
|
8128
|
+
function Wo(e) {
|
|
8128
8129
|
return e == null ? "-" : `${Math.round(e / 1e3)}s`;
|
|
8129
8130
|
}
|
|
8130
8131
|
function Rd(e) {
|
|
8131
8132
|
const { total: t, correct: n, summary: r, retryAllowed: o, onClose: i, onRetry: s } = e, u = (r == null ? void 0 : r.rate) ?? (t > 0 ? Math.round(n / t * 100) : 0);
|
|
8132
|
-
return /* @__PURE__ */
|
|
8133
|
+
return /* @__PURE__ */ ee("div", { className: de.Body, children: [
|
|
8133
8134
|
/* @__PURE__ */ x("div", { className: de.ResultHeader, children: "결과 요약" }),
|
|
8134
|
-
/* @__PURE__ */
|
|
8135
|
-
/* @__PURE__ */
|
|
8135
|
+
/* @__PURE__ */ ee("div", { className: de.SummaryGrid, role: "list", children: [
|
|
8136
|
+
/* @__PURE__ */ ee("div", { className: de.StatCard, role: "listitem", children: [
|
|
8136
8137
|
/* @__PURE__ */ x("div", { className: de.StatLabel, children: "정답률" }),
|
|
8137
|
-
/* @__PURE__ */
|
|
8138
|
+
/* @__PURE__ */ ee("div", { className: de.StatValue, children: [
|
|
8138
8139
|
u,
|
|
8139
8140
|
"%"
|
|
8140
8141
|
] }),
|
|
8141
8142
|
/* @__PURE__ */ x("div", { className: de.StatSub, children: `정답수 ${n}/문제수${t}` })
|
|
8142
8143
|
] }),
|
|
8143
|
-
/* @__PURE__ */
|
|
8144
|
+
/* @__PURE__ */ ee("div", { className: de.StatCard, role: "listitem", children: [
|
|
8144
8145
|
/* @__PURE__ */ x("div", { className: de.StatLabel, children: "총 점수" }),
|
|
8145
8146
|
/* @__PURE__ */ x("div", { className: de.StatValue, children: r ? `${r.gainedScore}/${r.totalScore}` : "-" }),
|
|
8146
8147
|
/* @__PURE__ */ x("div", { className: de.StatSub, children: "획득점수/최대점수" })
|
|
8147
8148
|
] }),
|
|
8148
|
-
/* @__PURE__ */
|
|
8149
|
+
/* @__PURE__ */ ee("div", { className: de.StatCard, role: "listitem", children: [
|
|
8149
8150
|
/* @__PURE__ */ x("div", { className: de.StatLabel, children: "총 소요 시간" }),
|
|
8150
|
-
/* @__PURE__ */ x("div", { className: de.StatValue, children:
|
|
8151
|
-
/* @__PURE__ */ x("div", { className: de.StatSub, children: `평균 ${
|
|
8151
|
+
/* @__PURE__ */ x("div", { className: de.StatValue, children: Wo(r == null ? void 0 : r.timeMsTotal) }),
|
|
8152
|
+
/* @__PURE__ */ x("div", { className: de.StatSub, children: `평균 ${Wo(r == null ? void 0 : r.avgMs)}` })
|
|
8152
8153
|
] }),
|
|
8153
|
-
/* @__PURE__ */
|
|
8154
|
+
/* @__PURE__ */ ee("div", { className: de.StatCard, role: "listitem", children: [
|
|
8154
8155
|
/* @__PURE__ */ x("div", { className: de.StatLabel, children: "타입오버 퀴즈수" }),
|
|
8155
8156
|
/* @__PURE__ */ x("div", { className: de.StatValue, children: r ? `${r.timedOut}` : "-" }),
|
|
8156
8157
|
/* @__PURE__ */ x("div", { className: de.StatSub, children: "timeout" })
|
|
8157
8158
|
] })
|
|
8158
8159
|
] }),
|
|
8159
|
-
/* @__PURE__ */
|
|
8160
|
+
/* @__PURE__ */ ee("div", { className: de.ResultActions, children: [
|
|
8160
8161
|
o && /* @__PURE__ */ x("button", { type: "button", onClick: s, className: de.CloseBtnSoft, children: "다시 풀기" }),
|
|
8161
8162
|
/* @__PURE__ */ x("button", { type: "button", onClick: i, className: de.CloseBtnSoft, children: "닫기" })
|
|
8162
8163
|
] })
|
|
@@ -8458,7 +8459,7 @@ function Od({ children: e, initialState: t }) {
|
|
|
8458
8459
|
}
|
|
8459
8460
|
});
|
|
8460
8461
|
return () => o();
|
|
8461
|
-
}, [n]), /* @__PURE__ */ x(
|
|
8462
|
+
}, [n]), /* @__PURE__ */ x(Ar.Provider, { value: n, children: e });
|
|
8462
8463
|
}
|
|
8463
8464
|
const Vo = [
|
|
8464
8465
|
"mode",
|
|
@@ -8481,7 +8482,7 @@ const Vo = [
|
|
|
8481
8482
|
"isSettingsOpen"
|
|
8482
8483
|
];
|
|
8483
8484
|
function zd({ containerRef: e }) {
|
|
8484
|
-
const t =
|
|
8485
|
+
const t = wt(), n = kn(), r = se(null);
|
|
8485
8486
|
return me(() => {
|
|
8486
8487
|
const o = e.current;
|
|
8487
8488
|
if (!o) return;
|
|
@@ -8520,7 +8521,7 @@ function zd({ containerRef: e }) {
|
|
|
8520
8521
|
}, [t, n]), null;
|
|
8521
8522
|
}
|
|
8522
8523
|
function Pd() {
|
|
8523
|
-
const e =
|
|
8524
|
+
const e = wt(), t = kn(), n = Mt(), r = Ue(Ko), o = Ue(On), i = te(
|
|
8524
8525
|
(a) => {
|
|
8525
8526
|
const { viewerState: l } = a;
|
|
8526
8527
|
if (l) {
|
|
@@ -8611,7 +8612,8 @@ function Pd() {
|
|
|
8611
8612
|
viewportHeight: a.viewportHeight,
|
|
8612
8613
|
audio: y,
|
|
8613
8614
|
range: g,
|
|
8614
|
-
translate: C
|
|
8615
|
+
translate: C,
|
|
8616
|
+
wordAvgDistancePx: e.getState().wordAvgDistancePx
|
|
8615
8617
|
};
|
|
8616
8618
|
}, [t, n, o]), u = te(
|
|
8617
8619
|
(a) => {
|
|
@@ -8703,7 +8705,7 @@ function Pd() {
|
|
|
8703
8705
|
},
|
|
8704
8706
|
[n, t, o]
|
|
8705
8707
|
);
|
|
8706
|
-
return
|
|
8708
|
+
return Rt(() => r ? (r.current = {
|
|
8707
8709
|
dispatch: u,
|
|
8708
8710
|
applySnapshot: i,
|
|
8709
8711
|
getSnapshot: s,
|
|
@@ -8726,15 +8728,59 @@ function Pd() {
|
|
|
8726
8728
|
i,
|
|
8727
8729
|
s,
|
|
8728
8730
|
n
|
|
8729
|
-
]),
|
|
8731
|
+
]), Rt(() => e.subscribe((l, d) => {
|
|
8730
8732
|
l.isPlaybackMode && !d.isPlaybackMode ? (e.getState().setDispatchHandler(u), e.getState().setApplySnapshotHandler(i)) : !l.isPlaybackMode && d.isPlaybackMode && (e.getState().setDispatchHandler(null), e.getState().setApplySnapshotHandler(null));
|
|
8731
8733
|
}), [e, u, i]), null;
|
|
8732
8734
|
}
|
|
8733
|
-
|
|
8735
|
+
function Ad(e) {
|
|
8736
|
+
const t = e.querySelectorAll("[data-gi]");
|
|
8737
|
+
if (t.length < 2) return 0;
|
|
8738
|
+
const n = [];
|
|
8739
|
+
let r = null, o = -1 / 0;
|
|
8740
|
+
for (let i = 0; i < t.length; i++) {
|
|
8741
|
+
const s = t[i].getBoundingClientRect();
|
|
8742
|
+
if (r && Math.abs(s.top - o) < s.height * 0.5) {
|
|
8743
|
+
const u = s.left - r.right;
|
|
8744
|
+
u >= 0 && n.push(u);
|
|
8745
|
+
}
|
|
8746
|
+
r = s, o = s.top;
|
|
8747
|
+
}
|
|
8748
|
+
return n.length === 0 ? 0 : n.reduce((i, s) => i + s, 0) / n.length;
|
|
8749
|
+
}
|
|
8750
|
+
function Bd({
|
|
8751
|
+
containerRef: e
|
|
8752
|
+
}) {
|
|
8753
|
+
const t = X((d) => d.fontSizePx), n = X((d) => d.fontFamily), r = X((d) => d.lineHeight), o = X((d) => d.marginX), i = X((d) => d.breakMarks), s = X((d) => d.breakGapPx), u = X((d) => d.showSplit), a = X((d) => d.viewportWidth), l = wt();
|
|
8754
|
+
return me(() => {
|
|
8755
|
+
const d = e.current;
|
|
8756
|
+
if (!d) return;
|
|
8757
|
+
let h, p;
|
|
8758
|
+
return h = requestAnimationFrame(() => {
|
|
8759
|
+
p = requestAnimationFrame(() => {
|
|
8760
|
+
const m = Ad(d);
|
|
8761
|
+
l.setState({ wordAvgDistancePx: m });
|
|
8762
|
+
});
|
|
8763
|
+
}), () => {
|
|
8764
|
+
cancelAnimationFrame(h), cancelAnimationFrame(p);
|
|
8765
|
+
};
|
|
8766
|
+
}, [
|
|
8767
|
+
e,
|
|
8768
|
+
l,
|
|
8769
|
+
t,
|
|
8770
|
+
n,
|
|
8771
|
+
r,
|
|
8772
|
+
o,
|
|
8773
|
+
i,
|
|
8774
|
+
s,
|
|
8775
|
+
u,
|
|
8776
|
+
a
|
|
8777
|
+
]), null;
|
|
8778
|
+
}
|
|
8779
|
+
const Gd = ({
|
|
8734
8780
|
containerRef: e,
|
|
8735
8781
|
onTranslate: t
|
|
8736
8782
|
}) => {
|
|
8737
|
-
const n = U((p) => p.rangeStartGI), r = U((p) => p.rangeEndGI), o = U((p) => p.getRangeText), i = U((p) => p.clearRange), s =
|
|
8783
|
+
const n = U((p) => p.rangeStartGI), r = U((p) => p.rangeEndGI), o = U((p) => p.getRangeText), i = U((p) => p.clearRange), s = wt(), u = n != null && r != null, [a, l] = pt(null);
|
|
8738
8784
|
me(() => {
|
|
8739
8785
|
if (!u) return;
|
|
8740
8786
|
const p = e.current;
|
|
@@ -8786,7 +8832,7 @@ const Bd = ({
|
|
|
8786
8832
|
const p = o();
|
|
8787
8833
|
p && t && t(p);
|
|
8788
8834
|
}, [o, t]);
|
|
8789
|
-
return !u || !a ? null : /* @__PURE__ */
|
|
8835
|
+
return !u || !a ? null : /* @__PURE__ */ ee(
|
|
8790
8836
|
"div",
|
|
8791
8837
|
{
|
|
8792
8838
|
"data-range-menu": !0,
|
|
@@ -8841,11 +8887,11 @@ const Bd = ({
|
|
|
8841
8887
|
]
|
|
8842
8888
|
}
|
|
8843
8889
|
);
|
|
8844
|
-
},
|
|
8845
|
-
handleStart:
|
|
8846
|
-
handleEnd:
|
|
8847
|
-
},
|
|
8848
|
-
const t = U((f) => f.rangeStartGI), n = U((f) => f.rangeEndGI), r = U((f) => f.setRange), o =
|
|
8890
|
+
}, Ld = "_handleStart_1ihf3_16 _handle_1ihf3_1", Hd = "_handleEnd_1ihf3_21 _handle_1ihf3_1", qo = {
|
|
8891
|
+
handleStart: Ld,
|
|
8892
|
+
handleEnd: Hd
|
|
8893
|
+
}, Nd = ({ containerRef: e }) => {
|
|
8894
|
+
const t = U((f) => f.rangeStartGI), n = U((f) => f.rangeEndGI), r = U((f) => f.setRange), o = wt(), i = t != null && n != null, [s, u] = pt(null), [a, l] = pt(null), d = se(null), h = se(null);
|
|
8849
8895
|
me(() => {
|
|
8850
8896
|
if (!i || t == null || n == null) {
|
|
8851
8897
|
u(null), l(null);
|
|
@@ -8902,7 +8948,7 @@ const Bd = ({
|
|
|
8902
8948
|
), y = te((f) => {
|
|
8903
8949
|
d.current = null, h.current = null, f.target.releasePointerCapture(f.pointerId);
|
|
8904
8950
|
}, []);
|
|
8905
|
-
return i ? /* @__PURE__ */
|
|
8951
|
+
return i ? /* @__PURE__ */ ee(xt, { children: [
|
|
8906
8952
|
s && /* @__PURE__ */ x(
|
|
8907
8953
|
"div",
|
|
8908
8954
|
{
|
|
@@ -8935,7 +8981,7 @@ const Bd = ({
|
|
|
8935
8981
|
)
|
|
8936
8982
|
] }) : null;
|
|
8937
8983
|
};
|
|
8938
|
-
function
|
|
8984
|
+
function Fd() {
|
|
8939
8985
|
const e = U((o) => o.rangeStartGI), t = U((o) => o.rangeEndGI), n = U((o) => o.clearRange), r = e != null && t != null;
|
|
8940
8986
|
return me(() => {
|
|
8941
8987
|
if (!r) return;
|
|
@@ -8957,7 +9003,7 @@ function Hd() {
|
|
|
8957
9003
|
return document.addEventListener("click", o, !0), () => document.removeEventListener("click", o, !0);
|
|
8958
9004
|
}, [r, e, t, n]), null;
|
|
8959
9005
|
}
|
|
8960
|
-
const
|
|
9006
|
+
const Dd = ({ isOpen: e, onClose: t, text: n }) => e ? /* @__PURE__ */ x(
|
|
8961
9007
|
"div",
|
|
8962
9008
|
{
|
|
8963
9009
|
style: {
|
|
@@ -8970,7 +9016,7 @@ const Nd = ({ isOpen: e, onClose: t, text: n }) => e ? /* @__PURE__ */ x(
|
|
|
8970
9016
|
zIndex: 10001
|
|
8971
9017
|
},
|
|
8972
9018
|
onClick: t,
|
|
8973
|
-
children: /* @__PURE__ */
|
|
9019
|
+
children: /* @__PURE__ */ ee(
|
|
8974
9020
|
"div",
|
|
8975
9021
|
{
|
|
8976
9022
|
style: {
|
|
@@ -9033,7 +9079,7 @@ const Nd = ({ isOpen: e, onClose: t, text: n }) => e ? /* @__PURE__ */ x(
|
|
|
9033
9079
|
children: "준비중입니다"
|
|
9034
9080
|
}
|
|
9035
9081
|
),
|
|
9036
|
-
n && /* @__PURE__ */
|
|
9082
|
+
n && /* @__PURE__ */ ee(
|
|
9037
9083
|
"div",
|
|
9038
9084
|
{
|
|
9039
9085
|
style: {
|
|
@@ -9056,8 +9102,8 @@ const Nd = ({ isOpen: e, onClose: t, text: n }) => e ? /* @__PURE__ */ x(
|
|
|
9056
9102
|
}
|
|
9057
9103
|
)
|
|
9058
9104
|
}
|
|
9059
|
-
) : null,
|
|
9060
|
-
function
|
|
9105
|
+
) : null, Wd = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
9106
|
+
function Kd({
|
|
9061
9107
|
section: e,
|
|
9062
9108
|
initialViewerState: t,
|
|
9063
9109
|
initialProgressRunIndex: n,
|
|
@@ -9082,7 +9128,7 @@ function jd({
|
|
|
9082
9128
|
for (const k of _)
|
|
9083
9129
|
(k == null ? void 0 : k.type) !== "image" && (M += ((S = k == null ? void 0 : k.runs) == null ? void 0 : S.length) ?? 0);
|
|
9084
9130
|
return M;
|
|
9085
|
-
}, [e]), g = he(() => typeof n == "number" ?
|
|
9131
|
+
}, [e]), g = he(() => typeof n == "number" ? Wd(n, f > 0 ? 0 : -1, Math.max(f - 1, -1)) : (f > 0, 0), [n, f]), w = he(
|
|
9086
9132
|
() => ({
|
|
9087
9133
|
section: e,
|
|
9088
9134
|
initialIndex: g,
|
|
@@ -9113,15 +9159,15 @@ function jd({
|
|
|
9113
9159
|
{
|
|
9114
9160
|
initialState: w,
|
|
9115
9161
|
gazeSync: p,
|
|
9116
|
-
children: /* @__PURE__ */ x(cu, { initialState: C, children: /* @__PURE__ */ x(Od, { initialState: { section: e, onQuizComplete: u, quizRetryAllowed: a, previousQuizResult: l }, children: /* @__PURE__ */ x(
|
|
9162
|
+
children: /* @__PURE__ */ x(cu, { initialState: C, children: /* @__PURE__ */ x(Od, { initialState: { section: e, onQuizComplete: u, quizRetryAllowed: a, previousQuizResult: l }, children: /* @__PURE__ */ x($d, {}) }, c) }, c)
|
|
9117
9163
|
},
|
|
9118
9164
|
c
|
|
9119
9165
|
) })
|
|
9120
9166
|
}
|
|
9121
9167
|
);
|
|
9122
9168
|
}
|
|
9123
|
-
function
|
|
9124
|
-
const e =
|
|
9169
|
+
function $d() {
|
|
9170
|
+
const e = X((d) => d.mode), t = se(null), n = wt(), r = Mt(), o = U((d) => d.translateOpen), i = U((d) => d.translateText), s = te(
|
|
9125
9171
|
(d) => {
|
|
9126
9172
|
const { rangeStartGI: h, rangeEndGI: p } = r.getState().progress;
|
|
9127
9173
|
r.getState().progress.setTranslateState({
|
|
@@ -9145,7 +9191,7 @@ function Wd() {
|
|
|
9145
9191
|
payload: {}
|
|
9146
9192
|
});
|
|
9147
9193
|
}, [n, r]);
|
|
9148
|
-
return /* @__PURE__ */
|
|
9194
|
+
return /* @__PURE__ */ ee(
|
|
9149
9195
|
"div",
|
|
9150
9196
|
{
|
|
9151
9197
|
ref: t,
|
|
@@ -9170,14 +9216,14 @@ function Wd() {
|
|
|
9170
9216
|
},
|
|
9171
9217
|
children: [
|
|
9172
9218
|
e === "scroll" ? /* @__PURE__ */ x(ka, {}) : /* @__PURE__ */ x($u, {}),
|
|
9173
|
-
/* @__PURE__ */ x(
|
|
9174
|
-
/* @__PURE__ */ x(
|
|
9219
|
+
/* @__PURE__ */ x(Gd, { containerRef: t, onTranslate: s }),
|
|
9220
|
+
/* @__PURE__ */ x(Nd, { containerRef: t }),
|
|
9175
9221
|
/* @__PURE__ */ x(nu, {}),
|
|
9176
9222
|
/* @__PURE__ */ x(Td, {}),
|
|
9177
9223
|
/* @__PURE__ */ x(Ku, {}),
|
|
9178
|
-
/* @__PURE__ */ x(
|
|
9224
|
+
/* @__PURE__ */ x(Fd, {}),
|
|
9179
9225
|
/* @__PURE__ */ x(
|
|
9180
|
-
|
|
9226
|
+
Dd,
|
|
9181
9227
|
{
|
|
9182
9228
|
isOpen: o,
|
|
9183
9229
|
onClose: u,
|
|
@@ -9185,11 +9231,12 @@ function Wd() {
|
|
|
9185
9231
|
}
|
|
9186
9232
|
),
|
|
9187
9233
|
/* @__PURE__ */ x(zd, { containerRef: t }),
|
|
9188
|
-
/* @__PURE__ */ x(Pd, {})
|
|
9234
|
+
/* @__PURE__ */ x(Pd, {}),
|
|
9235
|
+
/* @__PURE__ */ x(Bd, { containerRef: t })
|
|
9189
9236
|
]
|
|
9190
9237
|
}
|
|
9191
9238
|
);
|
|
9192
9239
|
}
|
|
9193
9240
|
export {
|
|
9194
|
-
|
|
9241
|
+
Kd as CRViewer
|
|
9195
9242
|
};
|