@embedpdf-editor/chapter-snippet 0.3.6 → 1.0.0

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.
@@ -38722,7 +38722,7 @@ function It$1(_ref379) {
38722
38722
  }))]
38723
38723
  });
38724
38724
  }
38725
- function Ct$1(_ref382) {
38725
+ function yt$1(_ref382) {
38726
38726
  var t = _ref382.chapterId,
38727
38727
  e = _ref382.localPageIndex,
38728
38728
  s = _ref382.scale,
@@ -38739,7 +38739,7 @@ function Ct$1(_ref382) {
38739
38739
  }
38740
38740
  });
38741
38741
  }
38742
- var yt$1 = {
38742
+ var Ct$1 = {
38743
38743
  kind: "first-wins"
38744
38744
  };
38745
38745
  function Mt$1(t, e, a) {
@@ -38827,9 +38827,9 @@ var St$1 = /*#__PURE__*/function () {
38827
38827
  }]);
38828
38828
  }();
38829
38829
  function xt$1(t) {
38830
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : yt$1;
38830
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ct$1;
38831
38831
  var a = function (t) {
38832
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : yt$1;
38832
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ct$1;
38833
38833
  var a = /* @__PURE__ */new Map();
38834
38834
  var _iterator177 = _createForOfIteratorHelper(t.chapters),
38835
38835
  _step177;
@@ -38915,7 +38915,7 @@ var kt$1 = /*#__PURE__*/function (_BasePlugin16) {
38915
38915
  function t(_t81, e) {
38916
38916
  var _this153;
38917
38917
  _classCallCheck(this, t);
38918
- _this153 = _callSuper(this, t, [_t81, e]), _this153.statusChange$ = createBehaviorEmitter(), _this153.manifestChange$ = createEmitter(), _this153.overlapStrategy = yt$1, _this153.chapterStatus = /* @__PURE__ */new Map(), _this153.chapterLastUsed = /* @__PURE__ */new Map(), _this153.passwordAttempts = /* @__PURE__ */new Map(), _this153.pendingLoadPromises = /* @__PURE__ */new Map(), _this153.unloadTimer = null, _this153.documentManagerUnsubs = [], _this153.documentManager = _this153.registry.getPlugin(DocumentManagerPlugin.id);
38918
+ _this153 = _callSuper(this, t, [_t81, e]), _this153.statusChange$ = createBehaviorEmitter(), _this153.manifestChange$ = createEmitter(), _this153.overlapStrategy = Ct$1, _this153.chapterStatus = /* @__PURE__ */new Map(), _this153.chapterLastUsed = /* @__PURE__ */new Map(), _this153.passwordAttempts = /* @__PURE__ */new Map(), _this153.pendingLoadPromises = /* @__PURE__ */new Map(), _this153.unloadTimer = null, _this153.documentManagerUnsubs = [], _this153.documentManager = _this153.registry.getPlugin(DocumentManagerPlugin.id);
38919
38919
  return _this153;
38920
38920
  }
38921
38921
  _inherits(t, _BasePlugin16);
@@ -38929,7 +38929,7 @@ var kt$1 = /*#__PURE__*/function (_BasePlugin16) {
38929
38929
  return _regenerator().w(function (_context54) {
38930
38930
  while (1) switch (_context54.n) {
38931
38931
  case 0:
38932
- if (this.config = _t82, this.passwordProvider = _t82.passwordProvider, this.overlapStrategy = (_t82$overlapStrategy = _t82.overlapStrategy) !== null && _t82$overlapStrategy !== void 0 ? _t82$overlapStrategy : yt$1, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t83) {
38932
+ if (this.config = _t82, this.passwordProvider = _t82.passwordProvider, this.overlapStrategy = (_t82$overlapStrategy = _t82.overlapStrategy) !== null && _t82$overlapStrategy !== void 0 ? _t82$overlapStrategy : Ct$1, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t83) {
38933
38933
  _this154.isOwnedChapter(_t83.id) && (_this154.passwordAttempts.delete(_t83.id), _this154.updateStatus(_t83.id, "loaded"));
38934
38934
  }), this.documentManager.provides().onDocumentClosed(function (_t84) {
38935
38935
  _this154.isOwnedChapter(_t84) && _this154.updateStatus(_t84, "closed");
@@ -41072,7 +41072,7 @@ function Ut(_ref391) {
41072
41072
  _d$87 = d$1(null),
41073
41073
  _d$88 = _slicedToArray(_d$87, 2),
41074
41074
  I = _d$88[0],
41075
- C = _d$88[1];
41075
+ y$1 = _d$88[1];
41076
41076
  if (y(function () {
41077
41077
  if (f) return f.onNotesChange(function (t) {
41078
41078
  b(t.filter(function (t) {
@@ -41084,13 +41084,13 @@ function Ut(_ref391) {
41084
41084
  var t = function t(_t198) {
41085
41085
  var e;
41086
41086
  var a = _t198.target;
41087
- (null == (e = a.closest) ? void 0 : e.call(a, "[data-note-marker-zone=\"".concat(I, "\"]"))) || (C(null), w(null));
41087
+ (null == (e = a.closest) ? void 0 : e.call(a, "[data-note-marker-zone=\"".concat(I, "\"]"))) || (y$1(null), w(null));
41088
41088
  };
41089
41089
  return document.addEventListener("mousedown", t), function () {
41090
41090
  return document.removeEventListener("mousedown", t);
41091
41091
  };
41092
41092
  }, [I]), !f || 0 === m.length || !o || !n) return null;
41093
- var y$1 = h / o,
41093
+ var C = h / o,
41094
41094
  M = l / n,
41095
41095
  S = (_ref395 = null == c ? void 0 : c.iconSize) !== null && _ref395 !== void 0 ? _ref395 : 16,
41096
41096
  x = (_ref396 = null == c ? void 0 : c.highlightColor) !== null && _ref396 !== void 0 ? _ref396 : "rgba(245, 158, 11, 0.08)";
@@ -41126,7 +41126,7 @@ function Ut(_ref391) {
41126
41126
  }({
41127
41127
  markerPdf: e.endAnchor,
41128
41128
  lineRects: e.rectsPdfCoord,
41129
- sx: y$1,
41129
+ sx: C,
41130
41130
  sy: M,
41131
41131
  cssPageWidth: h,
41132
41132
  iconSize: S
@@ -41156,7 +41156,7 @@ function Ut(_ref391) {
41156
41156
  width: i - s,
41157
41157
  height: o - r
41158
41158
  };
41159
- }(e.rectsPdfCoord, y$1, M),
41159
+ }(e.rectsPdfCoord, C, M),
41160
41160
  u = r ? 72 : 0,
41161
41161
  p = Math.max(0, Math.min(l.left, o) - 8),
41162
41162
  m = Math.max(0, Math.min(l.top, n) - 8),
@@ -41167,9 +41167,9 @@ function Ut(_ref391) {
41167
41167
  return /* @__PURE__ */u$1("div", {
41168
41168
  style: {
41169
41169
  position: "absolute",
41170
- left: t.origin.x * y$1 + "px",
41170
+ left: t.origin.x * C + "px",
41171
41171
  top: t.origin.y * M + "px",
41172
- width: t.size.width * y$1 + "px",
41172
+ width: t.size.width * C + "px",
41173
41173
  height: t.size.height * M + "px",
41174
41174
  background: x,
41175
41175
  borderRadius: "2px",
@@ -41206,7 +41206,7 @@ function Ut(_ref391) {
41206
41206
  return t.stopPropagation();
41207
41207
  },
41208
41208
  onClick: function onClick(t) {
41209
- t.stopPropagation(), C(function (t) {
41209
+ t.stopPropagation(), y$1(function (t) {
41210
41210
  return t === e.noteId ? null : e.noteId;
41211
41211
  });
41212
41212
  },
@@ -41234,7 +41234,7 @@ function Ut(_ref391) {
41234
41234
  return t.stopPropagation();
41235
41235
  },
41236
41236
  onClick: function onClick(t) {
41237
- t.stopPropagation(), C(function (t) {
41237
+ t.stopPropagation(), y$1(function (t) {
41238
41238
  return t === e.noteId ? null : e.noteId;
41239
41239
  });
41240
41240
  },
@@ -41274,10 +41274,10 @@ function Ut(_ref391) {
41274
41274
  children: c.renderMenuActions({
41275
41275
  note: e,
41276
41276
  onEdit: function onEdit() {
41277
- C(null), w(null), null == g || g.requestEdit(e.noteId);
41277
+ y$1(null), w(null), null == g || g.requestEdit(e.noteId);
41278
41278
  },
41279
41279
  onDelete: function onDelete() {
41280
- C(null), w(null), f.deleteNote(e.noteId);
41280
+ y$1(null), w(null), f.deleteNote(e.noteId);
41281
41281
  }
41282
41282
  })
41283
41283
  }) : /* @__PURE__ */u$1("div", {
@@ -41302,7 +41302,7 @@ function Ut(_ref391) {
41302
41302
  type: "button",
41303
41303
  style: _t,
41304
41304
  onClick: function onClick(t) {
41305
- t.stopPropagation(), C(null), w(null), null == g || g.requestEdit(e.noteId);
41305
+ t.stopPropagation(), y$1(null), w(null), null == g || g.requestEdit(e.noteId);
41306
41306
  },
41307
41307
  children: "编辑"
41308
41308
  }), /* @__PURE__ */u$1("button", {
@@ -41311,7 +41311,7 @@ function Ut(_ref391) {
41311
41311
  color: "#dc2626"
41312
41312
  }),
41313
41313
  onClick: function onClick(t) {
41314
- t.stopPropagation(), C(null), w(null), f.deleteNote(e.noteId);
41314
+ t.stopPropagation(), y$1(null), w(null), f.deleteNote(e.noteId);
41315
41315
  },
41316
41316
  children: "删除"
41317
41317
  })]
@@ -43182,7 +43182,7 @@ var ae = /*#__PURE__*/function (_BasePlugin22) {
43182
43182
  }]);
43183
43183
  }(BasePlugin);
43184
43184
  ae.id = "chapter-scroll";
43185
- var se$1 = ae;
43185
+ var se = ae;
43186
43186
  function re$1(t) {
43187
43187
  var e = t[t.length - 1];
43188
43188
  return {
@@ -43277,7 +43277,7 @@ var he$1 = /*#__PURE__*/function (_BasePlugin23) {
43277
43277
  function t(_t295, e) {
43278
43278
  var _this190;
43279
43279
  _classCallCheck(this, t);
43280
- _this190 = _callSuper(this, t, [_t295, e]), _this190.change$ = createBehaviorEmitter([]), _this190.entries = /* @__PURE__ */new Map(), _this190.chapterScroll = _this190.registry.getPlugin(se$1.id), _this190.chapterManager = _this190.registry.getPlugin(Zt.id), _this190.documentManager = _this190.registry.getPlugin(DocumentManagerPlugin.id);
43280
+ _this190 = _callSuper(this, t, [_t295, e]), _this190.change$ = createBehaviorEmitter([]), _this190.entries = /* @__PURE__ */new Map(), _this190.chapterScroll = _this190.registry.getPlugin(se.id), _this190.chapterManager = _this190.registry.getPlugin(Zt.id), _this190.documentManager = _this190.registry.getPlugin(DocumentManagerPlugin.id);
43281
43281
  return _this190;
43282
43282
  }
43283
43283
  _inherits(t, _BasePlugin23);
@@ -43596,8 +43596,8 @@ function de$1(_ref406) {
43596
43596
  return document.removeEventListener("mousedown", t);
43597
43597
  };
43598
43598
  }, [P]), !f || 0 === v.length || !n || !h) return null;
43599
- var C = l / n,
43600
- y$1 = d / h,
43599
+ var y$1 = l / n,
43600
+ C = d / h,
43601
43601
  M = (_ref407 = null == u ? void 0 : u.iconSize) !== null && _ref407 !== void 0 ? _ref407 : 16;
43602
43602
  return u$1("div", {
43603
43603
  className: p,
@@ -43634,8 +43634,8 @@ function de$1(_ref406) {
43634
43634
  }({
43635
43635
  markerPdf: i,
43636
43636
  lineRects: r,
43637
- sx: C,
43638
- sy: y$1,
43637
+ sx: y$1,
43638
+ sy: C,
43639
43639
  cssPageWidth: l,
43640
43640
  iconSize: M
43641
43641
  }),
@@ -43761,7 +43761,59 @@ function ce$1(t) {
43761
43761
  function ue$1(t, e) {
43762
43762
  t.wait(e, function () {});
43763
43763
  }
43764
- function pe$1(t, e, a) {
43764
+ function pe$1(_x66) {
43765
+ return _pe$.apply(this, arguments);
43766
+ }
43767
+ function _pe$() {
43768
+ _pe$ = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee169(t) {
43769
+ var e, _navigator$clipboard, _t784, a, _t785, _t786;
43770
+ return _regenerator().w(function (_context176) {
43771
+ while (1) switch (_context176.p = _context176.n) {
43772
+ case 0:
43773
+ e = t.trim();
43774
+ if (e) {
43775
+ _context176.n = 1;
43776
+ break;
43777
+ }
43778
+ return _context176.a(2, false);
43779
+ case 1:
43780
+ _context176.p = 1;
43781
+ if (!("undefined" != typeof navigator && (_navigator$clipboard = navigator.clipboard) !== null && _navigator$clipboard !== void 0 && _navigator$clipboard.writeText)) {
43782
+ _context176.n = 3;
43783
+ break;
43784
+ }
43785
+ _context176.n = 2;
43786
+ return navigator.clipboard.writeText(e);
43787
+ case 2:
43788
+ return _context176.a(2, !0);
43789
+ case 3:
43790
+ _context176.n = 5;
43791
+ break;
43792
+ case 4:
43793
+ _context176.p = 4;
43794
+ _t785 = _context176.v;
43795
+ case 5:
43796
+ if (!("undefined" == typeof document)) {
43797
+ _context176.n = 6;
43798
+ break;
43799
+ }
43800
+ return _context176.a(2, false);
43801
+ case 6:
43802
+ _context176.p = 6;
43803
+ _t784 = document.createElement("textarea");
43804
+ _t784.value = e, _t784.setAttribute("readonly", ""), _t784.style.position = "fixed", _t784.style.left = "-9999px", document.body.appendChild(_t784), _t784.select();
43805
+ a = document.execCommand("copy");
43806
+ return _context176.a(2, (document.body.removeChild(_t784), a));
43807
+ case 7:
43808
+ _context176.p = 7;
43809
+ _t786 = _context176.v;
43810
+ return _context176.a(2, false);
43811
+ }
43812
+ }, _callee169, null, [[6, 7], [1, 4]]);
43813
+ }));
43814
+ return _pe$.apply(this, arguments);
43815
+ }
43816
+ function ge$1(t, e, a) {
43765
43817
  return {
43766
43818
  chapterId: t.chapterId,
43767
43819
  localPageIndex: t.localPageIndex,
@@ -43771,22 +43823,22 @@ function pe$1(t, e, a) {
43771
43823
  selectedText: a
43772
43824
  };
43773
43825
  }
43774
- var ge$1 = {
43826
+ var fe$1 = {
43775
43827
  position: "relative",
43776
43828
  height: "100%",
43777
43829
  width: "100%"
43778
43830
  },
43779
- fe$1 = {
43831
+ me$1 = {
43780
43832
  userSelect: "none",
43781
43833
  WebkitUserSelect: "none"
43782
43834
  };
43783
- function me$1() {
43835
+ function ve$1() {
43784
43836
  var _window$getSelection;
43785
43837
  "undefined" != typeof window && ((_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.removeAllRanges());
43786
43838
  }
43787
- var ve$1 = "note",
43788
- be$1 = {
43789
- id: ve$1,
43839
+ var be$1 = "note",
43840
+ Pe$1 = {
43841
+ id: be$1,
43790
43842
  name: "Note Plugin",
43791
43843
  version: "0.1.0",
43792
43844
  provides: ["note"],
@@ -43813,10 +43865,10 @@ var ve$1 = "note",
43813
43865
  markerSize: 18
43814
43866
  }
43815
43867
  };
43816
- var Pe$1 = {
43868
+ var we$1 = {
43817
43869
  kind: "first-wins"
43818
43870
  };
43819
- function we$1(t, e, a) {
43871
+ function Ie(t, e, a) {
43820
43872
  if (1 === e.length) return e[0].chapterId;
43821
43873
  switch (a.kind) {
43822
43874
  case "first-wins":
@@ -43835,9 +43887,9 @@ function we$1(t, e, a) {
43835
43887
  return a.resolve(t, e);
43836
43888
  }
43837
43889
  }
43838
- var Ie = /*#__PURE__*/function () {
43839
- function Ie(t) {
43840
- _classCallCheck(this, Ie);
43890
+ var ye$1 = /*#__PURE__*/function () {
43891
+ function ye(t) {
43892
+ _classCallCheck(this, ye);
43841
43893
  this._pages = t, this._byChapter = /* @__PURE__ */new Map(), this._byGlobalNumber = /* @__PURE__ */new Map();
43842
43894
  var _iterator256 = _createForOfIteratorHelper(t),
43843
43895
  _step256;
@@ -43854,7 +43906,7 @@ var Ie = /*#__PURE__*/function () {
43854
43906
  _iterator256.f();
43855
43907
  }
43856
43908
  }
43857
- return _createClass(Ie, [{
43909
+ return _createClass(ye, [{
43858
43910
  key: "totalPages",
43859
43911
  get: function get() {
43860
43912
  return this._pages.length;
@@ -43901,9 +43953,9 @@ var Ie = /*#__PURE__*/function () {
43901
43953
  }]);
43902
43954
  }();
43903
43955
  function Ce(t) {
43904
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Pe$1;
43956
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : we$1;
43905
43957
  var a = function (t) {
43906
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Pe$1;
43958
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : we$1;
43907
43959
  var a = /* @__PURE__ */new Map();
43908
43960
  var _iterator257 = _createForOfIteratorHelper(t.chapters),
43909
43961
  _step257;
@@ -43931,7 +43983,7 @@ function Ce(t) {
43931
43983
  var _step258$value = _slicedToArray(_step258.value, 2),
43932
43984
  _r30 = _step258$value[0],
43933
43985
  _i62 = _step258$value[1];
43934
- s.set(_r30, we$1(_r30, _i62, e));
43986
+ s.set(_r30, Ie(_r30, _i62, e));
43935
43987
  }
43936
43988
  } catch (err) {
43937
43989
  _iterator258.e(err);
@@ -43983,13 +44035,13 @@ function Ce(t) {
43983
44035
  } finally {
43984
44036
  _iterator260.f();
43985
44037
  }
43986
- return new Ie(i);
44038
+ return new ye$1(i);
43987
44039
  }
43988
- var ye = /*#__PURE__*/function (_BasePlugin24) {
44040
+ var Me = /*#__PURE__*/function (_BasePlugin24) {
43989
44041
  function t(_t320, e) {
43990
44042
  var _this193;
43991
44043
  _classCallCheck(this, t);
43992
- _this193 = _callSuper(this, t, [_t320, e]), _this193.statusChange$ = createBehaviorEmitter(), _this193.manifestChange$ = createEmitter(), _this193.overlapStrategy = Pe$1, _this193.chapterStatus = /* @__PURE__ */new Map(), _this193.chapterLastUsed = /* @__PURE__ */new Map(), _this193.passwordAttempts = /* @__PURE__ */new Map(), _this193.pendingLoadPromises = /* @__PURE__ */new Map(), _this193.unloadTimer = null, _this193.documentManagerUnsubs = [], _this193.documentManager = _this193.registry.getPlugin(DocumentManagerPlugin.id);
44044
+ _this193 = _callSuper(this, t, [_t320, e]), _this193.statusChange$ = createBehaviorEmitter(), _this193.manifestChange$ = createEmitter(), _this193.overlapStrategy = we$1, _this193.chapterStatus = /* @__PURE__ */new Map(), _this193.chapterLastUsed = /* @__PURE__ */new Map(), _this193.passwordAttempts = /* @__PURE__ */new Map(), _this193.pendingLoadPromises = /* @__PURE__ */new Map(), _this193.unloadTimer = null, _this193.documentManagerUnsubs = [], _this193.documentManager = _this193.registry.getPlugin(DocumentManagerPlugin.id);
43993
44045
  return _this193;
43994
44046
  }
43995
44047
  _inherits(t, _BasePlugin24);
@@ -44003,7 +44055,7 @@ var ye = /*#__PURE__*/function (_BasePlugin24) {
44003
44055
  return _regenerator().w(function (_context83) {
44004
44056
  while (1) switch (_context83.n) {
44005
44057
  case 0:
44006
- if (this.config = _t321, this.passwordProvider = _t321.passwordProvider, this.overlapStrategy = (_t321$overlapStrategy = _t321.overlapStrategy) !== null && _t321$overlapStrategy !== void 0 ? _t321$overlapStrategy : Pe$1, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t322) {
44058
+ if (this.config = _t321, this.passwordProvider = _t321.passwordProvider, this.overlapStrategy = (_t321$overlapStrategy = _t321.overlapStrategy) !== null && _t321$overlapStrategy !== void 0 ? _t321$overlapStrategy : we$1, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t322) {
44007
44059
  _this194.isOwnedChapter(_t322.id) && (_this194.passwordAttempts.delete(_t322.id), _this194.updateStatus(_t322.id, "loaded"));
44008
44060
  }), this.documentManager.provides().onDocumentClosed(function (_t323) {
44009
44061
  _this194.isOwnedChapter(_t323) && _this194.updateStatus(_t323, "closed");
@@ -44020,7 +44072,7 @@ var ye = /*#__PURE__*/function (_BasePlugin24) {
44020
44072
  }
44021
44073
  }, _callee78, this);
44022
44074
  }));
44023
- function initialize(_x66) {
44075
+ function initialize(_x67) {
44024
44076
  return _initialize25.apply(this, arguments);
44025
44077
  }
44026
44078
  return initialize;
@@ -44342,7 +44394,7 @@ var ye = /*#__PURE__*/function (_BasePlugin24) {
44342
44394
  }
44343
44395
  }, _callee79, this);
44344
44396
  }));
44345
- function resolvePdfPayload(_x67) {
44397
+ function resolvePdfPayload(_x68) {
44346
44398
  return _resolvePdfPayload6.apply(this, arguments);
44347
44399
  }
44348
44400
  return resolvePdfPayload;
@@ -44410,7 +44462,7 @@ var ye = /*#__PURE__*/function (_BasePlugin24) {
44410
44462
  }
44411
44463
  }, _callee80, this, [[1, 5]]);
44412
44464
  }));
44413
- function startLoad(_x68) {
44465
+ function startLoad(_x69) {
44414
44466
  return _startLoad6.apply(this, arguments);
44415
44467
  }
44416
44468
  return startLoad;
@@ -44489,7 +44541,7 @@ var ye = /*#__PURE__*/function (_BasePlugin24) {
44489
44541
  }
44490
44542
  }, _callee81, this, [[4, 6]]);
44491
44543
  }));
44492
- function handleDocumentError(_x69, _x70, _x71) {
44544
+ function handleDocumentError(_x70, _x71, _x72) {
44493
44545
  return _handleDocumentError6.apply(this, arguments);
44494
44546
  }
44495
44547
  return handleDocumentError;
@@ -44521,12 +44573,12 @@ var ye = /*#__PURE__*/function (_BasePlugin24) {
44521
44573
  }
44522
44574
  }]);
44523
44575
  }(BasePlugin);
44524
- ye.id = "chapter-manager";
44525
- var Me = ye;
44526
- var Se = {
44576
+ Me.id = "chapter-manager";
44577
+ var Se = Me;
44578
+ var xe = {
44527
44579
  kind: "first-wins"
44528
44580
  };
44529
- function xe(t, e, a) {
44581
+ function ke(t, e, a) {
44530
44582
  if (1 === e.length) return e[0].chapterId;
44531
44583
  switch (a.kind) {
44532
44584
  case "first-wins":
@@ -44545,9 +44597,9 @@ function xe(t, e, a) {
44545
44597
  return a.resolve(t, e);
44546
44598
  }
44547
44599
  }
44548
- var ke = /*#__PURE__*/function () {
44549
- function ke(t) {
44550
- _classCallCheck(this, ke);
44600
+ var Le = /*#__PURE__*/function () {
44601
+ function Le(t) {
44602
+ _classCallCheck(this, Le);
44551
44603
  this._pages = t, this._byChapter = /* @__PURE__ */new Map(), this._byGlobalNumber = /* @__PURE__ */new Map();
44552
44604
  var _iterator271 = _createForOfIteratorHelper(t),
44553
44605
  _step271;
@@ -44564,7 +44616,7 @@ var ke = /*#__PURE__*/function () {
44564
44616
  _iterator271.f();
44565
44617
  }
44566
44618
  }
44567
- return _createClass(ke, [{
44619
+ return _createClass(Le, [{
44568
44620
  key: "totalPages",
44569
44621
  get: function get() {
44570
44622
  return this._pages.length;
@@ -44610,10 +44662,10 @@ var ke = /*#__PURE__*/function () {
44610
44662
  }
44611
44663
  }]);
44612
44664
  }();
44613
- function Le(t) {
44614
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Se;
44665
+ function $e(t) {
44666
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : xe;
44615
44667
  var a = function (t) {
44616
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Se;
44668
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : xe;
44617
44669
  var a = /* @__PURE__ */new Map();
44618
44670
  var _iterator272 = _createForOfIteratorHelper(t.chapters),
44619
44671
  _step272;
@@ -44641,7 +44693,7 @@ function Le(t) {
44641
44693
  var _step273$value = _slicedToArray(_step273.value, 2),
44642
44694
  _r34 = _step273$value[0],
44643
44695
  _i63 = _step273$value[1];
44644
- s.set(_r34, xe(_r34, _i63, e));
44696
+ s.set(_r34, ke(_r34, _i63, e));
44645
44697
  }
44646
44698
  } catch (err) {
44647
44699
  _iterator273.e(err);
@@ -44693,13 +44745,13 @@ function Le(t) {
44693
44745
  } finally {
44694
44746
  _iterator275.f();
44695
44747
  }
44696
- return new ke(i);
44748
+ return new Le(i);
44697
44749
  }
44698
- var $e = /*#__PURE__*/function (_BasePlugin25) {
44750
+ var Te = /*#__PURE__*/function (_BasePlugin25) {
44699
44751
  function t(_t364, e) {
44700
44752
  var _this199;
44701
44753
  _classCallCheck(this, t);
44702
- _this199 = _callSuper(this, t, [_t364, e]), _this199.statusChange$ = createBehaviorEmitter(), _this199.manifestChange$ = createEmitter(), _this199.overlapStrategy = Se, _this199.chapterStatus = /* @__PURE__ */new Map(), _this199.chapterLastUsed = /* @__PURE__ */new Map(), _this199.passwordAttempts = /* @__PURE__ */new Map(), _this199.pendingLoadPromises = /* @__PURE__ */new Map(), _this199.unloadTimer = null, _this199.documentManagerUnsubs = [], _this199.documentManager = _this199.registry.getPlugin(DocumentManagerPlugin.id);
44754
+ _this199 = _callSuper(this, t, [_t364, e]), _this199.statusChange$ = createBehaviorEmitter(), _this199.manifestChange$ = createEmitter(), _this199.overlapStrategy = xe, _this199.chapterStatus = /* @__PURE__ */new Map(), _this199.chapterLastUsed = /* @__PURE__ */new Map(), _this199.passwordAttempts = /* @__PURE__ */new Map(), _this199.pendingLoadPromises = /* @__PURE__ */new Map(), _this199.unloadTimer = null, _this199.documentManagerUnsubs = [], _this199.documentManager = _this199.registry.getPlugin(DocumentManagerPlugin.id);
44703
44755
  return _this199;
44704
44756
  }
44705
44757
  _inherits(t, _BasePlugin25);
@@ -44713,7 +44765,7 @@ var $e = /*#__PURE__*/function (_BasePlugin25) {
44713
44765
  return _regenerator().w(function (_context87) {
44714
44766
  while (1) switch (_context87.n) {
44715
44767
  case 0:
44716
- if (this.config = _t365, this.passwordProvider = _t365.passwordProvider, this.overlapStrategy = (_t365$overlapStrategy = _t365.overlapStrategy) !== null && _t365$overlapStrategy !== void 0 ? _t365$overlapStrategy : Se, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t366) {
44768
+ if (this.config = _t365, this.passwordProvider = _t365.passwordProvider, this.overlapStrategy = (_t365$overlapStrategy = _t365.overlapStrategy) !== null && _t365$overlapStrategy !== void 0 ? _t365$overlapStrategy : xe, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t366) {
44717
44769
  _this200.isOwnedChapter(_t366.id) && (_this200.passwordAttempts.delete(_t366.id), _this200.updateStatus(_t366.id, "loaded"));
44718
44770
  }), this.documentManager.provides().onDocumentClosed(function (_t367) {
44719
44771
  _this200.isOwnedChapter(_t367) && _this200.updateStatus(_t367, "closed");
@@ -44730,7 +44782,7 @@ var $e = /*#__PURE__*/function (_BasePlugin25) {
44730
44782
  }
44731
44783
  }, _callee82, this);
44732
44784
  }));
44733
- function initialize(_x72) {
44785
+ function initialize(_x73) {
44734
44786
  return _initialize26.apply(this, arguments);
44735
44787
  }
44736
44788
  return initialize;
@@ -44853,7 +44905,7 @@ var $e = /*#__PURE__*/function (_BasePlugin25) {
44853
44905
  } finally {
44854
44906
  _iterator280.f();
44855
44907
  }
44856
- this.manifest = e, this.virtualPageMap = Le(e, this.overlapStrategy), this.manifestChange$.emit({
44908
+ this.manifest = e, this.virtualPageMap = $e(e, this.overlapStrategy), this.manifestChange$.emit({
44857
44909
  manifest: e,
44858
44910
  map: this.virtualPageMap
44859
44911
  }), this.eagerPrefetchFromManifest();
@@ -45052,7 +45104,7 @@ var $e = /*#__PURE__*/function (_BasePlugin25) {
45052
45104
  }
45053
45105
  }, _callee83, this);
45054
45106
  }));
45055
- function resolvePdfPayload(_x73) {
45107
+ function resolvePdfPayload(_x74) {
45056
45108
  return _resolvePdfPayload7.apply(this, arguments);
45057
45109
  }
45058
45110
  return resolvePdfPayload;
@@ -45120,7 +45172,7 @@ var $e = /*#__PURE__*/function (_BasePlugin25) {
45120
45172
  }
45121
45173
  }, _callee84, this, [[1, 5]]);
45122
45174
  }));
45123
- function startLoad(_x74) {
45175
+ function startLoad(_x75) {
45124
45176
  return _startLoad7.apply(this, arguments);
45125
45177
  }
45126
45178
  return startLoad;
@@ -45199,7 +45251,7 @@ var $e = /*#__PURE__*/function (_BasePlugin25) {
45199
45251
  }
45200
45252
  }, _callee85, this, [[4, 6]]);
45201
45253
  }));
45202
- function handleDocumentError(_x75, _x76, _x77) {
45254
+ function handleDocumentError(_x76, _x77, _x78) {
45203
45255
  return _handleDocumentError7.apply(this, arguments);
45204
45256
  }
45205
45257
  return handleDocumentError;
@@ -45231,9 +45283,9 @@ var $e = /*#__PURE__*/function (_BasePlugin25) {
45231
45283
  }
45232
45284
  }]);
45233
45285
  }(BasePlugin);
45234
- $e.id = "chapter-manager";
45235
- var Te = $e;
45236
- function De(t, e) {
45286
+ Te.id = "chapter-manager";
45287
+ var De = Te;
45288
+ function ze(t, e) {
45237
45289
  if (t === e) return true;
45238
45290
  if (t.totalHeight !== e.totalHeight || t.totalWidth !== e.totalWidth || t.pageGap !== e.pageGap || t.items.length !== e.items.length) return false;
45239
45291
  for (var a = 0; a < t.items.length; a++) {
@@ -45243,15 +45295,15 @@ function De(t, e) {
45243
45295
  }
45244
45296
  return true;
45245
45297
  }
45246
- var ze = /*#__PURE__*/function (_BasePlugin26) {
45247
- function ze(t, e) {
45298
+ var Ge = /*#__PURE__*/function (_BasePlugin26) {
45299
+ function Ge(t, e) {
45248
45300
  var _this205;
45249
- _classCallCheck(this, ze);
45250
- _this205 = _callSuper(this, ze, [t, e]), _this205.layoutChange$ = createBehaviorEmitter(void 0, De), _this205.visibleChange$ = createBehaviorEmitter(), _this205.virtualPageMap = null, _this205.pageSizes = /* @__PURE__ */new Map(), _this205.offsets = [], _this205.totalHeight = 0, _this205.totalWidth = 0, _this205.viewportEl = null, _this205.viewportObservers = null, _this205.currentVisible = [], _this205.currentGlobalPageIndex = 0, _this205.chapterManagerUnsubs = [], _this205.chapterManager = _this205.registry.getPlugin(Te.id), _this205.documentManager = _this205.registry.getPlugin(DocumentManagerPlugin.id);
45301
+ _classCallCheck(this, Ge);
45302
+ _this205 = _callSuper(this, Ge, [t, e]), _this205.layoutChange$ = createBehaviorEmitter(void 0, ze), _this205.visibleChange$ = createBehaviorEmitter(), _this205.virtualPageMap = null, _this205.pageSizes = /* @__PURE__ */new Map(), _this205.offsets = [], _this205.totalHeight = 0, _this205.totalWidth = 0, _this205.viewportEl = null, _this205.viewportObservers = null, _this205.currentVisible = [], _this205.currentGlobalPageIndex = 0, _this205.chapterManagerUnsubs = [], _this205.chapterManager = _this205.registry.getPlugin(De.id), _this205.documentManager = _this205.registry.getPlugin(DocumentManagerPlugin.id);
45251
45303
  return _this205;
45252
45304
  }
45253
- _inherits(ze, _BasePlugin26);
45254
- return _createClass(ze, [{
45305
+ _inherits(Ge, _BasePlugin26);
45306
+ return _createClass(Ge, [{
45255
45307
  key: "initialize",
45256
45308
  value: function () {
45257
45309
  var _initialize27 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee86(t) {
@@ -45279,7 +45331,7 @@ var ze = /*#__PURE__*/function (_BasePlugin26) {
45279
45331
  }
45280
45332
  }, _callee86, this);
45281
45333
  }));
45282
- function initialize(_x78) {
45334
+ function initialize(_x79) {
45283
45335
  return _initialize27.apply(this, arguments);
45284
45336
  }
45285
45337
  return initialize;
@@ -45374,7 +45426,7 @@ var ze = /*#__PURE__*/function (_BasePlugin26) {
45374
45426
  key: "destroy",
45375
45427
  value: function destroy() {
45376
45428
  var t;
45377
- _superPropGet(ze, "destroy", this, 3)([]);
45429
+ _superPropGet(Ge, "destroy", this, 3)([]);
45378
45430
  var _iterator287 = _createForOfIteratorHelper(this.chapterManagerUnsubs),
45379
45431
  _step287;
45380
45432
  try {
@@ -45661,13 +45713,13 @@ var ze = /*#__PURE__*/function (_BasePlugin26) {
45661
45713
  }
45662
45714
  }]);
45663
45715
  }(BasePlugin);
45664
- ze.id = "chapter-scroll";
45665
- var Ge = ze;
45666
- var Oe = /*#__PURE__*/function (_BasePlugin27) {
45716
+ Ge.id = "chapter-scroll";
45717
+ var Oe = Ge;
45718
+ var Ae = /*#__PURE__*/function (_BasePlugin27) {
45667
45719
  function t(_t411, e) {
45668
45720
  var _this210;
45669
45721
  _classCallCheck(this, t);
45670
- _this210 = _callSuper(this, t, [_t411, e]), _this210.notesChange$ = createBehaviorEmitter([]), _this210.noteActivated$ = createEmitter(), _this210.notes = /* @__PURE__ */new Map(), _this210.chapterScroll = _this210.registry.getPlugin(Ge.id), _this210.chapterManager = _this210.registry.getPlugin(Me.id), _this210.documentManager = _this210.registry.getPlugin(DocumentManagerPlugin.id);
45722
+ _this210 = _callSuper(this, t, [_t411, e]), _this210.notesChange$ = createBehaviorEmitter([]), _this210.noteActivated$ = createEmitter(), _this210.notes = /* @__PURE__ */new Map(), _this210.chapterScroll = _this210.registry.getPlugin(Oe.id), _this210.chapterManager = _this210.registry.getPlugin(Se.id), _this210.documentManager = _this210.registry.getPlugin(DocumentManagerPlugin.id);
45671
45723
  return _this210;
45672
45724
  }
45673
45725
  _inherits(t, _BasePlugin27);
@@ -45711,7 +45763,7 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
45711
45763
  }
45712
45764
  }, _callee87, this, [[1, 3]]);
45713
45765
  }));
45714
- function initialize(_x79) {
45766
+ function initialize(_x80) {
45715
45767
  return _initialize28.apply(this, arguments);
45716
45768
  }
45717
45769
  return initialize;
@@ -45834,7 +45886,7 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
45834
45886
  globalPageNumber: _t428.globalPageNumber,
45835
45887
  globalPageIndex: _t428.globalPageIndex,
45836
45888
  rectsPdfCoord: _t428.rectsPdfCoord,
45837
- endAnchor: Ne(_t428.rectsPdfCoord),
45889
+ endAnchor: Ve(_t428.rectsPdfCoord),
45838
45890
  selectedText: _t428.selectedText,
45839
45891
  content: _t428.content
45840
45892
  };
@@ -45872,7 +45924,7 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
45872
45924
  }
45873
45925
  }, _callee88);
45874
45926
  }));
45875
- function complete(_x81) {
45927
+ function complete(_x82) {
45876
45928
  return _complete2.apply(this, arguments);
45877
45929
  }
45878
45930
  return complete;
@@ -45881,7 +45933,7 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
45881
45933
  }
45882
45934
  }, _callee89, this);
45883
45935
  }));
45884
- function requestCreateFromSelection(_x80) {
45936
+ function requestCreateFromSelection(_x81) {
45885
45937
  return _requestCreateFromSelection2.apply(this, arguments);
45886
45938
  }
45887
45939
  return requestCreateFromSelection;
@@ -45933,7 +45985,7 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
45933
45985
  }
45934
45986
  }, _callee90, this, [[3, 5]]);
45935
45987
  }));
45936
- function createNoteFromSelection(_x82) {
45988
+ function createNoteFromSelection(_x83) {
45937
45989
  return _createNoteFromSelection2.apply(this, arguments);
45938
45990
  }
45939
45991
  return createNoteFromSelection;
@@ -45967,7 +46019,7 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
45967
46019
  }
45968
46020
  }, _callee91, this, [[1, 3]]);
45969
46021
  }));
45970
- function deleteNote(_x83) {
46022
+ function deleteNote(_x84) {
45971
46023
  return _deleteNote2.apply(this, arguments);
45972
46024
  }
45973
46025
  return deleteNote;
@@ -46007,7 +46059,7 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
46007
46059
  }
46008
46060
  }, _callee92, this, [[2, 4]]);
46009
46061
  }));
46010
- function updateNoteContent(_x84, _x85) {
46062
+ function updateNoteContent(_x85, _x86) {
46011
46063
  return _updateNoteContent2.apply(this, arguments);
46012
46064
  }
46013
46065
  return updateNoteContent;
@@ -46051,7 +46103,7 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
46051
46103
  }
46052
46104
  }, _callee93, this);
46053
46105
  }));
