@nypl/web-reader 3.1.0 → 3.2.2

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/esm/index.js CHANGED
@@ -1259,6 +1259,7 @@ var require_tslib = __commonJS({
1259
1259
  var __importDefault2;
1260
1260
  var __classPrivateFieldGet2;
1261
1261
  var __classPrivateFieldSet2;
1262
+ var __classPrivateFieldIn2;
1262
1263
  var __createBinding2;
1263
1264
  (function(factory2) {
1264
1265
  var root2 = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
@@ -1451,9 +1452,13 @@ var require_tslib = __commonJS({
1451
1452
  __createBinding2 = Object.create ? function(o, m, k, k2) {
1452
1453
  if (k2 === void 0)
1453
1454
  k2 = k;
1454
- Object.defineProperty(o, k2, { enumerable: true, get: function() {
1455
- return m[k];
1456
- } });
1455
+ var desc = Object.getOwnPropertyDescriptor(m, k);
1456
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
1457
+ desc = { enumerable: true, get: function() {
1458
+ return m[k];
1459
+ } };
1460
+ }
1461
+ Object.defineProperty(o, k2, desc);
1457
1462
  } : function(o, m, k, k2) {
1458
1463
  if (k2 === void 0)
1459
1464
  k2 = k;
@@ -1634,6 +1639,11 @@ var require_tslib = __commonJS({
1634
1639
  throw new TypeError("Cannot write private member to an object whose class did not declare it");
1635
1640
  return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state2.set(receiver, value), value;
1636
1641
  };
1642
+ __classPrivateFieldIn2 = function(state2, receiver) {
1643
+ if (receiver === null || typeof receiver !== "object" && typeof receiver !== "function")
1644
+ throw new TypeError("Cannot use 'in' operator on non-object");
1645
+ return typeof state2 === "function" ? receiver === state2 : state2.has(receiver);
1646
+ };
1637
1647
  exporter("__extends", __extends2);
1638
1648
  exporter("__assign", __assign3);
1639
1649
  exporter("__rest", __rest3);
@@ -1658,6 +1668,7 @@ var require_tslib = __commonJS({
1658
1668
  exporter("__importDefault", __importDefault2);
1659
1669
  exporter("__classPrivateFieldGet", __classPrivateFieldGet2);
1660
1670
  exporter("__classPrivateFieldSet", __classPrivateFieldSet2);
1671
+ exporter("__classPrivateFieldIn", __classPrivateFieldIn2);
1661
1672
  });
1662
1673
  }
1663
1674
  });
@@ -13648,6 +13659,38 @@ var require_regenerator = __commonJS({
13648
13659
  }
13649
13660
  });
13650
13661
 
13662
+ // node_modules/make-event-props/dist/entry.js
13663
+ var require_entry = __commonJS({
13664
+ "node_modules/make-event-props/dist/entry.js"(exports2) {
13665
+ "use strict";
13666
+ Object.defineProperty(exports2, "__esModule", {
13667
+ value: true
13668
+ });
13669
+ exports2.default = exports2.focusEvents = exports2.keyboardEvents = exports2.touchEvents = exports2.mouseEvents = void 0;
13670
+ var mouseEvents2 = ["onClick", "onContextMenu", "onDoubleClick", "onDrag", "onDragEnd", "onDragEnter", "onDragExit", "onDragLeave", "onDragOver", "onDragStart", "onDrop", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onMouseOut", "onMouseOver", "onMouseUp"];
13671
+ exports2.mouseEvents = mouseEvents2;
13672
+ var touchEvents2 = ["onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
13673
+ exports2.touchEvents = touchEvents2;
13674
+ var keyboardEvents2 = ["onKeyDown", "onKeyPress", "onKeyUp"];
13675
+ exports2.keyboardEvents = keyboardEvents2;
13676
+ var focusEvents = ["onFocus", "onBlur"];
13677
+ exports2.focusEvents = focusEvents;
13678
+ var makeEventProps4 = function makeEventProps5(props, getArgs) {
13679
+ var eventProps2 = {};
13680
+ [].concat(mouseEvents2, touchEvents2, keyboardEvents2, focusEvents).forEach(function(eventName) {
13681
+ if (props[eventName]) {
13682
+ eventProps2[eventName] = function(event) {
13683
+ return getArgs ? props[eventName](event, getArgs(eventName)) : props[eventName](event);
13684
+ };
13685
+ }
13686
+ });
13687
+ return eventProps2;
13688
+ };
13689
+ var _default = makeEventProps4;
13690
+ exports2.default = _default;
13691
+ }
13692
+ });
13693
+
13651
13694
  // node_modules/debounce/index.js
13652
13695
  var require_debounce = __commonJS({
13653
13696
  "node_modules/debounce/index.js"(exports2, module2) {
@@ -13703,7 +13746,7 @@ var require_debounce = __commonJS({
13703
13746
  });
13704
13747
 
13705
13748
  // src/index.tsx
13706
- import React67 from "react";
13749
+ import React68 from "react";
13707
13750
 
13708
13751
  // node_modules/@emotion/react/dist/emotion-react.browser.esm.js
13709
13752
  import * as React2 from "react";
@@ -14657,7 +14700,7 @@ var processStyleValue = function processStyleValue2(key, value) {
14657
14700
  return value;
14658
14701
  };
14659
14702
  if (false) {
14660
- contentValuePattern = /(var|attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
14703
+ contentValuePattern = /(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
14661
14704
  contentValues = ["normal", "none", "initial", "inherit", "unset"];
14662
14705
  oldProcessStyleValue = processStyleValue;
14663
14706
  msPattern = /^-ms-/;
@@ -16275,9 +16318,9 @@ import * as React7 from "react";
16275
16318
 
16276
16319
  // node_modules/@chakra-ui/hooks/dist/chakra-ui-hooks.esm.js
16277
16320
  import * as React6 from "react";
16278
- import React__default, { useState as useState3, useMemo as useMemo2, useCallback as useCallback3, useEffect as useEffect4, useRef as useRef4 } from "react";
16321
+ import React__default, { useState as useState3, useCallback as useCallback3, useEffect as useEffect4, useRef as useRef4 } from "react";
16279
16322
 
16280
- // node_modules/@chakra-ui/hooks/dist/use-animation-state-5054a9f7.esm.js
16323
+ // node_modules/@chakra-ui/hooks/dist/use-animation-state-35233362.esm.js
16281
16324
  import * as React5 from "react";
16282
16325
  import { useState, useEffect as useEffect2 } from "react";
16283
16326
  var useSafeLayoutEffect = isBrowser2 ? React5.useLayoutEffect : React5.useEffect;
@@ -16351,22 +16394,22 @@ function useBoolean(initialState2) {
16351
16394
  initialState2 = false;
16352
16395
  }
16353
16396
  var _useState = useState3(initialState2), value = _useState[0], setValue = _useState[1];
16354
- var callbacks = useMemo2(function() {
16355
- return {
16356
- on: function on() {
16357
- return setValue(true);
16358
- },
16359
- off: function off() {
16360
- return setValue(false);
16361
- },
16362
- toggle: function toggle() {
16363
- return setValue(function(prev2) {
16364
- return !prev2;
16365
- });
16366
- }
16367
- };
16397
+ var on = useCallback3(function() {
16398
+ setValue(true);
16368
16399
  }, []);
16369
- return [value, callbacks];
16400
+ var off = useCallback3(function() {
16401
+ setValue(false);
16402
+ }, []);
16403
+ var toggle = useCallback3(function() {
16404
+ setValue(function(prev2) {
16405
+ return !prev2;
16406
+ });
16407
+ }, []);
16408
+ return [value, {
16409
+ on,
16410
+ off,
16411
+ toggle
16412
+ }];
16370
16413
  }
16371
16414
  function useControllableProp(prop2, state2) {
16372
16415
  var isControlled = prop2 !== void 0;
@@ -16915,7 +16958,7 @@ if (__DEV__) {
16915
16958
  }
16916
16959
 
16917
16960
  // node_modules/@chakra-ui/react-env/dist/chakra-ui-react-env.esm.js
16918
- import React8, { useContext as useContext5, useState as useState4, useMemo as useMemo4, createContext as createContext5 } from "react";
16961
+ import React8, { useContext as useContext5, useState as useState4, useMemo as useMemo3, createContext as createContext5 } from "react";
16919
16962
  var doc = {
16920
16963
  body: {
16921
16964
  classList: {
@@ -17029,7 +17072,7 @@ function useEnvironment() {
17029
17072
  function EnvironmentProvider(props) {
17030
17073
  var children = props.children, environmentProp = props.environment;
17031
17074
  var _useState = useState4(null), node2 = _useState[0], setNode = _useState[1];
17032
- var context = useMemo4(function() {
17075
+ var context = useMemo3(function() {
17033
17076
  var _ref;
17034
17077
  var doc3 = node2 == null ? void 0 : node2.ownerDocument;
17035
17078
  var win2 = node2 == null ? void 0 : node2.ownerDocument.defaultView;
@@ -18780,7 +18823,7 @@ function toCSSVar(rawTheme) {
18780
18823
  // node_modules/@chakra-ui/system/dist/chakra-ui-system.esm.js
18781
18824
  var import_react_fast_compare = __toESM(require_react_fast_compare());
18782
18825
  import * as React11 from "react";
18783
- import { useRef as useRef6, useMemo as useMemo7 } from "react";
18826
+ import { useRef as useRef6, useMemo as useMemo6 } from "react";
18784
18827
 
18785
18828
  // node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js
18786
18829
  import "react";
@@ -19392,7 +19435,7 @@ function boundAlpha(a2) {
19392
19435
  }
19393
19436
  function convertToPercentage(n) {
19394
19437
  if (n <= 1) {
19395
- return "".concat(Number(n) * 100, "%");
19438
+ return Number(n) * 100 + "%";
19396
19439
  }
19397
19440
  return n;
19398
19441
  }
@@ -19761,9 +19804,9 @@ function inputToRGB(color3) {
19761
19804
  }
19762
19805
  var CSS_INTEGER = "[-\\+]?\\d+%?";
19763
19806
  var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
19764
- var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
19765
- var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
19766
- var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
19807
+ var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
19808
+ var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
19809
+ var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
19767
19810
  var matchers = {
19768
19811
  CSS_UNIT: new RegExp(CSS_UNIT),
19769
19812
  rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
@@ -19946,7 +19989,7 @@ var TinyColor = function() {
19946
19989
  var h = Math.round(hsv.h * 360);
19947
19990
  var s = Math.round(hsv.s * 100);
19948
19991
  var v = Math.round(hsv.v * 100);
19949
- return this.a === 1 ? "hsv(".concat(h, ", ").concat(s, "%, ").concat(v, "%)") : "hsva(".concat(h, ", ").concat(s, "%, ").concat(v, "%, ").concat(this.roundA, ")");
19992
+ return this.a === 1 ? "hsv(" + h + ", " + s + "%, " + v + "%)" : "hsva(" + h + ", " + s + "%, " + v + "%, " + this.roundA + ")";
19950
19993
  };
19951
19994
  TinyColor2.prototype.toHsl = function() {
19952
19995
  var hsl = rgbToHsl(this.r, this.g, this.b);
@@ -19957,7 +20000,7 @@ var TinyColor = function() {
19957
20000
  var h = Math.round(hsl.h * 360);
19958
20001
  var s = Math.round(hsl.s * 100);
19959
20002
  var l = Math.round(hsl.l * 100);
19960
- return this.a === 1 ? "hsl(".concat(h, ", ").concat(s, "%, ").concat(l, "%)") : "hsla(".concat(h, ", ").concat(s, "%, ").concat(l, "%, ").concat(this.roundA, ")");
20003
+ return this.a === 1 ? "hsl(" + h + ", " + s + "%, " + l + "%)" : "hsla(" + h + ", " + s + "%, " + l + "%, " + this.roundA + ")";
19961
20004
  };
19962
20005
  TinyColor2.prototype.toHex = function(allow3Char) {
19963
20006
  if (allow3Char === void 0) {
@@ -19995,11 +20038,11 @@ var TinyColor = function() {
19995
20038
  var r = Math.round(this.r);
19996
20039
  var g = Math.round(this.g);
19997
20040
  var b2 = Math.round(this.b);
19998
- return this.a === 1 ? "rgb(".concat(r, ", ").concat(g, ", ").concat(b2, ")") : "rgba(".concat(r, ", ").concat(g, ", ").concat(b2, ", ").concat(this.roundA, ")");
20041
+ return this.a === 1 ? "rgb(" + r + ", " + g + ", " + b2 + ")" : "rgba(" + r + ", " + g + ", " + b2 + ", " + this.roundA + ")";
19999
20042
  };
20000
20043
  TinyColor2.prototype.toPercentageRgb = function() {
20001
20044
  var fmt = function(x) {
20002
- return "".concat(Math.round(bound01(x, 255) * 100), "%");
20045
+ return Math.round(bound01(x, 255) * 100) + "%";
20003
20046
  };
20004
20047
  return {
20005
20048
  r: fmt(this.r),
@@ -20012,7 +20055,7 @@ var TinyColor = function() {
20012
20055
  var rnd = function(x) {
20013
20056
  return Math.round(bound01(x, 255) * 100);
20014
20057
  };
20015
- return this.a === 1 ? "rgb(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%)") : "rgba(".concat(rnd(this.r), "%, ").concat(rnd(this.g), "%, ").concat(rnd(this.b), "%, ").concat(this.roundA, ")");
20058
+ return this.a === 1 ? "rgb(" + rnd(this.r) + "%, " + rnd(this.g) + "%, " + rnd(this.b) + "%)" : "rgba(" + rnd(this.r) + "%, " + rnd(this.g) + "%, " + rnd(this.b) + "%, " + this.roundA + ")";
20016
20059
  };
20017
20060
  TinyColor2.prototype.toName = function() {
20018
20061
  if (this.a === 0) {
@@ -20926,8 +20969,8 @@ var typography2 = {
20926
20969
  }
20927
20970
  };
20928
20971
 
20929
- // node_modules/@chakra-ui/theme/dist/index-895c67e0.esm.js
20930
- var baseStyleContainer$4 = {
20972
+ // node_modules/@chakra-ui/theme/dist/index-7ef32ef8.esm.js
20973
+ var baseStyleContainer$3 = {
20931
20974
  borderTopWidth: "1px",
20932
20975
  borderColor: "inherit",
20933
20976
  _last: {
@@ -20961,7 +21004,7 @@ var baseStyleIcon$5 = {
20961
21004
  };
20962
21005
  var baseStyle$D = {
20963
21006
  root: {},
20964
- container: baseStyleContainer$4,
21007
+ container: baseStyleContainer$3,
20965
21008
  button: baseStyleButton$1,
20966
21009
  panel: baseStylePanel,
20967
21010
  icon: baseStyleIcon$5
@@ -21073,7 +21116,7 @@ var baseStyleExcessLabel = function baseStyleExcessLabel2(props) {
21073
21116
  bg: mode("gray.200", "whiteAlpha.400")(props)
21074
21117
  };
21075
21118
  };
21076
- var baseStyleContainer$3 = function baseStyleContainer(props) {
21119
+ var baseStyleContainer$2 = function baseStyleContainer(props) {
21077
21120
  var name = props.name, theme3 = props.theme;
21078
21121
  var bg = name ? randomColor({
21079
21122
  string: name
@@ -21094,7 +21137,7 @@ var baseStyle$B = function baseStyle(props) {
21094
21137
  return {
21095
21138
  badge: baseStyleBadge(props),
21096
21139
  excessLabel: baseStyleExcessLabel(props),
21097
- container: baseStyleContainer$3(props)
21140
+ container: baseStyleContainer$2(props)
21098
21141
  };
21099
21142
  };
21100
21143
  function getSize$3(size3) {
@@ -21417,11 +21460,6 @@ var baseStyleControl$1 = function baseStyleControl(props) {
21417
21460
  }
21418
21461
  };
21419
21462
  };
21420
- var baseStyleContainer$2 = {
21421
- _disabled: {
21422
- cursor: "not-allowed"
21423
- }
21424
- };
21425
21463
  var baseStyleLabel$3 = {
21426
21464
  userSelect: "none",
21427
21465
  _disabled: {
@@ -21435,7 +21473,6 @@ var baseStyleIcon$4 = {
21435
21473
  var baseStyle$x = function baseStyle2(props) {
21436
21474
  return {
21437
21475
  icon: baseStyleIcon$4,
21438
- container: baseStyleContainer$2,
21439
21476
  control: baseStyleControl$1(props),
21440
21477
  label: baseStyleLabel$3
21441
21478
  };
@@ -22492,7 +22529,6 @@ var baseStyleControl2 = function baseStyleControl3(props) {
22492
22529
  var baseStyle$c = function baseStyle13(props) {
22493
22530
  return {
22494
22531
  label: Checkbox.baseStyle(props).label,
22495
- container: Checkbox.baseStyle(props).container,
22496
22532
  control: baseStyleControl2(props)
22497
22533
  };
22498
22534
  };
@@ -23977,7 +24013,8 @@ var {
23977
24013
  __importStar,
23978
24014
  __importDefault,
23979
24015
  __classPrivateFieldGet,
23980
- __classPrivateFieldSet
24016
+ __classPrivateFieldSet,
24017
+ __classPrivateFieldIn
23981
24018
  } = import_tslib.default;
23982
24019
 
23983
24020
  // node_modules/framer-motion/dist/es/motion/index.js
@@ -24227,7 +24264,7 @@ function useMotionRef(visualState, visualElement2, externalRef) {
24227
24264
  }
24228
24265
 
24229
24266
  // node_modules/framer-motion/dist/es/context/MotionContext/create.js
24230
- import { useMemo as useMemo8, useContext as useContext13 } from "react";
24267
+ import { useMemo as useMemo7, useContext as useContext13 } from "react";
24231
24268
 
24232
24269
  // node_modules/framer-motion/dist/es/render/utils/variants.js
24233
24270
  function isVariantLabels(v) {
@@ -24290,7 +24327,7 @@ function getCurrentTreeVariants(props, context) {
24290
24327
  // node_modules/framer-motion/dist/es/context/MotionContext/create.js
24291
24328
  function useCreateMotionContext(props, isStatic) {
24292
24329
  var _a = getCurrentTreeVariants(props, useContext13(MotionContext)), initial = _a.initial, animate2 = _a.animate;
24293
- return useMemo8(function() {
24330
+ return useMemo7(function() {
24294
24331
  return { initial, animate: animate2 };
24295
24332
  }, isStatic ? [
24296
24333
  variantLabelsAsDependency(initial),
@@ -24381,7 +24418,7 @@ function isSVGComponent(Component4) {
24381
24418
  import { createElement as createElement14 } from "react";
24382
24419
 
24383
24420
  // node_modules/framer-motion/dist/es/render/html/use-props.js
24384
- import { useMemo as useMemo9 } from "react";
24421
+ import { useMemo as useMemo8 } from "react";
24385
24422
 
24386
24423
  // node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js
24387
24424
  var valueScaleCorrection = {};
@@ -24829,7 +24866,7 @@ function copyRawValuesOnly(target, source, props) {
24829
24866
  }
24830
24867
  function useInitialMotionValues(_a, visualState, isStatic) {
24831
24868
  var transformTemplate2 = _a.transformTemplate;
24832
- return useMemo9(function() {
24869
+ return useMemo8(function() {
24833
24870
  var state2 = createHtmlRenderState();
24834
24871
  buildHTMLStyles(state2, visualState, void 0, void 0, { enableHardwareAcceleration: !isStatic }, transformTemplate2);
24835
24872
  var vars = state2.vars, style = state2.style;
@@ -24942,7 +24979,7 @@ function filterProps(props, isDom, forwardMotionProps) {
24942
24979
  }
24943
24980
 
24944
24981
  // node_modules/framer-motion/dist/es/render/svg/use-props.js
24945
- import { useMemo as useMemo10 } from "react";
24982
+ import { useMemo as useMemo9 } from "react";
24946
24983
 
24947
24984
  // node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js
24948
24985
  function calcOrigin(origin, offset2, size3) {
@@ -25014,7 +25051,7 @@ var createSvgRenderState = function() {
25014
25051
 
25015
25052
  // node_modules/framer-motion/dist/es/render/svg/use-props.js
25016
25053
  function useSVGProps(props, visualState) {
25017
- var visualProps = useMemo10(function() {
25054
+ var visualProps = useMemo9(function() {
25018
25055
  var state2 = createSvgRenderState();
25019
25056
  buildSVGAttrs(state2, visualState, void 0, void 0, { enableHardwareAcceleration: false }, props.transformTemplate);
25020
25057
  return __assign(__assign({}, state2.attrs), { style: __assign({}, state2.style) });
@@ -30508,13 +30545,13 @@ var FormErrorIcon = /* @__PURE__ */ forwardRef3(function(props, ref) {
30508
30545
  if (__DEV__) {
30509
30546
  FormErrorIcon.displayName = "FormErrorIcon";
30510
30547
  }
30511
- var _excluded8 = ["className", "children", "requiredIndicator", "optionalIndicator"];
30548
+ var _excluded8 = ["className", "children", "requiredIndicator"];
30512
30549
  var FormLabel = /* @__PURE__ */ forwardRef3(function(passedProps, ref) {
30513
30550
  var _field$getLabelProps;
30514
30551
  var styles2 = useStyleConfig("FormLabel", passedProps);
30515
30552
  var props = omitThemingProps(passedProps);
30516
30553
  props.className;
30517
- var children = props.children, _props$requiredIndica = props.requiredIndicator, requiredIndicator = _props$requiredIndica === void 0 ? /* @__PURE__ */ React20.createElement(RequiredIndicator, null) : _props$requiredIndica, _props$optionalIndica = props.optionalIndicator, optionalIndicator = _props$optionalIndica === void 0 ? null : _props$optionalIndica, rest = _objectWithoutPropertiesLoose8(props, _excluded8);
30554
+ var children = props.children, _props$requiredIndica = props.requiredIndicator, requiredIndicator = _props$requiredIndica === void 0 ? /* @__PURE__ */ React20.createElement(RequiredIndicator, null) : _props$requiredIndica, rest = _objectWithoutPropertiesLoose8(props, _excluded8);
30518
30555
  var field = useFormControlContext();
30519
30556
  var ownProps = (_field$getLabelProps = field == null ? void 0 : field.getLabelProps(rest, ref)) != null ? _field$getLabelProps : _extends14({
30520
30557
  ref
@@ -30525,7 +30562,7 @@ var FormLabel = /* @__PURE__ */ forwardRef3(function(passedProps, ref) {
30525
30562
  display: "block",
30526
30563
  textAlign: "start"
30527
30564
  }, styles2)
30528
- }), children, field != null && field.isRequired ? requiredIndicator : optionalIndicator);
30565
+ }), children, field != null && field.isRequired ? requiredIndicator : null);
30529
30566
  });
30530
30567
  if (__DEV__) {
30531
30568
  FormLabel.displayName = "FormLabel";
@@ -31204,28 +31241,18 @@ var Text = /* @__PURE__ */ forwardRef3(function(props, ref) {
31204
31241
  if (__DEV__) {
31205
31242
  Text.displayName = "Text";
31206
31243
  }
31207
- var _excluded$13 = ["spacing", "spacingX", "spacingY", "children", "justify", "direction", "align", "className", "shouldWrapChildren"];
31244
+ var _excluded$13 = ["spacing", "children", "justify", "direction", "align", "className", "shouldWrapChildren"];
31208
31245
  var _excluded2$12 = ["className"];
31209
31246
  var Wrap = /* @__PURE__ */ forwardRef3(function(props, ref) {
31210
- var _props$spacing = props.spacing, spacing3 = _props$spacing === void 0 ? "0.5rem" : _props$spacing, spacingX = props.spacingX, spacingY = props.spacingY, children = props.children, justify = props.justify, direction2 = props.direction, align = props.align, className = props.className, shouldWrapChildren = props.shouldWrapChildren, rest = _objectWithoutPropertiesLoose10(props, _excluded$13);
31247
+ var _props$spacing = props.spacing, spacing3 = _props$spacing === void 0 ? "0.5rem" : _props$spacing, children = props.children, justify = props.justify, direction2 = props.direction, align = props.align, className = props.className, shouldWrapChildren = props.shouldWrapChildren, rest = _objectWithoutPropertiesLoose10(props, _excluded$13);
31211
31248
  var styles2 = React22.useMemo(function() {
31212
- var _spacingX$spacingY = {
31213
- spacingX,
31214
- spacingY
31215
- }, _spacingX$spacingY$sp = _spacingX$spacingY.spacingX, x = _spacingX$spacingY$sp === void 0 ? spacing3 : _spacingX$spacingY$sp, _spacingX$spacingY$sp2 = _spacingX$spacingY.spacingY, y = _spacingX$spacingY$sp2 === void 0 ? spacing3 : _spacingX$spacingY$sp2;
31216
31249
  return {
31217
- "--chakra-wrap-x-spacing": function chakraWrapXSpacing(theme3) {
31218
- return mapResponsive(x, function(value) {
31250
+ "--chakra-wrap-spacing": function chakraWrapSpacing(theme3) {
31251
+ return mapResponsive(spacing3, function(value) {
31219
31252
  return tokenToCSSVar("space", value)(theme3);
31220
31253
  });
31221
31254
  },
31222
- "--chakra-wrap-y-spacing": function chakraWrapYSpacing(theme3) {
31223
- return mapResponsive(y, function(value) {
31224
- return tokenToCSSVar("space", value)(theme3);
31225
- });
31226
- },
31227
- "--wrap-x-spacing": "calc(var(--chakra-wrap-x-spacing) / 2)",
31228
- "--wrap-y-spacing": "calc(var(--chakra-wrap-y-spacing) / 2)",
31255
+ "--wrap-spacing": "calc(var(--chakra-wrap-spacing) / 2)",
31229
31256
  display: "flex",
31230
31257
  flexWrap: "wrap",
31231
31258
  justifyContent: justify,
@@ -31233,12 +31260,12 @@ var Wrap = /* @__PURE__ */ forwardRef3(function(props, ref) {
31233
31260
  flexDirection: direction2,
31234
31261
  listStyleType: "none",
31235
31262
  padding: "0",
31236
- margin: "calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)",
31263
+ margin: "calc(var(--wrap-spacing) * -1)",
31237
31264
  "& > *:not(style)": {
31238
- margin: "var(--wrap-y-spacing) var(--wrap-x-spacing)"
31265
+ margin: "var(--wrap-spacing)"
31239
31266
  }
31240
31267
  };
31241
- }, [spacing3, spacingX, spacingY, justify, align, direction2]);
31268
+ }, [spacing3, justify, align, direction2]);
31242
31269
  var childrenToRender = shouldWrapChildren ? React22.Children.map(children, function(child, index) {
31243
31270
  return /* @__PURE__ */ React22.createElement(WrapItem, {
31244
31271
  key: index
@@ -36613,6 +36640,9 @@ var ErrorBoundary = class extends React40.Component {
36613
36640
  var ErrorBoundary_default = ErrorBoundary;
36614
36641
 
36615
36642
  // src/ui/manager.tsx
36643
+ import * as React43 from "react";
36644
+
36645
+ // src/ui/Footer.tsx
36616
36646
  import * as React42 from "react";
36617
36647
 
36618
36648
  // src/ui/PageButton.tsx
@@ -36633,12 +36663,55 @@ function PageButton(props) {
36633
36663
  }
36634
36664
  var PageButton_default = PageButton;
36635
36665
 
36666
+ // src/ui/Footer.tsx
36667
+ var Footer = (_a) => {
36668
+ var _b = _a, {
36669
+ state: state2,
36670
+ navigator: navigator2
36671
+ } = _b, rest = __objRest(_b, [
36672
+ "state",
36673
+ "navigator"
36674
+ ]);
36675
+ const bgColor = useColorModeValue_default("ui.white", "ui.black", "ui.sepia");
36676
+ const isAtStart = state2 == null ? void 0 : state2.atStart;
36677
+ const isAtEnd = state2 == null ? void 0 : state2.atEnd;
36678
+ return /* @__PURE__ */ React42.createElement(Flex, __spreadValues({
36679
+ as: "footer",
36680
+ position: "sticky",
36681
+ height: `${FOOTER_HEIGHT}px`,
36682
+ zIndex: "sticky",
36683
+ bottom: "0",
36684
+ justifyContent: "space-between",
36685
+ w: "100%",
36686
+ bg: bgColor,
36687
+ borderTop: "1px solid",
36688
+ borderColor: "gray.100"
36689
+ }, rest), /* @__PURE__ */ React42.createElement(PageButton_default, {
36690
+ onClick: navigator2 == null ? void 0 : navigator2.goBackward,
36691
+ "aria-label": "Previous Page",
36692
+ disabled: isAtStart
36693
+ }, /* @__PURE__ */ React42.createElement(Icon, {
36694
+ as: MdKeyboardArrowLeft,
36695
+ w: 6,
36696
+ h: 6
36697
+ }), "Previous"), /* @__PURE__ */ React42.createElement(PageButton_default, {
36698
+ onClick: navigator2 == null ? void 0 : navigator2.goForward,
36699
+ "aria-label": "Next Page",
36700
+ disabled: isAtEnd
36701
+ }, "Next ", /* @__PURE__ */ React42.createElement(Icon, {
36702
+ as: MdKeyboardArrowRight,
36703
+ w: 6,
36704
+ h: 6
36705
+ })));
36706
+ };
36707
+ var Footer_default = Footer;
36708
+
36636
36709
  // src/ui/manager.tsx
36637
36710
  var ManagerUI = (props) => {
36638
36711
  var _a, _b;
36639
- return /* @__PURE__ */ React42.createElement(ThemeProvider3, {
36712
+ return /* @__PURE__ */ React43.createElement(ThemeProvider3, {
36640
36713
  theme: getTheme3((_b = (_a = props.state) == null ? void 0 : _a.settings) == null ? void 0 : _b.colorMode)
36641
- }, /* @__PURE__ */ React42.createElement(WebReaderContent, __spreadValues({}, props)));
36714
+ }, /* @__PURE__ */ React43.createElement(WebReaderContent, __spreadValues({}, props)));
36642
36715
  };
36643
36716
  var WebReaderContent = (_a) => {
36644
36717
  var _b = _a, {
@@ -36648,19 +36721,16 @@ var WebReaderContent = (_a) => {
36648
36721
  "children",
36649
36722
  "headerLeft"
36650
36723
  ]);
36651
- var _a2, _b2, _c, _d;
36652
36724
  const bgColor = useColorModeValue_default("ui.white", "ui.black", "ui.sepia");
36653
- const containerRef = React42.useRef(null);
36654
- const isAtStart = (_a2 = props.state) == null ? void 0 : _a2.atStart;
36655
- const isAtEnd = (_b2 = props.state) == null ? void 0 : _b2.atEnd;
36656
- return /* @__PURE__ */ React42.createElement(Flex, {
36725
+ const containerRef = React43.useRef(null);
36726
+ return /* @__PURE__ */ React43.createElement(Flex, {
36657
36727
  flexDir: "column",
36658
36728
  w: "100%",
36659
36729
  position: "relative"
36660
- }, !props.isLoading && /* @__PURE__ */ React42.createElement(Header, __spreadValues({
36730
+ }, !props.isLoading && /* @__PURE__ */ React43.createElement(Header, __spreadValues({
36661
36731
  headerLeft,
36662
36732
  containerRef
36663
- }, props)), /* @__PURE__ */ React42.createElement(Flex, {
36733
+ }, props)), /* @__PURE__ */ React43.createElement(Flex, {
36664
36734
  as: "main",
36665
36735
  ref: containerRef,
36666
36736
  position: "relative",
@@ -36668,39 +36738,15 @@ var WebReaderContent = (_a) => {
36668
36738
  flexDir: "column",
36669
36739
  alignItems: "stretch",
36670
36740
  flex: "1 1 auto"
36671
- }, children), /* @__PURE__ */ React42.createElement(Flex, {
36672
- as: "footer",
36673
- position: "sticky",
36674
- height: `${FOOTER_HEIGHT}px`,
36675
- zIndex: "docked",
36676
- bottom: "0",
36677
- justifyContent: "space-between",
36678
- w: "100%",
36679
- bg: bgColor,
36680
- borderTop: "1px solid",
36681
- borderColor: "gray.100"
36682
- }, /* @__PURE__ */ React42.createElement(PageButton_default, {
36683
- onClick: (_c = props.navigator) == null ? void 0 : _c.goBackward,
36684
- "aria-label": "Previous Page",
36685
- disabled: isAtStart
36686
- }, /* @__PURE__ */ React42.createElement(Icon, {
36687
- as: MdKeyboardArrowLeft,
36688
- w: 6,
36689
- h: 6
36690
- }), "Previous"), /* @__PURE__ */ React42.createElement(PageButton_default, {
36691
- onClick: (_d = props.navigator) == null ? void 0 : _d.goForward,
36692
- "aria-label": "Next Page",
36693
- disabled: isAtEnd
36694
- }, "Next ", /* @__PURE__ */ React42.createElement(Icon, {
36695
- as: MdKeyboardArrowRight,
36696
- w: 6,
36697
- h: 6
36698
- }))));
36741
+ }, children), /* @__PURE__ */ React43.createElement(Footer_default, {
36742
+ state: props.state,
36743
+ navigator: props.navigator
36744
+ }));
36699
36745
  };
36700
36746
  var manager_default = ManagerUI;
36701
36747
 
36702
36748
  // src/useWebReader.tsx
36703
- import React65 from "react";
36749
+ import React66 from "react";
36704
36750
 
36705
36751
  // src/utils/fetch.ts
36706
36752
  function fetchJson(url) {
@@ -36859,44 +36905,8 @@ function _getPrototypeOf(o) {
36859
36905
 
36860
36906
  // node_modules/react-pdf/dist/esm/Document.js
36861
36907
  var import_prop_types3 = __toESM(require_prop_types());
36862
- import React44, { PureComponent } from "react";
36863
-
36864
- // node_modules/make-event-props/dist/esm/index.js
36865
- var clipboardEvents = ["onCopy", "onCut", "onPaste"];
36866
- var compositionEvents = ["onCompositionEnd", "onCompositionStart", "onCompositionUpdate"];
36867
- var keyboardEvents = ["onKeyDown", "onKeyPress", "onKeyUp"];
36868
- var focusEvents = ["onFocus", "onBlur"];
36869
- var formEvents = ["onChange", "onInput", "onInvalid", "onReset", "onSubmit"];
36870
- var genericEvents = ["onError", "onLoad"];
36871
- var mouseEvents = ["onClick", "onContextMenu", "onDoubleClick", "onDrag", "onDragEnd", "onDragEnter", "onDragExit", "onDragLeave", "onDragOver", "onDragStart", "onDrop", "onMouseDown", "onMouseEnter", "onMouseLeave", "onMouseMove", "onMouseOut", "onMouseOver", "onMouseUp"];
36872
- var pointerEvents = ["onPointerDown", "onPointerMove", "onPointerUp", "onPointerCancel", "onGotPointerCapture", "onLostPointerCapture", "onPointerEnter", "onPointerLeave", "onPointerOver", "onPointerOut"];
36873
- var selectionEvents = ["onSelect"];
36874
- var touchEvents = ["onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
36875
- var uiEvents = ["onScroll"];
36876
- var wheelEvents = ["onWheel"];
36877
- var mediaEvents = ["onAbort", "onCanPlay", "onCanPlayThrough", "onDurationChange", "onEmptied", "onEncrypted", "onEnded", "onError", "onLoadedData", "onLoadedMetadata", "onLoadStart", "onPause", "onPlay", "onPlaying", "onProgress", "onRateChange", "onSeeked", "onSeeking", "onStalled", "onSuspend", "onTimeUpdate", "onVolumeChange", "onWaiting"];
36878
- var imageEvents = ["onLoad", "onError"];
36879
- var animationEvents = ["onAnimationStart", "onAnimationEnd", "onAnimationIteration"];
36880
- var transitionEvents = ["onTransitionEnd"];
36881
- var otherEvents = ["onToggle"];
36882
- var allEvents = [].concat(clipboardEvents, compositionEvents, keyboardEvents, focusEvents, formEvents, genericEvents, mouseEvents, pointerEvents, selectionEvents, touchEvents, uiEvents, wheelEvents, mediaEvents, imageEvents, animationEvents, transitionEvents, otherEvents);
36883
- var makeEventProps = function makeEventProps2(props, getArgs) {
36884
- var eventProps2 = {};
36885
- allEvents.forEach(function(eventName) {
36886
- if (!(eventName in props)) {
36887
- return;
36888
- }
36889
- if (!getArgs) {
36890
- eventProps2[eventName] = props[eventName];
36891
- return;
36892
- }
36893
- eventProps2[eventName] = function(event) {
36894
- return props[eventName](event, getArgs(eventName));
36895
- };
36896
- });
36897
- return eventProps2;
36898
- };
36899
- var esm_default = makeEventProps;
36908
+ var import_make_event_props2 = __toESM(require_entry());
36909
+ import React45, { PureComponent } from "react";
36900
36910
 
36901
36911
  // node_modules/make-cancellable-promise/dist/esm/index.js
36902
36912
  function makeCancellablePromise(promise) {
@@ -36934,10 +36944,10 @@ var DocumentContext_default = /* @__PURE__ */ createContext13(null);
36934
36944
 
36935
36945
  // node_modules/react-pdf/dist/esm/Message.js
36936
36946
  var import_prop_types = __toESM(require_prop_types());
36937
- import React43 from "react";
36947
+ import React44 from "react";
36938
36948
  function Message(_ref) {
36939
36949
  var children = _ref.children, type = _ref.type;
36940
- return /* @__PURE__ */ React43.createElement("div", {
36950
+ return /* @__PURE__ */ React44.createElement("div", {
36941
36951
  className: "react-pdf__message react-pdf__message--".concat(type)
36942
36952
  }, children);
36943
36953
  }
@@ -37327,9 +37337,10 @@ function _toConsumableArray(arr) {
37327
37337
 
37328
37338
  // node_modules/react-pdf/dist/esm/shared/propTypes.js
37329
37339
  var import_prop_types2 = __toESM(require_prop_types());
37340
+ var import_make_event_props = __toESM(require_entry());
37330
37341
  var eventProps = function() {
37331
37342
  var result = {};
37332
- [].concat(_toConsumableArray(mouseEvents), _toConsumableArray(touchEvents), _toConsumableArray(keyboardEvents)).forEach(function(eventName) {
37343
+ [].concat(_toConsumableArray(import_make_event_props.mouseEvents), _toConsumableArray(import_make_event_props.touchEvents), _toConsumableArray(import_make_event_props.keyboardEvents)).forEach(function(eventName) {
37333
37344
  result[eventName] = import_prop_types2.default.func;
37334
37345
  });
37335
37346
  return result;
@@ -37760,7 +37771,7 @@ var Document = /* @__PURE__ */ function(_PureComponent) {
37760
37771
  key: "renderChildren",
37761
37772
  value: function renderChildren() {
37762
37773
  var children = this.props.children;
37763
- return /* @__PURE__ */ React44.createElement(DocumentContext_default.Provider, {
37774
+ return /* @__PURE__ */ React45.createElement(DocumentContext_default.Provider, {
37764
37775
  value: this.childContext
37765
37776
  }, children);
37766
37777
  }
@@ -37771,19 +37782,19 @@ var Document = /* @__PURE__ */ function(_PureComponent) {
37771
37782
  var pdf = this.state.pdf;
37772
37783
  if (!file) {
37773
37784
  var noData = this.props.noData;
37774
- return /* @__PURE__ */ React44.createElement(Message, {
37785
+ return /* @__PURE__ */ React45.createElement(Message, {
37775
37786
  type: "no-data"
37776
37787
  }, typeof noData === "function" ? noData() : noData);
37777
37788
  }
37778
37789
  if (pdf === null) {
37779
37790
  var loading = this.props.loading;
37780
- return /* @__PURE__ */ React44.createElement(Message, {
37791
+ return /* @__PURE__ */ React45.createElement(Message, {
37781
37792
  type: "loading"
37782
37793
  }, typeof loading === "function" ? loading() : loading);
37783
37794
  }
37784
37795
  if (pdf === false) {
37785
37796
  var error2 = this.props.error;
37786
- return /* @__PURE__ */ React44.createElement(Message, {
37797
+ return /* @__PURE__ */ React45.createElement(Message, {
37787
37798
  type: "error"
37788
37799
  }, typeof error2 === "function" ? error2() : error2);
37789
37800
  }
@@ -37793,7 +37804,7 @@ var Document = /* @__PURE__ */ function(_PureComponent) {
37793
37804
  key: "render",
37794
37805
  value: function render() {
37795
37806
  var _this$props2 = this.props, className = _this$props2.className, inputRef = _this$props2.inputRef;
37796
- return /* @__PURE__ */ React44.createElement("div", _extends({
37807
+ return /* @__PURE__ */ React45.createElement("div", _extends({
37797
37808
  className: mergeClassNames("react-pdf__Document", className),
37798
37809
  ref: inputRef
37799
37810
  }, this.eventProps), this.renderContent());
@@ -37818,7 +37829,7 @@ var Document = /* @__PURE__ */ function(_PureComponent) {
37818
37829
  key: "eventProps",
37819
37830
  get: function get4() {
37820
37831
  var _this2 = this;
37821
- return esm_default(this.props, function() {
37832
+ return (0, import_make_event_props2.default)(this.props, function() {
37822
37833
  return _this2.state.pdf;
37823
37834
  });
37824
37835
  }
@@ -37868,7 +37879,8 @@ Document.propTypes = _objectSpread(_objectSpread({}, eventProps), {}, {
37868
37879
  // node_modules/react-pdf/dist/esm/Outline.js
37869
37880
  var import_regenerator4 = __toESM(require_regenerator());
37870
37881
  var import_prop_types5 = __toESM(require_prop_types());
37871
- import React46, { PureComponent as PureComponent3 } from "react";
37882
+ import React47, { PureComponent as PureComponent3 } from "react";
37883
+ var import_make_event_props3 = __toESM(require_entry());
37872
37884
 
37873
37885
  // node_modules/react-pdf/dist/esm/OutlineContext.js
37874
37886
  import { createContext as createContext14 } from "react";
@@ -37877,7 +37889,7 @@ var OutlineContext_default = /* @__PURE__ */ createContext14(null);
37877
37889
  // node_modules/react-pdf/dist/esm/OutlineItem.js
37878
37890
  var import_regenerator3 = __toESM(require_regenerator());
37879
37891
  var import_prop_types4 = __toESM(require_prop_types());
37880
- import React45, { PureComponent as PureComponent2 } from "react";
37892
+ import React46, { PureComponent as PureComponent2 } from "react";
37881
37893
 
37882
37894
  // node_modules/react-pdf/dist/esm/Ref.js
37883
37895
  var Ref = /* @__PURE__ */ function() {
@@ -38071,8 +38083,8 @@ var OutlineItemInternal = /* @__PURE__ */ function(_PureComponent) {
38071
38083
  return null;
38072
38084
  }
38073
38085
  var subitems = item.items;
38074
- return /* @__PURE__ */ React45.createElement("ul", null, subitems.map(function(subitem, subitemIndex) {
38075
- return /* @__PURE__ */ React45.createElement(OutlineItemInternal2, _extends({
38086
+ return /* @__PURE__ */ React46.createElement("ul", null, subitems.map(function(subitem, subitemIndex) {
38087
+ return /* @__PURE__ */ React46.createElement(OutlineItemInternal2, _extends({
38076
38088
  key: typeof subitem.destination === "string" ? subitem.destination : subitemIndex,
38077
38089
  item: subitem
38078
38090
  }, otherProps));
@@ -38082,7 +38094,7 @@ var OutlineItemInternal = /* @__PURE__ */ function(_PureComponent) {
38082
38094
  key: "render",
38083
38095
  value: function render() {
38084
38096
  var item = this.props.item;
38085
- return /* @__PURE__ */ React45.createElement("li", null, /* @__PURE__ */ React45.createElement("a", {
38097
+ return /* @__PURE__ */ React46.createElement("li", null, /* @__PURE__ */ React46.createElement("a", {
38086
38098
  href: "#",
38087
38099
  onClick: this.onClick
38088
38100
  }, item.title), this.renderSubitems());
@@ -38104,9 +38116,9 @@ OutlineItemInternal.propTypes = {
38104
38116
  pdf: isPdf.isRequired
38105
38117
  };
38106
38118
  var OutlineItem = function OutlineItem2(props) {
38107
- return /* @__PURE__ */ React45.createElement(DocumentContext_default.Consumer, null, function(documentContext) {
38108
- return /* @__PURE__ */ React45.createElement(OutlineContext_default.Consumer, null, function(outlineContext) {
38109
- return /* @__PURE__ */ React45.createElement(OutlineItemInternal, _extends({}, documentContext, outlineContext, props));
38119
+ return /* @__PURE__ */ React46.createElement(DocumentContext_default.Consumer, null, function(documentContext) {
38120
+ return /* @__PURE__ */ React46.createElement(OutlineContext_default.Consumer, null, function(outlineContext) {
38121
+ return /* @__PURE__ */ React46.createElement(OutlineItemInternal, _extends({}, documentContext, outlineContext, props));
38110
38122
  });
38111
38123
  });
38112
38124
  };
@@ -38274,8 +38286,8 @@ var OutlineInternal = /* @__PURE__ */ function(_PureComponent) {
38274
38286
  key: "renderOutline",
38275
38287
  value: function renderOutline() {
38276
38288
  var outline5 = this.state.outline;
38277
- return /* @__PURE__ */ React46.createElement("ul", null, outline5.map(function(item, itemIndex) {
38278
- return /* @__PURE__ */ React46.createElement(OutlineItem_default, {
38289
+ return /* @__PURE__ */ React47.createElement("ul", null, outline5.map(function(item, itemIndex) {
38290
+ return /* @__PURE__ */ React47.createElement(OutlineItem_default, {
38279
38291
  key: typeof item.destination === "string" ? item.destination : itemIndex,
38280
38292
  item
38281
38293
  });
@@ -38290,10 +38302,10 @@ var OutlineInternal = /* @__PURE__ */ function(_PureComponent) {
38290
38302
  return null;
38291
38303
  }
38292
38304
  var _this$props = this.props, className = _this$props.className, inputRef = _this$props.inputRef;
38293
- return /* @__PURE__ */ React46.createElement("div", _extends({
38305
+ return /* @__PURE__ */ React47.createElement("div", _extends({
38294
38306
  className: mergeClassNames("react-pdf__Outline", className),
38295
38307
  ref: inputRef
38296
- }, this.eventProps), /* @__PURE__ */ React46.createElement(OutlineContext_default.Provider, {
38308
+ }, this.eventProps), /* @__PURE__ */ React47.createElement(OutlineContext_default.Provider, {
38297
38309
  value: this.childContext
38298
38310
  }, this.renderOutline()));
38299
38311
  }
@@ -38308,7 +38320,7 @@ var OutlineInternal = /* @__PURE__ */ function(_PureComponent) {
38308
38320
  key: "eventProps",
38309
38321
  get: function get4() {
38310
38322
  var _this2 = this;
38311
- return esm_default(this.props, function() {
38323
+ return (0, import_make_event_props3.default)(this.props, function() {
38312
38324
  return _this2.state.outline;
38313
38325
  });
38314
38326
  }
@@ -38327,7 +38339,8 @@ OutlineInternal.propTypes = _objectSpread2({
38327
38339
  // node_modules/react-pdf/dist/esm/Page.js
38328
38340
  var import_regenerator8 = __toESM(require_regenerator());
38329
38341
  var import_prop_types11 = __toESM(require_prop_types());
38330
- import React52, { PureComponent as PureComponent9 } from "react";
38342
+ import React53, { PureComponent as PureComponent9 } from "react";
38343
+ var import_make_event_props4 = __toESM(require_entry());
38331
38344
 
38332
38345
  // node_modules/merge-refs/dist/esm/index.js
38333
38346
  function mergeRefs2() {
@@ -38355,7 +38368,7 @@ var PageContext_default = /* @__PURE__ */ createContext15(null);
38355
38368
 
38356
38369
  // node_modules/react-pdf/dist/esm/Page/PageCanvas.js
38357
38370
  var import_prop_types6 = __toESM(require_prop_types());
38358
- import React47, { PureComponent as PureComponent4 } from "react";
38371
+ import React48, { PureComponent as PureComponent4 } from "react";
38359
38372
  function _createSuper4(Derived) {
38360
38373
  var hasNativeReflectConstruct = _isNativeReflectConstruct4();
38361
38374
  return function _createSuperInternal() {
@@ -38470,7 +38483,7 @@ var PageCanvasInternal = /* @__PURE__ */ function(_PureComponent) {
38470
38483
  value: function render() {
38471
38484
  var _this2 = this;
38472
38485
  var canvasRef = this.props.canvasRef;
38473
- return /* @__PURE__ */ React47.createElement("canvas", {
38486
+ return /* @__PURE__ */ React48.createElement("canvas", {
38474
38487
  className: "react-pdf__Page__canvas",
38475
38488
  dir: "ltr",
38476
38489
  ref: mergeRefs2(canvasRef, function(ref) {
@@ -38514,15 +38527,15 @@ PageCanvasInternal.propTypes = {
38514
38527
  scale: import_prop_types6.default.number.isRequired
38515
38528
  };
38516
38529
  function PageCanvas(props) {
38517
- return /* @__PURE__ */ React47.createElement(PageContext_default.Consumer, null, function(context) {
38518
- return /* @__PURE__ */ React47.createElement(PageCanvasInternal, _extends({}, context, props));
38530
+ return /* @__PURE__ */ React48.createElement(PageContext_default.Consumer, null, function(context) {
38531
+ return /* @__PURE__ */ React48.createElement(PageCanvasInternal, _extends({}, context, props));
38519
38532
  });
38520
38533
  }
38521
38534
 
38522
38535
  // node_modules/react-pdf/dist/esm/Page/PageSVG.js
38523
38536
  var import_prop_types7 = __toESM(require_prop_types());
38524
38537
  var pdfjs2 = __toESM(require_pdf());
38525
- import React48, { PureComponent as PureComponent5 } from "react";
38538
+ import React49, { PureComponent as PureComponent5 } from "react";
38526
38539
  function _createSuper5(Derived) {
38527
38540
  var hasNativeReflectConstruct = _isNativeReflectConstruct5();
38528
38541
  return function _createSuperInternal() {
@@ -38615,7 +38628,7 @@ var PageSVGInternal = /* @__PURE__ */ function(_PureComponent) {
38615
38628
  value: function render() {
38616
38629
  var _this2 = this;
38617
38630
  var _this$viewport2 = this.viewport, width = _this$viewport2.width, height = _this$viewport2.height;
38618
- return /* @__PURE__ */ React48.createElement("div", {
38631
+ return /* @__PURE__ */ React49.createElement("div", {
38619
38632
  className: "react-pdf__Page__svg",
38620
38633
  ref: function ref(_ref) {
38621
38634
  return _this2.drawPageOnContainer(_ref);
@@ -38650,20 +38663,20 @@ PageSVGInternal.propTypes = {
38650
38663
  scale: import_prop_types7.default.number.isRequired
38651
38664
  };
38652
38665
  function PageSVG(props) {
38653
- return /* @__PURE__ */ React48.createElement(PageContext_default.Consumer, null, function(context) {
38654
- return /* @__PURE__ */ React48.createElement(PageSVGInternal, _extends({}, context, props));
38666
+ return /* @__PURE__ */ React49.createElement(PageContext_default.Consumer, null, function(context) {
38667
+ return /* @__PURE__ */ React49.createElement(PageSVGInternal, _extends({}, context, props));
38655
38668
  });
38656
38669
  }
38657
38670
 
38658
38671
  // node_modules/react-pdf/dist/esm/Page/TextLayer.js
38659
38672
  var import_regenerator6 = __toESM(require_regenerator());
38660
38673
  var import_prop_types9 = __toESM(require_prop_types());
38661
- import React50, { PureComponent as PureComponent7 } from "react";
38674
+ import React51, { PureComponent as PureComponent7 } from "react";
38662
38675
 
38663
38676
  // node_modules/react-pdf/dist/esm/Page/TextLayerItem.js
38664
38677
  var import_regenerator5 = __toESM(require_regenerator());
38665
38678
  var import_prop_types8 = __toESM(require_prop_types());
38666
- import React49, { PureComponent as PureComponent6 } from "react";
38679
+ import React50, { PureComponent as PureComponent6 } from "react";
38667
38680
  function _createSuper6(Derived) {
38668
38681
  var hasNativeReflectConstruct = _isNativeReflectConstruct6();
38669
38682
  return function _createSuperInternal() {
@@ -38799,7 +38812,7 @@ var TextLayerItemInternal = /* @__PURE__ */ function(_PureComponent) {
38799
38812
  var _this2 = this;
38800
38813
  var fontSize = this.fontSize, top2 = this.top, left2 = this.left;
38801
38814
  var _this$props2 = this.props, customTextRenderer = _this$props2.customTextRenderer, scale2 = _this$props2.scale, text = _this$props2.str;
38802
- return /* @__PURE__ */ React49.createElement("span", {
38815
+ return /* @__PURE__ */ React50.createElement("span", {
38803
38816
  ref: function ref(_ref) {
38804
38817
  _this2.item = _ref;
38805
38818
  },
@@ -38883,8 +38896,8 @@ TextLayerItemInternal.propTypes = {
38883
38896
  width: import_prop_types8.default.number.isRequired
38884
38897
  };
38885
38898
  function TextLayerItem(props) {
38886
- return /* @__PURE__ */ React49.createElement(PageContext_default.Consumer, null, function(context) {
38887
- return /* @__PURE__ */ React49.createElement(TextLayerItemInternal, _extends({}, context, props));
38899
+ return /* @__PURE__ */ React50.createElement(PageContext_default.Consumer, null, function(context) {
38900
+ return /* @__PURE__ */ React50.createElement(TextLayerItemInternal, _extends({}, context, props));
38888
38901
  });
38889
38902
  }
38890
38903
 
@@ -39008,7 +39021,7 @@ var TextLayerInternal = /* @__PURE__ */ function(_PureComponent) {
39008
39021
  return null;
39009
39022
  }
39010
39023
  return textItems.map(function(textItem, itemIndex) {
39011
- return /* @__PURE__ */ React50.createElement(TextLayerItem, _extends({
39024
+ return /* @__PURE__ */ React51.createElement(TextLayerItem, _extends({
39012
39025
  key: itemIndex,
39013
39026
  itemIndex
39014
39027
  }, textItem));
@@ -39018,7 +39031,7 @@ var TextLayerInternal = /* @__PURE__ */ function(_PureComponent) {
39018
39031
  key: "render",
39019
39032
  value: function render() {
39020
39033
  var viewport2 = this.unrotatedViewport, rotate = this.rotate;
39021
- return /* @__PURE__ */ React50.createElement("div", {
39034
+ return /* @__PURE__ */ React51.createElement("div", {
39022
39035
  className: "react-pdf__Page__textContent",
39023
39036
  style: {
39024
39037
  position: "absolute",
@@ -39058,8 +39071,8 @@ TextLayerInternal.propTypes = {
39058
39071
  scale: import_prop_types9.default.number
39059
39072
  };
39060
39073
  function TextLayer(props) {
39061
- return /* @__PURE__ */ React50.createElement(PageContext_default.Consumer, null, function(context) {
39062
- return /* @__PURE__ */ React50.createElement(TextLayerInternal, _extends({}, context, props));
39074
+ return /* @__PURE__ */ React51.createElement(PageContext_default.Consumer, null, function(context) {
39075
+ return /* @__PURE__ */ React51.createElement(TextLayerInternal, _extends({}, context, props));
39063
39076
  });
39064
39077
  }
39065
39078
 
@@ -39067,7 +39080,7 @@ function TextLayer(props) {
39067
39080
  var import_regenerator7 = __toESM(require_regenerator());
39068
39081
  var import_prop_types10 = __toESM(require_prop_types());
39069
39082
  var pdfjs3 = __toESM(require_pdf());
39070
- import React51, { PureComponent as PureComponent8 } from "react";
39083
+ import React52, { PureComponent as PureComponent8 } from "react";
39071
39084
  function _createSuper8(Derived) {
39072
39085
  var hasNativeReflectConstruct = _isNativeReflectConstruct8();
39073
39086
  return function _createSuperInternal() {
@@ -39221,7 +39234,7 @@ var AnnotationLayerInternal = /* @__PURE__ */ function(_PureComponent) {
39221
39234
  key: "render",
39222
39235
  value: function render() {
39223
39236
  var _this2 = this;
39224
- return /* @__PURE__ */ React51.createElement("div", {
39237
+ return /* @__PURE__ */ React52.createElement("div", {
39225
39238
  className: "react-pdf__Page__annotations annotationLayer",
39226
39239
  ref: function ref(_ref2) {
39227
39240
  _this2.annotationLayer = _ref2;
@@ -39253,9 +39266,9 @@ AnnotationLayerInternal.propTypes = {
39253
39266
  scale: import_prop_types10.default.number
39254
39267
  };
39255
39268
  var AnnotationLayer2 = function AnnotationLayer3(props) {
39256
- return /* @__PURE__ */ React51.createElement(DocumentContext_default.Consumer, null, function(documentContext) {
39257
- return /* @__PURE__ */ React51.createElement(PageContext_default.Consumer, null, function(pageContext) {
39258
- return /* @__PURE__ */ React51.createElement(AnnotationLayerInternal, _extends({}, documentContext, pageContext, props));
39269
+ return /* @__PURE__ */ React52.createElement(DocumentContext_default.Consumer, null, function(documentContext) {
39270
+ return /* @__PURE__ */ React52.createElement(PageContext_default.Consumer, null, function(pageContext) {
39271
+ return /* @__PURE__ */ React52.createElement(AnnotationLayerInternal, _extends({}, documentContext, pageContext, props));
39259
39272
  });
39260
39273
  });
39261
39274
  };
@@ -39457,12 +39470,12 @@ var PageInternal = /* @__PURE__ */ function(_PureComponent) {
39457
39470
  case "none":
39458
39471
  return null;
39459
39472
  case "svg":
39460
- return /* @__PURE__ */ React52.createElement(PageSVG, {
39473
+ return /* @__PURE__ */ React53.createElement(PageSVG, {
39461
39474
  key: "".concat(this.pageKeyNoScale, "_svg")
39462
39475
  });
39463
39476
  case "canvas":
39464
39477
  default:
39465
- return /* @__PURE__ */ React52.createElement(PageCanvas, {
39478
+ return /* @__PURE__ */ React53.createElement(PageCanvas, {
39466
39479
  key: "".concat(this.pageKey, "_canvas"),
39467
39480
  canvasRef
39468
39481
  });
@@ -39475,7 +39488,7 @@ var PageInternal = /* @__PURE__ */ function(_PureComponent) {
39475
39488
  if (!renderTextLayer2) {
39476
39489
  return null;
39477
39490
  }
39478
- return /* @__PURE__ */ React52.createElement(TextLayer, {
39491
+ return /* @__PURE__ */ React53.createElement(TextLayer, {
39479
39492
  key: "".concat(this.pageKey, "_text")
39480
39493
  });
39481
39494
  }
@@ -39486,7 +39499,7 @@ var PageInternal = /* @__PURE__ */ function(_PureComponent) {
39486
39499
  if (!renderAnnotationLayer2) {
39487
39500
  return null;
39488
39501
  }
39489
- return /* @__PURE__ */ React52.createElement(AnnotationLayer_default, {
39502
+ return /* @__PURE__ */ React53.createElement(AnnotationLayer_default, {
39490
39503
  key: "".concat(this.pageKey, "_annotations")
39491
39504
  });
39492
39505
  }
@@ -39494,7 +39507,7 @@ var PageInternal = /* @__PURE__ */ function(_PureComponent) {
39494
39507
  key: "renderChildren",
39495
39508
  value: function renderChildren() {
39496
39509
  var children = this.props.children;
39497
- return /* @__PURE__ */ React52.createElement(PageContext_default.Provider, {
39510
+ return /* @__PURE__ */ React53.createElement(PageContext_default.Provider, {
39498
39511
  value: this.childContext
39499
39512
  }, this.renderMainLayer(), this.renderTextLayer(), this.renderAnnotationLayer(), children);
39500
39513
  }
@@ -39506,19 +39519,19 @@ var PageInternal = /* @__PURE__ */ function(_PureComponent) {
39506
39519
  var page = this.state.page;
39507
39520
  if (!pageNumber) {
39508
39521
  var noData = this.props.noData;
39509
- return /* @__PURE__ */ React52.createElement(Message, {
39522
+ return /* @__PURE__ */ React53.createElement(Message, {
39510
39523
  type: "no-data"
39511
39524
  }, typeof noData === "function" ? noData() : noData);
39512
39525
  }
39513
39526
  if (pdf === null || page === null) {
39514
39527
  var loading = this.props.loading;
39515
- return /* @__PURE__ */ React52.createElement(Message, {
39528
+ return /* @__PURE__ */ React53.createElement(Message, {
39516
39529
  type: "loading"
39517
39530
  }, typeof loading === "function" ? loading() : loading);
39518
39531
  }
39519
39532
  if (pdf === false || page === false) {
39520
39533
  var error2 = this.props.error;
39521
- return /* @__PURE__ */ React52.createElement(Message, {
39534
+ return /* @__PURE__ */ React53.createElement(Message, {
39522
39535
  type: "error"
39523
39536
  }, typeof error2 === "function" ? error2() : error2);
39524
39537
  }
@@ -39529,7 +39542,7 @@ var PageInternal = /* @__PURE__ */ function(_PureComponent) {
39529
39542
  value: function render() {
39530
39543
  var pageNumber = this.pageNumber;
39531
39544
  var _this$props3 = this.props, className = _this$props3.className, inputRef = _this$props3.inputRef;
39532
- return /* @__PURE__ */ React52.createElement("div", _extends({
39545
+ return /* @__PURE__ */ React53.createElement("div", _extends({
39533
39546
  className: mergeClassNames("react-pdf__Page", className),
39534
39547
  "data-page-number": pageNumber,
39535
39548
  ref: mergeRefs2(inputRef, this.ref),
@@ -39609,7 +39622,7 @@ var PageInternal = /* @__PURE__ */ function(_PureComponent) {
39609
39622
  key: "eventProps",
39610
39623
  get: function get4() {
39611
39624
  var _this2 = this;
39612
- return esm_default(this.props, function() {
39625
+ return (0, import_make_event_props4.default)(this.props, function() {
39613
39626
  var page = _this2.state.page;
39614
39627
  if (!page) {
39615
39628
  return page;
@@ -39673,13 +39686,13 @@ PageInternal.propTypes = _objectSpread3(_objectSpread3({}, eventProps), {}, {
39673
39686
  width: import_prop_types11.default.number
39674
39687
  });
39675
39688
  function Page(props, ref) {
39676
- return /* @__PURE__ */ React52.createElement(DocumentContext_default.Consumer, null, function(context) {
39677
- return /* @__PURE__ */ React52.createElement(PageInternal, _extends({
39689
+ return /* @__PURE__ */ React53.createElement(DocumentContext_default.Consumer, null, function(context) {
39690
+ return /* @__PURE__ */ React53.createElement(PageInternal, _extends({
39678
39691
  ref
39679
39692
  }, context, props));
39680
39693
  });
39681
39694
  }
39682
- var Page_default = /* @__PURE__ */ React52.forwardRef(Page);
39695
+ var Page_default = /* @__PURE__ */ React53.forwardRef(Page);
39683
39696
 
39684
39697
  // node_modules/react-pdf/dist/esm/entry.js
39685
39698
  if (isLocalFileSystem) {
@@ -39688,10 +39701,10 @@ if (isLocalFileSystem) {
39688
39701
  pdfjs4.GlobalWorkerOptions.workerSrc = "pdf.worker.js";
39689
39702
 
39690
39703
  // src/PdfReader/index.tsx
39691
- import * as React56 from "react";
39704
+ import * as React57 from "react";
39692
39705
 
39693
39706
  // src/PdfReader/useMeasure.tsx
39694
- import * as React53 from "react";
39707
+ import * as React54 from "react";
39695
39708
  var DEFAULT_DIMENSION = {
39696
39709
  x: 0,
39697
39710
  y: 0,
@@ -39703,9 +39716,9 @@ var DEFAULT_DIMENSION = {
39703
39716
  right: 0
39704
39717
  };
39705
39718
  function useMeasure() {
39706
- const [element, ref] = React53.useState(null);
39707
- const [rect, setRect] = React53.useState(DEFAULT_DIMENSION);
39708
- const observer = React53.useMemo(() => new window.ResizeObserver((entries) => {
39719
+ const [element, ref] = React54.useState(null);
39720
+ const [rect, setRect] = React54.useState(DEFAULT_DIMENSION);
39721
+ const observer = React54.useMemo(() => new window.ResizeObserver((entries) => {
39709
39722
  if (entries[0]) {
39710
39723
  const {
39711
39724
  x,
@@ -39720,7 +39733,7 @@ function useMeasure() {
39720
39733
  setRect({ x, y, width, height, top: top2, left: left2, bottom: bottom2, right: right2 });
39721
39734
  }
39722
39735
  }), []);
39723
- React53.useLayoutEffect(() => {
39736
+ React54.useLayoutEffect(() => {
39724
39737
  if (!element)
39725
39738
  return;
39726
39739
  observer.observe(element);
@@ -39749,10 +39762,10 @@ var ChakraPage = chakra(Page_default, {
39749
39762
  var ChakraPage_default = ChakraPage;
39750
39763
 
39751
39764
  // src/PdfReader/ScrollPage.tsx
39752
- import React54 from "react";
39765
+ import React55 from "react";
39753
39766
 
39754
39767
  // node_modules/react-intersection-observer/react-intersection-observer.m.js
39755
- import { createElement as createElement32, Component as Component3, useRef as useRef19, useState as useState18, useCallback as useCallback15, useEffect as useEffect20 } from "react";
39768
+ import { createElement as createElement33, Component as Component3, useRef as useRef19, useState as useState18, useCallback as useCallback15, useEffect as useEffect20 } from "react";
39756
39769
  function _extends22() {
39757
39770
  _extends22 = Object.assign || function(target) {
39758
39771
  for (var i = 1; i < arguments.length; i++) {
@@ -39943,7 +39956,7 @@ var InView = /* @__PURE__ */ function(_React$Component) {
39943
39956
  });
39944
39957
  }
39945
39958
  var _this$props2 = this.props, children = _this$props2.children, as = _this$props2.as, tag2 = _this$props2.tag, props = _objectWithoutPropertiesLoose17(_this$props2, ["children", "as", "tag", "triggerOnce", "threshold", "root", "rootMargin", "onChange", "skip", "trackVisibility", "delay", "initialInView"]);
39946
- return /* @__PURE__ */ createElement32(as || tag2 || "div", _extends22({
39959
+ return /* @__PURE__ */ createElement33(as || tag2 || "div", _extends22({
39947
39960
  ref: this.handleNode
39948
39961
  }, props), children);
39949
39962
  };
@@ -40011,7 +40024,7 @@ function useInView(_temp) {
40011
40024
 
40012
40025
  // src/PdfReader/ScrollPage.tsx
40013
40026
  var Placeholder = ({ width, height, pageNumber }) => {
40014
- return /* @__PURE__ */ React54.createElement("div", {
40027
+ return /* @__PURE__ */ React55.createElement("div", {
40015
40028
  "data-page-number": pageNumber,
40016
40029
  style: { width, height }
40017
40030
  });
@@ -40028,15 +40041,15 @@ var ScrollPage = ({
40028
40041
  threshold: 0,
40029
40042
  triggerOnce: true
40030
40043
  });
40031
- return /* @__PURE__ */ React54.createElement("div", {
40044
+ return /* @__PURE__ */ React55.createElement("div", {
40032
40045
  ref
40033
- }, inView ? /* @__PURE__ */ React54.createElement(ChakraPage_default, {
40046
+ }, inView ? /* @__PURE__ */ React55.createElement(ChakraPage_default, {
40034
40047
  "data-page-number": pageNumber,
40035
40048
  pageNumber,
40036
40049
  scale: scale2,
40037
40050
  width,
40038
40051
  onLoadSuccess
40039
- }) : /* @__PURE__ */ React54.createElement(Placeholder, {
40052
+ }) : /* @__PURE__ */ React55.createElement(Placeholder, {
40040
40053
  width: placeholderWidth,
40041
40054
  height: placeholderHeight,
40042
40055
  pageNumber
@@ -40045,33 +40058,51 @@ var ScrollPage = ({
40045
40058
  var ScrollPage_default = ScrollPage;
40046
40059
 
40047
40060
  // src/ui/LoadingSkeleton.tsx
40048
- import React55 from "react";
40049
- function LoadingSkeleton({
40061
+ import React56 from "react";
40062
+ var LoadingSkeletonContent = ({
40050
40063
  height
40051
- }) {
40052
- return /* @__PURE__ */ React55.createElement(React55.Fragment, null, /* @__PURE__ */ React55.createElement(HeaderWrapper, null), /* @__PURE__ */ React55.createElement(Box, {
40064
+ }) => {
40065
+ const bgColor = useColorModeValue_default("ui.white", "ui.black", "ui.sepia");
40066
+ return /* @__PURE__ */ React56.createElement(React56.Fragment, null, /* @__PURE__ */ React56.createElement(HeaderWrapper, {
40067
+ bg: bgColor
40068
+ }), /* @__PURE__ */ React56.createElement(Box, {
40053
40069
  padding: "6",
40054
- bg: "white",
40055
- mt: "7",
40070
+ bg: bgColor,
40071
+ mt: "0",
40056
40072
  height,
40057
40073
  "aria-label": "Loading book...",
40058
40074
  "aria-busy": "true",
40059
40075
  role: "progressbar"
40060
- }, /* @__PURE__ */ React55.createElement(Flex, {
40076
+ }, /* @__PURE__ */ React56.createElement(Flex, {
40061
40077
  justifyContent: "center"
40062
- }, /* @__PURE__ */ React55.createElement(Skeleton, {
40078
+ }, /* @__PURE__ */ React56.createElement(Skeleton, {
40063
40079
  height: "20px",
40064
40080
  mb: "7",
40065
40081
  w: "30%"
40066
- })), /* @__PURE__ */ React55.createElement(SkeletonText, {
40082
+ })), /* @__PURE__ */ React56.createElement(SkeletonText, {
40067
40083
  mb: "7",
40068
40084
  noOfLines: 10,
40069
40085
  spacing: "4"
40070
- }), /* @__PURE__ */ React55.createElement(SkeletonText, {
40086
+ }), /* @__PURE__ */ React56.createElement(SkeletonText, {
40071
40087
  mb: "7",
40072
40088
  noOfLines: 5,
40073
40089
  spacing: "4"
40074
- })));
40090
+ })), /* @__PURE__ */ React56.createElement(Footer_default, {
40091
+ state: null,
40092
+ navigator: null,
40093
+ zIndex: "tooltip"
40094
+ }));
40095
+ };
40096
+ function LoadingSkeleton({
40097
+ height,
40098
+ state: state2
40099
+ }) {
40100
+ var _a;
40101
+ return /* @__PURE__ */ React56.createElement(ThemeProvider3, {
40102
+ theme: getTheme3((_a = state2 == null ? void 0 : state2.settings) == null ? void 0 : _a.colorMode)
40103
+ }, /* @__PURE__ */ React56.createElement(LoadingSkeletonContent, {
40104
+ height
40105
+ }));
40075
40106
  }
40076
40107
 
40077
40108
  // src/PdfReader/index.tsx
@@ -40185,7 +40216,7 @@ function usePdfReader(args) {
40185
40216
  height = DEFAULT_HEIGHT,
40186
40217
  growWhenScrolling = DEFAULT_SHOULD_GROW_WHEN_SCROLLING
40187
40218
  } = args != null ? args : {};
40188
- const [state2, dispatch] = React56.useReducer(pdfReducer, {
40219
+ const [state2, dispatch] = React57.useReducer(pdfReducer, {
40189
40220
  state: "INACTIVE",
40190
40221
  resourceIndex: 0,
40191
40222
  resource: null,
@@ -40204,7 +40235,7 @@ function usePdfReader(args) {
40204
40235
  const isParsed = typeof state2.numPages === "number";
40205
40236
  const isSinglePDF = manifest && (manifest == null ? void 0 : manifest.readingOrder.length) === 1;
40206
40237
  const [containerRef, containerSize] = useMeasure();
40207
- React56.useEffect(() => {
40238
+ React57.useEffect(() => {
40208
40239
  if (!webpubManifestUrl || !manifest) {
40209
40240
  return dispatch({ type: "ARGS_CHANGED", args: void 0 });
40210
40241
  }
@@ -40229,7 +40260,7 @@ function usePdfReader(args) {
40229
40260
  height,
40230
40261
  growWhenScrolling
40231
40262
  ]);
40232
- React56.useEffect(() => {
40263
+ React57.useEffect(() => {
40233
40264
  if (!manifest)
40234
40265
  return;
40235
40266
  if (!manifest.readingOrder || !manifest.readingOrder.length) {
@@ -40243,7 +40274,7 @@ function usePdfReader(args) {
40243
40274
  });
40244
40275
  });
40245
40276
  }, [state2.resourceIndex, manifest, proxyUrl]);
40246
- const resizePage = React56.useCallback((pdfWidth, pdfHeight, containerSize2) => {
40277
+ const resizePage = React57.useCallback((pdfWidth, pdfHeight, containerSize2) => {
40247
40278
  const wRatio = pdfWidth / containerSize2.width;
40248
40279
  const hRatio = pdfHeight / containerSize2.height;
40249
40280
  const fitHorizontal = wRatio > hRatio;
@@ -40251,10 +40282,10 @@ function usePdfReader(args) {
40251
40282
  const height2 = !fitHorizontal ? Math.round(containerSize2.height) : void 0;
40252
40283
  dispatch({ type: "RESIZE_PAGE", width, height: height2 });
40253
40284
  }, []);
40254
- React56.useEffect(() => {
40285
+ React57.useEffect(() => {
40255
40286
  resizePage(state2.pdfWidth, state2.pdfHeight, containerSize);
40256
40287
  }, [containerSize, state2.pdfWidth, state2.pdfHeight, resizePage]);
40257
- React56.useEffect(() => {
40288
+ React57.useEffect(() => {
40258
40289
  var _a2;
40259
40290
  if (!manifest || state2.state !== "ACTIVE")
40260
40291
  return;
@@ -40284,7 +40315,7 @@ function usePdfReader(args) {
40284
40315
  state2.resourceIndex,
40285
40316
  isSinglePDF
40286
40317
  ]);
40287
- const goForward = React56.useCallback(() => __async(this, null, function* () {
40318
+ const goForward = React57.useCallback(() => __async(this, null, function* () {
40288
40319
  var _a2;
40289
40320
  if (!state2.numPages)
40290
40321
  return;
@@ -40318,7 +40349,7 @@ function usePdfReader(args) {
40318
40349
  state2.pageNumber,
40319
40350
  state2.resourceIndex
40320
40351
  ]);
40321
- const goBackward = React56.useCallback(() => __async(this, null, function* () {
40352
+ const goBackward = React57.useCallback(() => __async(this, null, function* () {
40322
40353
  if (!isParsed)
40323
40354
  return;
40324
40355
  if (state2.state !== "ACTIVE")
@@ -40345,23 +40376,23 @@ function usePdfReader(args) {
40345
40376
  state2.pageNumber,
40346
40377
  state2.resourceIndex
40347
40378
  ]);
40348
- const setScroll = React56.useCallback((val) => __async(this, null, function* () {
40379
+ const setScroll = React57.useCallback((val) => __async(this, null, function* () {
40349
40380
  const isScrolling = val === "scrolling";
40350
40381
  dispatch({ type: "SET_SCROLL", isScrolling });
40351
40382
  }), []);
40352
- const zoomIn = React56.useCallback(() => __async(this, null, function* () {
40383
+ const zoomIn = React57.useCallback(() => __async(this, null, function* () {
40353
40384
  dispatch({
40354
40385
  type: "SET_SCALE",
40355
40386
  scale: state2.scale + SCALE_STEP
40356
40387
  });
40357
40388
  }), [state2.scale]);
40358
- const zoomOut = React56.useCallback(() => __async(this, null, function* () {
40389
+ const zoomOut = React57.useCallback(() => __async(this, null, function* () {
40359
40390
  dispatch({
40360
40391
  type: "SET_SCALE",
40361
40392
  scale: state2.scale - SCALE_STEP
40362
40393
  });
40363
40394
  }), [state2.scale]);
40364
- const goToPage = React56.useCallback((href) => __async(this, null, function* () {
40395
+ const goToPage = React57.useCallback((href) => __async(this, null, function* () {
40365
40396
  const getIndexFromHref = (href2) => {
40366
40397
  var _a2;
40367
40398
  const index = (_a2 = manifest == null ? void 0 : manifest.readingOrder) == null ? void 0 : _a2.findIndex((link2) => {
@@ -40392,8 +40423,9 @@ function usePdfReader(args) {
40392
40423
  return {
40393
40424
  type: null,
40394
40425
  isLoading: true,
40395
- content: /* @__PURE__ */ React56.createElement(LoadingSkeleton, {
40396
- height
40426
+ content: /* @__PURE__ */ React57.createElement(LoadingSkeleton, {
40427
+ height,
40428
+ state: state2
40397
40429
  }),
40398
40430
  navigator: null,
40399
40431
  manifest: null,
@@ -40423,7 +40455,7 @@ function usePdfReader(args) {
40423
40455
  return {
40424
40456
  type: "PDF",
40425
40457
  isLoading: false,
40426
- content: /* @__PURE__ */ React56.createElement(Flex, {
40458
+ content: /* @__PURE__ */ React57.createElement(Flex, {
40427
40459
  as: "main",
40428
40460
  zIndex: "base",
40429
40461
  flex: "1 0 auto",
@@ -40433,16 +40465,16 @@ function usePdfReader(args) {
40433
40465
  id: IFRAME_WRAPPER_ID,
40434
40466
  ref: containerRef,
40435
40467
  height: finalHeight
40436
- }, /* @__PURE__ */ React56.createElement("style", null, `
40468
+ }, /* @__PURE__ */ React57.createElement("style", null, `
40437
40469
  .react-pdf__Document {
40438
40470
  height: calc(100vh - ${HEADER_HEIGHT + FOOTER_HEIGHT}px);
40439
40471
  overflow-x: hidden;
40440
40472
  overflow-y: auto;
40441
40473
  }
40442
- `), /* @__PURE__ */ React56.createElement(Document, {
40474
+ `), /* @__PURE__ */ React57.createElement(Document, {
40443
40475
  file: state2.resource,
40444
40476
  onLoadSuccess: onDocumentLoadSuccess
40445
- }, isParsed && state2.numPages && /* @__PURE__ */ React56.createElement(React56.Fragment, null, state2.settings.isScrolling && Array.from(new Array(state2.numPages), (_, index) => /* @__PURE__ */ React56.createElement(ScrollPage_default, {
40477
+ }, isParsed && state2.numPages && /* @__PURE__ */ React57.createElement(React57.Fragment, null, state2.settings.isScrolling && Array.from(new Array(state2.numPages), (_, index) => /* @__PURE__ */ React57.createElement(ScrollPage_default, {
40446
40478
  key: `page_${index + 1}`,
40447
40479
  width: containerSize.width,
40448
40480
  placeholderHeight: state2.pdfHeight,
@@ -40450,13 +40482,13 @@ function usePdfReader(args) {
40450
40482
  scale: state2.scale,
40451
40483
  pageNumber: index + 1,
40452
40484
  onLoadSuccess: onRenderSuccess
40453
- })), !state2.settings.isScrolling && /* @__PURE__ */ React56.createElement(ChakraPage_default, {
40485
+ })), !state2.settings.isScrolling && /* @__PURE__ */ React57.createElement(ChakraPage_default, {
40454
40486
  pageNumber: state2.pageNumber,
40455
40487
  onLoadSuccess: onRenderSuccess,
40456
40488
  width: state2.pageWidth,
40457
40489
  height: state2.pageHeight,
40458
40490
  scale: state2.scale,
40459
- loading: /* @__PURE__ */ React56.createElement(React56.Fragment, null)
40491
+ loading: /* @__PURE__ */ React57.createElement(React57.Fragment, null)
40460
40492
  })))),
40461
40493
  state: state2,
40462
40494
  manifest,
@@ -40476,7 +40508,7 @@ function handleInvalidTransition(state2, action) {
40476
40508
  }
40477
40509
 
40478
40510
  // src/HtmlReader/index.tsx
40479
- import React64 from "react";
40511
+ import React65 from "react";
40480
40512
 
40481
40513
  // src/HtmlReader/lib.ts
40482
40514
  var FONT_SIZE_STEP = 4;
@@ -40494,8 +40526,18 @@ function makeInjectableElement(document2, injectable) {
40494
40526
  }
40495
40527
  return el;
40496
40528
  }
40529
+ case "script": {
40530
+ const el = document2.createElement("script");
40531
+ el.setAttribute("type", "text/javascript");
40532
+ if (injectable.url) {
40533
+ el.setAttribute("src", injectable.url);
40534
+ } else {
40535
+ console.warn("Injectable missing url", injectable);
40536
+ }
40537
+ return el;
40538
+ }
40497
40539
  default:
40498
- return;
40540
+ return void 0;
40499
40541
  }
40500
40542
  }
40501
40543
  function getCurrentIndex(manifest, state2, baseUrl) {
@@ -40518,10 +40560,15 @@ function getFromReadingOrder(href, manifest, baseUrl) {
40518
40560
  } : void 0;
40519
40561
  }
40520
40562
  function isSameResource(href1, href2, baseUrl) {
40521
- const url1 = new URL(href1, baseUrl);
40522
- const url2 = new URL(href2, baseUrl);
40523
- const doMatch = url1.origin === url2.origin && url1.pathname === url2.pathname;
40524
- return doMatch;
40563
+ try {
40564
+ const url1 = new URL(href1, baseUrl);
40565
+ const url2 = new URL(href2, baseUrl);
40566
+ const doMatch = url1.origin === url2.origin && url1.pathname === url2.pathname;
40567
+ return doMatch;
40568
+ } catch (e) {
40569
+ console.error(e);
40570
+ }
40571
+ return false;
40525
40572
  }
40526
40573
  function linkToLocator(link2, baseUrl, locations = {}) {
40527
40574
  var _a;
@@ -40640,7 +40687,7 @@ var familyToReadiumFamily = {
40640
40687
  };
40641
40688
 
40642
40689
  // src/utils/localstorage.ts
40643
- import React57 from "react";
40690
+ import React58 from "react";
40644
40691
  function getLocalStorageLocation(identifier2, args) {
40645
40692
  if (!(args == null ? void 0 : args.persistLastLocation))
40646
40693
  return void 0;
@@ -40663,7 +40710,7 @@ function getLocalStorageSettings(args) {
40663
40710
  return void 0;
40664
40711
  }
40665
40712
  function useUpdateLocalStorage(identifier2, state2, args) {
40666
- React57.useEffect(() => {
40713
+ React58.useEffect(() => {
40667
40714
  if (!identifier2 || !(args == null ? void 0 : args.persistLastLocation))
40668
40715
  return;
40669
40716
  if (state2.location) {
@@ -40684,7 +40731,7 @@ function useUpdateLocalStorage(identifier2, state2, args) {
40684
40731
  }
40685
40732
  }
40686
40733
  }, [state2.location, identifier2, args == null ? void 0 : args.persistLastLocation]);
40687
- React57.useEffect(() => {
40734
+ React58.useEffect(() => {
40688
40735
  if (!identifier2 || !state2.settings || !(args == null ? void 0 : args.persistSettings))
40689
40736
  return;
40690
40737
  const settings = {
@@ -40703,10 +40750,10 @@ function clearWebReaderLocalStorage() {
40703
40750
  }
40704
40751
 
40705
40752
  // src/HtmlReader/useLocationQuery.ts
40706
- import React58 from "react";
40753
+ import React59 from "react";
40707
40754
  var LOCATION_QUERY_TITLE = "location";
40708
40755
  function useLocationQuery(state2) {
40709
- React58.useEffect(() => {
40756
+ React59.useEffect(() => {
40710
40757
  if (state2.state === "READY")
40711
40758
  updateQuery(state2.location);
40712
40759
  }, [state2.location, state2.state]);
@@ -41173,11 +41220,11 @@ function extractContentContainerSize(container3) {
41173
41220
  }
41174
41221
 
41175
41222
  // src/HtmlReader/useResource.tsx
41176
- import React59 from "react";
41223
+ import React60 from "react";
41177
41224
  function useResource(manifest, state2, getContent, injectables, dispatch) {
41178
41225
  var _a, _b;
41179
41226
  const currentResourceUrl = (_b = (_a = state2.location) == null ? void 0 : _a.href) != null ? _b : null;
41180
- React59.useEffect(() => {
41227
+ React60.useEffect(() => {
41181
41228
  if (!currentResourceUrl) {
41182
41229
  return;
41183
41230
  }
@@ -41232,8 +41279,11 @@ function injectJS(body) {
41232
41279
  function handleLinkClick(evt) {
41233
41280
  // don't navigate
41234
41281
  evt.preventDefault();
41235
- // send message to parent
41236
- window.parent.postMessage( { type: 'LINK_CLICKED', href: evt.target.href } );
41282
+ const href = evt.currentTarget.href;
41283
+ if(href) {
41284
+ // send message to parent
41285
+ window.parent.postMessage( { type: 'LINK_CLICKED', href } );
41286
+ }
41237
41287
  };
41238
41288
  for ( var i = 0; i < links.length; i ++ ) {
41239
41289
  links[i].addEventListener('click', handleLinkClick);
@@ -41247,9 +41297,9 @@ function injectJS(body) {
41247
41297
 
41248
41298
  // src/HtmlReader/useWindowResize.ts
41249
41299
  var import_debounce2 = __toESM(require_debounce());
41250
- import React60 from "react";
41300
+ import React61 from "react";
41251
41301
  function useWindowResize(manifest, state2, dispatch) {
41252
- React60.useEffect(() => {
41302
+ React61.useEffect(() => {
41253
41303
  if (state2.state !== "NAVIGATING" && state2.state !== "READY")
41254
41304
  return;
41255
41305
  function handleResize() {
@@ -41270,11 +41320,11 @@ function useWindowResize(manifest, state2, dispatch) {
41270
41320
  }
41271
41321
 
41272
41322
  // src/HtmlReader/useUpdateScroll.ts
41273
- import * as React61 from "react";
41323
+ import * as React62 from "react";
41274
41324
  var SCROLL_STOP_DEBOUNCE = 100;
41275
41325
  function useUpdateScroll(state2, dispatch) {
41276
- const timeout = React61.useRef();
41277
- React61.useLayoutEffect(() => {
41326
+ const timeout = React62.useRef();
41327
+ React62.useLayoutEffect(() => {
41278
41328
  if (state2.state !== "READY")
41279
41329
  return;
41280
41330
  const iframeDocument = state2.iframe.contentDocument;
@@ -41293,9 +41343,9 @@ function useUpdateScroll(state2, dispatch) {
41293
41343
  }
41294
41344
 
41295
41345
  // src/HtmlReader/useUpdateCSS.ts
41296
- import React62 from "react";
41346
+ import React63 from "react";
41297
41347
  function useUpdateCSS(state2, manifest) {
41298
- React62.useEffect(() => {
41348
+ React63.useEffect(() => {
41299
41349
  if (!manifest)
41300
41350
  return;
41301
41351
  if (state2.state !== "NAVIGATING" && state2.state !== "READY")
@@ -41308,19 +41358,34 @@ function useUpdateCSS(state2, manifest) {
41308
41358
  }
41309
41359
 
41310
41360
  // src/HtmlReader/useIframeLinkClick.ts
41311
- import React63 from "react";
41312
- function useIframeLinkClick(dispatch) {
41313
- React63.useEffect(() => {
41314
- window.addEventListener("message", ({ data }) => {
41361
+ import React64 from "react";
41362
+ function useIframeLinkClick(baseUrl, manifest, dispatch) {
41363
+ React64.useEffect(() => {
41364
+ if (!baseUrl || !manifest)
41365
+ return;
41366
+ const messageHandler = ({ data }) => {
41315
41367
  if (typeof data === "object" && data !== null && "type" in data) {
41316
41368
  switch (data.type) {
41317
41369
  case "LINK_CLICKED":
41318
- dispatch({ type: "GO_TO_HREF", href: data.href });
41370
+ handleIframeLink(data.href, manifest, baseUrl, dispatch);
41319
41371
  }
41320
41372
  }
41321
- });
41322
- }, [dispatch]);
41373
+ };
41374
+ window.addEventListener("message", messageHandler);
41375
+ return () => window.removeEventListener("message", messageHandler);
41376
+ }, [dispatch, baseUrl, manifest]);
41323
41377
  }
41378
+ var handleIframeLink = (href, manifest, baseUrl, dispatch) => {
41379
+ if (isExternalLink(href, manifest, baseUrl)) {
41380
+ window.open(href, "_blank");
41381
+ } else {
41382
+ dispatch({ type: "GO_TO_HREF", href });
41383
+ }
41384
+ };
41385
+ var isExternalLink = (href, manifest, baseUrl) => {
41386
+ const resource = getFromReadingOrder(href, manifest, baseUrl);
41387
+ return resource === void 0;
41388
+ };
41324
41389
 
41325
41390
  // src/HtmlReader/index.tsx
41326
41391
  var IFRAME_ID_SELECTOR = "html-reader-iframe";
@@ -41337,7 +41402,7 @@ function useHtmlReader(args) {
41337
41402
  persistLastLocation = true,
41338
41403
  persistSettings = true
41339
41404
  } = args != null ? args : {};
41340
- const [state2, dispatch] = React64.useReducer(makeHtmlReducer(args), inactiveState);
41405
+ const [state2, dispatch] = React65.useReducer(makeHtmlReducer(args), inactiveState);
41341
41406
  const currentResourceUrl = (_b = (_a = state2.location) == null ? void 0 : _a.href) != null ? _b : null;
41342
41407
  const injectables = ((_d = (_c = manifest == null ? void 0 : manifest.metadata) == null ? void 0 : _c.presentation) == null ? void 0 : _d.layout) === "fixed" ? injectablesFixed : injectablesReflowable;
41343
41408
  useResource(manifest, state2, getContent, injectables, dispatch);
@@ -41347,8 +41412,8 @@ function useHtmlReader(args) {
41347
41412
  useLocationQuery(state2);
41348
41413
  useWindowResize(manifest, state2, dispatch);
41349
41414
  useUpdateCSS(state2, manifest);
41350
- useIframeLinkClick(dispatch);
41351
- React64.useEffect(() => {
41415
+ useIframeLinkClick(webpubManifestUrl, manifest, dispatch);
41416
+ React65.useEffect(() => {
41352
41417
  if (!webpubManifestUrl || !manifest) {
41353
41418
  return dispatch({ type: "ARGS_CHANGED", args: void 0 });
41354
41419
  }
@@ -41377,7 +41442,7 @@ function useHtmlReader(args) {
41377
41442
  persistLastLocation,
41378
41443
  persistSettings
41379
41444
  ]);
41380
- React64.useEffect(() => {
41445
+ React65.useEffect(() => {
41381
41446
  process.nextTick(() => {
41382
41447
  if (state2.state === "NAVIGATING") {
41383
41448
  const { fragment, progression, position: position3 } = state2.location.locations;
@@ -41399,7 +41464,7 @@ function useHtmlReader(args) {
41399
41464
  (_g = state2.settings) == null ? void 0 : _g.isScrolling,
41400
41465
  (_h = state2.location) == null ? void 0 : _h.locations
41401
41466
  ]);
41402
- const navigator2 = React64.useRef({
41467
+ const navigator2 = React65.useRef({
41403
41468
  goToPage(href) {
41404
41469
  dispatch({ type: "GO_TO_HREF", href });
41405
41470
  },
@@ -41440,7 +41505,7 @@ function useHtmlReader(args) {
41440
41505
  });
41441
41506
  }
41442
41507
  }).current;
41443
- const setIframe = React64.useRef((el) => {
41508
+ const setIframe = React65.useRef((el) => {
41444
41509
  dispatch({ type: "SET_IFRAME", iframe: el });
41445
41510
  }).current;
41446
41511
  if (!webpubManifestUrl || !manifest)
@@ -41449,8 +41514,9 @@ function useHtmlReader(args) {
41449
41514
  return {
41450
41515
  type: null,
41451
41516
  isLoading: true,
41452
- content: /* @__PURE__ */ React64.createElement(LoadingSkeleton, {
41453
- height
41517
+ content: /* @__PURE__ */ React65.createElement(LoadingSkeleton, {
41518
+ height,
41519
+ state: state2
41454
41520
  }),
41455
41521
  navigator: null,
41456
41522
  manifest: null,
@@ -41472,7 +41538,7 @@ function useHtmlReader(args) {
41472
41538
  return {
41473
41539
  type: "HTML",
41474
41540
  isLoading: false,
41475
- content: /* @__PURE__ */ React64.createElement(React64.Fragment, null, /* @__PURE__ */ React64.createElement("iframe", {
41541
+ content: /* @__PURE__ */ React65.createElement(React65.Fragment, null, /* @__PURE__ */ React65.createElement("iframe", {
41476
41542
  id: IFRAME_ID_SELECTOR,
41477
41543
  onLoad: () => dispatch({ type: "IFRAME_LOADED" }),
41478
41544
  ref: setIframe,
@@ -41524,8 +41590,8 @@ function useWebReader(args) {
41524
41590
  persistLastLocation = true,
41525
41591
  persistSettings = true
41526
41592
  } = args;
41527
- const [manifest, setManifest] = React65.useState(null);
41528
- const [error2, setError] = React65.useState(null);
41593
+ const [manifest, setManifest] = React66.useState(null);
41594
+ const [error2, setError] = React66.useState(null);
41529
41595
  if (error2) {
41530
41596
  throw error2;
41531
41597
  }
@@ -41551,14 +41617,15 @@ function useWebReader(args) {
41551
41617
  persistLastLocation,
41552
41618
  persistSettings
41553
41619
  } : void 0);
41554
- React65.useEffect(() => {
41620
+ React66.useEffect(() => {
41555
41621
  fetchJson(webpubManifestUrl).then(setManifest).catch(setError);
41556
41622
  }, [webpubManifestUrl]);
41557
41623
  if (manifest === null) {
41558
41624
  return {
41559
41625
  isLoading: true,
41560
- content: /* @__PURE__ */ React65.createElement(LoadingSkeleton, {
41561
- height
41626
+ content: /* @__PURE__ */ React66.createElement(LoadingSkeleton, {
41627
+ height,
41628
+ state: htmlReader == null ? void 0 : htmlReader.state
41562
41629
  }),
41563
41630
  manifest: null,
41564
41631
  navigator: null,
@@ -41576,7 +41643,7 @@ function useWebReader(args) {
41576
41643
  }
41577
41644
 
41578
41645
  // src/ServiceWorker/client.ts
41579
- import React66 from "react";
41646
+ import React67 from "react";
41580
41647
 
41581
41648
  // src/ServiceWorker/constants.ts
41582
41649
  var PRECACHE_PUBLICATIONS = "PRECACHE_PUBLICATIONS";
@@ -41584,7 +41651,7 @@ var CACHE_EXPIRATION_SECONDS = 7 * 24 * 60 * 60;
41584
41651
 
41585
41652
  // src/ServiceWorker/client.ts
41586
41653
  function usePublicationSW(publications) {
41587
- React66.useEffect(() => {
41654
+ React67.useEffect(() => {
41588
41655
  var _a;
41589
41656
  if ("serviceWorker" in navigator) {
41590
41657
  const message = {
@@ -41615,12 +41682,12 @@ var WebReaderWithoutBoundary = (_a) => {
41615
41682
  getContent
41616
41683
  }, props));
41617
41684
  const { content } = webReader;
41618
- return /* @__PURE__ */ React67.createElement(manager_default, __spreadValues({
41685
+ return /* @__PURE__ */ React68.createElement(manager_default, __spreadValues({
41619
41686
  headerLeft
41620
41687
  }, webReader), content);
41621
41688
  };
41622
41689
  var WebReader = (props) => {
41623
- return /* @__PURE__ */ React67.createElement(ErrorBoundary_default, __spreadValues({}, props), /* @__PURE__ */ React67.createElement(WebReaderWithoutBoundary, __spreadValues({}, props)));
41690
+ return /* @__PURE__ */ React68.createElement(ErrorBoundary_default, __spreadValues({}, props), /* @__PURE__ */ React68.createElement(WebReaderWithoutBoundary, __spreadValues({}, props)));
41624
41691
  };
41625
41692
  var src_default = WebReader;
41626
41693
  export {
@@ -41644,20 +41711,6 @@ export {
41644
41711
  usePublicationSW,
41645
41712
  useWebReader
41646
41713
  };
41647
- /*! *****************************************************************************
41648
- Copyright (c) Microsoft Corporation.
41649
-
41650
- Permission to use, copy, modify, and/or distribute this software for any
41651
- purpose with or without fee is hereby granted.
41652
-
41653
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
41654
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
41655
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
41656
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
41657
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
41658
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
41659
- PERFORMANCE OF THIS SOFTWARE.
41660
- ***************************************************************************** */
41661
41714
  /** @license React v16.13.1
41662
41715
  * react-is.production.min.js
41663
41716
  *