46054
- function scrollToNote(_x86) {
46106
+ function scrollToNote(_x87) {
46055
46107
  return _scrollToNote2.apply(this, arguments);
46056
46108
  }
46057
46109
  return scrollToNote;
@@ -46077,28 +46129,28 @@ var Oe = /*#__PURE__*/function (_BasePlugin27) {
46077
46129
  }
46078
46130
  }]);
46079
46131
  }(BasePlugin);
46080
- Oe.id = "note";
46081
- var Ae = Oe;
46082
- function Ne(t) {
46132
+ Ae.id = "note";
46133
+ var Ne = Ae;
46134
+ function Ve(t) {
46083
46135
  var e = t[t.length - 1];
46084
46136
  return {
46085
46137
  x: e.origin.x + e.size.width,
46086
46138
  y: e.origin.y + e.size.height
46087
46139
  };
46088
46140
  }
46089
- var Ve = {
46090
- manifest: be$1,
46141
+ var Ee = {
46142
+ manifest: Pe$1,
46091
46143
  create: function create(t) {
46092
- return new Ae(ve$1, t);
46144
+ return new Ne(be$1, t);
46093
46145
  },
46094
46146
  reducer: function reducer(t) {
46095
46147
  return t;
46096
46148
  },
46097
46149
  initialState: {}
46098
46150
  },
46099
- Ee = "paragraph-bookmark",
46100
- Re = {
46101
- id: Ee,
46151
+ Re = "paragraph-bookmark",
46152
+ Fe = {
46153
+ id: Re,
46102
46154
  name: "Paragraph Bookmark Plugin",
46103
46155
  version: "0.1.0",
46104
46156
  provides: ["paragraph-bookmark"],
@@ -46106,10 +46158,10 @@ var Ve = {
46106
46158
  optional: [],
46107
46159
  defaultConfig: {}
46108
46160
  };
46109
- var Fe = {
46161
+ var Ue = {
46110
46162
  kind: "first-wins"
46111
46163
  };
46112
- function Ue(t, e, a) {
46164
+ function _e(t, e, a) {
46113
46165
  if (1 === e.length) return e[0].chapterId;
46114
46166
  switch (a.kind) {
46115
46167
  case "first-wins":
@@ -46128,9 +46180,9 @@ function Ue(t, e, a) {
46128
46180
  return a.resolve(t, e);
46129
46181
  }
46130
46182
  }
46131
- var _e = /*#__PURE__*/function () {
46132
- function _e(t) {
46133
- _classCallCheck(this, _e);
46183
+ var qe = /*#__PURE__*/function () {
46184
+ function qe(t) {
46185
+ _classCallCheck(this, qe);
46134
46186
  this._pages = t, this._byChapter = /* @__PURE__ */new Map(), this._byGlobalNumber = /* @__PURE__ */new Map();
46135
46187
  var _iterator294 = _createForOfIteratorHelper(t),
46136
46188
  _step294;
@@ -46147,7 +46199,7 @@ var _e = /*#__PURE__*/function () {
46147
46199
  _iterator294.f();
46148
46200
  }
46149
46201
  }
46150
- return _createClass(_e, [{
46202
+ return _createClass(qe, [{
46151
46203
  key: "totalPages",
46152
46204
  get: function get() {
46153
46205
  return this._pages.length;
@@ -46193,10 +46245,10 @@ var _e = /*#__PURE__*/function () {
46193
46245
  }
46194
46246
  }]);
46195
46247
  }();
46196
- function qe(t) {
46197
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Fe;
46248
+ function We(t) {
46249
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ue;
46198
46250
  var a = function (t) {
46199
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Fe;
46251
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ue;
46200
46252
  var a = /* @__PURE__ */new Map();
46201
46253
  var _iterator295 = _createForOfIteratorHelper(t.chapters),
46202
46254
  _step295;
@@ -46224,7 +46276,7 @@ function qe(t) {
46224
46276
  var _step296$value = _slicedToArray(_step296.value, 2),
46225
46277
  _r39 = _step296$value[0],
46226
46278
  _i64 = _step296$value[1];
46227
- s.set(_r39, Ue(_r39, _i64, e));
46279
+ s.set(_r39, _e(_r39, _i64, e));
46228
46280
  }
46229
46281
  } catch (err) {
46230
46282
  _iterator296.e(err);
@@ -46276,13 +46328,13 @@ function qe(t) {
46276
46328
  } finally {
46277
46329
  _iterator298.f();
46278
46330
  }
46279
- return new _e(i);
46331
+ return new qe(i);
46280
46332
  }
46281
- var We = /*#__PURE__*/function (_BasePlugin28) {
46333
+ var He = /*#__PURE__*/function (_BasePlugin28) {
46282
46334
  function t(_t441, e) {
46283
46335
  var _this213;
46284
46336
  _classCallCheck(this, t);
46285
- _this213 = _callSuper(this, t, [_t441, e]), _this213.statusChange$ = createBehaviorEmitter(), _this213.manifestChange$ = createEmitter(), _this213.overlapStrategy = Fe, _this213.chapterStatus = /* @__PURE__ */new Map(), _this213.chapterLastUsed = /* @__PURE__ */new Map(), _this213.passwordAttempts = /* @__PURE__ */new Map(), _this213.pendingLoadPromises = /* @__PURE__ */new Map(), _this213.unloadTimer = null, _this213.documentManagerUnsubs = [], _this213.documentManager = _this213.registry.getPlugin(DocumentManagerPlugin.id);
46337
+ _this213 = _callSuper(this, t, [_t441, e]), _this213.statusChange$ = createBehaviorEmitter(), _this213.manifestChange$ = createEmitter(), _this213.overlapStrategy = Ue, _this213.chapterStatus = /* @__PURE__ */new Map(), _this213.chapterLastUsed = /* @__PURE__ */new Map(), _this213.passwordAttempts = /* @__PURE__ */new Map(), _this213.pendingLoadPromises = /* @__PURE__ */new Map(), _this213.unloadTimer = null, _this213.documentManagerUnsubs = [], _this213.documentManager = _this213.registry.getPlugin(DocumentManagerPlugin.id);
46286
46338
  return _this213;
46287
46339
  }
46288
46340
  _inherits(t, _BasePlugin28);
@@ -46296,7 +46348,7 @@ var We = /*#__PURE__*/function (_BasePlugin28) {
46296
46348
  return _regenerator().w(function (_context99) {
46297
46349
  while (1) switch (_context99.n) {
46298
46350
  case 0:
46299
- if (this.config = _t442, this.passwordProvider = _t442.passwordProvider, this.overlapStrategy = (_t442$overlapStrategy = _t442.overlapStrategy) !== null && _t442$overlapStrategy !== void 0 ? _t442$overlapStrategy : Fe, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t443) {
46351
+ if (this.config = _t442, this.passwordProvider = _t442.passwordProvider, this.overlapStrategy = (_t442$overlapStrategy = _t442.overlapStrategy) !== null && _t442$overlapStrategy !== void 0 ? _t442$overlapStrategy : Ue, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t443) {
46300
46352
  _this214.isOwnedChapter(_t443.id) && (_this214.passwordAttempts.delete(_t443.id), _this214.updateStatus(_t443.id, "loaded"));
46301
46353
  }), this.documentManager.provides().onDocumentClosed(function (_t444) {
46302
46354
  _this214.isOwnedChapter(_t444) && _this214.updateStatus(_t444, "closed");
@@ -46313,7 +46365,7 @@ var We = /*#__PURE__*/function (_BasePlugin28) {
46313
46365
  }
46314
46366
  }, _callee94, this);
46315
46367
  }));
46316
- function initialize(_x87) {
46368
+ function initialize(_x88) {
46317
46369
  return _initialize29.apply(this, arguments);
46318
46370
  }
46319
46371
  return initialize;
@@ -46436,7 +46488,7 @@ var We = /*#__PURE__*/function (_BasePlugin28) {
46436
46488
  } finally {
46437
46489
  _iterator303.f();
46438
46490
  }
46439
- this.manifest = e, this.virtualPageMap = qe(e, this.overlapStrategy), this.manifestChange$.emit({
46491
+ this.manifest = e, this.virtualPageMap = We(e, this.overlapStrategy), this.manifestChange$.emit({
46440
46492
  manifest: e,
46441
46493
  map: this.virtualPageMap
46442
46494
  }), this.eagerPrefetchFromManifest();
@@ -46635,7 +46687,7 @@ var We = /*#__PURE__*/function (_BasePlugin28) {
46635
46687
  }
46636
46688
  }, _callee95, this);
46637
46689
  }));
46638
- function resolvePdfPayload(_x88) {
46690
+ function resolvePdfPayload(_x89) {
46639
46691
  return _resolvePdfPayload8.apply(this, arguments);
46640
46692
  }
46641
46693
  return resolvePdfPayload;
@@ -46703,7 +46755,7 @@ var We = /*#__PURE__*/function (_BasePlugin28) {
46703
46755
  }
46704
46756
  }, _callee96, this, [[1, 5]]);
46705
46757
  }));
46706
- function startLoad(_x89) {
46758
+ function startLoad(_x90) {
46707
46759
  return _startLoad8.apply(this, arguments);
46708
46760
  }
46709
46761
  return startLoad;
@@ -46782,7 +46834,7 @@ var We = /*#__PURE__*/function (_BasePlugin28) {
46782
46834
  }
46783
46835
  }, _callee97, this, [[4, 6]]);
46784
46836
  }));
46785
- function handleDocumentError(_x90, _x91, _x92) {
46837
+ function handleDocumentError(_x91, _x92, _x93) {
46786
46838
  return _handleDocumentError8.apply(this, arguments);
46787
46839
  }
46788
46840
  return handleDocumentError;
@@ -46814,12 +46866,12 @@ var We = /*#__PURE__*/function (_BasePlugin28) {
46814
46866
  }
46815
46867
  }]);
46816
46868
  }(BasePlugin);
46817
- We.id = "chapter-manager";
46818
- var He = We;
46819
- var Be = {
46869
+ He.id = "chapter-manager";
46870
+ var Be = He;
46871
+ var je = {
46820
46872
  kind: "first-wins"
46821
46873
  };
46822
- function je(t, e, a) {
46874
+ function Ze(t, e, a) {
46823
46875
  if (1 === e.length) return e[0].chapterId;
46824
46876
  switch (a.kind) {
46825
46877
  case "first-wins":
@@ -46838,9 +46890,9 @@ function je(t, e, a) {
46838
46890
  return a.resolve(t, e);
46839
46891
  }
46840
46892
  }
46841
- var Ze = /*#__PURE__*/function () {
46842
- function Ze(t) {
46843
- _classCallCheck(this, Ze);
46893
+ var Ye = /*#__PURE__*/function () {
46894
+ function Ye(t) {
46895
+ _classCallCheck(this, Ye);
46844
46896
  this._pages = t, this._byChapter = /* @__PURE__ */new Map(), this._byGlobalNumber = /* @__PURE__ */new Map();
46845
46897
  var _iterator309 = _createForOfIteratorHelper(t),
46846
46898
  _step309;
@@ -46857,7 +46909,7 @@ var Ze = /*#__PURE__*/function () {
46857
46909
  _iterator309.f();
46858
46910
  }
46859
46911
  }
46860
- return _createClass(Ze, [{
46912
+ return _createClass(Ye, [{
46861
46913
  key: "totalPages",
46862
46914
  get: function get() {
46863
46915
  return this._pages.length;
@@ -46903,10 +46955,10 @@ var Ze = /*#__PURE__*/function () {
46903
46955
  }
46904
46956
  }]);
46905
46957
  }();
46906
- function Ye(t) {
46907
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Be;
46958
+ function Xe(t) {
46959
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : je;
46908
46960
  var a = function (t) {
46909
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Be;
46961
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : je;
46910
46962
  var a = /* @__PURE__ */new Map();
46911
46963
  var _iterator310 = _createForOfIteratorHelper(t.chapters),
46912
46964
  _step310;
@@ -46934,7 +46986,7 @@ function Ye(t) {
46934
46986
  var _step311$value = _slicedToArray(_step311.value, 2),
46935
46987
  _r43 = _step311$value[0],
46936
46988
  _i65 = _step311$value[1];
46937
- s.set(_r43, je(_r43, _i65, e));
46989
+ s.set(_r43, Ze(_r43, _i65, e));
46938
46990
  }
46939
46991
  } catch (err) {
46940
46992
  _iterator311.e(err);
@@ -46986,13 +47038,13 @@ function Ye(t) {
46986
47038
  } finally {
46987
47039
  _iterator313.f();
46988
47040
  }
46989
- return new Ze(i);
47041
+ return new Ye(i);
46990
47042
  }
46991
- var Xe = /*#__PURE__*/function (_BasePlugin29) {
47043
+ var Ke = /*#__PURE__*/function (_BasePlugin29) {
46992
47044
  function t(_t485, e) {
46993
47045
  var _this219;
46994
47046
  _classCallCheck(this, t);
46995
- _this219 = _callSuper(this, t, [_t485, e]), _this219.statusChange$ = createBehaviorEmitter(), _this219.manifestChange$ = createEmitter(), _this219.overlapStrategy = Be, _this219.chapterStatus = /* @__PURE__ */new Map(), _this219.chapterLastUsed = /* @__PURE__ */new Map(), _this219.passwordAttempts = /* @__PURE__ */new Map(), _this219.pendingLoadPromises = /* @__PURE__ */new Map(), _this219.unloadTimer = null, _this219.documentManagerUnsubs = [], _this219.documentManager = _this219.registry.getPlugin(DocumentManagerPlugin.id);
47047
+ _this219 = _callSuper(this, t, [_t485, e]), _this219.statusChange$ = createBehaviorEmitter(), _this219.manifestChange$ = createEmitter(), _this219.overlapStrategy = je, _this219.chapterStatus = /* @__PURE__ */new Map(), _this219.chapterLastUsed = /* @__PURE__ */new Map(), _this219.passwordAttempts = /* @__PURE__ */new Map(), _this219.pendingLoadPromises = /* @__PURE__ */new Map(), _this219.unloadTimer = null, _this219.documentManagerUnsubs = [], _this219.documentManager = _this219.registry.getPlugin(DocumentManagerPlugin.id);
46996
47048
  return _this219;
46997
47049
  }
46998
47050
  _inherits(t, _BasePlugin29);
@@ -47006,7 +47058,7 @@ var Xe = /*#__PURE__*/function (_BasePlugin29) {
47006
47058
  return _regenerator().w(function (_context103) {
47007
47059
  while (1) switch (_context103.n) {
47008
47060
  case 0:
47009
- if (this.config = _t486, this.passwordProvider = _t486.passwordProvider, this.overlapStrategy = (_t486$overlapStrategy = _t486.overlapStrategy) !== null && _t486$overlapStrategy !== void 0 ? _t486$overlapStrategy : Be, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t487) {
47061
+ if (this.config = _t486, this.passwordProvider = _t486.passwordProvider, this.overlapStrategy = (_t486$overlapStrategy = _t486.overlapStrategy) !== null && _t486$overlapStrategy !== void 0 ? _t486$overlapStrategy : je, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t487) {
47010
47062
  _this220.isOwnedChapter(_t487.id) && (_this220.passwordAttempts.delete(_t487.id), _this220.updateStatus(_t487.id, "loaded"));
47011
47063
  }), this.documentManager.provides().onDocumentClosed(function (_t488) {
47012
47064
  _this220.isOwnedChapter(_t488) && _this220.updateStatus(_t488, "closed");
@@ -47023,7 +47075,7 @@ var Xe = /*#__PURE__*/function (_BasePlugin29) {
47023
47075
  }
47024
47076
  }, _callee98, this);
47025
47077
  }));
47026
- function initialize(_x93) {
47078
+ function initialize(_x94) {
47027
47079
  return _initialize30.apply(this, arguments);
47028
47080
  }
47029
47081
  return initialize;
@@ -47146,7 +47198,7 @@ var Xe = /*#__PURE__*/function (_BasePlugin29) {
47146
47198
  } finally {
47147
47199
  _iterator318.f();
47148
47200
  }
47149
- this.manifest = e, this.virtualPageMap = Ye(e, this.overlapStrategy), this.manifestChange$.emit({
47201
+ this.manifest = e, this.virtualPageMap = Xe(e, this.overlapStrategy), this.manifestChange$.emit({
47150
47202
  manifest: e,
47151
47203
  map: this.virtualPageMap
47152
47204
  }), this.eagerPrefetchFromManifest();
@@ -47345,7 +47397,7 @@ var Xe = /*#__PURE__*/function (_BasePlugin29) {
47345
47397
  }
47346
47398
  }, _callee99, this);
47347
47399
  }));
47348
- function resolvePdfPayload(_x94) {
47400
+ function resolvePdfPayload(_x95) {
47349
47401
  return _resolvePdfPayload9.apply(this, arguments);
47350
47402
  }
47351
47403
  return resolvePdfPayload;
@@ -47413,7 +47465,7 @@ var Xe = /*#__PURE__*/function (_BasePlugin29) {
47413
47465
  }
47414
47466
  }, _callee100, this, [[1, 5]]);
47415
47467
  }));
47416
- function startLoad(_x95) {
47468
+ function startLoad(_x96) {
47417
47469
  return _startLoad9.apply(this, arguments);
47418
47470
  }
47419
47471
  return startLoad;
@@ -47492,7 +47544,7 @@ var Xe = /*#__PURE__*/function (_BasePlugin29) {
47492
47544
  }
47493
47545
  }, _callee101, this, [[4, 6]]);
47494
47546
  }));
47495
- function handleDocumentError(_x96, _x97, _x98) {
47547
+ function handleDocumentError(_x97, _x98, _x99) {
47496
47548
  return _handleDocumentError9.apply(this, arguments);
47497
47549
  }
47498
47550
  return handleDocumentError;
@@ -47524,9 +47576,9 @@ var Xe = /*#__PURE__*/function (_BasePlugin29) {
47524
47576
  }
47525
47577
  }]);
47526
47578
  }(BasePlugin);
47527
- Xe.id = "chapter-manager";
47528
- var Ke = Xe;
47529
- function Qe(t, e) {
47579
+ Ke.id = "chapter-manager";
47580
+ var Qe = Ke;
47581
+ function Je(t, e) {
47530
47582
  if (t === e) return true;
47531
47583
  if (t.totalHeight !== e.totalHeight || t.totalWidth !== e.totalWidth || t.pageGap !== e.pageGap || t.items.length !== e.items.length) return false;
47532
47584
  for (var a = 0; a < t.items.length; a++) {
@@ -47536,15 +47588,15 @@ function Qe(t, e) {
47536
47588
  }
47537
47589
  return true;
47538
47590
  }
47539
- var Je = /*#__PURE__*/function (_BasePlugin30) {
47540
- function Je(t, e) {
47591
+ var ta = /*#__PURE__*/function (_BasePlugin30) {
47592
+ function ta(t, e) {
47541
47593
  var _this225;
47542
- _classCallCheck(this, Je);
47543
- _this225 = _callSuper(this, Je, [t, e]), _this225.layoutChange$ = createBehaviorEmitter(void 0, Qe), _this225.visibleChange$ = createBehaviorEmitter(), _this225.virtualPageMap = null, _this225.pageSizes = /* @__PURE__ */new Map(), _this225.offsets = [], _this225.totalHeight = 0, _this225.totalWidth = 0, _this225.viewportEl = null, _this225.viewportObservers = null, _this225.currentVisible = [], _this225.currentGlobalPageIndex = 0, _this225.chapterManagerUnsubs = [], _this225.chapterManager = _this225.registry.getPlugin(Ke.id), _this225.documentManager = _this225.registry.getPlugin(DocumentManagerPlugin.id);
47594
+ _classCallCheck(this, ta);
47595
+ _this225 = _callSuper(this, ta, [t, e]), _this225.layoutChange$ = createBehaviorEmitter(void 0, Je), _this225.visibleChange$ = createBehaviorEmitter(), _this225.virtualPageMap = null, _this225.pageSizes = /* @__PURE__ */new Map(), _this225.offsets = [], _this225.totalHeight = 0, _this225.totalWidth = 0, _this225.viewportEl = null, _this225.viewportObservers = null, _this225.currentVisible = [], _this225.currentGlobalPageIndex = 0, _this225.chapterManagerUnsubs = [], _this225.chapterManager = _this225.registry.getPlugin(Qe.id), _this225.documentManager = _this225.registry.getPlugin(DocumentManagerPlugin.id);
47544
47596
  return _this225;
47545
47597
  }
47546
- _inherits(Je, _BasePlugin30);
47547
- return _createClass(Je, [{
47598
+ _inherits(ta, _BasePlugin30);
47599
+ return _createClass(ta, [{
47548
47600
  key: "initialize",
47549
47601
  value: function () {
47550
47602
  var _initialize31 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee102(t) {
@@ -47572,7 +47624,7 @@ var Je = /*#__PURE__*/function (_BasePlugin30) {
47572
47624
  }
47573
47625
  }, _callee102, this);
47574
47626
  }));
47575
- function initialize(_x99) {
47627
+ function initialize(_x100) {
47576
47628
  return _initialize31.apply(this, arguments);
47577
47629
  }
47578
47630
  return initialize;
@@ -47667,7 +47719,7 @@ var Je = /*#__PURE__*/function (_BasePlugin30) {
47667
47719
  key: "destroy",
47668
47720
  value: function destroy() {
47669
47721
  var t;
47670
- _superPropGet(Je, "destroy", this, 3)([]);
47722
+ _superPropGet(ta, "destroy", this, 3)([]);
47671
47723
  var _iterator325 = _createForOfIteratorHelper(this.chapterManagerUnsubs),
47672
47724
  _step325;
47673
47725
  try {
@@ -47954,9 +48006,9 @@ var Je = /*#__PURE__*/function (_BasePlugin30) {
47954
48006
  }
47955
48007
  }]);
47956
48008
  }(BasePlugin);
47957
- Je.id = "chapter-scroll";
47958
- var ta = Je;
47959
- function ea(t) {
48009
+ ta.id = "chapter-scroll";
48010
+ var ea = ta;
48011
+ function aa(t) {
47960
48012
  if (0 === t.length) throw new Error("unionRects: empty rects");
47961
48013
  var e = 1 / 0,
47962
48014
  a = 1 / 0,
@@ -47985,14 +48037,14 @@ function ea(t) {
47985
48037
  }
47986
48038
  };
47987
48039
  }
47988
- function aa(t) {
48040
+ function sa(t) {
47989
48041
  var e = t[t.length - 1];
47990
48042
  return {
47991
48043
  x: e.origin.x + e.size.width,
47992
48044
  y: e.origin.y + e.size.height
47993
48045
  };
47994
48046
  }
47995
- function sa(t, e) {
48047
+ function ra(t, e) {
47996
48048
  var a = t.origin.y,
47997
48049
  s = t.origin.y + t.size.height,
47998
48050
  r = e.origin.y,
@@ -48001,14 +48053,14 @@ function sa(t, e) {
48001
48053
  if (o <= 0) return 0;
48002
48054
  return Math.max(0, Math.min(s, i) - Math.max(a, r)) / o;
48003
48055
  }
48004
- function ra(t, e) {
48056
+ function ia(t, e) {
48005
48057
  var _t$markerAnchor2, _e$markerAnchor2;
48006
48058
  var a, s;
48007
48059
  if (t.chapterId !== e.chapterId || t.localPageIndex !== e.localPageIndex) return false;
48008
48060
  var r = (null == (a = t.rectsPdfCoord) ? void 0 : a.length) ? t.rectsPdfCoord : [t.rectPdfCoord],
48009
48061
  i = (null == (s = e.rectsPdfCoord) ? void 0 : s.length) ? e.rectsPdfCoord : [e.rectPdfCoord],
48010
- o = (_t$markerAnchor2 = t.markerAnchor) !== null && _t$markerAnchor2 !== void 0 ? _t$markerAnchor2 : aa(r),
48011
- n = (_e$markerAnchor2 = e.markerAnchor) !== null && _e$markerAnchor2 !== void 0 ? _e$markerAnchor2 : aa(i);
48062
+ o = (_t$markerAnchor2 = t.markerAnchor) !== null && _t$markerAnchor2 !== void 0 ? _t$markerAnchor2 : sa(r),
48063
+ n = (_e$markerAnchor2 = e.markerAnchor) !== null && _e$markerAnchor2 !== void 0 ? _e$markerAnchor2 : sa(i);
48012
48064
  if (Math.hypot(o.x - n.x, o.y - n.y) <= 6) return true;
48013
48065
  var _iterator330 = _createForOfIteratorHelper(r),
48014
48066
  _step330;
@@ -48020,7 +48072,7 @@ function ra(t, e) {
48020
48072
  try {
48021
48073
  for (_iterator331.s(); !(_step331 = _iterator331.n()).done;) {
48022
48074
  var _t532 = _step331.value;
48023
- if (sa(_h20, _t532) < .5) continue;
48075
+ if (ra(_h20, _t532) < .5) continue;
48024
48076
  var _e71 = Math.max(_h20.origin.x, _t532.origin.x);
48025
48077
  if (Math.min(_h20.origin.x + _h20.size.width, _t532.origin.x + _t532.size.width) - _e71 > .25 * Math.min(_h20.size.width, _t532.size.width)) return true;
48026
48078
  }
@@ -48037,7 +48089,7 @@ function ra(t, e) {
48037
48089
  }
48038
48090
  return false;
48039
48091
  }
48040
- function ia(t, e, a, s) {
48092
+ function oa(t, e, a, s) {
48041
48093
  var r = a.length > 0 ? a : [];
48042
48094
  if (0 === r.length) throw new Error("buildParagraphBookmarkAnchor: no rects");
48043
48095
  return {
@@ -48045,21 +48097,21 @@ function ia(t, e, a, s) {
48045
48097
  localPageIndex: e,
48046
48098
  globalPageIndex: null == s ? void 0 : s.globalPageIndex,
48047
48099
  globalPageNumber: null == s ? void 0 : s.globalPageNumber,
48048
- rectPdfCoord: ea(r),
48100
+ rectPdfCoord: aa(r),
48049
48101
  rectsPdfCoord: r,
48050
- markerAnchor: aa(r)
48102
+ markerAnchor: sa(r)
48051
48103
  };
48052
48104
  }
48053
- function oa(_x100, _x101, _x102) {
48054
- return _oa.apply(this, arguments);
48105
+ function na(_x101, _x102, _x103) {
48106
+ return _na.apply(this, arguments);
48055
48107
  }
48056
- function _oa() {
48057
- _oa = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee169(t, e, a) {
48058
- return _regenerator().w(function (_context176) {
48059
- while (1) switch (_context176.n) {
48108
+ function _na() {
48109
+ _na = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee170(t, e, a) {
48110
+ return _regenerator().w(function (_context177) {
48111
+ while (1) switch (_context177.n) {
48060
48112
  case 0:
48061
48113
  t.scrollToGlobalPageIndex(e);
48062
- _context176.n = 1;
48114
+ _context177.n = 1;
48063
48115
  return function (t, e) {
48064
48116
  var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2500;
48065
48117
  var s = t.getLayout().items.find(function (t) {
@@ -48082,17 +48134,17 @@ function _oa() {
48082
48134
  marginTop: 80
48083
48135
  });
48084
48136
  case 2:
48085
- return _context176.a(2);
48137
+ return _context177.a(2);
48086
48138
  }
48087
- }, _callee169);
48139
+ }, _callee170);
48088
48140
  }));
48089
- return _oa.apply(this, arguments);
48141
+ return _na.apply(this, arguments);
48090
48142
  }
48091
- var na = /*#__PURE__*/function (_BasePlugin31) {
48143
+ var ha = /*#__PURE__*/function (_BasePlugin31) {
48092
48144
  function t(_t533, e) {
48093
48145
  var _this230;
48094
48146
  _classCallCheck(this, t);
48095
- _this230 = _callSuper(this, t, [_t533, e]), _this230.change$ = createBehaviorEmitter([]), _this230.entries = /* @__PURE__ */new Map(), _this230.chapterScroll = _this230.registry.getPlugin(ta.id), _this230.chapterManager = _this230.registry.getPlugin(He.id), _this230.documentManager = _this230.registry.getPlugin(DocumentManagerPlugin.id);
48147
+ _this230 = _callSuper(this, t, [_t533, e]), _this230.change$ = createBehaviorEmitter([]), _this230.entries = /* @__PURE__ */new Map(), _this230.chapterScroll = _this230.registry.getPlugin(ea.id), _this230.chapterManager = _this230.registry.getPlugin(Be.id), _this230.documentManager = _this230.registry.getPlugin(DocumentManagerPlugin.id);
48096
48148
  return _this230;
48097
48149
  }
48098
48150
  _inherits(t, _BasePlugin31);
@@ -48136,7 +48188,7 @@ var na = /*#__PURE__*/function (_BasePlugin31) {
48136
48188
  }
48137
48189
  }, _callee103, this, [[1, 3]]);
48138
48190
  }));
48139
- function initialize(_x103) {
48191
+ function initialize(_x104) {
48140
48192
  return _initialize32.apply(this, arguments);
48141
48193
  }
48142
48194
  return initialize;
@@ -48186,7 +48238,7 @@ var na = /*#__PURE__*/function (_BasePlugin31) {
48186
48238
  try {
48187
48239
  for (_iterator333.s(); !(_step333 = _iterator333.n()).done;) {
48188
48240
  var s = _step333.value;
48189
- if (ra(s.anchor, _t543.anchor)) return s;
48241
+ if (ia(s.anchor, _t543.anchor)) return s;
48190
48242
  }
48191
48243
  } catch (err) {
48192
48244
  _iterator333.e(err);
@@ -48250,7 +48302,7 @@ var na = /*#__PURE__*/function (_BasePlugin31) {
48250
48302
  }
48251
48303
  }, _callee104, this, [[2, 5]]);
48252
48304
  }));
48253
- function requestRemoveBookmark(_x104) {
48305
+ function requestRemoveBookmark(_x105) {
48254
48306
  return _requestRemoveBookmark2.apply(this, arguments);
48255
48307
  }
48256
48308
  return requestRemoveBookmark;
@@ -48355,32 +48407,32 @@ var na = /*#__PURE__*/function (_BasePlugin31) {
48355
48407
  return e.origin.y + e.size.height;
48356
48408
  }(e.anchor);
48357
48409
  _context110.n = 5;
48358
- return oa(a, s, r);
48410
+ return na(a, s, r);
48359
48411
  case 5:
48360
48412
  return _context110.a(2);
48361
48413
  }
48362
48414
  }, _callee105, this);
48363
48415
  }));
48364
- function scrollToBookmark(_x105) {
48416
+ function scrollToBookmark(_x106) {
48365
48417
  return _scrollToBookmark2.apply(this, arguments);
48366
48418
  }
48367
48419
  return scrollToBookmark;
48368
48420
  }()
48369
48421
  }]);
48370
48422
  }(BasePlugin);
48371
- na.id = "paragraph-bookmark";
48372
- var ha = na;
48373
- var la = {
48374
- manifest: Re,
48423
+ ha.id = "paragraph-bookmark";
48424
+ var la = ha;
48425
+ var da = {
48426
+ manifest: Fe,
48375
48427
  create: function create(t) {
48376
- return new ha(Ee, t);
48428
+ return new la(Re, t);
48377
48429
  },
48378
48430
  reducer: function reducer(t) {
48379
48431
  return t;
48380
48432
  },
48381
48433
  initialState: {}
48382
48434
  };
48383
- function da(_ref425) {
48435
+ function ca(_ref425) {
48384
48436
  var _d$iconSize;
48385
48437
  var t = _ref425.item,
48386
48438
  e = _ref425.pdfPageWidth,
@@ -48391,7 +48443,7 @@ function da(_ref425) {
48391
48443
  var c = ce$1(t),
48392
48444
  _useCapability6 = useCapability(SelectionPlugin.id),
48393
48445
  u = _useCapability6.provides,
48394
- _useCapability7 = useCapability(ha.id),
48446
+ _useCapability7 = useCapability(la.id),
48395
48447
  p = _useCapability7.provides,
48396
48448
  g = A(null),
48397
48449
  _d$93 = d$1(null),
@@ -48406,7 +48458,7 @@ function da(_ref425) {
48406
48458
  _d$98 = _slicedToArray(_d$97, 2),
48407
48459
  w = _d$98[0],
48408
48460
  I = _d$98[1],
48409
- C = (_d$iconSize = d === null || d === void 0 ? void 0 : d.iconSize) !== null && _d$iconSize !== void 0 ? _d$iconSize : 16;
48461
+ y$1 = (_d$iconSize = d === null || d === void 0 ? void 0 : d.iconSize) !== null && _d$iconSize !== void 0 ? _d$iconSize : 16;
48410
48462
  y(function () {
48411
48463
  if (!u) return;
48412
48464
  var e = u.forDocument(c),
@@ -48428,7 +48480,7 @@ function da(_ref425) {
48428
48480
  r = true, s();
48429
48481
  };
48430
48482
  }, [u, c, t.localPageIndex]);
48431
- var y$1 = w !== null && w !== void 0 ? w : b;
48483
+ var C = w !== null && w !== void 0 ? w : b;
48432
48484
  y(function () {
48433
48485
  if (!f || !e) return;
48434
48486
  var t = function t(_t553) {
@@ -48462,12 +48514,12 @@ function da(_ref425) {
48462
48514
  return document.removeEventListener("mousemove", t);
48463
48515
  };
48464
48516
  }, [f, e, o, h, l, u, c, w]);
48465
- var L = y$1 !== null && y$1 !== void 0 && y$1.length ? ia(t.chapterId, t.localPageIndex, y$1, {
48517
+ var L = C !== null && C !== void 0 && C.length ? oa(t.chapterId, t.localPageIndex, C, {
48466
48518
  globalPageIndex: t.globalPageIndex,
48467
48519
  globalPageNumber: t.globalPageNumber
48468
48520
  }) : null,
48469
48521
  $ = L && (p === null || p === void 0 ? void 0 : p.listBookmarks().some(function (t) {
48470
- return ra(t.anchor, L);
48522
+ return ia(t.anchor, L);
48471
48523
  })),
48472
48524
  T = q$2(function () {
48473
48525
  p && L && !$ && (p.addBookmark({
@@ -48481,9 +48533,9 @@ function da(_ref425) {
48481
48533
  if (!p || !e || !o) return null;
48482
48534
  var D = h / e,
48483
48535
  z = l / o,
48484
- G = y$1 === null || y$1 === void 0 ? void 0 : y$1[y$1.length - 1],
48485
- O = G ? Math.min((G.origin.x + G.size.width) * D + 6, Math.max(0, h - C - 2)) : 0,
48486
- A$1 = G ? G.origin.y * z + (G.size.height * z - C) / 2 : 0,
48536
+ G = C === null || C === void 0 ? void 0 : C[C.length - 1],
48537
+ O = G ? Math.min((G.origin.x + G.size.width) * D + 6, Math.max(0, h - y$1 - 2)) : 0,
48538
+ A$1 = G ? G.origin.y * z + (G.size.height * z - y$1) / 2 : 0,
48487
48539
  N = G ? Math.max(0, (G.origin.x + G.size.width) * D - 4) : 0,
48488
48540
  V = G ? Math.max(0, G.origin.y * z - 4) : 0;
48489
48541
  return u$1("div", {
@@ -48494,17 +48546,17 @@ function da(_ref425) {
48494
48546
  zIndex: 14,
48495
48547
  pointerEvents: "none"
48496
48548
  },
48497
- children: y$1 && G && !$ && /* @__PURE__ */u$1("div", {
48549
+ children: C && G && !$ && /* @__PURE__ */u$1("div", {
48498
48550
  style: {
48499
48551
  position: "absolute",
48500
48552
  left: "".concat(N, "px"),
48501
48553
  top: "".concat(V, "px"),
48502
- width: "".concat(C + 20, "px"),
48503
- height: "".concat(G.size.height * z + C + 12, "px"),
48554
+ width: "".concat(y$1 + 20, "px"),
48555
+ height: "".concat(G.size.height * z + y$1 + 12, "px"),
48504
48556
  pointerEvents: "auto"
48505
48557
  },
48506
48558
  onMouseEnter: function onMouseEnter() {
48507
- return I(y$1);
48559
+ return I(C);
48508
48560
  },
48509
48561
  onMouseLeave: function onMouseLeave() {
48510
48562
  return I(null);
@@ -48520,8 +48572,8 @@ function da(_ref425) {
48520
48572
  position: "absolute",
48521
48573
  left: O - N + "px",
48522
48574
  top: A$1 - V + "px",
48523
- width: C,
48524
- height: C,
48575
+ width: y$1,
48576
+ height: y$1,
48525
48577
  cursor: "pointer",
48526
48578
  display: "flex",
48527
48579
  alignItems: "center",
@@ -48541,8 +48593,8 @@ function da(_ref425) {
48541
48593
  position: "absolute",
48542
48594
  left: O - N + "px",
48543
48595
  top: A$1 - V + "px",
48544
- width: "".concat(C, "px"),
48545
- height: "".concat(C, "px"),
48596
+ width: "".concat(y$1, "px"),
48597
+ height: "".concat(y$1, "px"),
48546
48598
  border: "none",
48547
48599
  borderRadius: "4px",
48548
48600
  background: "#3b82f6",
@@ -48561,47 +48613,82 @@ function da(_ref425) {
48561
48613
  })
48562
48614
  });
48563
48615
  }
48564
- var ca = [{
48565
- id: "highlight",
48566
- label: "高亮背景",
48567
- icon: /* @__PURE__ */u$1(fa, {})
48568
- }, {
48569
- id: "underline",
48570
- label: "下划线",
48571
- icon: /* @__PURE__ */u$1(ma, {})
48572
- }, {
48573
- id: "squiggly",
48574
- label: "波浪线",
48575
- icon: /* @__PURE__ */u$1(va, {})
48576
- }, {
48577
- id: "strikeout",
48578
- label: "删除线",
48579
- icon: /* @__PURE__ */u$1(ba, {})
48580
- }, {
48581
- id: "note",
48582
- label: "添加笔记",
48583
- icon: /* @__PURE__ */u$1(Pa, {})
48584
- }];
48585
- function ua(_ref426) {
48616
+ function ua() {
48617
+ return u$1("svg", {
48618
+ width: "20",
48619
+ height: "20",
48620
+ viewBox: "0 0 24 24",
48621
+ fill: "none",
48622
+ "aria-hidden": true,
48623
+ children: [/* @__PURE__ */u$1("rect", {
48624
+ x: "8.5",
48625
+ y: "8.5",
48626
+ width: "11",
48627
+ height: "13",
48628
+ rx: "2.25",
48629
+ fill: "#f1f5f9",
48630
+ stroke: "#94a3b8",
48631
+ strokeWidth: "1.35"
48632
+ }), /* @__PURE__ */u$1("rect", {
48633
+ x: "4.5",
48634
+ y: "3.5",
48635
+ width: "11",
48636
+ height: "13",
48637
+ rx: "2.25",
48638
+ fill: "#ffffff",
48639
+ stroke: "#334155",
48640
+ strokeWidth: "1.5"
48641
+ }), /* @__PURE__ */u$1("path", {
48642
+ d: "M7.5 7h5.5a1.5 1.5 0 0 1 1.5 1.5V14",
48643
+ stroke: "#64748b",
48644
+ strokeWidth: "1.2",
48645
+ strokeLinecap: "round"
48646
+ })]
48647
+ });
48648
+ }
48649
+ var pa = [{
48650
+ id: "highlight",
48651
+ label: "高亮背景",
48652
+ icon: /* @__PURE__ */u$1(Ia, {})
48653
+ }, {
48654
+ id: "underline",
48655
+ label: "下划线",
48656
+ icon: /* @__PURE__ */u$1(ya, {})
48657
+ }, {
48658
+ id: "squiggly",
48659
+ label: "波浪线",
48660
+ icon: /* @__PURE__ */u$1(Ca, {})
48661
+ }, {
48662
+ id: "strikeout",
48663
+ label: "删除线",
48664
+ icon: /* @__PURE__ */u$1(Ma, {})
48665
+ }],
48666
+ ga = "copy",
48667
+ fa = "复制",
48668
+ ma = {
48669
+ label: "添加笔记",
48670
+ icon: /* @__PURE__ */u$1(Sa, {})
48671
+ };
48672
+ function va(_ref426) {
48586
48673
  var s = _ref426.placementAbove,
48587
48674
  r = _ref426.anchorHeight,
48588
48675
  i = _ref426.onAction,
48589
48676
  _ref426$hiddenBuiltin = _ref426.hiddenBuiltinActions,
48590
48677
  o = _ref426$hiddenBuiltin === void 0 ? [] : _ref426$hiddenBuiltin,
48591
48678
  _ref426$extraActions = _ref426.extraActions,
48592
- n = _ref426$extraActions === void 0 ? [] : _ref426$extraActions;
48593
- var h = new Set(o),
48594
- l = ca.filter(function (t) {
48595
- return "note" !== t.id && !h.has(t.id);
48679
+ n = _ref426$extraActions === void 0 ? [] : _ref426$extraActions,
48680
+ h = _ref426.renderCopyIcon;
48681
+ var l = new Set(o),
48682
+ d = !l.has("copy"),
48683
+ c = pa.filter(function (t) {
48684
+ return !l.has(t.id);
48596
48685
  }),
48597
- d = ca.find(function (t) {
48598
- return "note" === t.id;
48599
- }),
48600
- c = d && !h.has("note"),
48601
- u = _toConsumableArray(n).sort(function (t, e) {
48686
+ u = !l.has("note"),
48687
+ p = _toConsumableArray(n).sort(function (t, e) {
48602
48688
  var _t$order, _e$order;
48603
48689
  return ((_t$order = t.order) !== null && _t$order !== void 0 ? _t$order : 0) - ((_e$order = e.order) !== null && _e$order !== void 0 ? _e$order : 0);
48604
- });
48690
+ }),
48691
+ g = c.length > 0 || p.length > 0;
48605
48692
  return u$1("div", {
48606
48693
  style: {
48607
48694
  position: "absolute",
@@ -48621,16 +48708,24 @@ function ua(_ref426) {
48621
48708
  },
48622
48709
  role: "toolbar",
48623
48710
  "aria-label": "选区工具",
48624
- children: [l.map(function (t) {
48625
- return /* @__PURE__ */u$1(pa, {
48711
+ children: [d && /* @__PURE__ */u$1(k$2, {
48712
+ children: [/* @__PURE__ */u$1(Pa, {
48713
+ label: fa,
48714
+ onClick: function onClick() {
48715
+ return i(ga);
48716
+ },
48717
+ children: h ? h() : /* @__PURE__ */u$1(ua, {})
48718
+ }), g && /* @__PURE__ */u$1(ba, {})]
48719
+ }), c.map(function (t) {
48720
+ return /* @__PURE__ */u$1(Pa, {
48626
48721
  label: t.label,
48627
48722
  onClick: function onClick() {
48628
48723
  return i(t.id);
48629
48724
  },
48630
48725
  children: t.icon
48631
48726
  }, t.id);
48632
- }), u.map(function (t) {
48633
- return /* @__PURE__ */u$1(pa, {
48727
+ }), p.map(function (t) {
48728
+ return /* @__PURE__ */u$1(Pa, {
48634
48729
  label: t.label,
48635
48730
  onClick: function onClick() {
48636
48731
  return i(t.id);
@@ -48643,28 +48738,31 @@ function ua(_ref426) {
48643
48738
  children: t.label.slice(0, 2)
48644
48739
  })
48645
48740
  }, t.id);
48646
- }), c && /* @__PURE__ */u$1(k$2, {
48647
- children: [/* @__PURE__ */u$1("span", {
48648
- style: {
48649
- width: 1,
48650
- height: 28,
48651
- margin: "0 4px",
48652
- background: "#e2e8f0",
48653
- flexShrink: 0
48654
- },
48655
- "aria-hidden": true
48656
- }), /* @__PURE__ */u$1(pa, {
48657
- label: d.label,
48741
+ }), u && /* @__PURE__ */u$1(k$2, {
48742
+ children: [(g || d) && /* @__PURE__ */u$1(ba, {}), /* @__PURE__ */u$1(Pa, {
48743
+ label: ma.label,
48658
48744
  onClick: function onClick() {
48659
48745
  return i("note");
48660
48746
  },
48661
48747
  accent: true,
48662
- children: d.icon
48748
+ children: ma.icon
48663
48749
  })]
48664
48750
  })]
48665
48751
  });
48666
48752
  }
48667
- function pa(_ref427) {
48753
+ function ba() {
48754
+ return u$1("span", {
48755
+ style: {
48756
+ width: 1,
48757
+ height: 28,
48758
+ margin: "0 4px",
48759
+ background: "#e2e8f0",
48760
+ flexShrink: 0
48761
+ },
48762
+ "aria-hidden": true
48763
+ });
48764
+ }
48765
+ function Pa(_ref427) {
48668
48766
  var t = _ref427.label,
48669
48767
  e = _ref427.onClick,
48670
48768
  s = _ref427.accent,
@@ -48696,7 +48794,7 @@ function pa(_ref427) {
48696
48794
  children: r
48697
48795
  });
48698
48796
  }
48699
- function ga(_ref428) {
48797
+ function wa(_ref428) {
48700
48798
  var e = _ref428.behind,
48701
48799
  s = _ref428.mark;
48702
48800
  return u$1("svg", {
@@ -48717,8 +48815,8 @@ function ga(_ref428) {
48717
48815
  }), s]
48718
48816
  });
48719
48817
  }
48720
- function fa() {
48721
- return u$1(ga, {
48818
+ function Ia() {
48819
+ return u$1(wa, {
48722
48820
  behind: /* @__PURE__ */u$1("rect", {
48723
48821
  x: "5",
48724
48822
  y: "4",
@@ -48729,8 +48827,8 @@ function fa() {
48729
48827
  })
48730
48828
  });
48731
48829
  }
48732
- function ma() {
48733
- return u$1(ga, {
48830
+ function ya() {
48831
+ return u$1(wa, {
48734
48832
  mark: /* @__PURE__ */u$1("path", {
48735
48833
  d: "M6 22h16",
48736
48834
  stroke: "#dc2626",
@@ -48739,8 +48837,8 @@ function ma() {
48739
48837
  })
48740
48838
  });
48741
48839
  }
48742
- function va() {
48743
- return u$1(ga, {
48840
+ function Ca() {
48841
+ return u$1(wa, {
48744
48842
  mark: /* @__PURE__ */u$1("path", {
48745
48843
  d: "M6 22c2-2 3-2 5 0s3 2 5 0 3-2 5 0",
48746
48844
  stroke: "#dc2626",
@@ -48750,8 +48848,8 @@ function va() {
48750
48848
  })
48751
48849
  });
48752
48850
  }
48753
- function ba() {
48754
- return u$1(ga, {
48851
+ function Ma() {
48852
+ return u$1(wa, {
48755
48853
  mark: /* @__PURE__ */u$1("path", {
48756
48854
  d: "M5 14h18",
48757
48855
  stroke: "#dc2626",
@@ -48760,7 +48858,7 @@ function ba() {
48760
48858
  })
48761
48859
  });
48762
48860
  }
48763
- function Pa() {
48861
+ function Sa() {
48764
48862
  return u$1("svg", {
48765
48863
  width: "20",
48766
48864
  height: "20",
@@ -48785,69 +48883,78 @@ function Pa() {
48785
48883
  })]
48786
48884
  });
48787
48885
  }
48788
- var wa = {
48886
+ var xa = {
48789
48887
  highlight: "highlight",
48790
48888
  underline: "underline",
48791
48889
  squiggly: "squiggly",
48792
48890
  strikeout: "strikeout"
48793
48891
  };
48794
- function Ia(t, e) {
48795
- var _t$markup, _t$notes, _s$extraActions, _t$markup3;
48892
+ function ka(t, e) {
48893
+ var _t$markup, _t$notes, _s$hiddenBuiltinActio, _s$extraActions, _t$markup3;
48796
48894
  var s = t === null || t === void 0 ? void 0 : t.selectionToolbar,
48797
48895
  r = false !== (t === null || t === void 0 || (_t$markup = t.markup) === null || _t$markup === void 0 ? void 0 : _t$markup.enabled),
48798
48896
  i = false !== (t === null || t === void 0 || (_t$notes = t.notes) === null || _t$notes === void 0 ? void 0 : _t$notes.enabled);
48799
48897
  if (false === (s === null || s === void 0 ? void 0 : s.enabled)) return;
48800
- if (!r && !i && !(s !== null && s !== void 0 && (_s$extraActions = s.extraActions) !== null && _s$extraActions !== void 0 && _s$extraActions.length)) return;
48898
+ var n = !(s !== null && s !== void 0 && (_s$hiddenBuiltinActio = s.hiddenBuiltinActions) !== null && _s$hiddenBuiltinActio !== void 0 && _s$hiddenBuiltinActio.includes("copy"));
48899
+ if (!(r || i || n || s !== null && s !== void 0 && (_s$extraActions = s.extraActions) !== null && _s$extraActions !== void 0 && _s$extraActions.length)) return;
48801
48900
  var _useCapability8 = useCapability(SelectionPlugin.id),
48802
- n = _useCapability8.provides,
48901
+ h = _useCapability8.provides,
48803
48902
  _useCapability9 = useCapability(AnnotationPlugin.id),
48804
- h = _useCapability9.provides,
48805
- _useCapability0 = useCapability(Ae.id),
48806
- d = _useCapability0.provides;
48903
+ d = _useCapability9.provides,
48904
+ _useCapability0 = useCapability(Ne.id),
48905
+ c = _useCapability0.provides;
48807
48906
  return T$2(function () {
48808
48907
  return function (o) {
48809
48908
  var l = ce$1(o.item);
48810
- return function (c) {
48811
- var _c$placement;
48812
- return /* @__PURE__ */u$1("div", _objectSpread(_objectSpread({}, c.menuWrapperProps), {}, {
48813
- children: /* @__PURE__ */u$1(ua, {
48814
- placementAbove: !!((_c$placement = c.placement) !== null && _c$placement !== void 0 && _c$placement.suggestTop),
48815
- anchorHeight: c.rect.size.height,
48909
+ return function (u) {
48910
+ var _u$placement;
48911
+ return /* @__PURE__ */u$1("div", _objectSpread(_objectSpread({}, u.menuWrapperProps), {}, {
48912
+ children: /* @__PURE__ */u$1(va, {
48913
+ placementAbove: !!((_u$placement = u.placement) !== null && _u$placement !== void 0 && _u$placement.suggestTop),
48914
+ anchorHeight: u.rect.size.height,
48816
48915
  onAction: function onAction(a) {
48817
- if ("highlight" !== a && "underline" !== a && "squiggly" !== a && "strikeout" !== a) {
48818
- var _e$onExtraAction;
48819
- if ("note" === a) {
48820
- if (!n || !d || !i) return;
48821
- var _t554 = n.getHighlightRectsForPage(o.item.localPageIndex, l);
48822
- return void ue$1(n.getSelectedText(l), function (e) {
48823
- d.requestCreateFromSelection({
48824
- chapterId: o.item.chapterId,
48825
- localPageIndex: o.item.localPageIndex,
48826
- globalPageIndex: o.item.globalPageIndex,
48827
- globalPageNumber: o.item.globalPageNumber,
48828
- rectsPdfCoord: _t554,
48829
- selectedText: e.join("\n")
48916
+ if ("copy" !== a) {
48917
+ if ("highlight" !== a && "underline" !== a && "squiggly" !== a && "strikeout" !== a) {
48918
+ var _e$onExtraAction;
48919
+ if ("note" === a) {
48920
+ if (!h || !c || !i) return;
48921
+ var _t554 = h.getHighlightRectsForPage(o.item.localPageIndex, l);
48922
+ return void ue$1(h.getSelectedText(l), function (e) {
48923
+ c.requestCreateFromSelection({
48924
+ chapterId: o.item.chapterId,
48925
+ localPageIndex: o.item.localPageIndex,
48926
+ globalPageIndex: o.item.globalPageIndex,
48927
+ globalPageNumber: o.item.globalPageNumber,
48928
+ rectsPdfCoord: _t554,
48929
+ selectedText: e.join("\n")
48930
+ });
48830
48931
  });
48831
- });
48932
+ }
48933
+ e === null || e === void 0 || (_e$onExtraAction = e.onExtraAction) === null || _e$onExtraAction === void 0 || _e$onExtraAction.call(e, a, o);
48934
+ } else {
48935
+ var _t$markup2;
48936
+ if (!h || !d || !r) return;
48937
+ rt$1(l, xa[a], d, h, t === null || t === void 0 || (_t$markup2 = t.markup) === null || _t$markup2 === void 0 ? void 0 : _t$markup2.styles);
48832
48938
  }
48833
- e === null || e === void 0 || (_e$onExtraAction = e.onExtraAction) === null || _e$onExtraAction === void 0 || _e$onExtraAction.call(e, a, o);
48834
48939
  } else {
48835
- var _t$markup2;
48836
- if (!n || !h || !r) return;
48837
- rt$1(l, wa[a], h, n, t === null || t === void 0 || (_t$markup2 = t.markup) === null || _t$markup2 === void 0 ? void 0 : _t$markup2.styles);
48940
+ if (!h || !n) return;
48941
+ ue$1(h.getSelectedText(l), function (t) {
48942
+ pe$1(t.join("\n"));
48943
+ });
48838
48944
  }
48839
48945
  },
48840
48946
  hiddenBuiltinActions: s === null || s === void 0 ? void 0 : s.hiddenBuiltinActions,
48841
- extraActions: s === null || s === void 0 ? void 0 : s.extraActions
48947
+ extraActions: s === null || s === void 0 ? void 0 : s.extraActions,
48948
+ renderCopyIcon: s === null || s === void 0 ? void 0 : s.renderCopyIcon
48842
48949
  })
48843
48950
  }));
48844
48951
  };
48845
48952
  };
48846
- }, [h, t === null || t === void 0 || (_t$markup3 = t.markup) === null || _t$markup3 === void 0 ? void 0 : _t$markup3.styles, e === null || e === void 0 ? void 0 : e.onExtraAction, r, d, i, n, s === null || s === void 0 ? void 0 : s.extraActions, s === null || s === void 0 ? void 0 : s.hiddenBuiltinActions]);
48953
+ }, [d, t === null || t === void 0 || (_t$markup3 = t.markup) === null || _t$markup3 === void 0 ? void 0 : _t$markup3.styles, n, e === null || e === void 0 ? void 0 : e.onExtraAction, r, c, i, h, s === null || s === void 0 ? void 0 : s.extraActions, s === null || s === void 0 ? void 0 : s.hiddenBuiltinActions, s === null || s === void 0 ? void 0 : s.renderCopyIcon]);
48847
48954
  }
48848
- var Ca = "chapter-manager",
48849
- ya = {
48850
- id: Ca,
48955
+ var La = "chapter-manager",
48956
+ $a = {
48957
+ id: La,
48851
48958
  name: "Chapter Manager Plugin",
48852
48959
  version: "0.1.0",
48853
48960
  provides: ["chapter-manager"],
@@ -48862,10 +48969,10 @@ var Ca = "chapter-manager",
48862
48969
  autoActivateOnLoad: true
48863
48970
  }
48864
48971
  };
48865
- var Ma = {
48972
+ var Ta = {
48866
48973
  kind: "first-wins"
48867
48974
  };
48868
- function Sa(t, e, a) {
48975
+ function Da(t, e, a) {
48869
48976
  if (1 === e.length) return e[0].chapterId;
48870
48977
  switch (a.kind) {
48871
48978
  case "first-wins":
@@ -48884,9 +48991,9 @@ function Sa(t, e, a) {
48884
48991
  return a.resolve(t, e);
48885
48992
  }
48886
48993
  }
48887
- var xa = /*#__PURE__*/function () {
48888
- function xa(t) {
48889
- _classCallCheck(this, xa);
48994
+ var za = /*#__PURE__*/function () {
48995
+ function za(t) {
48996
+ _classCallCheck(this, za);
48890
48997
  this._pages = t, this._byChapter = /* @__PURE__ */new Map(), this._byGlobalNumber = /* @__PURE__ */new Map();
48891
48998
  var _iterator336 = _createForOfIteratorHelper(t),
48892
48999
  _step336;
@@ -48903,7 +49010,7 @@ var xa = /*#__PURE__*/function () {
48903
49010
  _iterator336.f();
48904
49011
  }
48905
49012
  }
48906
- return _createClass(xa, [{
49013
+ return _createClass(za, [{
48907
49014
  key: "totalPages",
48908
49015
  get: function get() {
48909
49016
  return this._pages.length;
@@ -48949,10 +49056,10 @@ var xa = /*#__PURE__*/function () {
48949
49056
  }
48950
49057
  }]);
48951
49058
  }();
48952
- function ka(t) {
48953
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ma;
49059
+ function Ga(t) {
49060
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ta;
48954
49061
  var a = function (t) {
48955
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ma;
49062
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Ta;
48956
49063
  var a = /* @__PURE__ */new Map();
48957
49064
  var _iterator337 = _createForOfIteratorHelper(t.chapters),
48958
49065
  _step337;
@@ -48980,7 +49087,7 @@ function ka(t) {
48980
49087
  var _step338$value = _slicedToArray(_step338.value, 2),
48981
49088
  _r48 = _step338$value[0],
48982
49089
  _i67 = _step338$value[1];
48983
- s.set(_r48, Sa(_r48, _i67, e));
49090
+ s.set(_r48, Da(_r48, _i67, e));
48984
49091
  }
48985
49092
  } catch (err) {
48986
49093
  _iterator338.e(err);
@@ -49032,13 +49139,13 @@ function ka(t) {
49032
49139
  } finally {
49033
49140
  _iterator340.f();
49034
49141
  }
49035
- return new xa(i);
49142
+ return new za(i);
49036
49143
  }
49037
- var La = /*#__PURE__*/function (_BasePlugin32) {
49144
+ var Oa = /*#__PURE__*/function (_BasePlugin32) {
49038
49145
  function t(_t559, e) {
49039
49146
  var _this233;
49040
49147
  _classCallCheck(this, t);
49041
- _this233 = _callSuper(this, t, [_t559, e]), _this233.statusChange$ = createBehaviorEmitter(), _this233.manifestChange$ = createEmitter(), _this233.overlapStrategy = Ma, _this233.chapterStatus = /* @__PURE__ */new Map(), _this233.chapterLastUsed = /* @__PURE__ */new Map(), _this233.passwordAttempts = /* @__PURE__ */new Map(), _this233.pendingLoadPromises = /* @__PURE__ */new Map(), _this233.unloadTimer = null, _this233.documentManagerUnsubs = [], _this233.documentManager = _this233.registry.getPlugin(DocumentManagerPlugin.id);
49148
+ _this233 = _callSuper(this, t, [_t559, e]), _this233.statusChange$ = createBehaviorEmitter(), _this233.manifestChange$ = createEmitter(), _this233.overlapStrategy = Ta, _this233.chapterStatus = /* @__PURE__ */new Map(), _this233.chapterLastUsed = /* @__PURE__ */new Map(), _this233.passwordAttempts = /* @__PURE__ */new Map(), _this233.pendingLoadPromises = /* @__PURE__ */new Map(), _this233.unloadTimer = null, _this233.documentManagerUnsubs = [], _this233.documentManager = _this233.registry.getPlugin(DocumentManagerPlugin.id);
49042
49149
  return _this233;
49043
49150
  }
49044
49151
  _inherits(t, _BasePlugin32);
@@ -49052,7 +49159,7 @@ var La = /*#__PURE__*/function (_BasePlugin32) {
49052
49159
  return _regenerator().w(function (_context111) {
49053
49160
  while (1) switch (_context111.n) {
49054
49161
  case 0:
49055
- if (this.config = _t560, this.passwordProvider = _t560.passwordProvider, this.overlapStrategy = (_t560$overlapStrategy = _t560.overlapStrategy) !== null && _t560$overlapStrategy !== void 0 ? _t560$overlapStrategy : Ma, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t561) {
49162
+ if (this.config = _t560, this.passwordProvider = _t560.passwordProvider, this.overlapStrategy = (_t560$overlapStrategy = _t560.overlapStrategy) !== null && _t560$overlapStrategy !== void 0 ? _t560$overlapStrategy : Ta, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t561) {
49056
49163
  _this234.isOwnedChapter(_t561.id) && (_this234.passwordAttempts.delete(_t561.id), _this234.updateStatus(_t561.id, "loaded"));
49057
49164
  }), this.documentManager.provides().onDocumentClosed(function (_t562) {
49058
49165
  _this234.isOwnedChapter(_t562) && _this234.updateStatus(_t562, "closed");
@@ -49069,7 +49176,7 @@ var La = /*#__PURE__*/function (_BasePlugin32) {
49069
49176
  }
49070
49177
  }, _callee106, this);
49071
49178
  }));
49072
- function initialize(_x106) {
49179
+ function initialize(_x107) {
49073
49180
  return _initialize33.apply(this, arguments);
49074
49181
  }
49075
49182
  return initialize;
@@ -49192,7 +49299,7 @@ var La = /*#__PURE__*/function (_BasePlugin32) {
49192
49299
  } finally {
49193
49300
  _iterator345.f();
49194
49301
  }
49195
- this.manifest = e, this.virtualPageMap = ka(e, this.overlapStrategy), this.manifestChange$.emit({
49302
+ this.manifest = e, this.virtualPageMap = Ga(e, this.overlapStrategy), this.manifestChange$.emit({
49196
49303
  manifest: e,
49197
49304
  map: this.virtualPageMap
49198
49305
  }), this.eagerPrefetchFromManifest();
@@ -49391,7 +49498,7 @@ var La = /*#__PURE__*/function (_BasePlugin32) {
49391
49498
  }
49392
49499
  }, _callee107, this);
49393
49500
  }));
49394
- function resolvePdfPayload(_x107) {
49501
+ function resolvePdfPayload(_x108) {
49395
49502
  return _resolvePdfPayload0.apply(this, arguments);
49396
49503
  }
49397
49504
  return resolvePdfPayload;
@@ -49459,7 +49566,7 @@ var La = /*#__PURE__*/function (_BasePlugin32) {
49459
49566
  }
49460
49567
  }, _callee108, this, [[1, 5]]);
49461
49568
  }));
49462
- function startLoad(_x108) {
49569
+ function startLoad(_x109) {
49463
49570
  return _startLoad0.apply(this, arguments);
49464
49571
  }
49465
49572
  return startLoad;
@@ -49538,7 +49645,7 @@ var La = /*#__PURE__*/function (_BasePlugin32) {
49538
49645
  }
49539
49646
  }, _callee109, this, [[4, 6]]);
49540
49647
  }));
49541
- function handleDocumentError(_x109, _x110, _x111) {
49648
+ function handleDocumentError(_x110, _x111, _x112) {
49542
49649
  return _handleDocumentError0.apply(this, arguments);
49543
49650
  }
49544
49651
  return handleDocumentError;
@@ -49570,24 +49677,24 @@ var La = /*#__PURE__*/function (_BasePlugin32) {
49570
49677
  }
49571
49678
  }]);
49572
49679
  }(BasePlugin);
49573
- La.id = "chapter-manager";
49574
- var $a = La;
49575
- var Ta = {
49576
- manifest: ya,
49680
+ Oa.id = "chapter-manager";
49681
+ var Aa = Oa;
49682
+ var Na = {
49683
+ manifest: $a,
49577
49684
  create: function create(t) {
49578
- return new $a(Ca, t);
49685
+ return new Aa(La, t);
49579
49686
  },
49580
49687
  reducer: function reducer(t) {
49581
49688
  return t;
49582
49689
  },
49583
49690
  initialState: {}
49584
49691
  };
49585
- function Da(t) {
49692
+ function Va(t) {
49586
49693
  var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : .5;
49587
49694
  var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
49588
49695
  return Math.min(a, Math.max(e, t));
49589
49696
  }
49590
- function za(t, e) {
49697
+ function Ea(t, e) {
49591
49698
  if (e <= 0) return 1;
49592
49699
  var a = 0;
49593
49700
  var _iterator351 = _createForOfIteratorHelper(t.pages),
@@ -49606,16 +49713,16 @@ function za(t, e) {
49606
49713
  }
49607
49714
  return a <= 0 ? 1 : e / a;
49608
49715
  }
49609
- function Ga(t, e) {
49716
+ function Ra(t, e) {
49610
49717
  return t <= 0 ? e !== null && e !== void 0 ? e : 0 : null == e || e <= 0 ? t : Math.min(e, t);
49611
49718
  }
49612
- function Oa(t, e, a, s) {
49613
- var r = Ga(e, a);
49719
+ function Fa(t, e, a, s) {
49720
+ var r = Ra(e, a);
49614
49721
  if (r <= 0) return s;
49615
- var i = za(t, r);
49722
+ var i = Ea(t, r);
49616
49723
  return Math.min(s, i);
49617
49724
  }
49618
- function Aa(t, e, a, s, r) {
49725
+ function Ua(t, e, a, s, r) {
49619
49726
  if (!t || a <= 0) return r;
49620
49727
  var i = r;
49621
49728
  var _iterator352 = _createForOfIteratorHelper(e.chapters),
@@ -49624,7 +49731,7 @@ function Aa(t, e, a, s, r) {
49624
49731
  for (_iterator352.s(); !(_step352 = _iterator352.n()).done;) {
49625
49732
  var _o20 = _step352.value;
49626
49733
  var _e78 = t.getDocument(_o20.chapterId);
49627
- _e78 && (i = Math.min(i, Oa(_e78, a, s, r)));
49734
+ _e78 && (i = Math.min(i, Fa(_e78, a, s, r)));
49628
49735
  }
49629
49736
  } catch (err) {
49630
49737
  _iterator352.e(err);
@@ -49633,43 +49740,46 @@ function Aa(t, e, a, s, r) {
49633
49740
  }
49634
49741
  return i;
49635
49742
  }
49636
- function Na(t) {
49743
+ function _a(t) {
49637
49744
  return t instanceof HTMLElement ? t.clientWidth : 0;
49638
49745
  }
49639
- function Va(t, e, a) {
49640
- var _e$min, _e$max;
49746
+ function qa(t, e, a) {
49747
+ var _e$min, _e$max, _e$initial;
49641
49748
  var _useRegistry4 = useRegistry(),
49642
49749
  o = _useRegistry4.registry,
49643
49750
  _useCapability1 = useCapability(DocumentManagerPlugin.id),
49644
49751
  h = _useCapability1.provides,
49645
- _useCapability10 = useCapability($a.id),
49752
+ _useCapability10 = useCapability(Aa.id),
49646
49753
  l = _useCapability10.provides,
49647
49754
  d = false !== (e === null || e === void 0 ? void 0 : e.enabled),
49648
49755
  c = (_e$min = e === null || e === void 0 ? void 0 : e.min) !== null && _e$min !== void 0 ? _e$min : .5,
49649
49756
  u = (_e$max = e === null || e === void 0 ? void 0 : e.max) !== null && _e$max !== void 0 ? _e$max : 3,
49650
49757
  p = e === null || e === void 0 ? void 0 : e.pageWidth,
49758
+ g = function (t) {
49759
+ return null != t && t > 0;
49760
+ }(p),
49761
+ f = (_e$initial = e === null || e === void 0 ? void 0 : e.initial) !== null && _e$initial !== void 0 ? _e$initial : 1,
49651
49762
  _d$99 = d$1(0),
49652
49763
  _d$100 = _slicedToArray(_d$99, 2),
49653
- g = _d$100[0],
49654
- f = _d$100[1],
49764
+ b = _d$100[0],
49765
+ P = _d$100[1],
49655
49766
  _d$101 = d$1(function () {
49656
- var _e$initial;
49657
- return (_e$initial = e === null || e === void 0 ? void 0 : e.initial) !== null && _e$initial !== void 0 ? _e$initial : 1;
49767
+ return f;
49658
49768
  }),
49659
49769
  _d$102 = _slicedToArray(_d$101, 2),
49660
- b = _d$102[0],
49661
- P = _d$102[1],
49662
- w = A(b);
49770
+ w = _d$102[0],
49771
+ I = _d$102[1],
49772
+ y$1 = A(w);
49663
49773
  y(function () {
49664
49774
  if (a) return function (t, e) {
49665
49775
  if (!t || "undefined" == typeof ResizeObserver) return function () {};
49666
49776
  var a = null;
49667
49777
  var s = new ResizeObserver(function () {
49668
- e(Na(a));
49778
+ e(_a(a));
49669
49779
  }),
49670
49780
  r = function r() {
49671
49781
  var r = t.querySelector("[data-chapter-scroll-viewport]");
49672
- r !== a ? (a && s.unobserve(a), a = r, a ? (s.observe(a), e(Na(a))) : e(0)) : e(Na(a));
49782
+ r !== a ? (a && s.unobserve(a), a = r, a ? (s.observe(a), e(_a(a))) : e(0)) : e(_a(a));
49673
49783
  };
49674
49784
  r();
49675
49785
  var i = new MutationObserver(r);
@@ -49681,20 +49791,20 @@ function Va(t, e, a) {
49681
49791
  return function () {
49682
49792
  cancelAnimationFrame(o), i.disconnect(), a && s.unobserve(a), s.disconnect();
49683
49793
  };
49684
- }(a.current, f);
49794
+ }(a.current, P);
49685
49795
  }, [a, a === null || a === void 0 ? void 0 : a.current]);
49686
- var I = Aa(h, t, g, p, u),
49687
- C = Math.min(c, I),
49688
- y$1 = q$2(function (e) {
49689
- var a = Aa(h, t, g, p, u),
49796
+ var C = Ua(h, t, b, p, u),
49797
+ M = Math.min(c, C),
49798
+ S = q$2(function (e) {
49799
+ var a = Ua(h, t, b, p, u),
49690
49800
  s = Math.min(c, a),
49691
- r = Da(e, s, a);
49692
- w.current = r, P(r), function (t, e, a) {
49801
+ r = Va(e, s, a);
49802
+ y$1.current = r, I(r), function (t, e, a) {
49693
49803
  var s = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : .5;
49694
49804
  var r = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 3;
49695
49805
  var i = t === null || t === void 0 ? void 0 : t.getStore();
49696
49806
  if (!i) return;
49697
- var o = Da(a, s, r);
49807
+ var o = Va(a, s, r);
49698
49808
  i.dispatchToCore(setDefaultScale(o));
49699
49809
  var _iterator353 = _createForOfIteratorHelper(e.chapters),
49700
49810
  _step353;
@@ -49709,23 +49819,22 @@ function Va(t, e, a) {
49709
49819
  _iterator353.f();
49710
49820
  }
49711
49821
  }(o, t, r, s, a);
49712
- }, [o, t, c, u, h, g, p]),
49713
- M = q$2(function (t) {
49822
+ }, [o, t, c, u, h, b, p]),
49823
+ x = q$2(function (t) {
49714
49824
  if (!h) return;
49715
49825
  var e = h.getDocument(t);
49716
49826
  if (!e) return;
49717
- var a = Ga(g, p);
49718
- a <= 0 || y$1(za(e, a));
49719
- }, [y$1, h, p, g]);
49827
+ var a = Ra(b, p);
49828
+ a <= 0 || S(Ea(e, a));
49829
+ }, [S, h, p, b]);
49720
49830
  return y(function () {
49721
- var _e$initial2;
49722
- o && (null != p || g > 0 || y$1((_e$initial2 = e === null || e === void 0 ? void 0 : e.initial) !== null && _e$initial2 !== void 0 ? _e$initial2 : 1));
49723
- }, [y$1, p, o, g, e === null || e === void 0 ? void 0 : e.initial]), y(function () {
49724
- w.current > I && y$1(I);
49725
- }, [y$1, I]), y(function () {
49831
+ o && (g || S(f));
49832
+ }, [S, f, o, g]), y(function () {
49833
+ y$1.current > C && S(C);
49834
+ }, [S, C]), y(function () {
49726
49835
  if (!l) return;
49727
49836
  var e = function e(t) {
49728
- null != p || g > 0 ? M(t) : y$1(w.current);
49837
+ g ? x(t) : S(f);
49729
49838
  },
49730
49839
  a = l.onChapterStatusChange(function (t) {
49731
49840
  "loaded" === t.status && e(t.chapterId);
@@ -49743,15 +49852,15 @@ function Va(t, e, a) {
49743
49852
  _iterator354.f();
49744
49853
  }
49745
49854
  return a;
49746
- }, [M, y$1, l, t.chapters, p, g]), y(function () {
49747
- if (!(g <= 0) && l) {
49855
+ }, [x, S, l, f, t.chapters, g]), y(function () {
49856
+ if (g && !(b <= 0) && l) {
49748
49857
  var _iterator355 = _createForOfIteratorHelper(t.chapters),
49749
49858
  _step355;
49750
49859
  try {
49751
49860
  for (_iterator355.s(); !(_step355 = _iterator355.n()).done;) {
49752
49861
  var _e79 = _step355.value;
49753
49862
  if ("loaded" === l.getChapterStatus(_e79.chapterId)) {
49754
- M(_e79.chapterId);
49863
+ x(_e79.chapterId);
49755
49864
  break;
49756
49865
  }
49757
49866
  }
@@ -49761,18 +49870,18 @@ function Va(t, e, a) {
49761
49870
  _iterator355.f();
49762
49871
  }
49763
49872
  }
49764
- }, [M, l, t.chapters, g]), {
49765
- scale: b,
49766
- setScale: y$1,
49873
+ }, [x, l, t.chapters, g, b]), {
49874
+ scale: w,
49875
+ setScale: S,
49767
49876
  zoomEnabled: d,
49768
- minZoom: C,
49769
- maxZoom: I
49877
+ minZoom: M,
49878
+ maxZoom: C
49770
49879
  };
49771
49880
  }
49772
- function Ea(t, e, a) {
49881
+ function Wa(t, e, a) {
49773
49882
  return Math.min(a, Math.max(e, t));
49774
49883
  }
49775
- function Ra(t, e) {
49884
+ function Ha(t, e) {
49776
49885
  if (!t || false === e.enabled) return function () {};
49777
49886
  var a = null,
49778
49887
  s = null,
@@ -49794,7 +49903,7 @@ function Ra(t, e) {
49794
49903
  h = 1,
49795
49904
  l = 1;
49796
49905
  var d = function d(t) {
49797
- (t.ctrlKey || t.metaKey) && (t.preventDefault(), null === n ? (l = e(), h = 1) : clearTimeout(n), h *= 1 - .01 * t.deltaY, h = Ea(h, .1, 10), a(Ea(l * h, s, r)), n = setTimeout(function () {
49906
+ (t.ctrlKey || t.metaKey) && (t.preventDefault(), null === n ? (l = e(), h = 1) : clearTimeout(n), h *= 1 - .01 * t.deltaY, h = Wa(h, .1, 10), a(Wa(l * h, s, r)), n = setTimeout(function () {
49798
49907
  n = null;
49799
49908
  }, 120));
49800
49909
  },
@@ -49820,7 +49929,7 @@ function Ra(t, e) {
49820
49929
  _e80 = _ref431[0],
49821
49930
  _n77 = _ref431[1],
49822
49931
  _h22 = Math.hypot(_n77.x - _e80.x, _n77.y - _e80.y);
49823
- a(Ea(o * (_h22 / i), s, r));
49932
+ a(Wa(o * (_h22 / i), s, r));
49824
49933
  }
49825
49934
  },
49826
49935
  g = function g(t) {
@@ -49854,23 +49963,23 @@ function Ra(t, e) {
49854
49963
  r && cancelAnimationFrame(r), (_s30 = s) !== null && _s30 !== void 0 && _s30.disconnect(), (_a51 = a) === null || _a51 === void 0 ? void 0 : _a51();
49855
49964
  };
49856
49965
  }
49857
- var Fa = {
49966
+ var Ba = {
49858
49967
  chapters: []
49859
49968
  };
49860
- function Ua(t) {
49969
+ function ja(t) {
49861
49970
  var e = A(null),
49862
- _useCapability11 = useCapability($a.id),
49971
+ _useCapability11 = useCapability(Aa.id),
49863
49972
  a = _useCapability11.provides,
49864
49973
  r = T$2(function () {
49865
49974
  var _a$getManifest;
49866
- return (_a$getManifest = a === null || a === void 0 ? void 0 : a.getManifest()) !== null && _a$getManifest !== void 0 ? _a$getManifest : Fa;
49975
+ return (_a$getManifest = a === null || a === void 0 ? void 0 : a.getManifest()) !== null && _a$getManifest !== void 0 ? _a$getManifest : Ba;
49867
49976
  }, [a]),
49868
- _Va = Va(r, t === null || t === void 0 ? void 0 : t.zoom, e),
49869
- n = _Va.scale,
49870
- h = _Va.setScale,
49871
- l = _Va.zoomEnabled,
49872
- d = _Va.minZoom,
49873
- c = _Va.maxZoom;
49977
+ _qa = qa(r, t === null || t === void 0 ? void 0 : t.zoom, e),
49978
+ n = _qa.scale,
49979
+ h = _qa.setScale,
49980
+ l = _qa.zoomEnabled,
49981
+ d = _qa.minZoom,
49982
+ c = _qa.maxZoom;
49874
49983
  return function (t, e) {
49875
49984
  var a = e.enabled,
49876
49985
  s = e.getScale,
@@ -49878,7 +49987,7 @@ function Ua(t) {
49878
49987
  o = e.minZoom,
49879
49988
  n = e.maxZoom;
49880
49989
  y(function () {
49881
- if (a) return Ra(t.current, {
49990
+ if (a) return Ha(t.current, {
49882
49991
  enabled: true,
49883
49992
  getScale: s,
49884
49993
  setScale: r,
@@ -49901,7 +50010,7 @@ function Ua(t) {
49901
50010
  zoomEnabled: l
49902
50011
  };
49903
50012
  }
49904
- var _a = {
50013
+ var Za = {
49905
50014
  display: "flex",
49906
50015
  alignItems: "center",
49907
50016
  justifyContent: "center",
@@ -49911,7 +50020,7 @@ var _a = {
49911
50020
  border: "1px solid rgba(15, 23, 42, 0.08)",
49912
50021
  boxShadow: "0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 10px 24px -4px rgba(15, 23, 42, 0.12)"
49913
50022
  },
49914
- qa = {
50023
+ Ya = {
49915
50024
  padding: "6px 12px",
49916
50025
  fontSize: "12px",
49917
50026
  fontWeight: "500",
@@ -49921,7 +50030,7 @@ var _a = {
49921
50030
  color: "#dc2626",
49922
50031
  cursor: "pointer"
49923
50032
  };
49924
- function Wa(t, e) {
50033
+ function Xa(t, e) {
49925
50034
  var _e$markup, _e$markup2;
49926
50035
  var _useAnnotationCapabil9 = useAnnotationCapability(),
49927
50036
  s = _useAnnotationCapabil9.provides,
@@ -49961,14 +50070,14 @@ function Wa(t, e) {
49961
50070
  onDelete: g
49962
50071
  }) : /* @__PURE__ */u$1("button", {
49963
50072
  type: "button",
49964
- style: qa,
50073
+ style: Ya,
49965
50074
  onClick: g,
49966
50075
  children: "删除"
49967
50076
  }), /* @__PURE__ */u$1("div", _objectSpread(_objectSpread({}, h), {}, {
49968
50077
  children: /* @__PURE__ */u$1("div", {
49969
50078
  style: f,
49970
50079
  children: /* @__PURE__ */u$1("div", {
49971
- style: _a,
50080
+ style: Za,
49972
50081
  role: "toolbar",
49973
50082
  "aria-label": "划线标注",
49974
50083
  children: m
@@ -49978,7 +50087,7 @@ function Wa(t, e) {
49978
50087
  };
49979
50088
  }, [s, t, i, r, n]);
49980
50089
  }
49981
- function Ha(_ref432) {
50090
+ function Ka(_ref432) {
49982
50091
  var _u$notes, _u$bookmarks, _u$bookmarks2, _u$bookmarks4, _u$scrollViewport2;
49983
50092
  var s = _ref432.className,
49984
50093
  r = _ref432.buildSelectionMenu,
@@ -49994,14 +50103,14 @@ function Ha(_ref432) {
49994
50103
  u = _ref432.features,
49995
50104
  p = _ref432.onExtraSelectionAction,
49996
50105
  g = _ref432.children;
49997
- var _Ua = Ua(u),
49998
- f = _Ua.hostRef,
50106
+ var _ja = ja(u),
50107
+ f = _ja.hostRef,
49999
50108
  m = function () {
50000
50109
  var _useRegistry5 = useRegistry(),
50001
50110
  t = _useRegistry5.registry;
50002
50111
  return T$2(function () {
50003
50112
  var _t$getPlugin, _t$getPlugin$provides;
50004
- var e = t === null || t === void 0 || (_t$getPlugin = t.getPlugin(Ae.id)) === null || _t$getPlugin === void 0 || (_t$getPlugin$provides = _t$getPlugin.provides) === null || _t$getPlugin$provides === void 0 ? void 0 : _t$getPlugin$provides.call(_t$getPlugin);
50113
+ var e = t === null || t === void 0 || (_t$getPlugin = t.getPlugin(Ne.id)) === null || _t$getPlugin === void 0 || (_t$getPlugin$provides = _t$getPlugin.provides) === null || _t$getPlugin$provides === void 0 ? void 0 : _t$getPlugin$provides.call(_t$getPlugin);
50005
50114
  return e ? function (t) {
50006
50115
  return e.createNoteFromSelection(t);
50007
50116
  } : null;
@@ -50010,38 +50119,38 @@ function Ha(_ref432) {
50010
50119
  b = function () {
50011
50120
  var _useRegistry6 = useRegistry(),
50012
50121
  t = _useRegistry6.registry;
50013
- return !!(t !== null && t !== void 0 && t.getPlugin(Ae.id));
50122
+ return !!(t !== null && t !== void 0 && t.getPlugin(Ne.id));
50014
50123
  }(),
50015
50124
  P = function () {
50016
50125
  var _useRegistry7 = useRegistry(),
50017
50126
  t = _useRegistry7.registry;
50018
- return !!(t !== null && t !== void 0 && t.getPlugin(ha.id));
50127
+ return !!(t !== null && t !== void 0 && t.getPlugin(la.id));
50019
50128
  }(),
50020
50129
  w = h && b && false !== (u === null || u === void 0 || (_u$notes = u.notes) === null || _u$notes === void 0 ? void 0 : _u$notes.enabled),
50021
50130
  I = l && P && false !== (u === null || u === void 0 || (_u$bookmarks = u.bookmarks) === null || _u$bookmarks === void 0 ? void 0 : _u$bookmarks.enabled),
50022
- C = P && false !== (u === null || u === void 0 || (_u$bookmarks2 = u.bookmarks) === null || _u$bookmarks2 === void 0 ? void 0 : _u$bookmarks2.enabled),
50023
- y = Ia(u, {
50131
+ y = P && false !== (u === null || u === void 0 || (_u$bookmarks2 = u.bookmarks) === null || _u$bookmarks2 === void 0 ? void 0 : _u$bookmarks2.enabled),
50132
+ C = ka(u, {
50024
50133
  onExtraAction: p
50025
50134
  }),
50026
50135
  M = T$2(function () {
50027
- if (r || y) return function (t) {
50028
- var e = y ? y(t) : t.defaultMenu;
50136
+ if (r || C) return function (t) {
50137
+ var e = C ? C(t) : t.defaultMenu;
50029
50138
  return r ? r(_objectSpread(_objectSpread({}, t), {}, {
50030
50139
  defaultMenu: e
50031
50140
  })) : e;
50032
50141
  };
50033
- }, [r, y]),
50142
+ }, [r, C]),
50034
50143
  S = T$2(function () {
50035
- return c || C ? function (s) {
50144
+ return c || y ? function (s) {
50036
50145
  var _u$bookmarks3;
50037
50146
  return /* @__PURE__ */u$1(k$2, {
50038
- children: [C && /* @__PURE__ */u$1(Ba, {
50147
+ children: [y && /* @__PURE__ */u$1(Qa, {
50039
50148
  item: s,
50040
50149
  hoverUi: u === null || u === void 0 || (_u$bookmarks3 = u.bookmarks) === null || _u$bookmarks3 === void 0 ? void 0 : _u$bookmarks3.hover
50041
50150
  }), c === null || c === void 0 ? void 0 : c(s)]
50042
50151
  });
50043
50152
  } : c;
50044
- }, [u === null || u === void 0 || (_u$bookmarks4 = u.bookmarks) === null || _u$bookmarks4 === void 0 ? void 0 : _u$bookmarks4.hover, C, c]),
50153
+ }, [u === null || u === void 0 || (_u$bookmarks4 = u.bookmarks) === null || _u$bookmarks4 === void 0 ? void 0 : _u$bookmarks4.hover, y, c]),
50045
50154
  x = T$2(function () {
50046
50155
  var _u$scrollViewport$bac, _u$scrollViewport;
50047
50156
  return {
@@ -50051,12 +50160,12 @@ function Ha(_ref432) {
50051
50160
  return u$1("div", {
50052
50161
  ref: f,
50053
50162
  className: s,
50054
- style: s ? void 0 : ge$1,
50163
+ style: s ? void 0 : fe$1,
50055
50164
  children: [/* @__PURE__ */u$1(It$1, {
50056
50165
  style: x,
50057
50166
  renderPage: function renderPage(t) {
50058
50167
  var _u$notes2, _u$bookmarks5;
50059
- return /* @__PURE__ */u$1(ja, {
50168
+ return /* @__PURE__ */u$1(Ja, {
50060
50169
  item: t,
50061
50170
  showNoteMarkers: w,
50062
50171
  showBookmarkMarkers: I,
@@ -50074,14 +50183,14 @@ function Ha(_ref432) {
50074
50183
  }), g]
50075
50184
  });
50076
50185
  }
50077
- function Ba(_ref433) {
50186
+ function Qa(_ref433) {
50078
50187
  var _r$document$pages$t$l, _r$document;
50079
50188
  var t = _ref433.item,
50080
50189
  e = _ref433.hoverUi;
50081
50190
  var s = ce$1(t),
50082
50191
  r = useDocumentState(s),
50083
50192
  i = (_r$document$pages$t$l = r === null || r === void 0 || (_r$document = r.document) === null || _r$document === void 0 ? void 0 : _r$document.pages[t.localPageIndex]) !== null && _r$document$pages$t$l !== void 0 ? _r$document$pages$t$l : null;
50084
- return i ? /* @__PURE__ */u$1(da, {
50193
+ return i ? /* @__PURE__ */u$1(ca, {
50085
50194
  item: t,
50086
50195
  pdfPageWidth: i.size.width,
50087
50196
  pdfPageHeight: i.size.height,
@@ -50090,7 +50199,7 @@ function Ba(_ref433) {
50090
50199
  hoverUi: e
50091
50200
  }) : null;
50092
50201
  }
50093
- function ja(_ref434) {
50202
+ function Ja(_ref434) {
50094
50203
  var _b$getDocument$pages$, _b$getDocument;
50095
50204
  var e = _ref434.item,
50096
50205
  s = _ref434.showNoteMarkers,
@@ -50142,7 +50251,7 @@ function ja(_ref434) {
50142
50251
  var a = i.getHighlightRectsForPage(t.localPageIndex, n);
50143
50252
  ue$1(i.getSelectedText(n), function (s) {
50144
50253
  var r = s.join("\n"),
50145
- i = pe$1(t, a, r);
50254
+ i = ge$1(t, a, r);
50146
50255
  e(i);
50147
50256
  });
50148
50257
  },
@@ -50167,7 +50276,7 @@ function ja(_ref434) {
50167
50276
  defaultMenu: M,
50168
50277
  createNote: d
50169
50278
  }) : M,
50170
- x = Wa(v, u),
50279
+ x = Xa(v, u),
50171
50280
  L = T$2(function () {
50172
50281
  return function (t, e) {
50173
50282
  if (t || e) return function (a) {
@@ -50190,9 +50299,9 @@ function ja(_ref434) {
50190
50299
  children: /* @__PURE__ */u$1(PagePointerProvider, {
50191
50300
  documentId: v,
50192
50301
  pageIndex: e.localPageIndex,
50193
- style: fe$1,
50194
- onPointerDown: me$1,
50195
- children: [/* @__PURE__ */u$1(Ct$1, {
50302
+ style: me$1,
50303
+ onPointerDown: ve$1,
50304
+ children: [/* @__PURE__ */u$1(yt$1, {
50196
50305
  chapterId: v,
50197
50306
  localPageIndex: e.localPageIndex
50198
50307
  }), /* @__PURE__ */u$1(SelectionLayer, {
@@ -50228,21 +50337,21 @@ function ja(_ref434) {
50228
50337
  })
50229
50338
  });
50230
50339
  }
50231
- var Ya = /*#__PURE__*/function () {
50232
- function Ya(t) {
50233
- _classCallCheck(this, Ya);
50340
+ var es = /*#__PURE__*/function () {
50341
+ function es(t) {
50342
+ _classCallCheck(this, es);
50234
50343
  this.cb = t;
50235
50344
  }
50236
- return _createClass(Ya, [{
50345
+ return _createClass(es, [{
50237
50346
  key: "resolvePassword",
50238
50347
  value: function resolvePassword(t, e) {
50239
50348
  return this.cb(t, e);
50240
50349
  }
50241
50350
  }]);
50242
50351
  }();
50243
- var es = "chapter-scroll",
50244
- as = {
50245
- id: es,
50352
+ var ns = "chapter-scroll",
50353
+ hs = {
50354
+ id: ns,
50246
50355
  name: "Chapter Scroll Plugin",
50247
50356
  version: "0.1.0",
50248
50357
  provides: ["chapter-scroll"],
@@ -50255,10 +50364,10 @@ var es = "chapter-scroll",
50255
50364
  pageGap: 20
50256
50365
  }
50257
50366
  };
50258
- var ss = {
50367
+ var ls = {
50259
50368
  kind: "first-wins"
50260
50369
  };
50261
- function rs(t, e, a) {
50370
+ function ds(t, e, a) {
50262
50371
  if (1 === e.length) return e[0].chapterId;
50263
50372
  switch (a.kind) {
50264
50373
  case "first-wins":
@@ -50277,9 +50386,9 @@ function rs(t, e, a) {
50277
50386
  return a.resolve(t, e);
50278
50387
  }
50279
50388
  }
50280
- var is = /*#__PURE__*/function () {
50281
- function is(t) {
50282
- _classCallCheck(this, is);
50389
+ var cs = /*#__PURE__*/function () {
50390
+ function cs(t) {
50391
+ _classCallCheck(this, cs);
50283
50392
  this._pages = t, this._byChapter = /* @__PURE__ */new Map(), this._byGlobalNumber = /* @__PURE__ */new Map();
50284
50393
  var _iterator356 = _createForOfIteratorHelper(t),
50285
50394
  _step356;
@@ -50296,7 +50405,7 @@ var is = /*#__PURE__*/function () {
50296
50405
  _iterator356.f();
50297
50406
  }
50298
50407
  }
50299
- return _createClass(is, [{
50408
+ return _createClass(cs, [{
50300
50409
  key: "totalPages",
50301
50410
  get: function get() {
50302
50411
  return this._pages.length;
@@ -50342,10 +50451,10 @@ var is = /*#__PURE__*/function () {
50342
50451
  }
50343
50452
  }]);
50344
50453
  }();
50345
- function os(t) {
50346
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ss;
50454
+ function us(t) {
50455
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ls;
50347
50456
  var a = function (t) {
50348
- var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ss;
50457
+ var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ls;
50349
50458
  var a = /* @__PURE__ */new Map();
50350
50459
  var _iterator357 = _createForOfIteratorHelper(t.chapters),
50351
50460
  _step357;
@@ -50373,7 +50482,7 @@ function os(t) {
50373
50482
  var _step358$value = _slicedToArray(_step358.value, 2),
50374
50483
  _r52 = _step358$value[0],
50375
50484
  _i68 = _step358$value[1];
50376
- s.set(_r52, rs(_r52, _i68, e));
50485
+ s.set(_r52, ds(_r52, _i68, e));
50377
50486
  }
50378
50487
  } catch (err) {
50379
50488
  _iterator358.e(err);
@@ -50425,13 +50534,13 @@ function os(t) {
50425
50534
  } finally {
50426
50535
  _iterator360.f();
50427
50536
  }
50428
- return new is(i);
50537
+ return new cs(i);
50429
50538
  }
50430
- var ns = /*#__PURE__*/function (_BasePlugin33) {
50539
+ var ps = /*#__PURE__*/function (_BasePlugin33) {
50431
50540
  function t(_t605, e) {
50432
50541
  var _this239;
50433
50542
  _classCallCheck(this, t);
50434
- _this239 = _callSuper(this, t, [_t605, e]), _this239.statusChange$ = createBehaviorEmitter(), _this239.manifestChange$ = createEmitter(), _this239.overlapStrategy = ss, _this239.chapterStatus = /* @__PURE__ */new Map(), _this239.chapterLastUsed = /* @__PURE__ */new Map(), _this239.passwordAttempts = /* @__PURE__ */new Map(), _this239.pendingLoadPromises = /* @__PURE__ */new Map(), _this239.unloadTimer = null, _this239.documentManagerUnsubs = [], _this239.documentManager = _this239.registry.getPlugin(DocumentManagerPlugin.id);
50543
+ _this239 = _callSuper(this, t, [_t605, e]), _this239.statusChange$ = createBehaviorEmitter(), _this239.manifestChange$ = createEmitter(), _this239.overlapStrategy = ls, _this239.chapterStatus = /* @__PURE__ */new Map(), _this239.chapterLastUsed = /* @__PURE__ */new Map(), _this239.passwordAttempts = /* @__PURE__ */new Map(), _this239.pendingLoadPromises = /* @__PURE__ */new Map(), _this239.unloadTimer = null, _this239.documentManagerUnsubs = [], _this239.documentManager = _this239.registry.getPlugin(DocumentManagerPlugin.id);
50435
50544
  return _this239;
50436
50545
  }
50437
50546
  _inherits(t, _BasePlugin33);
@@ -50445,7 +50554,7 @@ var ns = /*#__PURE__*/function (_BasePlugin33) {
50445
50554
  return _regenerator().w(function (_context115) {
50446
50555
  while (1) switch (_context115.n) {
50447
50556
  case 0:
50448
- if (this.config = _t606, this.passwordProvider = _t606.passwordProvider, this.overlapStrategy = (_t606$overlapStrategy = _t606.overlapStrategy) !== null && _t606$overlapStrategy !== void 0 ? _t606$overlapStrategy : ss, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t607) {
50557
+ if (this.config = _t606, this.passwordProvider = _t606.passwordProvider, this.overlapStrategy = (_t606$overlapStrategy = _t606.overlapStrategy) !== null && _t606$overlapStrategy !== void 0 ? _t606$overlapStrategy : ls, this.documentManagerUnsubs.push(this.documentManager.provides().onDocumentOpened(function (_t607) {
50449
50558
  _this240.isOwnedChapter(_t607.id) && (_this240.passwordAttempts.delete(_t607.id), _this240.updateStatus(_t607.id, "loaded"));
50450
50559
  }), this.documentManager.provides().onDocumentClosed(function (_t608) {
50451
50560
  _this240.isOwnedChapter(_t608) && _this240.updateStatus(_t608, "closed");
@@ -50462,7 +50571,7 @@ var ns = /*#__PURE__*/function (_BasePlugin33) {
50462
50571
  }
50463
50572
  }, _callee110, this);
50464
50573
  }));
50465
- function initialize(_x112) {
50574
+ function initialize(_x113) {
50466
50575
  return _initialize34.apply(this, arguments);
50467
50576
  }
50468
50577
  return initialize;
@@ -50585,7 +50694,7 @@ var ns = /*#__PURE__*/function (_BasePlugin33) {
50585
50694
  } finally {
50586
50695
  _iterator365.f();
50587
50696
  }
50588
- this.manifest = e, this.virtualPageMap = os(e, this.overlapStrategy), this.manifestChange$.emit({
50697
+ this.manifest = e, this.virtualPageMap = us(e, this.overlapStrategy), this.manifestChange$.emit({
50589
50698
  manifest: e,
50590
50699
  map: this.virtualPageMap
50591
50700
  }), this.eagerPrefetchFromManifest();
@@ -50784,7 +50893,7 @@ var ns = /*#__PURE__*/function (_BasePlugin33) {
50784
50893
  }
50785
50894
  }, _callee111, this);
50786
50895
  }));
50787
- function resolvePdfPayload(_x113) {
50896
+ function resolvePdfPayload(_x114) {
50788
50897
  return _resolvePdfPayload1.apply(this, arguments);
50789
50898
  }
50790
50899
  return resolvePdfPayload;
@@ -50852,7 +50961,7 @@ var ns = /*#__PURE__*/function (_BasePlugin33) {
50852
50961
  }
50853
50962
  }, _callee112, this, [[1, 5]]);
50854
50963
  }));
50855
- function startLoad(_x114) {
50964
+ function startLoad(_x115) {
50856
50965
  return _startLoad1.apply(this, arguments);
50857
50966
  }
50858
50967
  return startLoad;
@@ -50931,7 +51040,7 @@ var ns = /*#__PURE__*/function (_BasePlugin33) {
50931
51040
  }
50932
51041
  }, _callee113, this, [[4, 6]]);
50933
51042
  }));
50934
- function handleDocumentError(_x115, _x116, _x117) {
51043
+ function handleDocumentError(_x116, _x117, _x118) {
50935
51044
  return _handleDocumentError1.apply(this, arguments);
50936
51045
  }
50937
51046
  return handleDocumentError;
@@ -50963,9 +51072,9 @@ var ns = /*#__PURE__*/function (_BasePlugin33) {
50963
51072
  }
50964
51073
  }]);
50965
51074
  }(BasePlugin);
50966
- ns.id = "chapter-manager";
50967
- var hs = ns;
50968
- function ls(t, e) {
51075
+ ps.id = "chapter-manager";
51076
+ var gs = ps;
51077
+ function fs(t, e) {
50969
51078
  if (t === e) return true;
50970
51079
  if (t.totalHeight !== e.totalHeight || t.totalWidth !== e.totalWidth || t.pageGap !== e.pageGap || t.items.length !== e.items.length) return false;
50971
51080
  for (var a = 0; a < t.items.length; a++) {
@@ -50975,15 +51084,15 @@ function ls(t, e) {
50975
51084
  }
50976
51085
  return true;
50977
51086
  }
50978
- var ds = /*#__PURE__*/function (_BasePlugin34) {
50979
- function ds(t, e) {
51087
+ var ms = /*#__PURE__*/function (_BasePlugin34) {
51088
+ function ms(t, e) {
50980
51089
  var _this245;
50981
- _classCallCheck(this, ds);
50982
- _this245 = _callSuper(this, ds, [t, e]), _this245.layoutChange$ = createBehaviorEmitter(void 0, ls), _this245.visibleChange$ = createBehaviorEmitter(), _this245.virtualPageMap = null, _this245.pageSizes = /* @__PURE__ */new Map(), _this245.offsets = [], _this245.totalHeight = 0, _this245.totalWidth = 0, _this245.viewportEl = null, _this245.viewportObservers = null, _this245.currentVisible = [], _this245.currentGlobalPageIndex = 0, _this245.chapterManagerUnsubs = [], _this245.chapterManager = _this245.registry.getPlugin(hs.id), _this245.documentManager = _this245.registry.getPlugin(DocumentManagerPlugin.id);
51090
+ _classCallCheck(this, ms);
51091
+ _this245 = _callSuper(this, ms, [t, e]), _this245.layoutChange$ = createBehaviorEmitter(void 0, fs), _this245.visibleChange$ = createBehaviorEmitter(), _this245.virtualPageMap = null, _this245.pageSizes = /* @__PURE__ */new Map(), _this245.offsets = [], _this245.totalHeight = 0, _this245.totalWidth = 0, _this245.viewportEl = null, _this245.viewportObservers = null, _this245.currentVisible = [], _this245.currentGlobalPageIndex = 0, _this245.chapterManagerUnsubs = [], _this245.chapterManager = _this245.registry.getPlugin(gs.id), _this245.documentManager = _this245.registry.getPlugin(DocumentManagerPlugin.id);
50983
51092
  return _this245;
50984
51093
  }
50985
- _inherits(ds, _BasePlugin34);
50986
- return _createClass(ds, [{
51094
+ _inherits(ms, _BasePlugin34);
51095
+ return _createClass(ms, [{
50987
51096
  key: "initialize",
50988
51097
  value: function () {
50989
51098
  var _initialize35 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee114(t) {
@@ -51011,7 +51120,7 @@ var ds = /*#__PURE__*/function (_BasePlugin34) {
51011
51120
  }
51012
51121
  }, _callee114, this);
51013
51122
  }));
51014
- function initialize(_x118) {
51123
+ function initialize(_x119) {
51015
51124
  return _initialize35.apply(this, arguments);
51016
51125
  }
51017
51126
  return initialize;
@@ -51106,7 +51215,7 @@ var ds = /*#__PURE__*/function (_BasePlugin34) {
51106
51215
  key: "destroy",
51107
51216
  value: function destroy() {
51108
51217
  var t;
51109
- _superPropGet(ds, "destroy", this, 3)([]);
51218
+ _superPropGet(ms, "destroy", this, 3)([]);
51110
51219
  var _iterator372 = _createForOfIteratorHelper(this.chapterManagerUnsubs),
51111
51220
  _step372;
51112
51221
  try {
@@ -51393,19 +51502,19 @@ var ds = /*#__PURE__*/function (_BasePlugin34) {
51393
51502
  }
51394
51503
  }]);
51395
51504
  }(BasePlugin);
51396
- ds.id = "chapter-scroll";
51397
- var cs = ds;
51398
- var us = {
51399
- manifest: as,
51505
+ ms.id = "chapter-scroll";
51506
+ var vs = ms;
51507
+ var bs = {
51508
+ manifest: hs,
51400
51509
  create: function create(t) {
51401
- return new cs(es, t);
51510
+ return new vs(ns, t);
51402
51511
  },
51403
51512
  reducer: function reducer(t) {
51404
51513
  return t;
51405
51514
  },
51406
51515
  initialState: {}
51407
51516
  },
51408
- ps = {
51517
+ Ps = {
51409
51518
  "annotation-toolbar": {
51410
51519
  id: "annotation-toolbar",
51411
51520
  position: {
@@ -51902,12 +52011,12 @@ var us = {
51902
52011
  }]
51903
52012
  }
51904
52013
  };
51905
- var gs = /*#__PURE__*/function () {
51906
- function gs() {
51907
- _classCallCheck(this, gs);
52014
+ var ws = /*#__PURE__*/function () {
52015
+ function ws() {
52016
+ _classCallCheck(this, ws);
51908
52017
  this.specs = [];
51909
52018
  }
51910
- return _createClass(gs, [{
52019
+ return _createClass(ws, [{
51911
52020
  key: "register",
51912
52021
  value: function register(t) {
51913
52022
  if (this.specs.some(function (e) {
@@ -51939,7 +52048,7 @@ var gs = /*#__PURE__*/function () {
51939
52048
  }, {
51940
52049
  key: "buildToolbars",
51941
52050
  value: function buildToolbars() {
51942
- var t = structuredClone(ps);
52051
+ var t = structuredClone(Ps);
51943
52052
  var _iterator377 = _createForOfIteratorHelper(this.specs),
51944
52053
  _step377;
51945
52054
  try {
@@ -51962,7 +52071,7 @@ var gs = /*#__PURE__*/function () {
51962
52071
  } : {}), {}, {
51963
52072
  categories: (_e$categories = e.categories) !== null && _e$categories !== void 0 ? _e$categories : []
51964
52073
  });
51965
- a.items = fs(a.items, s, e.position);
52074
+ a.items = Is(a.items, s, e.position);
51966
52075
  }
51967
52076
  } catch (err) {
51968
52077
  _iterator377.e(err);
@@ -51973,7 +52082,7 @@ var gs = /*#__PURE__*/function () {
51973
52082
  }
51974
52083
  }]);
51975
52084
  }();
51976
- function fs(t, e, a) {
52085
+ function Is(t, e, a) {
51977
52086
  return (null == a ? void 0 : a.after) || (null == a ? void 0 : a.before) ? function (t, e, a) {
51978
52087
  var _s34 = function s(t) {
51979
52088
  var r = [];
@@ -52002,14 +52111,14 @@ function fs(t, e, a) {
52002
52111
  });
52003
52112
  }(t, e);
52004
52113
  }
52005
- var ms = {
52114
+ var ys = {
52006
52115
  annotate: "annotation-toolbar",
52007
52116
  shapes: "shapes-toolbar",
52008
52117
  insert: "insert-toolbar",
52009
52118
  form: "form-toolbar",
52010
52119
  redact: "redaction-toolbar"
52011
52120
  };
52012
- function vs() {
52121
+ function Cs() {
52013
52122
  return {
52014
52123
  "mode:view": {
52015
52124
  id: "mode:view",
@@ -52134,7 +52243,7 @@ function vs() {
52134
52243
  }
52135
52244
  };
52136
52245
  }
52137
- function bs(t) {
52246
+ function Ms(t) {
52138
52247
  var _t$toolbar, _e$enabledModes, _t$commands, _t$features, _t$features2, _t$features3;
52139
52248
  var e = (_t$toolbar = t.toolbar) !== null && _t$toolbar !== void 0 ? _t$toolbar : {},
52140
52249
  a = (_e$enabledModes = e.enabledModes) !== null && _e$enabledModes !== void 0 ? _e$enabledModes : ["view", "annotate", "shapes", "insert", "form", "redact"],
@@ -52144,7 +52253,7 @@ function bs(t) {
52144
52253
  var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
52145
52254
  var e, a, s, r, i, o;
52146
52255
  var n = new Set((_t$enabledModes = t.enabledModes) !== null && _t$enabledModes !== void 0 ? _t$enabledModes : ["view", "annotate", "shapes", "insert", "form", "redact"]),
52147
- h = new gs();
52256
+ h = new ws();
52148
52257
  (null == (e = t.customOperations) ? void 0 : e.length) && h.registerAll(t.customOperations);
52149
52258
  var l = h.buildToolbars(),
52150
52259
  d = {};
@@ -52154,7 +52263,7 @@ function bs(t) {
52154
52263
  for (_iterator379.s(); !(_step379 = _iterator379.n()).done;) {
52155
52264
  var _u = _step379.value;
52156
52265
  if ("view" === _u) continue;
52157
- var _t652 = ms[_u];
52266
+ var _t652 = ys[_u];
52158
52267
  l[_t652] && (d[_t652] = l[_t652]);
52159
52268
  }
52160
52269
  } catch (err) {
@@ -52216,17 +52325,17 @@ function bs(t) {
52216
52325
  })),
52217
52326
  r = _ref455.schema,
52218
52327
  i = _ref455.operationRegistry,
52219
- o = _objectSpread(_objectSpread(_objectSpread({}, s ? vs() : {}), s ? Ps(i.list()) : {}), (_t$commands = t.commands) !== null && _t$commands !== void 0 ? _t$commands : {}),
52328
+ o = _objectSpread(_objectSpread(_objectSpread({}, s ? Cs() : {}), s ? Ss(i.list()) : {}), (_t$commands = t.commands) !== null && _t$commands !== void 0 ? _t$commands : {}),
52220
52329
  n = [createPluginRegistration(DocumentManagerPluginPackage, {
52221
52330
  initialDocuments: []
52222
- }), createPluginRegistration(Ta, {
52331
+ }), createPluginRegistration(Na, {
52223
52332
  manifest: t.manifest,
52224
52333
  overlapStrategy: t.overlapStrategy,
52225
52334
  passwordProvider: t.passwordProvider,
52226
52335
  chapterPdfLoader: t.chapterPdfLoader,
52227
52336
  prefetchChapters: t.prefetchChapters,
52228
52337
  unloadTimeoutMs: t.unloadTimeoutMs
52229
- }), createPluginRegistration(us, {
52338
+ }), createPluginRegistration(bs, {
52230
52339
  placeholderPageHeight: t.placeholderPageHeight,
52231
52340
  placeholderPageWidth: t.placeholderPageWidth
52232
52341
  }), createPluginRegistration(InteractionManagerPluginPackage), createPluginRegistration(RenderPluginPackage), createPluginRegistration(RotatePluginPackage), createPluginRegistration(SelectionPluginPackage, {
@@ -52242,10 +52351,10 @@ function bs(t) {
52242
52351
  })] : []), _toConsumableArray(s ? [createPluginRegistration(I18nPluginPackage), createPluginRegistration(UIPluginPackage, {
52243
52352
  schema: r
52244
52353
  })] : []));
52245
- return t.notes && n.push(createPluginRegistration(Ve, {
52354
+ return t.notes && n.push(createPluginRegistration(Ee, {
52246
52355
  callbacks: t.notes.callbacks,
52247
52356
  ui: (_t$features = t.features) === null || _t$features === void 0 || (_t$features = _t$features.notes) === null || _t$features === void 0 ? void 0 : _t$features.marker
52248
- })), t.bookmarks && n.push(createPluginRegistration(la, {
52357
+ })), t.bookmarks && n.push(createPluginRegistration(da, {
52249
52358
  callbacks: t.bookmarks.callbacks,
52250
52359
  ui: (_t$features2 = t.features) === null || _t$features2 === void 0 || (_t$features2 = _t$features2.bookmarks) === null || _t$features2 === void 0 ? void 0 : _t$features2.marker,
52251
52360
  hover: (_t$features3 = t.features) === null || _t$features3 === void 0 || (_t$features3 = _t$features3.bookmarks) === null || _t$features3 === void 0 ? void 0 : _t$features3.hover
@@ -52255,7 +52364,7 @@ function bs(t) {
52255
52364
  operationRegistry: i
52256
52365
  };
52257
52366
  }
52258
- function Ps(t) {
52367
+ function Ss(t) {
52259
52368
  var e = {};
52260
52369
  var _iterator380 = _createForOfIteratorHelper(t),
52261
52370
  _step380;
@@ -52288,22 +52397,22 @@ function Ps(t) {
52288
52397
  }
52289
52398
  return e;
52290
52399
  }
52291
- var ws = nt$1(),
52292
- Is = {};
52293
- function Cs(t) {
52400
+ var xs = nt$1(),
52401
+ ks = {};
52402
+ function Ls(t) {
52294
52403
  var _t$toolbar2;
52295
- return bs(_objectSpread(_objectSpread({}, t), {}, {
52404
+ return Ms(_objectSpread(_objectSpread({}, t), {}, {
52296
52405
  toolbar: (_t$toolbar2 = t.toolbar) !== null && _t$toolbar2 !== void 0 ? _t$toolbar2 : {
52297
52406
  enabledModes: []
52298
52407
  },
52299
52408
  features: nt$1(t.features)
52300
52409
  }));
52301
52410
  }
52302
- var ys = {
52411
+ var $s = {
52303
52412
  overlapStrategy: {
52304
52413
  kind: "first-wins"
52305
52414
  },
52306
- passwordProvider: new Ya(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee115() {
52415
+ passwordProvider: new es(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee115() {
52307
52416
  return _regenerator().w(function (_context120) {
52308
52417
  while (1) switch (_context120.n) {
52309
52418
  case 0:
@@ -52318,7 +52427,7 @@ var ys = {
52318
52427
  enabledModes: []
52319
52428
  }
52320
52429
  };
52321
- function Ms(t) {
52430
+ function Ts(t) {
52322
52431
  return function (t) {
52323
52432
  return "callbacks" in t.notes;
52324
52433
  }(t) ? {
@@ -52328,12 +52437,12 @@ function Ms(t) {
52328
52437
  bookmarks: t.bookmarks.callbacks
52329
52438
  } : t;
52330
52439
  }
52331
- function Ss(t) {
52440
+ function Ds(t) {
52332
52441
  var _t$overlapStrategy;
52333
- return _objectSpread(_objectSpread({}, ys), {}, {
52442
+ return _objectSpread(_objectSpread({}, $s), {}, {
52334
52443
  manifest: t.manifest,
52335
52444
  chapterPdfLoader: t.chapterPdfLoader,
52336
- overlapStrategy: (_t$overlapStrategy = t.overlapStrategy) !== null && _t$overlapStrategy !== void 0 ? _t$overlapStrategy : ys.overlapStrategy,
52445
+ overlapStrategy: (_t$overlapStrategy = t.overlapStrategy) !== null && _t$overlapStrategy !== void 0 ? _t$overlapStrategy : $s.overlapStrategy,
52337
52446
  notes: {
52338
52447
  callbacks: t.notes
52339
52448
  },
@@ -52343,23 +52452,23 @@ function Ss(t) {
52343
52452
  features: nt$1(t.features)
52344
52453
  });
52345
52454
  }
52346
- function xs(t) {
52347
- var e = Ss(Ms(t)),
52348
- _Cs = Cs(e),
52349
- a = _Cs.plugins;
52455
+ function zs(t) {
52456
+ var e = Ds(Ts(t)),
52457
+ _Ls = Ls(e),
52458
+ a = _Ls.plugins;
52350
52459
  return {
52351
52460
  plugins: a,
52352
52461
  features: e.features,
52353
52462
  editorOptions: e
52354
52463
  };
52355
52464
  }
52356
- function ks(t) {
52357
- var _Ss = Ss(Ms(t)),
52358
- e = _Ss.features,
52359
- a = _objectWithoutProperties(_Ss, _excluded14);
52465
+ function Gs(t) {
52466
+ var _Ds = Ds(Ts(t)),
52467
+ e = _Ds.features,
52468
+ a = _objectWithoutProperties(_Ds, _excluded14);
52360
52469
  return a;
52361
52470
  }
52362
- var Ls = {
52471
+ var Os = {
52363
52472
  display: "flex",
52364
52473
  height: "100%",
52365
52474
  minHeight: "120px",
@@ -52368,14 +52477,14 @@ var Ls = {
52368
52477
  fontSize: "14px",
52369
52478
  color: "#64748b"
52370
52479
  };
52371
- function $s(_ref462) {
52480
+ function As(_ref462) {
52372
52481
  var e = _ref462.chapterId,
52373
52482
  s = _ref462.chapterManager,
52374
52483
  o = _ref462.loadTimeoutMs,
52375
52484
  n = _ref462.onLoadTimeout,
52376
52485
  h = _ref462.children,
52377
52486
  l = _objectWithoutProperties(_ref462, _excluded15);
52378
- var _useCapability15 = useCapability($a.id),
52487
+ var _useCapability15 = useCapability(Aa.id),
52379
52488
  d = _useCapability15.provides,
52380
52489
  c = s !== null && s !== void 0 ? s : d,
52381
52490
  _d$103 = d$1(false),
@@ -52411,19 +52520,19 @@ function $s(_ref462) {
52411
52520
  t = true, s(), i();
52412
52521
  };
52413
52522
  }, [c, e, o, n]), g ? /* @__PURE__ */u$1("div", {
52414
- style: Ls,
52523
+ style: Os,
52415
52524
  children: g
52416
- }) : c ? u ? /* @__PURE__ */u$1(Ha, _objectSpread(_objectSpread({}, l), {}, {
52525
+ }) : c ? u ? /* @__PURE__ */u$1(Ka, _objectSpread(_objectSpread({}, l), {}, {
52417
52526
  children: h
52418
52527
  })) : /* @__PURE__ */u$1("div", {
52419
- style: Ls,
52528
+ style: Os,
52420
52529
  children: ["正在加载 ", e, ".pdf…"]
52421
52530
  }) : /* @__PURE__ */u$1("div", {
52422
- style: Ls,
52531
+ style: Os,
52423
52532
  children: "正在初始化章节管理器…"
52424
52533
  });
52425
52534
  }
52426
- function Ts(_ref463) {
52535
+ function Ns(_ref463) {
52427
52536
  var t = _ref463.engine,
52428
52537
  e = _ref463.options,
52429
52538
  s = _ref463.editorOptions,
@@ -52440,13 +52549,13 @@ function Ts(_ref463) {
52440
52549
  m = _ref463.children;
52441
52550
  var _T$7 = T$2(function () {
52442
52551
  return function (t) {
52443
- if (t.options) return xs(t.options);
52552
+ if (t.options) return zs(t.options);
52444
52553
  if (!t.editorOptions) throw new Error("ChapterPdfViewer: 请传入 `options`(推荐),或同时传入 `editorOptions` 与 `features`");
52445
52554
  var e = nt$1(t.features),
52446
- _Cs2 = Cs(_objectSpread(_objectSpread({}, t.editorOptions), {}, {
52555
+ _Ls2 = Ls(_objectSpread(_objectSpread({}, t.editorOptions), {}, {
52447
52556
  features: e
52448
52557
  })),
52449
- a = _Cs2.plugins;
52558
+ a = _Ls2.plugins;
52450
52559
  return {
52451
52560
  plugins: a,
52452
52561
  features: e,
@@ -52468,7 +52577,7 @@ function Ts(_ref463) {
52468
52577
  I = _d$108[1];
52469
52578
  return u$1("div", {
52470
52579
  className: n,
52471
- style: n ? void 0 : ge$1,
52580
+ style: n ? void 0 : fe$1,
52472
52581
  children: /* @__PURE__ */u$1(EmbedPDF, {
52473
52582
  engine: t,
52474
52583
  plugins: v,
@@ -52483,7 +52592,7 @@ function Ts(_ref463) {
52483
52592
  }
52484
52593
  }, _callee116);
52485
52594
  }));
52486
- function onInitialized(_x119) {
52595
+ function onInitialized(_x120) {
52487
52596
  return _onInitialized.apply(this, arguments);
52488
52597
  }
52489
52598
  return onInitialized;
@@ -52500,13 +52609,13 @@ function Ts(_ref463) {
52500
52609
  renderPageOverlay: c,
52501
52610
  children: m
52502
52611
  },
52503
- s = (_w$getPlugin$provides = w === null || w === void 0 || (_w$getPlugin = w.getPlugin($a.id)) === null || _w$getPlugin === void 0 ? void 0 : _w$getPlugin.provides()) !== null && _w$getPlugin$provides !== void 0 ? _w$getPlugin$provides : null;
52504
- return p ? /* @__PURE__ */u$1($s, _objectSpread({
52612
+ s = (_w$getPlugin$provides = w === null || w === void 0 || (_w$getPlugin = w.getPlugin(Aa.id)) === null || _w$getPlugin === void 0 ? void 0 : _w$getPlugin.provides()) !== null && _w$getPlugin$provides !== void 0 ? _w$getPlugin$provides : null;
52613
+ return p ? /* @__PURE__ */u$1(As, _objectSpread({
52505
52614
  chapterId: p,
52506
52615
  chapterManager: s,
52507
52616
  loadTimeoutMs: g,
52508
52617
  onLoadTimeout: f
52509
- }, e)) : /* @__PURE__ */u$1(Ha, _objectSpread({}, e));
52618
+ }, e)) : /* @__PURE__ */u$1(Ka, _objectSpread({}, e));
52510
52619
  }
52511
52620
  })
52512
52621
  });
@@ -52538,7 +52647,7 @@ function getBookmarkCallbacks(input) {
52538
52647
  * 将宿主传入的 options/editorInput 转为 editor-engine 选项,并把笔记/书签回调桥接为 CustomEvent。
52539
52648
  */
52540
52649
  function buildEditorOptionsWithEvents(input, eventHost) {
52541
- var base = ks(input);
52650
+ var base = Gs(input);
52542
52651
  var sourceNoteCallbacks = getNoteCallbacks(input);
52543
52652
  var sourceBookmarkCallbacks = getBookmarkCallbacks(input);
52544
52653
  var noteCallbacks = _objectSpread(_objectSpread({}, sourceNoteCallbacks), {}, {
@@ -52574,7 +52683,7 @@ function buildEditorOptionsWithEvents(input, eventHost) {
52574
52683
  }
52575
52684
  }, _callee117);
52576
52685
  }));
52577
- function onRequestRemove(_x120) {
52686
+ function onRequestRemove(_x121) {
52578
52687
  return _onRequestRemove.apply(this, arguments);
52579
52688
  }
52580
52689
  return onRequestRemove;
@@ -52604,7 +52713,7 @@ function dispatchViewerReady(host, registry) {
52604
52713
  */
52605
52714
  function defaultSnippetWasmUrl() {
52606
52715
  var scope = 'embedpdf' + '-editor';
52607
- return 'https://cdn.jsdelivr.net/npm/@' + scope + '/chapter-snippet@' + "0.3.5" + '/dist/pdfium.wasm';
52716
+ return 'https://cdn.jsdelivr.net/npm/@' + scope + '/chapter-snippet@' + "0.3.6" + '/dist/pdfium.wasm';
52608
52717
  }
52609
52718
  var DEFAULT_CHAPTER_SCROLL_VIEWPORT_BACKGROUND = "#f1f5f9";
52610
52719
  ({
@@ -52815,7 +52924,7 @@ function ChapterApp(_ref466) {
52815
52924
  height: '100%',
52816
52925
  minHeight: 0
52817
52926
  },
52818
- children: u$1(Ts, {
52927
+ children: u$1(Ns, {
52819
52928
  engine: engine,
52820
52929
  editorOptions: editorOptions,
52821
52930
  features: features,
@@ -53269,7 +53378,7 @@ var _ChapterManagerPlugin = /*#__PURE__*/function (_BasePlugin35) {
53269
53378
  }
53270
53379
  }, _callee118, this);
53271
53380
  }));
53272
- function initialize(_x121) {
53381
+ function initialize(_x122) {
53273
53382
  return _initialize36.apply(this, arguments);
53274
53383
  }
53275
53384
  return initialize;
@@ -53593,7 +53702,7 @@ var _ChapterManagerPlugin = /*#__PURE__*/function (_BasePlugin35) {
53593
53702
  }
53594
53703
  }, _callee119, this);
53595
53704
  }));
53596
- function resolvePdfPayload(_x122) {
53705
+ function resolvePdfPayload(_x123) {
53597
53706
  return _resolvePdfPayload10.apply(this, arguments);
53598
53707
  }
53599
53708
  return resolvePdfPayload;
@@ -53666,7 +53775,7 @@ var _ChapterManagerPlugin = /*#__PURE__*/function (_BasePlugin35) {
53666
53775
  }
53667
53776
  }, _callee120, this, [[1, 5]]);
53668
53777
  }));
53669
- function startLoad(_x123) {
53778
+ function startLoad(_x124) {
53670
53779
  return _startLoad10.apply(this, arguments);
53671
53780
  }
53672
53781
  return startLoad;
@@ -53756,7 +53865,7 @@ var _ChapterManagerPlugin = /*#__PURE__*/function (_BasePlugin35) {
53756
53865
  }
53757
53866
  }, _callee121, this, [[4, 6]]);
53758
53867
  }));
53759
- function handleDocumentError(_x124, _x125, _x126) {
53868
+ function handleDocumentError(_x125, _x126, _x127) {
53760
53869
  return _handleDocumentError10.apply(this, arguments);
53761
53870
  }
53762
53871
  return handleDocumentError;
@@ -54003,7 +54112,7 @@ var D = /*#__PURE__*/function (_BasePlugin36) {
54003
54112
  }
54004
54113
  }, _callee122, this);
54005
54114
  }));
54006
- function initialize(_x127) {
54115
+ function initialize(_x128) {
54007
54116
  return _initialize37.apply(this, arguments);
54008
54117
  }
54009
54118
  return initialize;
@@ -54325,7 +54434,7 @@ var D = /*#__PURE__*/function (_BasePlugin36) {
54325
54434
  }
54326
54435
  }, _callee123, this);
54327
54436
  }));
54328
- function resolvePdfPayload(_x128) {
54437
+ function resolvePdfPayload(_x129) {
54329
54438
  return _resolvePdfPayload11.apply(this, arguments);
54330
54439
  }
54331
54440
  return resolvePdfPayload;
@@ -54393,7 +54502,7 @@ var D = /*#__PURE__*/function (_BasePlugin36) {
54393
54502
  }
54394
54503
  }, _callee124, this, [[1, 5]]);
54395
54504
  }));
54396
- function startLoad(_x129) {
54505
+ function startLoad(_x130) {
54397
54506
  return _startLoad11.apply(this, arguments);
54398
54507
  }
54399
54508
  return startLoad;
@@ -54472,7 +54581,7 @@ var D = /*#__PURE__*/function (_BasePlugin36) {
54472
54581
  }
54473
54582
  }, _callee125, this, [[4, 6]]);
54474
54583
  }));
54475
- function handleDocumentError(_x130, _x131, _x132) {
54584
+ function handleDocumentError(_x131, _x132, _x133) {
54476
54585
  return _handleDocumentError11.apply(this, arguments);
54477
54586
  }
54478
54587
  return handleDocumentError;
@@ -54713,7 +54822,7 @@ var F = /*#__PURE__*/function (_BasePlugin37) {
54713
54822
  }
54714
54823
  }, _callee126, this);
54715
54824
  }));
54716
- function initialize(_x133) {
54825
+ function initialize(_x134) {
54717
54826
  return _initialize38.apply(this, arguments);
54718
54827
  }
54719
54828
  return initialize;
@@ -55035,7 +55144,7 @@ var F = /*#__PURE__*/function (_BasePlugin37) {
55035
55144
  }
55036
55145
  }, _callee127, this);
55037
55146
  }));
55038
- function resolvePdfPayload(_x134) {
55147
+ function resolvePdfPayload(_x135) {
55039
55148
  return _resolvePdfPayload12.apply(this, arguments);
55040
55149
  }
55041
55150
  return resolvePdfPayload;
@@ -55103,7 +55212,7 @@ var F = /*#__PURE__*/function (_BasePlugin37) {
55103
55212
  }
55104
55213
  }, _callee128, this, [[1, 5]]);
55105
55214
  }));
55106
- function startLoad(_x135) {
55215
+ function startLoad(_x136) {
55107
55216
  return _startLoad12.apply(this, arguments);
55108
55217
  }
55109
55218
  return startLoad;
@@ -55182,7 +55291,7 @@ var F = /*#__PURE__*/function (_BasePlugin37) {
55182
55291
  }
55183
55292
  }, _callee129, this, [[4, 6]]);
55184
55293
  }));
55185
- function handleDocumentError(_x136, _x137, _x138) {
55294
+ function handleDocumentError(_x137, _x138, _x139) {
55186
55295
  return _handleDocumentError12.apply(this, arguments);
55187
55296
  }
55188
55297
  return handleDocumentError;
@@ -55262,7 +55371,7 @@ var q = /*#__PURE__*/function (_BasePlugin38) {
55262
55371
  }
55263
55372
  }, _callee130, this);
55264
55373
  }));
55265
- function initialize(_x139) {
55374
+ function initialize(_x140) {
55266
55375
  return _initialize39.apply(this, arguments);
55267
55376
  }
55268
55377
  return initialize;
@@ -55852,7 +55961,7 @@ var X = /*#__PURE__*/function (_BasePlugin39) {
55852
55961
  }
55853
55962
  }, _callee131, this);
55854
55963
  }));
55855
- function initialize(_x140) {
55964
+ function initialize(_x141) {
55856
55965
  return _initialize40.apply(this, arguments);
55857
55966
  }
55858
55967
  return initialize;
@@ -56174,7 +56283,7 @@ var X = /*#__PURE__*/function (_BasePlugin39) {
56174
56283
  }
56175
56284
  }, _callee132, this);
56176
56285
  }));
56177
- function resolvePdfPayload(_x141) {
56286
+ function resolvePdfPayload(_x142) {
56178
56287
  return _resolvePdfPayload13.apply(this, arguments);
56179
56288
  }
56180
56289
  return resolvePdfPayload;
@@ -56242,7 +56351,7 @@ var X = /*#__PURE__*/function (_BasePlugin39) {
56242
56351
  }
56243
56352
  }, _callee133, this, [[1, 5]]);
56244
56353
  }));
56245
- function startLoad(_x142) {
56354
+ function startLoad(_x143) {
56246
56355
  return _startLoad13.apply(this, arguments);
56247
56356
  }
56248
56357
  return startLoad;
@@ -56321,7 +56430,7 @@ var X = /*#__PURE__*/function (_BasePlugin39) {
56321
56430
  }
56322
56431
  }, _callee134, this, [[4, 6]]);
56323
56432
  }));
56324
- function handleDocumentError(_x143, _x144, _x145) {
56433
+ function handleDocumentError(_x144, _x145, _x146) {
56325
56434
  return _handleDocumentError13.apply(this, arguments);
56326
56435
  }
56327
56436
  return handleDocumentError;
@@ -56562,7 +56671,7 @@ var ot = /*#__PURE__*/function (_BasePlugin40) {
56562
56671
  }
56563
56672
  }, _callee135, this);
56564
56673
  }));
56565
- function initialize(_x146) {
56674
+ function initialize(_x147) {
56566
56675
  return _initialize41.apply(this, arguments);
56567
56676
  }
56568
56677
  return initialize;
@@ -56884,7 +56993,7 @@ var ot = /*#__PURE__*/function (_BasePlugin40) {
56884
56993
  }
56885
56994
  }, _callee136, this);
56886
56995
  }));
56887
- function resolvePdfPayload(_x147) {
56996
+ function resolvePdfPayload(_x148) {
56888
56997
  return _resolvePdfPayload14.apply(this, arguments);
56889
56998
  }
56890
56999
  return resolvePdfPayload;
@@ -56952,7 +57061,7 @@ var ot = /*#__PURE__*/function (_BasePlugin40) {
56952
57061
  }
56953
57062
  }, _callee137, this, [[1, 5]]);
56954
57063
  }));
56955
- function startLoad(_x148) {
57064
+ function startLoad(_x149) {
56956
57065
  return _startLoad14.apply(this, arguments);
56957
57066
  }
56958
57067
  return startLoad;
@@ -57031,7 +57140,7 @@ var ot = /*#__PURE__*/function (_BasePlugin40) {
57031
57140
  }
57032
57141
  }, _callee138, this, [[4, 6]]);
57033
57142
  }));
57034
- function handleDocumentError(_x149, _x150, _x151) {
57143
+ function handleDocumentError(_x150, _x151, _x152) {
57035
57144
  return _handleDocumentError14.apply(this, arguments);
57036
57145
  }
57037
57146
  return handleDocumentError;
@@ -57111,7 +57220,7 @@ var nt = /*#__PURE__*/function (_BasePlugin41) {
57111
57220
  }
57112
57221
  }, _callee139, this);
57113
57222
  }));
57114
- function initialize(_x152) {
57223
+ function initialize(_x153) {
57115
57224
  return _initialize42.apply(this, arguments);
57116
57225
  }
57117
57226
  return initialize;
@@ -57543,7 +57652,7 @@ var dt = /*#__PURE__*/function (_BasePlugin42) {
57543
57652
  }
57544
57653
  }, _callee140, this, [[1, 3]]);
57545
57654
  }));
57546
- function initialize(_x153) {
57655
+ function initialize(_x154) {
57547
57656
  return _initialize43.apply(this, arguments);
57548
57657
  }
57549
57658
  return initialize;
@@ -57704,7 +57813,7 @@ var dt = /*#__PURE__*/function (_BasePlugin42) {
57704
57813
  }
57705
57814
  }, _callee141);
57706
57815
  }));
57707
- function complete(_x155) {
57816
+ function complete(_x156) {
57708
57817
  return _complete3.apply(this, arguments);
57709
57818
  }
57710
57819
  return complete;
@@ -57713,7 +57822,7 @@ var dt = /*#__PURE__*/function (_BasePlugin42) {
57713
57822
  }
57714
57823
  }, _callee142, this);
57715
57824
  }));
57716
- function requestCreateFromSelection(_x154) {
57825
+ function requestCreateFromSelection(_x155) {
57717
57826
  return _requestCreateFromSelection3.apply(this, arguments);
57718
57827
  }
57719
57828
  return requestCreateFromSelection;
@@ -57765,7 +57874,7 @@ var dt = /*#__PURE__*/function (_BasePlugin42) {
57765
57874
  }
57766
57875
  }, _callee143, this, [[3, 5]]);
57767
57876
  }));
57768
- function createNoteFromSelection(_x156) {
57877
+ function createNoteFromSelection(_x157) {
57769
57878
  return _createNoteFromSelection3.apply(this, arguments);
57770
57879
  }
57771
57880
  return createNoteFromSelection;
@@ -57799,7 +57908,7 @@ var dt = /*#__PURE__*/function (_BasePlugin42) {
57799
57908
  }
57800
57909
  }, _callee144, this, [[1, 3]]);
57801
57910
  }));
57802
- function deleteNote(_x157) {
57911
+ function deleteNote(_x158) {
57803
57912
  return _deleteNote3.apply(this, arguments);
57804
57913
  }
57805
57914
  return deleteNote;
@@ -57839,7 +57948,7 @@ var dt = /*#__PURE__*/function (_BasePlugin42) {
57839
57948
  }
57840
57949
  }, _callee145, this, [[2, 4]]);
57841
57950
  }));
57842
- function updateNoteContent(_x158, _x159) {
57951
+ function updateNoteContent(_x159, _x160) {
57843
57952
  return _updateNoteContent3.apply(this, arguments);
57844
57953
  }
57845
57954
  return updateNoteContent;
@@ -57883,7 +57992,7 @@ var dt = /*#__PURE__*/function (_BasePlugin42) {
57883
57992
  }
57884
57993
  }, _callee146, this);
57885
57994
  }));
57886
- function scrollToNote(_x160) {
57995
+ function scrollToNote(_x161) {
57887
57996
  return _scrollToNote3.apply(this, arguments);
57888
57997
  }
57889
57998
  return scrollToNote;
@@ -58125,7 +58234,7 @@ var Pt = /*#__PURE__*/function (_BasePlugin43) {
58125
58234
  }
58126
58235
  }, _callee147, this);
58127
58236
  }));
58128
- function initialize(_x161) {
58237
+ function initialize(_x162) {
58129
58238
  return _initialize44.apply(this, arguments);
58130
58239
  }
58131
58240
  return initialize;
@@ -58447,7 +58556,7 @@ var Pt = /*#__PURE__*/function (_BasePlugin43) {
58447
58556
  }
58448
58557
  }, _callee148, this);
58449
58558
  }));
58450
- function resolvePdfPayload(_x162) {
58559
+ function resolvePdfPayload(_x163) {
58451
58560
  return _resolvePdfPayload15.apply(this, arguments);
58452
58561
  }
58453
58562
  return resolvePdfPayload;
@@ -58515,7 +58624,7 @@ var Pt = /*#__PURE__*/function (_BasePlugin43) {
58515
58624
  }
58516
58625
  }, _callee149, this, [[1, 5]]);
58517
58626
  }));
58518
- function startLoad(_x163) {
58627
+ function startLoad(_x164) {
58519
58628
  return _startLoad15.apply(this, arguments);
58520
58629
  }
58521
58630
  return startLoad;
@@ -58594,7 +58703,7 @@ var Pt = /*#__PURE__*/function (_BasePlugin43) {
58594
58703
  }
58595
58704
  }, _callee150, this, [[4, 6]]);
58596
58705
  }));
58597
- function handleDocumentError(_x164, _x165, _x166) {
58706
+ function handleDocumentError(_x165, _x166, _x167) {
58598
58707
  return _handleDocumentError15.apply(this, arguments);
58599
58708
  }
58600
58709
  return handleDocumentError;
@@ -58835,7 +58944,7 @@ var St = /*#__PURE__*/function (_BasePlugin44) {
58835
58944
  }
58836
58945
  }, _callee151, this);
58837
58946
  }));
58838
- function initialize(_x167) {
58947
+ function initialize(_x168) {
58839
58948
  return _initialize45.apply(this, arguments);
58840
58949
  }
58841
58950
  return initialize;
@@ -59157,7 +59266,7 @@ var St = /*#__PURE__*/function (_BasePlugin44) {
59157
59266
  }
59158
59267
  }, _callee152, this);
59159
59268
  }));
59160
- function resolvePdfPayload(_x168) {
59269
+ function resolvePdfPayload(_x169) {
59161
59270
  return _resolvePdfPayload16.apply(this, arguments);
59162
59271
  }
59163
59272
  return resolvePdfPayload;
@@ -59225,7 +59334,7 @@ var St = /*#__PURE__*/function (_BasePlugin44) {
59225
59334
  }
59226
59335
  }, _callee153, this, [[1, 5]]);
59227
59336
  }));
59228
- function startLoad(_x169) {
59337
+ function startLoad(_x170) {
59229
59338
  return _startLoad16.apply(this, arguments);
59230
59339
  }
59231
59340
  return startLoad;
@@ -59304,7 +59413,7 @@ var St = /*#__PURE__*/function (_BasePlugin44) {
59304
59413
  }
59305
59414
  }, _callee154, this, [[4, 6]]);
59306
59415
  }));
59307
- function handleDocumentError(_x170, _x171, _x172) {
59416
+ function handleDocumentError(_x171, _x172, _x173) {
59308
59417
  return _handleDocumentError16.apply(this, arguments);
59309
59418
  }
59310
59419
  return handleDocumentError;
@@ -59384,7 +59493,7 @@ var Lt = /*#__PURE__*/function (_BasePlugin45) {
59384
59493
  }
59385
59494
  }, _callee155, this);
59386
59495
  }));
59387
- function initialize(_x173) {
59496
+ function initialize(_x174) {
59388
59497
  return _initialize46.apply(this, arguments);
59389
59498
  }
59390
59499
  return initialize;
@@ -59820,16 +59929,16 @@ function Ot(t, e) {
59820
59929
  }
59821
59930
  return false;
59822
59931
  }
59823
- function Gt(_x174, _x175, _x176) {
59932
+ function Gt(_x175, _x176, _x177) {
59824
59933
  return _Gt.apply(this, arguments);
59825
59934
  }
59826
59935
  function _Gt() {
59827
- _Gt = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee170(t, e, a) {
59828
- return _regenerator().w(function (_context177) {
59829
- while (1) switch (_context177.n) {
59936
+ _Gt = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee171(t, e, a) {
59937
+ return _regenerator().w(function (_context178) {
59938
+ while (1) switch (_context178.n) {
59830
59939
  case 0:
59831
59940
  t.scrollToGlobalPageIndex(e);
59832
- _context177.n = 1;
59941
+ _context178.n = 1;
59833
59942
  return function (t, e) {
59834
59943
  var a = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 2500;
59835
59944
  var s = t.getLayout().items.find(function (t) {
@@ -59852,9 +59961,9 @@ function _Gt() {
59852
59961
  marginTop: 80
59853
59962
  });
59854
59963
  case 2:
59855
- return _context177.a(2);
59964
+ return _context178.a(2);
59856
59965
  }
59857
- }, _callee170);
59966
+ }, _callee171);
59858
59967
  }));
59859
59968
  return _Gt.apply(this, arguments);
59860
59969
  }
@@ -59906,7 +60015,7 @@ var zt = /*#__PURE__*/function (_BasePlugin46) {
59906
60015
  }
59907
60016
  }, _callee156, this, [[1, 3]]);
59908
60017
  }));
59909
- function initialize(_x177) {
60018
+ function initialize(_x178) {
59910
60019
  return _initialize47.apply(this, arguments);
59911
60020
  }
59912
60021
  return initialize;
@@ -60020,7 +60129,7 @@ var zt = /*#__PURE__*/function (_BasePlugin46) {
60020
60129
  }
60021
60130
  }, _callee157, this, [[2, 5]]);
60022
60131
  }));
60023
- function requestRemoveBookmark(_x178) {
60132
+ function requestRemoveBookmark(_x179) {
60024
60133
  return _requestRemoveBookmark3.apply(this, arguments);
60025
60134
  }
60026
60135
  return requestRemoveBookmark;
@@ -60131,7 +60240,7 @@ var zt = /*#__PURE__*/function (_BasePlugin46) {
60131
60240
  }
60132
60241
  }, _callee158, this);
60133
60242
  }));
60134
- function scrollToBookmark(_x179) {
60243
+ function scrollToBookmark(_x180) {
60135
60244
  return _scrollToBookmark3.apply(this, arguments);
60136
60245
  }
60137
60246
  return scrollToBookmark;
@@ -60185,14 +60294,14 @@ function Bt(t) {
60185
60294
  }
60186
60295
  PdfAnnotationSubtype.HIGHLIGHT, PdfAnnotationSubtype.UNDERLINE, PdfAnnotationSubtype.SQUIGGLY, PdfAnnotationSubtype.STRIKEOUT, PdfAnnotationSubtype.HIGHLIGHT, PdfAnnotationSubtype.UNDERLINE, PdfAnnotationSubtype.SQUIGGLY, PdfAnnotationSubtype.STRIKEOUT;
60187
60296
  Bt();
60188
- var se = 1;
60189
- function oe(t) {
60297
+ var oe = 1;
60298
+ function re(t) {
60190
60299
  var e = new Uint8Array(t);
60191
60300
  var a = "";
60192
60301
  for (var _s127 = 0; _s127 < e.length; _s127++) a += String.fromCharCode(e[_s127]);
60193
60302
  return btoa(a);
60194
60303
  }
60195
- function re(t) {
60304
+ function ie(t) {
60196
60305
  return t.map(function (t) {
60197
60306
  if (!(t.ctx && "data" in t.ctx && t.ctx.data instanceof ArrayBuffer)) return {
60198
60307
  annotation: t.annotation
@@ -60201,13 +60310,13 @@ function re(t) {
60201
60310
  return {
60202
60311
  annotation: t.annotation,
60203
60312
  ctx: {
60204
- dataBase64: oe(e.data),
60313
+ dataBase64: re(e.data),
60205
60314
  mimeType: e.mimeType
60206
60315
  }
60207
60316
  };
60208
60317
  });
60209
60318
  }
60210
- function ie(t) {
60319
+ function ne(t) {
60211
60320
  return t.map(function (t) {
60212
60321
  var _t$ctx;
60213
60322
  if (!((_t$ctx = t.ctx) !== null && _t$ctx !== void 0 && _t$ctx.dataBase64)) return {
@@ -60229,14 +60338,14 @@ function ie(t) {
60229
60338
  };
60230
60339
  });
60231
60340
  }
60232
- function ne(t) {
60341
+ function he(t) {
60233
60342
  return {
60234
60343
  bookmarks: false !== (t === null || t === void 0 ? void 0 : t.bookmarks),
60235
60344
  notes: false !== (t === null || t === void 0 ? void 0 : t.notes),
60236
60345
  markup: false !== (t === null || t === void 0 ? void 0 : t.markup)
60237
60346
  };
60238
60347
  }
60239
- function he(t) {
60348
+ function de(t) {
60240
60349
  var _t$getPlugin13, _t$getPlugin14, _t$getPlugin15, _t$getPlugin16;
60241
60350
  var e = (_t$getPlugin13 = t.getPlugin(AnnotationPlugin.id)) === null || _t$getPlugin13 === void 0 ? void 0 : _t$getPlugin13.provides(),
60242
60351
  a = (_t$getPlugin14 = t.getPlugin(lt.id)) === null || _t$getPlugin14 === void 0 ? void 0 : _t$getPlugin14.provides(),
@@ -60249,55 +60358,55 @@ function he(t) {
60249
60358
  chapterManager: o
60250
60359
  };
60251
60360
  }
60252
- function de(_x180, _x181, _x182) {
60253
- return _de.apply(this, arguments);
60361
+ function le(_x181, _x182, _x183) {
60362
+ return _le.apply(this, arguments);
60254
60363
  }
60255
- function _de() {
60256
- _de = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee171(t, e, a) {
60364
+ function _le() {
60365
+ _le = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee172(t, e, a) {
60257
60366
  var s;
60258
- return _regenerator().w(function (_context178) {
60259
- while (1) switch (_context178.n) {
60367
+ return _regenerator().w(function (_context179) {
60368
+ while (1) switch (_context179.n) {
60260
60369
  case 0:
60261
60370
  if (!(!a || !t)) {
60262
- _context178.n = 1;
60371
+ _context179.n = 1;
60263
60372
  break;
60264
60373
  }
60265
- return _context178.a(2);
60374
+ return _context179.a(2);
60266
60375
  case 1:
60267
- _context178.n = 2;
60376
+ _context179.n = 2;
60268
60377
  return t.ensureChapterLoaded(e);
60269
60378
  case 2:
60270
- s = _context178.v;
60379
+ s = _context179.v;
60271
60380
  if (!("loaded" !== s)) {
60272
- _context178.n = 3;
60381
+ _context179.n = 3;
60273
60382
  break;
60274
60383
  }
60275
60384
  throw new Error("\u7AE0\u8282 ".concat(e, " \u672A\u52A0\u8F7D\u6210\u529F\uFF08").concat(s, "\uFF09\uFF0C\u65E0\u6CD5\u5BFC\u5165/\u5BFC\u51FA\u5212\u7EBF"));
60276
60385
  case 3:
60277
- return _context178.a(2);
60386
+ return _context179.a(2);
60278
60387
  }
60279
- }, _callee171);
60388
+ }, _callee172);
60280
60389
  }));
60281
- return _de.apply(this, arguments);
60282
- }
60283
- function le(_x183, _x184, _x185) {
60284
60390
  return _le.apply(this, arguments);
60285
60391
  }
60286
- function _le() {
60287
- _le = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee172(t, e, a) {
60288
- var s, _he, o, r, i, n, h, _t784, d;
60289
- return _regenerator().w(function (_context179) {
60290
- while (1) switch (_context179.n) {
60392
+ function ce(_x184, _x185, _x186) {
60393
+ return _ce.apply(this, arguments);
60394
+ }
60395
+ function _ce() {
60396
+ _ce = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee173(t, e, a) {
60397
+ var s, _de, o, r, i, n, h, _t787, d;
60398
+ return _regenerator().w(function (_context180) {
60399
+ while (1) switch (_context180.n) {
60291
60400
  case 0:
60292
- s = ne(a), _he = he(t), o = _he.annotation, r = _he.note, i = _he.bookmark, n = _he.chapterManager, h = {
60401
+ s = he(a), _de = de(t), o = _de.annotation, r = _de.note, i = _de.bookmark, n = _de.chapterManager, h = {
60293
60402
  chapterId: e
60294
60403
  };
60295
60404
  if (!s.bookmarks) {
60296
- _context179.n = 2;
60405
+ _context180.n = 2;
60297
60406
  break;
60298
60407
  }
60299
60408
  if (i) {
60300
- _context179.n = 1;
60409
+ _context180.n = 1;
60301
60410
  break;
60302
60411
  }
60303
60412
  throw new Error("paragraph-bookmark 插件未注册");
@@ -60305,11 +60414,11 @@ function _le() {
60305
60414
  h.bookmarks = i.listBookmarksForChapter(e);
60306
60415
  case 2:
60307
60416
  if (!s.notes) {
60308
- _context179.n = 4;
60417
+ _context180.n = 4;
60309
60418
  break;
60310
60419
  }
60311
60420
  if (r) {
60312
- _context179.n = 3;
60421
+ _context180.n = 3;
60313
60422
  break;
60314
60423
  }
60315
60424
  throw new Error("note 插件未注册");
@@ -60317,19 +60426,19 @@ function _le() {
60317
60426
  h.notes = r.listNotesForChapter(e);
60318
60427
  case 4:
60319
60428
  if (!s.markup) {
60320
- _context179.n = 8;
60429
+ _context180.n = 8;
60321
60430
  break;
60322
60431
  }
60323
60432
  if (o) {
60324
- _context179.n = 5;
60433
+ _context180.n = 5;
60325
60434
  break;
60326
60435
  }
60327
60436
  throw new Error("annotation 插件未注册");
60328
60437
  case 5:
60329
- _context179.n = 6;
60330
- return de(n, e, false !== (a === null || a === void 0 ? void 0 : a.ensureChapterLoaded));
60438
+ _context180.n = 6;
60439
+ return le(n, e, false !== (a === null || a === void 0 ? void 0 : a.ensureChapterLoaded));
60331
60440
  case 6:
60332
- _context179.n = 7;
60441
+ _context180.n = 7;
60333
60442
  return d = o.forDocument(e).exportAnnotations(), new Promise(function (t, e) {
60334
60443
  d.wait(function (e) {
60335
60444
  return t(e);
@@ -60338,83 +60447,83 @@ function _le() {
60338
60447
  });
60339
60448
  });
60340
60449
  case 7:
60341
- _t784 = _context179.v;
60342
- h.markup = re(_t784);
60450
+ _t787 = _context180.v;
60451
+ h.markup = ie(_t787);
60343
60452
  case 8:
60344
- return _context179.a(2, h);
60453
+ return _context180.a(2, h);
60345
60454
  }
60346
- }, _callee172);
60455
+ }, _callee173);
60347
60456
  }));
60348
- return _le.apply(this, arguments);
60349
- }
60350
- function ce(_x186, _x187, _x188) {
60351
60457
  return _ce.apply(this, arguments);
60352
60458
  }
60353
- function _ce() {
60354
- _ce = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee173(t, e, a) {
60355
- var s, _iterator529, _step529, o, _e141, _r79, i, _t785;
60356
- return _regenerator().w(function (_context180) {
60357
- while (1) switch (_context180.p = _context180.n) {
60459
+ function ue(_x187, _x188, _x189) {
60460
+ return _ue.apply(this, arguments);
60461
+ }
60462
+ function _ue() {
60463
+ _ue = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee174(t, e, a) {
60464
+ var s, _iterator529, _step529, o, _e141, _r79, i, _t788;
60465
+ return _regenerator().w(function (_context181) {
60466
+ while (1) switch (_context181.p = _context181.n) {
60358
60467
  case 0:
60359
60468
  s = {};
60360
60469
  _iterator529 = _createForOfIteratorHelper(e.chapters);
60361
- _context180.p = 1;
60470
+ _context181.p = 1;
60362
60471
  _iterator529.s();
60363
60472
  case 2:
60364
60473
  if ((_step529 = _iterator529.n()).done) {
60365
- _context180.n = 5;
60474
+ _context181.n = 5;
60366
60475
  break;
60367
60476
  }
60368
60477
  o = _step529.value;
60369
- _context180.n = 3;
60370
- return le(t, o.chapterId, a);
60478
+ _context181.n = 3;
60479
+ return ce(t, o.chapterId, a);
60371
60480
  case 3:
60372
- _e141 = _context180.v;
60481
+ _e141 = _context181.v;
60373
60482
  _r79 = _e141.chapterId;
60374
60483
  i = _objectWithoutProperties(_e141, _excluded18);
60375
60484
  s[o.chapterId] = i;
60376
60485
  case 4:
60377
- _context180.n = 2;
60486
+ _context181.n = 2;
60378
60487
  break;
60379
60488
  case 5:
60380
- _context180.n = 7;
60489
+ _context181.n = 7;
60381
60490
  break;
60382
60491
  case 6:
60383
- _context180.p = 6;
60384
- _t785 = _context180.v;
60385
- _iterator529.e(_t785);
60492
+ _context181.p = 6;
60493
+ _t788 = _context181.v;
60494
+ _iterator529.e(_t788);
60386
60495
  case 7:
60387
- _context180.p = 7;
60496
+ _context181.p = 7;
60388
60497
  _iterator529.f();
60389
- return _context180.f(7);
60498
+ return _context181.f(7);
60390
60499
  case 8:
60391
- return _context180.a(2, {
60500
+ return _context181.a(2, {
60392
60501
  version: 1,
60393
60502
  exportedAt: /* @__PURE__ */new Date().toISOString(),
60394
60503
  chapters: s
60395
60504
  });
60396
60505
  }
60397
- }, _callee173, null, [[1, 6, 7, 8]]);
60506
+ }, _callee174, null, [[1, 6, 7, 8]]);
60398
60507
  }));
60399
- return _ce.apply(this, arguments);
60400
- }
60401
- function ue(_x189, _x190, _x191) {
60402
60508
  return _ue.apply(this, arguments);
60403
60509
  }
60404
- function _ue() {
60405
- _ue = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee174(t, e, a) {
60510
+ function pe(_x190, _x191, _x192) {
60511
+ return _pe2.apply(this, arguments);
60512
+ }
60513
+ function _pe2() {
60514
+ _pe2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee175(t, e, a) {
60406
60515
  var _a$mode;
60407
- var s, o, _he2, r, i, n, h, d, _iterator530, _step530, _t786, _iterator531, _step531, _t787, _t788, _s130, _t789, _t790;
60408
- return _regenerator().w(function (_context181) {
60409
- while (1) switch (_context181.n) {
60516
+ var s, o, _de2, r, i, n, h, d, _iterator530, _step530, _t789, _iterator531, _step531, _t790, _t791, _s130, _t792, _t793;
60517
+ return _regenerator().w(function (_context182) {
60518
+ while (1) switch (_context182.n) {
60410
60519
  case 0:
60411
- s = ne(a), o = (_a$mode = a === null || a === void 0 ? void 0 : a.mode) !== null && _a$mode !== void 0 ? _a$mode : "replace", _he2 = he(t), r = _he2.annotation, i = _he2.note, n = _he2.bookmark, h = _he2.chapterManager, d = e.chapterId;
60520
+ s = he(a), o = (_a$mode = a === null || a === void 0 ? void 0 : a.mode) !== null && _a$mode !== void 0 ? _a$mode : "replace", _de2 = de(t), r = _de2.annotation, i = _de2.note, n = _de2.bookmark, h = _de2.chapterManager, d = e.chapterId;
60412
60521
  if (!(s.bookmarks && e.bookmarks)) {
60413
- _context181.n = 2;
60522
+ _context182.n = 2;
60414
60523
  break;
60415
60524
  }
60416
60525
  if (n) {
60417
- _context181.n = 1;
60526
+ _context182.n = 1;
60418
60527
  break;
60419
60528
  }
60420
60529
  throw new Error("paragraph-bookmark 插件未注册");
@@ -60423,8 +60532,8 @@ function _ue() {
60423
60532
  _iterator530 = _createForOfIteratorHelper(e.bookmarks);
60424
60533
  try {
60425
60534
  for (_iterator530.s(); !(_step530 = _iterator530.n()).done;) {
60426
- _t786 = _step530.value;
60427
- n.addBookmark(_t786);
60535
+ _t789 = _step530.value;
60536
+ n.addBookmark(_t789);
60428
60537
  }
60429
60538
  } catch (err) {
60430
60539
  _iterator530.e(err);
@@ -60434,11 +60543,11 @@ function _ue() {
60434
60543
  }
60435
60544
  case 2:
60436
60545
  if (!(s.notes && e.notes)) {
60437
- _context181.n = 4;
60546
+ _context182.n = 4;
60438
60547
  break;
60439
60548
  }
60440
60549
  if (i) {
60441
- _context181.n = 3;
60550
+ _context182.n = 3;
60442
60551
  break;
60443
60552
  }
60444
60553
  throw new Error("note 插件未注册");
@@ -60447,8 +60556,8 @@ function _ue() {
60447
60556
  _iterator531 = _createForOfIteratorHelper(e.notes);
60448
60557
  try {
60449
60558
  for (_iterator531.s(); !(_step531 = _iterator531.n()).done;) {
60450
- _t787 = _step531.value;
60451
- i.registerNote(_t787);
60559
+ _t790 = _step531.value;
60560
+ i.registerNote(_t790);
60452
60561
  }
60453
60562
  } catch (err) {
60454
60563
  _iterator531.e(err);
@@ -60458,54 +60567,54 @@ function _ue() {
60458
60567
  }
60459
60568
  case 4:
60460
60569
  if (!(s.markup && e.markup)) {
60461
- _context181.n = 7;
60570
+ _context182.n = 7;
60462
60571
  break;
60463
60572
  }
60464
60573
  if (r) {
60465
- _context181.n = 5;
60574
+ _context182.n = 5;
60466
60575
  break;
60467
60576
  }
60468
60577
  throw new Error("annotation 插件未注册");
60469
60578
  case 5:
60470
- _context181.n = 6;
60471
- return de(h, d, false !== (a === null || a === void 0 ? void 0 : a.ensureChapterLoaded));
60579
+ _context182.n = 6;
60580
+ return le(h, d, false !== (a === null || a === void 0 ? void 0 : a.ensureChapterLoaded));
60472
60581
  case 6:
60473
- _t788 = r.forDocument(d), _s130 = ie(e.markup);
60474
- "replace" === o && _t788.deleteAllAnnotations(), _t788.importAnnotations(_s130);
60582
+ _t791 = r.forDocument(d), _s130 = ne(e.markup);
60583
+ "replace" === o && _t791.deleteAllAnnotations(), _t791.importAnnotations(_s130);
60475
60584
  case 7:
60476
- _t789 = a !== null && a !== void 0 && a.persistNotes && i;
60477
- if (!_t789) {
60478
- _context181.n = 8;
60585
+ _t792 = a !== null && a !== void 0 && a.persistNotes && i;
60586
+ if (!_t792) {
60587
+ _context182.n = 8;
60479
60588
  break;
60480
60589
  }
60481
- _context181.n = 8;
60590
+ _context182.n = 8;
60482
60591
  return a.persistNotes(i.listAllNotes());
60483
60592
  case 8:
60484
- _t790 = (a === null || a === void 0 ? void 0 : a.persistBookmarks) && n;
60485
- if (!_t790) {
60486
- _context181.n = 9;
60593
+ _t793 = (a === null || a === void 0 ? void 0 : a.persistBookmarks) && n;
60594
+ if (!_t793) {
60595
+ _context182.n = 9;
60487
60596
  break;
60488
60597
  }
60489
- _context181.n = 9;
60598
+ _context182.n = 9;
60490
60599
  return a.persistBookmarks(n.listBookmarks());
60491
60600
  case 9:
60492
- return _context181.a(2);
60601
+ return _context182.a(2);
60493
60602
  }
60494
- }, _callee174);
60603
+ }, _callee175);
60495
60604
  }));
60496
- return _ue.apply(this, arguments);
60497
- }
60498
- function pe(_x192, _x193, _x194) {
60499
60605
  return _pe2.apply(this, arguments);
60500
60606
  }
60501
- function _pe2() {
60502
- _pe2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee175(t, e, a) {
60607
+ function ge(_x193, _x194, _x195) {
60608
+ return _ge.apply(this, arguments);
60609
+ }
60610
+ function _ge() {
60611
+ _ge = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee176(t, e, a) {
60503
60612
  var _i88, _Object$entries20, _Object$entries20$_i, _s131, o;
60504
- return _regenerator().w(function (_context182) {
60505
- while (1) switch (_context182.n) {
60613
+ return _regenerator().w(function (_context183) {
60614
+ while (1) switch (_context183.n) {
60506
60615
  case 0:
60507
60616
  if (!(1 !== e.version)) {
60508
- _context182.n = 1;
60617
+ _context183.n = 1;
60509
60618
  break;
60510
60619
  }
60511
60620
  throw new Error("\u4E0D\u652F\u6301\u7684\u5F52\u6863\u7248\u672C ".concat(e.version, "\uFF0C\u5F53\u524D\u4E3A 1"));
@@ -60513,42 +60622,42 @@ function _pe2() {
60513
60622
  _i88 = 0, _Object$entries20 = Object.entries(e.chapters);
60514
60623
  case 2:
60515
60624
  if (!(_i88 < _Object$entries20.length)) {
60516
- _context182.n = 4;
60625
+ _context183.n = 4;
60517
60626
  break;
60518
60627
  }
60519
60628
  _Object$entries20$_i = _slicedToArray(_Object$entries20[_i88], 2), _s131 = _Object$entries20$_i[0], o = _Object$entries20$_i[1];
60520
- _context182.n = 3;
60521
- return ue(t, _objectSpread({
60629
+ _context183.n = 3;
60630
+ return pe(t, _objectSpread({
60522
60631
  chapterId: _s131
60523
60632
  }, o), a);
60524
60633
  case 3:
60525
60634
  _i88++;
60526
- _context182.n = 2;
60635
+ _context183.n = 2;
60527
60636
  break;
60528
60637
  case 4:
60529
- return _context182.a(2);
60638
+ return _context183.a(2);
60530
60639
  }
60531
- }, _callee175);
60640
+ }, _callee176);
60532
60641
  }));
60533
- return _pe2.apply(this, arguments);
60642
+ return _ge.apply(this, arguments);
60534
60643
  }
60535
- function ge(t) {
60644
+ function fe(t) {
60536
60645
  return JSON.stringify(t, null, 2);
60537
60646
  }
60538
- function fe(t) {
60647
+ function me(t) {
60539
60648
  var e = JSON.parse(t);
60540
60649
  if (!e || "object" != _typeof(e) || !e.chapters) throw new Error("无效的章节标注 JSON");
60541
60650
  return e;
60542
60651
  }
60543
- function me(t) {
60652
+ function ve(t) {
60544
60653
  return JSON.stringify(t, null, 2);
60545
60654
  }
60546
- function ve(t) {
60655
+ function be(t) {
60547
60656
  var e = JSON.parse(t);
60548
60657
  if (!(e !== null && e !== void 0 && e.chapterId)) throw new Error("无效的章节标注 JSON:缺少 chapterId");
60549
60658
  return e;
60550
60659
  }
60551
- function be(t, e) {
60660
+ function Pe(t, e) {
60552
60661
  var a = new Blob([e], {
60553
60662
  type: "application/json;charset=utf-8"
60554
60663
  }),
@@ -60556,12 +60665,12 @@ function be(t, e) {
60556
60665
  o = document.createElement("a");
60557
60666
  o.href = s, o.download = t, o.click(), URL.revokeObjectURL(s);
60558
60667
  }
60559
- function Pe(t) {
60668
+ function we(t) {
60560
60669
  var e = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "chapter-annotations.json";
60561
- be(e, ge(t));
60670
+ Pe(e, fe(t));
60562
60671
  }
60563
- function we(t, e) {
60564
- be(e !== null && e !== void 0 ? e : "chapter-annotations-".concat(t.chapterId, ".json"), me(t));
60672
+ function ye(t, e) {
60673
+ Pe(e !== null && e !== void 0 ? e : "chapter-annotations-".concat(t.chapterId, ".json"), ve(t));
60565
60674
  }
60566
60675
  var version = '0.1.0';
60567
60676
  if (typeof customElements !== 'undefined' && !customElements.get('embedpdf-chapter-container')) {
@@ -60591,10 +60700,10 @@ var chapterSnippetRuntime = {
60591
60700
  version: version,
60592
60701
  EmbedPdfChapterContainer: EmbedPdfChapterContainer,
60593
60702
  CHAPTER_SNIPPET_EVENTS: CHAPTER_SNIPPET_EVENTS,
60594
- createChapterViewerEditorOptions: ks,
60595
- DEFAULT_CHAPTER_VIEWER_FEATURES: ws,
60703
+ createChapterViewerEditorOptions: Gs,
60704
+ DEFAULT_CHAPTER_VIEWER_FEATURES: xs,
60596
60705
  applySelectionMarkup: rt$1,
60597
- buildParagraphBookmarkAnchor: ia
60706
+ buildParagraphBookmarkAnchor: oa
60598
60707
  };
60599
60708
  if (typeof globalThis !== 'undefined') {
60600
60709
  globalThis.__CHAPTER_SNIPPET__ = chapterSnippetRuntime;
@@ -62424,7 +62533,7 @@ function createHybridImageConverter(workerPool) {
62424
62533
  }
62425
62534
  }, _callee163, null, [[1, 3]]);
62426
62535
  }));
62427
- return function converter(_x195) {
62536
+ return function converter(_x196) {
62428
62537
  return _ref497.apply(this, arguments);
62429
62538
  };
62430
62539
  }();
@@ -69370,14 +69479,14 @@ var functions = {
69370
69479
  PDFiumExt_OpenFormFillInfo: [[], 'number'],
69371
69480
  PDFiumExt_SaveAsCopy: [["number", "number"], 'number']
69372
69481
  };
69373
- function createWrappedModule(_x196) {
69482
+ function createWrappedModule(_x197) {
69374
69483
  return _createWrappedModule.apply(this, arguments);
69375
69484
  }
69376
69485
  function _createWrappedModule() {
69377
- _createWrappedModule = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee176(pdfium) {
69486
+ _createWrappedModule = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee177(pdfium) {
69378
69487
  var module, key, ident, args, ret;
69379
- return _regenerator().w(function (_context183) {
69380
- while (1) switch (_context183.n) {
69488
+ return _regenerator().w(function (_context184) {
69489
+ while (1) switch (_context184.n) {
69381
69490
  case 0:
69382
69491
  module = {
69383
69492
  pdfium: pdfium
@@ -69388,28 +69497,28 @@ function _createWrappedModule() {
69388
69497
  ret = functions[ident][1]; // @ts-ignore
69389
69498
  module[ident] = pdfium.cwrap(key, ret, args);
69390
69499
  }
69391
- return _context183.a(2, module);
69500
+ return _context184.a(2, module);
69392
69501
  }
69393
- }, _callee176);
69502
+ }, _callee177);
69394
69503
  }));
69395
69504
  return _createWrappedModule.apply(this, arguments);
69396
69505
  }
69397
- function init(_x197) {
69506
+ function init(_x198) {
69398
69507
  return _init.apply(this, arguments);
69399
69508
  }
69400
69509
  function _init() {
69401
- _init = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee177(moduleOverrides) {
69510
+ _init = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee178(moduleOverrides) {
69402
69511
  var pdfium;
69403
- return _regenerator().w(function (_context184) {
69404
- while (1) switch (_context184.n) {
69512
+ return _regenerator().w(function (_context185) {
69513
+ while (1) switch (_context185.n) {
69405
69514
  case 0:
69406
- _context184.n = 1;
69515
+ _context185.n = 1;
69407
69516
  return createPdfium(moduleOverrides);
69408
69517
  case 1:
69409
- pdfium = _context184.v;
69410
- return _context184.a(2, createWrappedModule(pdfium));
69518
+ pdfium = _context185.v;
69519
+ return _context185.a(2, createWrappedModule(pdfium));
69411
69520
  }
69412
- }, _callee177);
69521
+ }, _callee178);
69413
69522
  }));
69414
69523
  return _init.apply(this, arguments);
69415
69524
  }
@@ -70236,7 +70345,7 @@ var FontFallbackManager = /*#__PURE__*/function () {
70236
70345
  }
70237
70346
  }, _callee165, null, [[1, 3]]);
70238
70347
  }));
70239
- return function (_x199) {
70348
+ return function (_x200) {
70240
70349
  return _ref500.apply(this, arguments);
70241
70350
  };
70242
70351
  }()));
@@ -70245,7 +70354,7 @@ var FontFallbackManager = /*#__PURE__*/function () {
70245
70354
  }
70246
70355
  }, _callee166);
70247
70356
  }));
70248
- function preloadFonts(_x198) {
70357
+ function preloadFonts(_x199) {
70249
70358
  return _preloadFonts.apply(this, arguments);
70250
70359
  }
70251
70360
  return preloadFonts;
@@ -70547,7 +70656,7 @@ var FontFallbackManager = /*#__PURE__*/function () {
70547
70656
  }
70548
70657
  }, _callee167, this, [[3, 7], [1, 2]]);
70549
70658
  }));
70550
- function fetchFontAsync(_x200) {
70659
+ function fetchFontAsync(_x201) {
70551
70660
  return _fetchFontAsync.apply(this, arguments);
70552
70661
  }
70553
70662
  return fetchFontAsync;
@@ -73931,13 +74040,13 @@ var PdfiumNative = /*#__PURE__*/function () {
73931
74040
  var deviceXPtr = this.memoryManager.malloc(4);
73932
74041
  var deviceYPtr = this.memoryManager.malloc(4);
73933
74042
  this.pdfiumModule.FPDF_PageToDevice(pagePtr, 0, 0, page.size.width, page.size.height, 0, left, top, deviceXPtr, deviceYPtr);
73934
- var _x201 = this.pdfiumModule.pdfium.getValue(deviceXPtr, "i32");
74043
+ var _x202 = this.pdfiumModule.pdfium.getValue(deviceXPtr, "i32");
73935
74044
  var _y3 = this.pdfiumModule.pdfium.getValue(deviceYPtr, "i32");
73936
74045
  this.memoryManager.free(deviceXPtr);
73937
74046
  this.memoryManager.free(deviceYPtr);
73938
74047
  var rect = {
73939
74048
  origin: {
73940
- x: _x201,
74049
+ x: _x202,
73941
74050
  y: _y3
73942
74051
  },
73943
74052
  size: {
@@ -77666,12 +77775,12 @@ var PdfiumNative = /*#__PURE__*/function () {
77666
77775
  x: pointX,
77667
77776
  y: pointY
77668
77777
  }),
77669
- _x202 = _this$convertPagePoin.x,
77778
+ _x203 = _this$convertPagePoin.x,
77670
77779
  _y4 = _this$convertPagePoin.y;
77671
77780
  var last = vertices[vertices.length - 1];
77672
- if (!last || last.x !== _x202 || last.y !== _y4) {
77781
+ if (!last || last.x !== _x203 || last.y !== _y4) {
77673
77782
  vertices.push({
77674
- x: _x202,
77783
+ x: _x203,
77675
77784
  y: _y4
77676
77785
  });
77677
77786
  }
@@ -78250,11 +78359,11 @@ var PdfiumNative = /*#__PURE__*/function () {
78250
78359
  try {
78251
78360
  if (dest.zoom.mode === PdfZoomMode$1.XYZ) {
78252
78361
  var _dest$zoom$params = dest.zoom.params,
78253
- _x203 = _dest$zoom$params.x,
78362
+ _x204 = _dest$zoom$params.x,
78254
78363
  _y5 = _dest$zoom$params.y,
78255
78364
  zoom = _dest$zoom$params.zoom;
78256
78365
  return this.pdfiumModule.EPDFDest_CreateXYZ(pagePtr, /*has_left*/
78257
- true, _x203, /*has_top*/
78366
+ true, _x204, /*has_top*/
78258
78367
  true, _y5, /*has_zoom*/
78259
78368
  true, zoom);
78260
78369
  }
@@ -78486,7 +78595,7 @@ var PdfiumNative = /*#__PURE__*/function () {
78486
78595
  var hasX = this.pdfiumModule.pdfium.getValue(hasXPtr, "i8");
78487
78596
  var hasY = this.pdfiumModule.pdfium.getValue(hasYPtr, "i8");
78488
78597
  var hasZ = this.pdfiumModule.pdfium.getValue(hasZPtr, "i8");
78489
- var _x204 = hasX ? this.pdfiumModule.pdfium.getValue(xPtr, "float") : 0;
78598
+ var _x205 = hasX ? this.pdfiumModule.pdfium.getValue(xPtr, "float") : 0;
78490
78599
  var _y6 = hasY ? this.pdfiumModule.pdfium.getValue(yPtr, "float") : 0;
78491
78600
  var zoom = hasZ ? this.pdfiumModule.pdfium.getValue(zPtr, "float") : 0;
78492
78601
  this.memoryManager.free(hasXPtr);
@@ -78500,7 +78609,7 @@ var PdfiumNative = /*#__PURE__*/function () {
78500
78609
  zoom: {
78501
78610
  mode: zoomMode,
78502
78611
  params: {
78503
- x: _x204,
78612
+ x: _x205,
78504
78613
  y: _y6,
78505
78614
  zoom: zoom
78506
78615
  }
@@ -78873,13 +78982,13 @@ var PdfiumNative = /*#__PURE__*/function () {
78873
78982
  });
78874
78983
  var _xs2 = [p1.x, p2.x, p3.x, p4.x];
78875
78984
  var _ys2 = [p1.y, p2.y, p3.y, p4.y];
78876
- var _x205 = Math.min.apply(Math, _xs2);
78985
+ var _x206 = Math.min.apply(Math, _xs2);
78877
78986
  var _y7 = Math.min.apply(Math, _ys2);
78878
- var width = Math.max.apply(Math, _xs2) - _x205;
78987
+ var width = Math.max.apply(Math, _xs2) - _x206;
78879
78988
  var height = Math.max.apply(Math, _ys2) - _y7;
78880
78989
  highlightRects.push({
78881
78990
  origin: {
78882
- x: _x205,
78991
+ x: _x206,
78883
78992
  y: _y7
78884
78993
  },
78885
78994
  size: {
@@ -79372,39 +79481,39 @@ var PdfiumNative = /*#__PURE__*/function () {
79372
79481
  }
79373
79482
  }]);
79374
79483
  }();
79375
- function createPdfiumEngine(_x206, _x207) {
79484
+ function createPdfiumEngine(_x207, _x208) {
79376
79485
  return _createPdfiumEngine2.apply(this, arguments);
79377
79486
  }
79378
79487
  function _createPdfiumEngine2() {
79379
- _createPdfiumEngine2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee178(wasmUrl, options) {
79488
+ _createPdfiumEngine2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee179(wasmUrl, options) {
79380
79489
  var response, wasmBinary, wasmModule, native;
79381
- return _regenerator().w(function (_context185) {
79382
- while (1) switch (_context185.n) {
79490
+ return _regenerator().w(function (_context186) {
79491
+ while (1) switch (_context186.n) {
79383
79492
  case 0:
79384
- _context185.n = 1;
79493
+ _context186.n = 1;
79385
79494
  return fetch(wasmUrl);
79386
79495
  case 1:
79387
- response = _context185.v;
79388
- _context185.n = 2;
79496
+ response = _context186.v;
79497
+ _context186.n = 2;
79389
79498
  return response.arrayBuffer();
79390
79499
  case 2:
79391
- wasmBinary = _context185.v;
79392
- _context185.n = 3;
79500
+ wasmBinary = _context186.v;
79501
+ _context186.n = 3;
79393
79502
  return init({
79394
79503
  wasmBinary: wasmBinary
79395
79504
  });
79396
79505
  case 3:
79397
- wasmModule = _context185.v;
79506
+ wasmModule = _context186.v;
79398
79507
  native = new PdfiumNative(wasmModule, {
79399
79508
  logger: options == null ? void 0 : options.logger,
79400
79509
  fontFallback: options == null ? void 0 : options.fontFallback
79401
79510
  });
79402
- return _context185.a(2, new PdfEngine(native, {
79511
+ return _context186.a(2, new PdfEngine(native, {
79403
79512
  imageConverter: browserImageDataToBlobConverter,
79404
79513
  logger: options == null ? void 0 : options.logger
79405
79514
  }));
79406
79515
  }
79407
- }, _callee178);
79516
+ }, _callee179);
79408
79517
  }));
79409
79518
  return _createPdfiumEngine2.apply(this, arguments);
79410
79519
  }
@@ -79412,4 +79521,4 @@ var directEngine = /*#__PURE__*/Object.freeze({
79412
79521
  __proto__: null,
79413
79522
  createPdfiumEngine: createPdfiumEngine
79414
79523
  });
79415
- export { se as CHAPTER_ANNOTATIONS_ARCHIVE_VERSION, CHAPTER_SNIPPET_EVENTS, c as CallbackPasswordProvider, ChapterManagerPlugin, Is as DEFAULT_CHAPTER_VIEWER_CONFIG, ws as DEFAULT_CHAPTER_VIEWER_FEATURES, EmbedPdfChapterContainer, rt$1 as applySelectionMarkup, d as buildChapterViewerCatalog, ia as buildParagraphBookmarkAnchor, ge as chapterAnnotationsArchiveToJson, me as chapterAnnotationsSnapshotToJson, h as chapterDescriptorFromTreeNode, xs as createChapterViewerBundle, ks as createChapterViewerEditorOptions, ChapterEmbedPDF as default, t$1 as defaultOverlapStrategy, Pe as downloadChapterAnnotationsArchive, we as downloadChapterAnnotationsSnapshot, be as downloadJsonFile, ce as exportAllChapterAnnotations, le as exportChapterAnnotations, p as flattenChapterTree, ue as importChapterAnnotations, pe as importChapterAnnotationsArchive, normalizeChapterViewerConfig, i as overlapStrategyForSamePageOwner, fe as parseChapterAnnotationsArchiveJson, ve as parseChapterAnnotationsSnapshotJson, g as toChapterTreeNodes, version };
79524
+ export { oe as CHAPTER_ANNOTATIONS_ARCHIVE_VERSION, CHAPTER_SNIPPET_EVENTS, c as CallbackPasswordProvider, ChapterManagerPlugin, ks as DEFAULT_CHAPTER_VIEWER_CONFIG, xs as DEFAULT_CHAPTER_VIEWER_FEATURES, EmbedPdfChapterContainer, rt$1 as applySelectionMarkup, d as buildChapterViewerCatalog, oa as buildParagraphBookmarkAnchor, fe as chapterAnnotationsArchiveToJson, ve as chapterAnnotationsSnapshotToJson, h as chapterDescriptorFromTreeNode, zs as createChapterViewerBundle, Gs as createChapterViewerEditorOptions, ChapterEmbedPDF as default, t$1 as defaultOverlapStrategy, we as downloadChapterAnnotationsArchive, ye as downloadChapterAnnotationsSnapshot, Pe as downloadJsonFile, ue as exportAllChapterAnnotations, ce as exportChapterAnnotations, p as flattenChapterTree, pe as importChapterAnnotations, ge as importChapterAnnotationsArchive, normalizeChapterViewerConfig, i as overlapStrategyForSamePageOwner, me as parseChapterAnnotationsArchiveJson, be as parseChapterAnnotationsSnapshotJson, g as toChapterTreeNodes, version };