@flyfish-group/file-viewer3 1.0.19 → 1.0.20

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.
Files changed (265) hide show
  1. package/README.md +17 -16
  2. package/dist/components/3MFLoader.js +1 -1
  3. package/dist/components/AMFLoader.js +1 -1
  4. package/dist/components/AudioViewer.js +1 -1
  5. package/dist/components/CadViewer.js +1 -1
  6. package/dist/components/CodeViewer.js +1 -1
  7. package/dist/components/ColladaLoader.js +1 -1
  8. package/dist/components/DrawingViewer.js +1 -1
  9. package/dist/components/EdaViewer.js +1 -1
  10. package/dist/components/EmailViewer.js +1 -1
  11. package/dist/components/EpubViewer.js +1 -1
  12. package/dist/components/FBXLoader.js +1 -1
  13. package/dist/components/GLTFLoader.js +1 -1
  14. package/dist/components/ImageViewer.js +1 -1
  15. package/dist/components/KMZLoader.js +1 -1
  16. package/dist/components/MarkdownViewer.js +1 -1
  17. package/dist/components/ModelViewer.js +1 -1
  18. package/dist/components/OBJLoader.js +1 -1
  19. package/dist/components/OfdViewer.js +1 -1
  20. package/dist/components/PCDLoader.js +1 -1
  21. package/dist/components/PLYLoader.js +1 -1
  22. package/dist/components/PdfView.js +206 -207
  23. package/dist/components/PptxRender.js +1 -1
  24. package/dist/components/STLLoader.js +1 -1
  25. package/dist/components/TDSLoader.js +1 -1
  26. package/dist/components/TypstViewer.js +1671 -0
  27. package/dist/components/USDLoader.js +1 -1
  28. package/dist/components/UmdViewer.js +1 -1
  29. package/dist/components/VRMLLoader.js +1 -1
  30. package/dist/components/VTKLoader.js +1 -1
  31. package/dist/components/XYZLoader.js +1 -1
  32. package/dist/components/XlsxTable.js +1 -1
  33. package/dist/components/__vite-browser-external.js +1 -1
  34. package/dist/components/_plugin-vue_export-helper.js +1 -1
  35. package/dist/components/ar-SA-G6X2FPQ2.js +1 -1
  36. package/dist/components/arc.js +1 -1
  37. package/dist/components/architecture-7EHR7CIX.js +1 -1
  38. package/dist/components/architectureDiagram-3BPJPVTR.js +1 -1
  39. package/dist/components/archive.js +1 -1
  40. package/dist/components/asyncToGenerator.js +1 -1
  41. package/dist/components/audio.js +1 -1
  42. package/dist/components/az-AZ-76LH7QW2.js +1 -1
  43. package/dist/components/bash.js +1 -1
  44. package/dist/components/bg-BG-XCXSNQG7.js +1 -1
  45. package/dist/components/blockDiagram-GPEHLZMM.js +1 -1
  46. package/dist/components/bn-BD-2XOGV67Q.js +1 -1
  47. package/dist/components/c4Diagram-AAUBKEIU.js +1 -1
  48. package/dist/components/ca-ES-6MX7JW3Y.js +1 -1
  49. package/dist/components/cad.js +1 -1
  50. package/dist/components/cfb.js +1 -1
  51. package/dist/components/channel.js +1 -1
  52. package/dist/components/chunk-2J33WTMH.js +1 -1
  53. package/dist/components/chunk-3OPIFGDE.js +1 -1
  54. package/dist/components/chunk-4BX2VUAB.js +1 -1
  55. package/dist/components/chunk-55IACEB6.js +1 -1
  56. package/dist/components/chunk-5ZQYHXKU.js +1 -1
  57. package/dist/components/chunk-6U3AYISY.js +1 -1
  58. package/dist/components/chunk-727SXJPM.js +1 -1
  59. package/dist/components/chunk-AGHRB4JF.js +1 -1
  60. package/dist/components/chunk-AQP2D5EJ.js +1 -1
  61. package/dist/components/chunk-BSJP7CBP.js +1 -1
  62. package/dist/components/chunk-CSCIHK7Q.js +1 -1
  63. package/dist/components/chunk-FMBD7UC4.js +1 -1
  64. package/dist/components/chunk-K2UTITRG.js +1 -1
  65. package/dist/components/chunk-KSCS5N6A.js +1 -1
  66. package/dist/components/chunk-L5ZTLDWV.js +1 -1
  67. package/dist/components/chunk-LZXEDZCA.js +1 -1
  68. package/dist/components/chunk-ND2GUHAM.js +1 -1
  69. package/dist/components/chunk-NZK2D7GU.js +1 -1
  70. package/dist/components/chunk-O5CBEL6O.js +1 -1
  71. package/dist/components/chunk-QZHKN3VN.js +1 -1
  72. package/dist/components/chunk-SRAX5OIU.js +1 -1
  73. package/dist/components/chunk-WU5MYG2G.js +1 -1
  74. package/dist/components/chunk-XPW4576I.js +1 -1
  75. package/dist/components/chunk-Z3N5DIM6.js +1 -1
  76. package/dist/components/chunk-ZUYEQ4TG.js +1 -1
  77. package/dist/components/chunk.js +1 -1
  78. package/dist/components/classDiagram-4FO5ZUOK.js +1 -1
  79. package/dist/components/classDiagram-v2-Q7XG4LA2.js +1 -1
  80. package/dist/components/compiler.js +1 -0
  81. package/dist/components/core.js +1 -1
  82. package/dist/components/cose-bilkent-S5V4N54A.js +1 -1
  83. package/dist/components/cpp.js +1 -1
  84. package/dist/components/cs-CZ-2BRQDIVT.js +1 -1
  85. package/dist/components/csharp.js +1 -1
  86. package/dist/components/css.js +1 -1
  87. package/dist/components/cytoscape.esm.js +1 -1
  88. package/dist/components/da-DK-5WZEPLOC.js +1 -1
  89. package/dist/components/dagre-BM42HDAG.js +1 -1
  90. package/dist/components/dagre.js +1 -1
  91. package/dist/components/de-DE-XR44H4JA.js +1 -1
  92. package/dist/components/defaultLocale.js +1 -1
  93. package/dist/components/defineProperty.js +1 -1
  94. package/dist/components/diagram-2AECGRRQ.js +1 -1
  95. package/dist/components/diagram-5GNKFQAL.js +1 -1
  96. package/dist/components/diagram-KO2AKTUF.js +1 -1
  97. package/dist/components/diagram-LMA3HP47.js +1 -1
  98. package/dist/components/diagram-OG6HWLK6.js +1 -1
  99. package/dist/components/diff.js +1 -1
  100. package/dist/components/directory-open-01563666.js +1 -1
  101. package/dist/components/directory-open-4ed118d0.js +1 -1
  102. package/dist/components/dist.js +1 -1
  103. package/dist/components/dist2.js +1 -1
  104. package/dist/components/dist3.js +1 -1
  105. package/dist/components/docx-preview.js +1 -1
  106. package/dist/components/drawing.js +1 -1
  107. package/dist/components/ebook.js +1 -1
  108. package/dist/components/eda.js +1 -1
  109. package/dist/components/el-GR-BZB4AONW.js +1 -1
  110. package/dist/components/email.js +1 -1
  111. package/dist/components/en-B4ZKOASM.js +1 -1
  112. package/dist/components/erDiagram-TEJ5UH35.js +1 -1
  113. package/dist/components/es-ES-U4NZUMDT.js +1 -1
  114. package/dist/components/eu-ES-A7QVB2H4.js +1 -1
  115. package/dist/components/eventmodeling-FCH6USID.js +1 -1
  116. package/dist/components/fa-IR-HGAKTJCU.js +1 -1
  117. package/dist/components/fflate.module.js +1 -1
  118. package/dist/components/fi-FI-Z5N7JZ37.js +1 -1
  119. package/dist/components/file-open-002ab408.js +1 -1
  120. package/dist/components/file-open-7c801643.js +1 -1
  121. package/dist/components/file-save-3189631c.js +1 -1
  122. package/dist/components/file-save-745eba88.js +1 -1
  123. package/dist/components/flowDiagram-I6XJVG4X.js +1 -1
  124. package/dist/components/fr-FR-RHASNOE6.js +1 -1
  125. package/dist/components/ganttDiagram-6RSMTGT7.js +1 -1
  126. package/dist/components/gitGraph-WXDBUCRP.js +1 -1
  127. package/dist/components/gitGraphDiagram-PVQCEYII.js +1 -1
  128. package/dist/components/gl-ES-HMX3MZ6V.js +1 -1
  129. package/dist/components/global-compiler.js +1 -0
  130. package/dist/components/global-renderer.js +1 -0
  131. package/dist/components/go.js +1 -1
  132. package/dist/components/graphlib.js +1 -1
  133. package/dist/components/he-IL-6SHJWFNN.js +1 -1
  134. package/dist/components/hi-IN-IWLTKZ5I.js +1 -1
  135. package/dist/components/hu-HU-A5ZG7DT2.js +1 -1
  136. package/dist/components/id-ID-SAP4L64H.js +1 -1
  137. package/dist/components/image-GAAHSSAO.js +1 -1
  138. package/dist/components/image-blob-reduce.esm.js +1 -1
  139. package/dist/components/image.js +1 -1
  140. package/dist/components/info-J43DQDTF.js +1 -1
  141. package/dist/components/infoDiagram-5YYISTIA.js +1 -1
  142. package/dist/components/ini.js +1 -1
  143. package/dist/components/init.js +1 -1
  144. package/dist/components/ishikawaDiagram-YF4QCWOH.js +1 -1
  145. package/dist/components/it-IT-JPQ66NNP.js +1 -1
  146. package/dist/components/ja-JP-DBVTYXUO.js +1 -1
  147. package/dist/components/java.js +1 -1
  148. package/dist/components/javascript.js +1 -1
  149. package/dist/components/journeyDiagram-JHISSGLW.js +1 -1
  150. package/dist/components/json.js +1 -1
  151. package/dist/components/jszip.min.js +1 -1
  152. package/dist/components/kaa-6HZHGXH3.js +1 -1
  153. package/dist/components/kab-KAB-ZGHBKWFO.js +1 -1
  154. package/dist/components/kanban-definition-UN3LZRKU.js +1 -1
  155. package/dist/components/katex.js +1 -1
  156. package/dist/components/kk-KZ-P5N5QNE5.js +1 -1
  157. package/dist/components/km-KH-HSX4SM5Z.js +1 -1
  158. package/dist/components/ko-KR-MTYHY66A.js +1 -1
  159. package/dist/components/ku-TR-6OUDTVRD.js +1 -1
  160. package/dist/components/lib.js +1 -1
  161. package/dist/components/libarchive.js +1 -1
  162. package/dist/components/linear.js +1 -1
  163. package/dist/components/lt-LT-XHIRWOB4.js +1 -1
  164. package/dist/components/lv-LV-5QDEKY6T.js +1 -1
  165. package/dist/components/markdown.js +1 -1
  166. package/dist/components/md.js +1 -1
  167. package/dist/components/mermaid-parser.core.js +1 -1
  168. package/dist/components/mindmap-definition-RKZ34NQL.js +1 -1
  169. package/dist/components/model.js +1 -1
  170. package/dist/components/mp4.js +1 -1
  171. package/dist/components/mr-IN-CRQNXWMA.js +1 -1
  172. package/dist/components/my-MM-5M5IBNSE.js +1 -1
  173. package/dist/components/nb-NO-T6EIAALU.js +1 -1
  174. package/dist/components/nestedRender.js +1 -1
  175. package/dist/components/nl-NL-IS3SIHDZ.js +1 -1
  176. package/dist/components/nn-NO-6E72VCQL.js +1 -1
  177. package/dist/components/objectSpread2.js +1 -1
  178. package/dist/components/objectWithoutProperties.js +1 -1
  179. package/dist/components/oc-FR-POXYY2M6.js +1 -1
  180. package/dist/components/ofd.js +1 -1
  181. package/dist/components/ofd2.js +1 -1
  182. package/dist/components/ordinal.js +1 -1
  183. package/dist/components/pa-IN-N4M65BXN.js +1 -1
  184. package/dist/components/packet-YPE3B663.js +1 -1
  185. package/dist/components/pdf.js +1 -1
  186. package/dist/components/percentages-BXMCSKIN.js +1 -1
  187. package/dist/components/php.js +1 -1
  188. package/dist/components/pica.js +1 -1
  189. package/dist/components/pie-LRSECV5Y.js +1 -1
  190. package/dist/components/pie.js +1 -1
  191. package/dist/components/pieDiagram-4H26LBE5.js +1 -1
  192. package/dist/components/pl-PL-T2D74RX3.js +1 -1
  193. package/dist/components/postal-mime.js +1 -1
  194. package/dist/components/pptx.js +1 -1
  195. package/dist/components/printLayout.js +1 -1
  196. package/dist/components/prod.js +1 -1
  197. package/dist/components/pt-BR-5N22H2LF.js +1 -1
  198. package/dist/components/pt-PT-UZXXM6DQ.js +1 -1
  199. package/dist/components/python.js +1 -1
  200. package/dist/components/quadrantDiagram-W4KKPZXB.js +1 -1
  201. package/dist/components/radar-GUYGQ44K.js +1 -1
  202. package/dist/components/renderer.js +1 -0
  203. package/dist/components/requirementDiagram-4Y6WPE33.js +1 -1
  204. package/dist/components/ro-RO-JPDTUUEW.js +1 -1
  205. package/dist/components/rough.esm.js +1 -1
  206. package/dist/components/roundRect.js +1 -1
  207. package/dist/components/ru-RU-B4JR7IUQ.js +1 -1
  208. package/dist/components/rust.js +1 -1
  209. package/dist/components/sankeyDiagram-5OEKKPKP.js +1 -1
  210. package/dist/components/sequenceDiagram-3UESZ5HK.js +1 -1
  211. package/dist/components/shared.js +1 -1
  212. package/dist/components/shared2.js +1 -1
  213. package/dist/components/si-LK-N5RQ5JYF.js +1 -1
  214. package/dist/components/sk-SK-C5VTKIMK.js +1 -1
  215. package/dist/components/sl-SI-NN7IZMDC.js +1 -1
  216. package/dist/components/sourceLoading.js +1 -0
  217. package/dist/components/sql.js +1 -1
  218. package/dist/components/src.js +1 -1
  219. package/dist/components/src2.js +1 -1
  220. package/dist/components/stateDiagram-AJRCARHV.js +1 -1
  221. package/dist/components/stateDiagram-v2-BHNVJYJU.js +1 -1
  222. package/dist/components/subset-shared.chunk.js +1 -1
  223. package/dist/components/subset-worker.chunk.js +1 -1
  224. package/dist/components/sv-SE-XGPEYMSR.js +1 -1
  225. package/dist/components/ta-IN-2NMHFXQM.js +1 -1
  226. package/dist/components/text.js +1 -1
  227. package/dist/components/th-TH-HPSO5L25.js +1 -1
  228. package/dist/components/three.module.js +1 -1
  229. package/dist/components/time.js +1 -1
  230. package/dist/components/timeline-definition-PNZ67QCA.js +1 -1
  231. package/dist/components/tr-TR-DEFEU3FU.js +1 -1
  232. package/dist/components/treeView-BLDUP644.js +1 -1
  233. package/dist/components/treemap-LRROVOQU.js +1 -1
  234. package/dist/components/typescript.js +1 -1
  235. package/dist/components/typst.js +1 -0
  236. package/dist/components/uk-UA-QMV73CPH.js +1 -1
  237. package/dist/components/umd.js +1 -1
  238. package/dist/components/use.js +1 -1
  239. package/dist/components/util.js +1 -1
  240. package/dist/components/vennDiagram-CIIHVFJN.js +1 -1
  241. package/dist/components/vi-VN-M7AON7JQ.js +1 -1
  242. package/dist/components/wardley-L42UT6IY.js +1 -1
  243. package/dist/components/wardleyDiagram-YWT4CUSO.js +1 -1
  244. package/dist/components/wasm-pack-shim.js +1 -0
  245. package/dist/components/wasm-pack-shim2.js +1 -0
  246. package/dist/components/wasm.js +1 -0
  247. package/dist/components/word.js +1 -1
  248. package/dist/components/worker-ref.js +1 -1
  249. package/dist/components/xlsx.js +1 -1
  250. package/dist/components/xml.js +1 -1
  251. package/dist/components/xychartDiagram-2RQKCTM6.js +1 -1
  252. package/dist/components/yaml.js +1 -1
  253. package/dist/components/zh-CN-LNUGB5OW.js +1 -1
  254. package/dist/components/zh-HK-E62DVLB3.js +1 -1
  255. package/dist/components/zh-TW-RAJ6MFWO.js +1 -1
  256. package/dist/file-viewer3.css +1 -1
  257. package/dist/index.mjs +1 -1
  258. package/dist/src/package/common/sourceLoading.d.ts +10 -0
  259. package/dist/src/package/common/type.d.ts +33 -1
  260. package/dist/src/package/components/FileViewer/useViewerExport.d.ts +2 -1
  261. package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +2 -1
  262. package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +15 -0
  263. package/dist/src/package/vendors/typst/index.d.ts +8 -0
  264. package/package.json +5 -1
  265. package/dist/components/wrapAsyncGenerator.js +0 -1
@@ -1,20 +1,18 @@
1
1
  import { n as e, t } from "./defineProperty.js";
2
2
  import { n, t as r } from "./objectSpread2.js";
3
3
  import { n as i, t as a } from "./asyncToGenerator.js";
4
- import { i as o, n as s, t as c } from "./wrapAsyncGenerator.js";
4
+ import { i as o, o as s, r as c } from "./sourceLoading.js";
5
5
  import { t as l } from "./_plugin-vue_export-helper.js";
6
6
  import { n as u, r as d } from "./printLayout.js";
7
7
  import { t as f } from "./worker-ref.js";
8
8
  import { Fragment as p, computed as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, defineComponent as v, nextTick as y, normalizeClass as b, normalizeStyle as x, onBeforeUnmount as S, onMounted as C, openBlock as w, ref as T, renderList as E, toDisplayString as D, withModifiers as ee } from "vue";
9
- //#region \0@oxc-project+runtime@0.130.0/helpers/assertClassBrand.js
10
- i();
9
+ e(), n(), i();
11
10
  function O(e, t, n) {
12
11
  if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
13
12
  throw TypeError("Private element is not present on this object");
14
13
  }
15
14
  //#endregion
16
15
  //#region \0@oxc-project+runtime@0.130.0/helpers/checkPrivateRedeclaration.js
17
- e();
18
16
  function k(e, t) {
19
17
  if (t.has(e)) throw TypeError("Cannot initialize the same private elements twice on an object");
20
18
  }
@@ -40,7 +38,6 @@ function N(e, t, n) {
40
38
  }
41
39
  //#endregion
42
40
  //#region \0@oxc-project+runtime@0.130.0/helpers/toSetter.js
43
- n();
44
41
  function P(e, t, n) {
45
42
  t || (t = []);
46
43
  var r = t.length++;
@@ -50,7 +47,7 @@ function P(e, t, n) {
50
47
  }
51
48
  //#endregion
52
49
  //#region node_modules/.pnpm/pdfjs-dist@5.7.284/node_modules/pdfjs-dist/legacy/build/pdf.mjs
53
- var F, te, ne, re, ie, ae, oe, se, ce, I, le, ue, de, fe, pe, me, he, ge, _e = {
50
+ var F, te, ne, re, ie, ae, oe, se, ce, le, I, ue, de, fe, pe, me, he, ge, _e = {
54
51
  9306(e, t, n) {
55
52
  var r = n(4901), i = n(6823), a = TypeError;
56
53
  e.exports = function(e) {
@@ -202,7 +199,7 @@ var F, te, ne, re, ie, ae, oe, se, ce, I, le, ue, de, fe, pe, me, he, ge, _e = {
202
199
  }, ce = function(e) {
203
200
  if (o(e) && (!g || m(E, e))) return e;
204
201
  throw new O(u(e) + " is not a typed array constructor");
205
- }, I = function(e, t, n, r) {
202
+ }, le = function(e, t, n, r) {
206
203
  if (i) {
207
204
  if (n) for (var o in ne) {
208
205
  var s = a[o];
@@ -216,7 +213,7 @@ var F, te, ne, re, ie, ae, oe, se, ce, I, le, ue, de, fe, pe, me, he, ge, _e = {
216
213
  }
217
214
  (!D[e] || n) && f(D, e, n ? t : M && C[e] || t, r);
218
215
  }
219
- }, le = function(e, t, n) {
216
+ }, I = function(e, t, n) {
220
217
  var r, o;
221
218
  if (i) {
222
219
  if (g) {
@@ -250,8 +247,8 @@ var F, te, ne, re, ie, ae, oe, se, ce, I, le, ue, de, fe, pe, me, he, ge, _e = {
250
247
  TYPED_ARRAY_TAG: N && A,
251
248
  aTypedArray: se,
252
249
  aTypedArrayConstructor: ce,
253
- exportTypedArrayMethod: I,
254
- exportTypedArrayStaticMethod: le,
250
+ exportTypedArrayMethod: le,
251
+ exportTypedArrayStaticMethod: I,
255
252
  getTypedArrayConstructor: ae,
256
253
  isView: ie,
257
254
  isTypedArray: oe,
@@ -12149,19 +12146,19 @@ var Wd = class {
12149
12146
  styles: Object.create(null),
12150
12147
  lang: null
12151
12148
  };
12152
- var i = !1, a = !1, s;
12149
+ var i = !1, a = !1, o;
12153
12150
  try {
12154
- for (var c = o(n), l; i = !(l = yield c.next()).done; i = !1) {
12151
+ for (var c = s(n), l; i = !(l = yield c.next()).done; i = !1) {
12155
12152
  let e = l.value;
12156
12153
  r.lang != null || (r.lang = e.lang), Object.assign(r.styles, e.styles), r.items.push(...e.items);
12157
12154
  }
12158
12155
  } catch (e) {
12159
- a = !0, s = e;
12156
+ a = !0, o = e;
12160
12157
  } finally {
12161
12158
  try {
12162
12159
  i && c.return != null && (yield c.return());
12163
12160
  } finally {
12164
- if (a) throw s;
12161
+ if (a) throw o;
12165
12162
  }
12166
12163
  }
12167
12164
  return r;
@@ -15220,7 +15217,7 @@ var oh = /\r\n?|\n/g, sh = /* @__PURE__ */ new WeakMap(), ch = /* @__PURE__ */ n
15220
15217
  super.resetAnnotationElement(e), e.resetEdited();
15221
15218
  }
15222
15219
  };
15223
- I = fh;
15220
+ le = fh;
15224
15221
  function ph(e) {
15225
15222
  let t = (e) => {
15226
15223
  this.editorDiv.style.fontSize = `calc(${e}px * var(--total-scale-factor))`, this.translate(0, -(e - j(uh, this)) * this.parentScale), N(uh, this, e), O(dh, this, gh).call(this);
@@ -15253,7 +15250,7 @@ function hh() {
15253
15250
  let e = [];
15254
15251
  this.editorDiv.normalize();
15255
15252
  let t = null;
15256
- for (let n of this.editorDiv.childNodes) (t == null ? void 0 : t.nodeType) === Node.TEXT_NODE && n.nodeName === "BR" || (e.push(_h.call(I, n)), t = n);
15253
+ for (let n of this.editorDiv.childNodes) (t == null ? void 0 : t.nodeType) === Node.TEXT_NODE && n.nodeName === "BR" || (e.push(_h.call(le, n)), t = n);
15257
15254
  return e.join("\n");
15258
15255
  }
15259
15256
  function gh() {
@@ -16110,7 +16107,7 @@ var pg = /* @__PURE__ */ new WeakMap(), mg = /* @__PURE__ */ new WeakMap(), hg =
16110
16107
  return !1;
16111
16108
  }
16112
16109
  };
16113
- le = Lg;
16110
+ I = Lg;
16114
16111
  function Rg() {
16115
16112
  let e = new sg(j(bg, this), .001);
16116
16113
  N(Dg, this, e.getOutlines()), [this.x, this.y, this.width, this.height] = j(Dg, this).box;
@@ -16136,10 +16133,10 @@ function zg({ highlightOutlines: e, highlightId: t, clipPathId: n }) {
16136
16133
  else if (this.parent) {
16137
16134
  let t = this.parent.viewport.rotation;
16138
16135
  this.parent.drawLayer.updateProperties(j(Og, this), {
16139
- bbox: Gg.call(le, j(Dg, this).box, (t - this.rotation + 360) % 360),
16136
+ bbox: Gg.call(I, j(Dg, this).box, (t - this.rotation + 360) % 360),
16140
16137
  path: { d: e.toSVGPath() }
16141
16138
  }), this.parent.drawLayer.updateProperties(j(Mg, this), {
16142
- bbox: Gg.call(le, j(Cg, this).box, t),
16139
+ bbox: Gg.call(I, j(Cg, this).box, t),
16143
16140
  path: { d: j(Cg, this).toSVGPath() }
16144
16141
  });
16145
16142
  }
@@ -16172,7 +16169,7 @@ function Bg(e) {
16172
16169
  this.color = e, this.opacity = t, this.onUpdatedColor();
16173
16170
  }, n = this.color, r = this.opacity;
16174
16171
  this.addCommands({
16175
- cmd: t.bind(this, e, le._defaultOpacity),
16172
+ cmd: t.bind(this, e, I._defaultOpacity),
16176
16173
  undo: t.bind(this, n, r),
16177
16174
  post: this._uiManager.updateUI.bind(this._uiManager, this),
16178
16175
  mustExec: !0,
@@ -16258,7 +16255,7 @@ function Gg([e, t, n, r], i) {
16258
16255
  ];
16259
16256
  }
16260
16257
  function Kg(e) {
16261
- le._keyboardManager.exec(this, e);
16258
+ I._keyboardManager.exec(this, e);
16262
16259
  }
16263
16260
  function qg(e) {
16264
16261
  if (!j(vg, this)) return;
@@ -17462,8 +17459,8 @@ var Z_ = 8, Q_ = 3, $_ = class e {
17462
17459
  let f = null, p = 0;
17463
17460
  var t = !1, n = !1, r;
17464
17461
  try {
17465
- for (var i = o(l), s; t = !(s = yield i.next()).done; t = !1) {
17466
- let e = s.value;
17462
+ for (var i = s(l), o; t = !(o = yield i.next()).done; t = !1) {
17463
+ let e = o.value;
17467
17464
  f || (f = new Uint8Array(new Uint32Array(e.buffer, 0, 4)[0])), f.set(e, p), p += e.length;
17468
17465
  }
17469
17466
  } catch (e) {
@@ -19014,7 +19011,7 @@ var My, Ny, Py, Fy, Iy = {
19014
19011
  }, ce = function(e) {
19015
19012
  if (o(e) && (!g || m(E, e))) return e;
19016
19013
  throw new O(u(e) + " is not a typed array constructor");
19017
- }, I = function(e, t, n, r) {
19014
+ }, le = function(e, t, n, r) {
19018
19015
  if (i) {
19019
19016
  if (n) for (var o in ne) {
19020
19017
  var s = a[o];
@@ -19028,7 +19025,7 @@ var My, Ny, Py, Fy, Iy = {
19028
19025
  }
19029
19026
  (!D[e] || n) && f(D, e, n ? t : M && C[e] || t, r);
19030
19027
  }
19031
- }, le = function(e, t, n) {
19028
+ }, I = function(e, t, n) {
19032
19029
  var r, o;
19033
19030
  if (i) {
19034
19031
  if (g) {
@@ -19062,8 +19059,8 @@ var My, Ny, Py, Fy, Iy = {
19062
19059
  TYPED_ARRAY_TAG: N && A,
19063
19060
  aTypedArray: se,
19064
19061
  aTypedArrayConstructor: ce,
19065
- exportTypedArrayMethod: I,
19066
- exportTypedArrayStaticMethod: le,
19062
+ exportTypedArrayMethod: le,
19063
+ exportTypedArrayStaticMethod: I,
19067
19064
  getTypedArrayConstructor: ae,
19068
19065
  isView: ie,
19069
19066
  isTypedArray: oe,
@@ -22916,9 +22913,9 @@ var uw = class extends Array {
22916
22913
  var n = this;
22917
22914
  return a(function* () {
22918
22915
  let r = [], i = !1;
22919
- var a = !1, s = !1, c;
22916
+ var a = !1, o = !1, c;
22920
22917
  try {
22921
- for (var l = o(n.bundles), u; a = !(u = yield l.next()).done; a = !1) {
22918
+ for (var l = s(n.bundles), u; a = !(u = yield l.next()).done; a = !1) {
22922
22919
  let n = u.value;
22923
22920
  {
22924
22921
  i = !0;
@@ -22931,12 +22928,12 @@ var uw = class extends Array {
22931
22928
  }
22932
22929
  }
22933
22930
  } catch (e) {
22934
- s = !0, c = e;
22931
+ o = !0, c = e;
22935
22932
  } finally {
22936
22933
  try {
22937
22934
  a && l.return != null && (yield l.return());
22938
22935
  } finally {
22939
- if (s) throw c;
22936
+ if (o) throw c;
22940
22937
  }
22941
22938
  }
22942
22939
  return !i && typeof console < "u" && console.warn(`[fluent] Request for keys failed because no resource bundles got generated.
@@ -23190,14 +23187,14 @@ My = kw;
23190
23187
  function Aw(e, t) {
23191
23188
  var n = this;
23192
23189
  return c(function* () {
23193
- let { baseURL: r, paths: i } = yield s(O(My, n, Mw).call(n)), a = [t];
23190
+ let { baseURL: r, paths: i } = yield o(O(My, n, Mw).call(n)), a = [t];
23194
23191
  if (e !== t) {
23195
23192
  let n = t.split("-", 1)[0];
23196
23193
  n !== t && a.push(n), a.push(e);
23197
23194
  }
23198
- let o = a.map((e) => [e, O(My, n, jw).call(n, e, r, i)]);
23199
- for (let [e, t] of o) {
23200
- let r = yield s(t);
23195
+ let s = a.map((e) => [e, O(My, n, jw).call(n, e, r, i)]);
23196
+ for (let [e, t] of s) {
23197
+ let r = yield o(t);
23201
23198
  r ? yield r : e === "en-us" && (yield O(My, n, Pw).call(n, e));
23202
23199
  }
23203
23200
  })();
@@ -26628,9 +26625,7 @@ function GO(e) {
26628
26625
  var KO = { create() {
26629
26626
  return f("pdf.worker.js").defaults(() => new GO());
26630
26627
  } };
26631
- //#endregion
26632
- //#region src/package/vendors/pdf/PdfView.vue?vue&type=script&setup=true&lang.ts
26633
- i();
26628
+ i(), n();
26634
26629
  var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-toolbar-group" }, XO = ["disabled"], ZO = { class: "pdf-page-meter" }, QO = ["disabled"], $O = { class: "pdf-toolbar-group pdf-toolbar-group--zoom" }, ek = ["disabled"], tk = ["disabled"], nk = { class: "pdf-toolbar-group pdf-toolbar-group--rotate" }, rk = { class: "pdf-rotation-meter" }, ik = { class: "pdf-content" }, ak = {
26635
26630
  key: 0,
26636
26631
  class: "pdf-nav-pane"
@@ -26657,18 +26652,19 @@ var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-too
26657
26652
  __name: "PdfView",
26658
26653
  props: {
26659
26654
  data: {},
26655
+ url: {},
26660
26656
  exportAdapter: { type: Function },
26661
26657
  options: {}
26662
26658
  },
26663
26659
  setup(e) {
26664
- var t, n, r, i;
26665
- let o = e, s = T(null), c = T(((t = o.options) == null ? void 0 : t.navigation) === !1 ? !1 : ((n = o.options) == null ? void 0 : n.defaultNavigationVisible) !== !1), l = T("pages"), f = T("loading"), v = T(""), O = T(1), k = T(0), A = T(1), j = T(!0), M = T(me((r = (i = o.options) == null ? void 0 : i.rotation) == null ? 0 : r)), N = T([]), P = m(() => {
26660
+ var t, n, i, o;
26661
+ let s = e, c = T(null), l = T(((t = s.options) == null ? void 0 : t.navigation) === !1 ? !1 : ((n = s.options) == null ? void 0 : n.defaultNavigationVisible) !== !1), f = T("pages"), v = T("loading"), O = T(""), k = T(1), A = T(0), j = T(1), M = T(!0), N = T(he((i = (o = s.options) == null ? void 0 : o.rotation) == null ? 0 : i)), P = T([]), F = m(() => {
26666
26662
  var e;
26667
- return ((e = o.options) == null ? void 0 : e.navigation) !== !1;
26668
- }), F = m(() => Array.from({ length: k.value }, (e, t) => t + 1)), te = m(() => {
26663
+ return ((e = s.options) == null ? void 0 : e.navigation) !== !1;
26664
+ }), te = m(() => Array.from({ length: A.value }, (e, t) => t + 1)), ne = m(() => {
26669
26665
  let e = (t) => t.reduce((t, n) => t + 1 + e(n.items), 0);
26670
- return e(N.value);
26671
- }), ne = m(() => {
26666
+ return e(P.value);
26667
+ }), re = m(() => {
26672
26668
  let e = [], t = (n, r) => {
26673
26669
  n.forEach((n) => {
26674
26670
  e.push({
@@ -26677,26 +26673,26 @@ var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-too
26677
26673
  }), n.expanded && n.items.length && t(n.items, r + 1);
26678
26674
  });
26679
26675
  };
26680
- return t(N.value, 0), e;
26681
- }), re = m(() => `${Math.round(A.value * 100)}%`), ie = m(() => `${M.value}°`), ae = m(() => O.value > 1), oe = m(() => O.value < k.value), se = m(() => A.value > Sk), ce = m(() => A.value < Ck), I = {
26676
+ return t(P.value, 0), e;
26677
+ }), ie = m(() => `${Math.round(j.value * 100)}%`), ae = m(() => `${N.value}°`), oe = m(() => k.value > 1), se = m(() => k.value < A.value), ce = m(() => j.value > Sk), le = m(() => j.value < Ck), I = {
26682
26678
  viewer: null,
26683
26679
  linkService: null,
26684
26680
  resource: null,
26685
26681
  document: null,
26686
26682
  search: ""
26687
- }, le = null, ue = 0, de = !1, fe = 0;
26688
- function pe() {
26683
+ }, ue = null, de = 0, fe = !1, pe = 0;
26684
+ function me() {
26689
26685
  return typeof window > "u" || !("Worker" in window) ? null : sf.create({ port: KO.create() });
26690
26686
  }
26691
- function me(e) {
26687
+ function he(e) {
26692
26688
  let t = (Math.round(e / 90) * 90 % 360 + 360) % 360;
26693
26689
  return t === 90 || t === 180 || t === 270 ? t : 0;
26694
26690
  }
26695
- function he(e) {
26696
- return ge.apply(this, arguments);
26691
+ function ge(e) {
26692
+ return _e.apply(this, arguments);
26697
26693
  }
26698
- function ge() {
26699
- return ge = a(function* (e) {
26694
+ function _e() {
26695
+ return _e = a(function* (e) {
26700
26696
  if (e) try {
26701
26697
  yield e.loadingTask.destroy();
26702
26698
  } catch (e) {
@@ -26705,14 +26701,14 @@ var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-too
26705
26701
  var t;
26706
26702
  (t = e.worker) == null || t.destroy();
26707
26703
  }
26708
- }), ge.apply(this, arguments);
26704
+ }), _e.apply(this, arguments);
26709
26705
  }
26710
- function _e(e) {
26706
+ function ve(e) {
26711
26707
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
26712
26708
  }
26713
- function ve(e, t = "outline") {
26709
+ function L(e, t = "outline") {
26714
26710
  return e.map((e, n) => {
26715
- let r = `${t}-${n}`, i = Array.isArray(e.items) ? ve(e.items, r) : [];
26711
+ let r = `${t}-${n}`, i = Array.isArray(e.items) ? L(e.items, r) : [];
26716
26712
  return {
26717
26713
  id: r,
26718
26714
  title: e.title || `目录 ${n + 1}`,
@@ -26722,72 +26718,72 @@ var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-too
26722
26718
  };
26723
26719
  });
26724
26720
  }
26725
- function L(e) {
26726
- return ye.apply(this, arguments);
26721
+ function ye(e) {
26722
+ return be.apply(this, arguments);
26727
26723
  }
26728
- function ye() {
26729
- return ye = a(function* (e) {
26724
+ function be() {
26725
+ return be = a(function* (e) {
26730
26726
  try {
26731
26727
  let t = yield e.getOutline();
26732
- if (de || I.document !== e) return;
26733
- N.value = Array.isArray(t) ? ve(t) : [];
26728
+ if (fe || I.document !== e) return;
26729
+ P.value = Array.isArray(t) ? L(t) : [];
26734
26730
  } catch (e) {
26735
- console.warn("PDF 大纲读取失败", e), N.value = [];
26731
+ console.warn("PDF 大纲读取失败", e), P.value = [];
26736
26732
  }
26737
- }), ye.apply(this, arguments);
26733
+ }), be.apply(this, arguments);
26738
26734
  }
26739
- function be(e, t, n) {
26735
+ function xe(e, t, n) {
26740
26736
  let r = n === "print" ? 1.75 : 1.5, i = Math.sqrt(Dk / Math.max(e * t, 1));
26741
26737
  return Math.max(.75, Math.min(r, i));
26742
26738
  }
26743
- function xe() {
26744
- return Se.apply(this, arguments);
26745
- }
26746
26739
  function Se() {
26747
- return Se = a(function* (e = 1) {
26740
+ return Ce.apply(this, arguments);
26741
+ }
26742
+ function Ce() {
26743
+ return Ce = a(function* (e = 1) {
26748
26744
  var t;
26749
26745
  let n = I.document;
26750
26746
  if (!n) throw Error("PDF 尚未加载完成,请稍后再试");
26751
26747
  let r = yield n.getPage(Math.min(Math.max(e, 1), n.numPages)), i = r.getViewport({
26752
26748
  scale: yt.PDF_TO_CSS_UNITS,
26753
- rotation: M.value
26749
+ rotation: N.value
26754
26750
  });
26755
26751
  return (t = r.cleanup) == null || t.call(r), {
26756
26752
  width: Math.ceil(i.width),
26757
26753
  height: Math.ceil(i.height)
26758
26754
  };
26759
- }), Se.apply(this, arguments);
26760
- }
26761
- function Ce() {
26762
- return we.apply(this, arguments);
26755
+ }), Ce.apply(this, arguments);
26763
26756
  }
26764
26757
  function we() {
26765
- return we = a(function* () {
26766
- let e = yield xe();
26758
+ return Te.apply(this, arguments);
26759
+ }
26760
+ function Te() {
26761
+ return Te = a(function* () {
26762
+ let e = yield Se();
26767
26763
  return u({
26768
26764
  selector: ".viewer-export-content .pdf-export-page",
26769
26765
  width: e.width,
26770
26766
  height: e.height
26771
26767
  });
26772
- }), we.apply(this, arguments);
26768
+ }), Te.apply(this, arguments);
26773
26769
  }
26774
- function Te(e) {
26775
- return Ee.apply(this, arguments);
26770
+ function Ee(e) {
26771
+ return R.apply(this, arguments);
26776
26772
  }
26777
- function Ee() {
26778
- return Ee = a(function* (e) {
26773
+ function R() {
26774
+ return R = a(function* (e) {
26779
26775
  let t = I.document;
26780
26776
  if (!t) throw Error("PDF 尚未加载完成,请稍后再试");
26781
26777
  let n = [];
26782
26778
  for (let i = 1; i <= t.numPages; i += 1) {
26783
26779
  var r;
26784
- if (de) throw Error("PDF 已卸载,无法继续打印");
26780
+ if (fe) throw Error("PDF 已卸载,无法继续打印");
26785
26781
  let a = yield t.getPage(i), o = a.getViewport({
26786
26782
  scale: yt.PDF_TO_CSS_UNITS,
26787
- rotation: M.value
26788
- }), s = Math.ceil(o.width), c = Math.ceil(o.height), l = be(o.width, o.height, e.mode), u = a.getViewport({
26783
+ rotation: N.value
26784
+ }), s = Math.ceil(o.width), c = Math.ceil(o.height), l = xe(o.width, o.height, e.mode), u = a.getViewport({
26789
26785
  scale: yt.PDF_TO_CSS_UNITS * l,
26790
- rotation: M.value
26786
+ rotation: N.value
26791
26787
  }), f = document.createElement("canvas"), p = f.getContext("2d");
26792
26788
  if (!p) throw Error("当前浏览器无法创建 PDF 打印画布");
26793
26789
  f.width = Math.ceil(u.width), f.height = Math.ceil(u.height), yield a.render({
@@ -26801,177 +26797,180 @@ var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-too
26801
26797
  `width:${d(s)}`,
26802
26798
  `height:${d(c)}`
26803
26799
  ].join(";");
26804
- n.push(`<section class="pdf-export-page viewer-print-page" style="${h}" aria-label="${_e(m)}"><img src="${f.toDataURL("image/png")}" alt="${_e(m)}" /></section>`), f.width = 0, f.height = 0, (r = a.cleanup) == null || r.call(a);
26800
+ n.push(`<section class="pdf-export-page viewer-print-page" style="${h}" aria-label="${ve(m)}"><img src="${f.toDataURL("image/png")}" alt="${ve(m)}" /></section>`), f.width = 0, f.height = 0, (r = a.cleanup) == null || r.call(a);
26805
26801
  }
26806
26802
  return `<div class="pdf-export-document">${n.join("")}</div>`;
26807
- }), Ee.apply(this, arguments);
26808
- }
26809
- function R() {
26810
- return z.apply(this, arguments);
26803
+ }), R.apply(this, arguments);
26811
26804
  }
26812
26805
  function z() {
26813
- return z = a(function* () {
26806
+ return De.apply(this, arguments);
26807
+ }
26808
+ function De() {
26809
+ return De = a(function* () {
26814
26810
  var e;
26815
- if (!s.value) return;
26816
- let t = ++fe;
26817
- f.value = "loading", v.value = "", I.document = null, N.value = [], (e = o.exportAdapter) == null || e.call(o, null);
26811
+ if (!c.value) return;
26812
+ let t = ++pe;
26813
+ v.value = "loading", O.value = "", I.document = null, P.value = [], (e = s.exportAdapter) == null || e.call(s, null);
26818
26814
  let n = null;
26819
26815
  try {
26820
- var r;
26821
- if (de || t !== fe || !s.value) return;
26822
- let e = new ZS(), i = new jS({ eventBus: e }), a = new cS({
26816
+ var i, a, o;
26817
+ if (fe || t !== pe || !c.value) return;
26818
+ let e = new ZS(), l = new jS({ eventBus: e }), u = new cS({
26823
26819
  eventBus: e,
26824
- linkService: i,
26820
+ linkService: l,
26825
26821
  updateMatchesCountOnProgress: !0
26826
- }), c = new CO({
26827
- container: s.value,
26822
+ }), d = new CO({
26823
+ container: c.value,
26828
26824
  eventBus: e,
26829
- linkService: i,
26830
- findController: a,
26825
+ linkService: l,
26826
+ findController: u,
26831
26827
  l10n: new kw("zh-CN"),
26832
26828
  enableAutoLinking: !1
26833
26829
  });
26834
- I.viewer = c, I.linkService = i, i.setViewer(c), e.on("pagesinit", () => {
26835
- Fe(M.value), je(), f.value = "ready", I.search && e.dispatch("find", {
26830
+ if (I.viewer = d, I.linkService = l, l.setViewer(d), e.on("pagesinit", () => {
26831
+ Ie(N.value), Me(), v.value = "ready", I.search && e.dispatch("find", {
26836
26832
  type: "",
26837
26833
  query: I.search
26838
26834
  });
26839
26835
  }), e.on("pagechanging", ({ pageNumber: e }) => {
26840
- O.value = e;
26836
+ k.value = e;
26841
26837
  }), e.on("scalechanging", ({ scale: e }) => {
26842
- A.value = ke(e);
26843
- });
26844
- let l = pe(), u = Ud({
26845
- data: o.data,
26846
- worker: l || void 0,
26838
+ j.value = Ae(e);
26839
+ }), !s.url && !s.data) throw Error("PDF 缺少可读取的数据源");
26840
+ let f = me(), p = Ud(r(r({}, s.url ? {
26841
+ url: s.url,
26842
+ rangeChunkSize: ((i = s.options) == null ? void 0 : i.rangeChunkSize) || 65536,
26843
+ withCredentials: ((a = s.options) == null ? void 0 : a.withCredentials) === !0
26844
+ } : { data: s.data }), {}, {
26845
+ worker: f || void 0,
26847
26846
  cMapUrl: `https://npm.onmicrosoft.cn/pdfjs-dist@${jf}/cmaps/`,
26848
26847
  wasmUrl: `https://npm.onmicrosoft.cn/pdfjs-dist@${jf}/wasm/`,
26849
26848
  useWorkerFetch: !0,
26850
26849
  cMapPacked: !0,
26851
26850
  enableXfa: !0
26852
- });
26851
+ }));
26853
26852
  n = {
26854
- loadingTask: u,
26855
- worker: l
26853
+ loadingTask: p,
26854
+ worker: f
26856
26855
  }, I.resource = n;
26857
- let d = yield u.promise;
26858
- if (de || t !== fe || I.resource !== n) {
26859
- I.resource === n && (I.resource = null, yield he(n));
26856
+ let m = yield p.promise;
26857
+ if (fe || t !== pe || I.resource !== n) {
26858
+ I.resource === n && (I.resource = null, yield ge(n));
26860
26859
  return;
26861
26860
  }
26862
- k.value = d.numPages, O.value = 1, I.document = d, (r = o.exportAdapter) == null || r.call(o, {
26861
+ A.value = m.numPages, k.value = 1, I.document = m, (o = s.exportAdapter) == null || o.call(s, {
26863
26862
  includeDocumentStyles: !1,
26864
- printStyle: Ce,
26865
- toHtml: Te
26866
- }), L(d), c.setDocument(d), i.setDocument(d, null);
26863
+ printStyle: we,
26864
+ toHtml: Ee
26865
+ }), ye(m), d.setDocument(m), l.setDocument(m, null);
26867
26866
  } catch (e) {
26868
- if (I.resource === n && (I.resource = null, he(n)), de || t !== fe) return;
26869
- f.value = "error", v.value = e instanceof Error ? e.message : "PDF 加载失败";
26867
+ if (I.resource === n && (I.resource = null, ge(n)), fe || t !== pe) return;
26868
+ v.value = "error", O.value = e instanceof Error ? e.message : "PDF 加载失败";
26870
26869
  }
26871
- }), z.apply(this, arguments);
26870
+ }), De.apply(this, arguments);
26872
26871
  }
26873
- function De(e) {
26872
+ function Oe(e) {
26874
26873
  var t;
26875
26874
  let n = e.getPageView(0), r = n == null ? void 0 : n.pdfPage;
26876
26875
  if (r) return r.getViewport({
26877
26876
  scale: yt.PDF_TO_CSS_UNITS,
26878
- rotation: M.value
26877
+ rotation: N.value
26879
26878
  }).width;
26880
26879
  let i = n == null || (t = n.viewport) == null ? void 0 : t.width;
26881
- return i && A.value ? i / A.value : 0;
26880
+ return i && j.value ? i / j.value : 0;
26882
26881
  }
26883
- function Oe(e) {
26882
+ function ke(e) {
26884
26883
  var t;
26885
- let n = De(e), r = ((t = s.value) == null ? void 0 : t.clientWidth) || window.innerWidth, i = Math.max(r - Tk - Ek, 96);
26886
- return n ? ke(i / n) : 1;
26884
+ let n = Oe(e), r = ((t = c.value) == null ? void 0 : t.clientWidth) || window.innerWidth, i = Math.max(r - Tk - Ek, 96);
26885
+ return n ? Ae(i / n) : 1;
26887
26886
  }
26888
- function ke(e) {
26887
+ function Ae(e) {
26889
26888
  return Number(Math.min(Ck, Math.max(Sk, e)).toFixed(2));
26890
26889
  }
26891
- function Ae(e) {
26890
+ function je(e) {
26892
26891
  if (!I.viewer) return;
26893
- let t = ke(e);
26894
- I.viewer.currentScale = t, A.value = t;
26892
+ let t = Ae(e);
26893
+ I.viewer.currentScale = t, j.value = t;
26895
26894
  }
26896
- function je() {
26897
- I.viewer && (j.value = !0, Ae(Oe(I.viewer)), y(() => {
26895
+ function Me() {
26896
+ I.viewer && (M.value = !0, je(ke(I.viewer)), y(() => {
26898
26897
  var e;
26899
26898
  (e = I.viewer) == null || e.update();
26900
26899
  }));
26901
26900
  }
26902
- function Me() {
26903
- !j.value || !I.viewer || typeof window > "u" || (window.cancelAnimationFrame(ue), ue = window.requestAnimationFrame(() => {
26904
- je();
26905
- }));
26906
- }
26907
26901
  function Ne() {
26908
- j.value = !1, Ae(A.value + wk);
26902
+ !M.value || !I.viewer || typeof window > "u" || (window.cancelAnimationFrame(de), de = window.requestAnimationFrame(() => {
26903
+ Me();
26904
+ }));
26909
26905
  }
26910
26906
  function Pe() {
26911
- j.value = !1, Ae(A.value - wk);
26907
+ M.value = !1, je(j.value + wk);
26912
26908
  }
26913
- function Fe(e) {
26914
- let t = me(e);
26915
- M.value = t, I.viewer && (I.viewer.pagesRotation = t, y(() => {
26909
+ function Fe() {
26910
+ M.value = !1, je(j.value - wk);
26911
+ }
26912
+ function Ie(e) {
26913
+ let t = he(e);
26914
+ N.value = t, I.viewer && (I.viewer.pagesRotation = t, y(() => {
26916
26915
  var e;
26917
- if (j.value) {
26918
- je();
26916
+ if (M.value) {
26917
+ Me();
26919
26918
  return;
26920
26919
  }
26921
26920
  (e = I.viewer) == null || e.update();
26922
26921
  }));
26923
26922
  }
26924
- function Ie() {
26925
- Fe(M.value - 90);
26926
- }
26927
26923
  function Le() {
26928
- Fe(M.value + 90);
26924
+ Ie(N.value - 90);
26929
26925
  }
26930
- function Re(e) {
26931
- if (!I.viewer || !k.value) return;
26932
- let t = Math.min(k.value, Math.max(1, e));
26933
- I.viewer.currentPageNumber = t, O.value = t;
26926
+ function Re() {
26927
+ Ie(N.value + 90);
26934
26928
  }
26935
26929
  function ze(e) {
26936
- l.value = e;
26930
+ if (!I.viewer || !A.value) return;
26931
+ let t = Math.min(A.value, Math.max(1, e));
26932
+ I.viewer.currentPageNumber = t, k.value = t;
26933
+ }
26934
+ function B(e) {
26935
+ f.value = e;
26937
26936
  }
26938
- function B() {
26939
- P.value && (c.value = !c.value, y(() => {
26937
+ function Be() {
26938
+ F.value && (l.value = !l.value, y(() => {
26940
26939
  var e;
26941
- if (j.value) {
26942
- je();
26940
+ if (M.value) {
26941
+ Me();
26943
26942
  return;
26944
26943
  }
26945
26944
  (e = I.viewer) == null || e.update();
26946
26945
  }));
26947
26946
  }
26948
- function Be() {
26949
- je();
26947
+ function Ve() {
26948
+ Me();
26950
26949
  }
26951
- function Ve(e) {
26950
+ function He(e) {
26952
26951
  e.items.length && (e.expanded = !e.expanded);
26953
26952
  }
26954
- function He(e) {
26953
+ function Ue(e) {
26955
26954
  !e.dest || !I.linkService || I.linkService.goToDestination(e.dest);
26956
26955
  }
26957
26956
  return C(() => {
26958
- R(), s.value && (le = new ResizeObserver(() => {
26959
- Me();
26960
- }), le.observe(s.value));
26957
+ z(), c.value && (ue = new ResizeObserver(() => {
26958
+ Ne();
26959
+ }), ue.observe(c.value));
26961
26960
  }), S(() => {
26962
26961
  var e;
26963
- de = !0, fe += 1, window.cancelAnimationFrame(ue), le == null || le.disconnect(), le = null, I.viewer = null, I.linkService = null, I.document = null, N.value = [], (e = o.exportAdapter) == null || e.call(o, null);
26962
+ fe = !0, pe += 1, window.cancelAnimationFrame(de), ue == null || ue.disconnect(), ue = null, I.viewer = null, I.linkService = null, I.document = null, P.value = [], (e = s.exportAdapter) == null || e.call(s, null);
26964
26963
  let t = I.resource;
26965
- I.resource = null, he(t);
26966
- }), (e, t) => (w(), g("div", { class: b(["pdf-shell", { "pdf-shell--nav-hidden": !P.value || !c.value }]) }, [_("div", qO, [
26967
- P.value ? (w(), g("button", {
26964
+ I.resource = null, ge(t);
26965
+ }), (e, t) => (w(), g("div", { class: b(["pdf-shell", { "pdf-shell--nav-hidden": !F.value || !l.value }]) }, [_("div", qO, [
26966
+ F.value ? (w(), g("button", {
26968
26967
  key: 0,
26969
- class: b(["pdf-icon-button", { "pdf-icon-button--active": c.value }]),
26968
+ class: b(["pdf-icon-button", { "pdf-icon-button--active": l.value }]),
26970
26969
  type: "button",
26971
26970
  title: "切换导航窗格",
26972
26971
  "aria-label": "切换导航窗格",
26973
- "aria-pressed": c.value,
26974
- onClick: B
26972
+ "aria-pressed": l.value,
26973
+ onClick: Be
26975
26974
  }, [...t[4] || (t[4] = [_("span", { class: "pdf-panel-icon" }, null, -1)])], 10, JO)) : h("", !0),
26976
26975
  _("div", YO, [
26977
26976
  _("button", {
@@ -26979,17 +26978,17 @@ var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-too
26979
26978
  type: "button",
26980
26979
  title: "上一页",
26981
26980
  "aria-label": "上一页",
26982
- disabled: !ae.value,
26983
- onClick: t[0] || (t[0] = (e) => Re(O.value - 1))
26981
+ disabled: !oe.value,
26982
+ onClick: t[0] || (t[0] = (e) => ze(k.value - 1))
26984
26983
  }, [...t[5] || (t[5] = [_("span", { "aria-hidden": "true" }, "‹", -1)])], 8, XO),
26985
- _("span", ZO, [_("strong", null, D(O.value), 1), _("span", null, "/ " + D(k.value || "-"), 1)]),
26984
+ _("span", ZO, [_("strong", null, D(k.value), 1), _("span", null, "/ " + D(A.value || "-"), 1)]),
26986
26985
  _("button", {
26987
26986
  class: "pdf-icon-button",
26988
26987
  type: "button",
26989
26988
  title: "下一页",
26990
26989
  "aria-label": "下一页",
26991
- disabled: !oe.value,
26992
- onClick: t[1] || (t[1] = (e) => Re(O.value + 1))
26990
+ disabled: !se.value,
26991
+ onClick: t[1] || (t[1] = (e) => ze(k.value + 1))
26993
26992
  }, [...t[6] || (t[6] = [_("span", { "aria-hidden": "true" }, "›", -1)])], 8, QO)
26994
26993
  ]),
26995
26994
  _("div", $O, [
@@ -26998,22 +26997,22 @@ var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-too
26998
26997
  type: "button",
26999
26998
  title: "缩小",
27000
26999
  "aria-label": "缩小",
27001
- disabled: !se.value,
27002
- onClick: Pe
27000
+ disabled: !ce.value,
27001
+ onClick: Fe
27003
27002
  }, [...t[7] || (t[7] = [_("span", { "aria-hidden": "true" }, "−", -1)])], 8, ek),
27004
27003
  _("button", {
27005
27004
  class: "pdf-scale-button",
27006
27005
  type: "button",
27007
27006
  title: "适合宽度",
27008
- onClick: Be
27009
- }, D(re.value), 1),
27007
+ onClick: Ve
27008
+ }, D(ie.value), 1),
27010
27009
  _("button", {
27011
27010
  class: "pdf-icon-button",
27012
27011
  type: "button",
27013
27012
  title: "放大",
27014
27013
  "aria-label": "放大",
27015
- disabled: !ce.value,
27016
- onClick: Ne
27014
+ disabled: !le.value,
27015
+ onClick: Pe
27017
27016
  }, [...t[8] || (t[8] = [_("span", { "aria-hidden": "true" }, "+", -1)])], 8, tk)
27018
27017
  ]),
27019
27018
  _("div", nk, [
@@ -27022,57 +27021,57 @@ var qO = { class: "pdf-toolbar" }, JO = ["aria-pressed"], YO = { class: "pdf-too
27022
27021
  type: "button",
27023
27022
  title: "向左旋转",
27024
27023
  "aria-label": "向左旋转",
27025
- onClick: Ie
27024
+ onClick: Le
27026
27025
  }, [...t[9] || (t[9] = [_("span", { "aria-hidden": "true" }, "↺", -1)])]),
27027
- _("span", rk, D(ie.value), 1),
27026
+ _("span", rk, D(ae.value), 1),
27028
27027
  _("button", {
27029
27028
  class: "pdf-icon-button",
27030
27029
  type: "button",
27031
27030
  title: "向右旋转",
27032
27031
  "aria-label": "向右旋转",
27033
- onClick: Le
27032
+ onClick: Re
27034
27033
  }, [...t[10] || (t[10] = [_("span", { "aria-hidden": "true" }, "↻", -1)])])
27035
27034
  ])
27036
- ]), _("div", ik, [P.value && c.value ? (w(), g("aside", ak, [
27037
- _("div", ok, [_("span", null, D(l.value === "pages" ? "页面导航" : "目录导航"), 1), _("strong", null, D(l.value === "pages" ? `${k.value} 页` : `${te.value} 项`), 1)]),
27035
+ ]), _("div", ik, [F.value && l.value ? (w(), g("aside", ak, [
27036
+ _("div", ok, [_("span", null, D(f.value === "pages" ? "页面导航" : "目录导航"), 1), _("strong", null, D(f.value === "pages" ? `${A.value} 页` : `${ne.value} 项`), 1)]),
27038
27037
  _("div", sk, [_("button", {
27039
27038
  type: "button",
27040
27039
  role: "tab",
27041
- "aria-selected": l.value === "pages" ? "true" : "false",
27042
- class: b({ active: l.value === "pages" }),
27043
- onClick: t[2] || (t[2] = (e) => ze("pages"))
27040
+ "aria-selected": f.value === "pages" ? "true" : "false",
27041
+ class: b({ active: f.value === "pages" }),
27042
+ onClick: t[2] || (t[2] = (e) => B("pages"))
27044
27043
  }, " 页面 ", 10, ck), _("button", {
27045
27044
  type: "button",
27046
27045
  role: "tab",
27047
- "aria-selected": l.value === "outline" ? "true" : "false",
27048
- class: b({ active: l.value === "outline" }),
27049
- onClick: t[3] || (t[3] = (e) => ze("outline"))
27046
+ "aria-selected": f.value === "outline" ? "true" : "false",
27047
+ class: b({ active: f.value === "outline" }),
27048
+ onClick: t[3] || (t[3] = (e) => B("outline"))
27050
27049
  }, " 目录 ", 10, lk)]),
27051
- l.value === "pages" ? (w(), g("div", uk, [(w(!0), g(p, null, E(F.value, (e) => (w(), g("button", {
27050
+ f.value === "pages" ? (w(), g("div", uk, [(w(!0), g(p, null, E(te.value, (e) => (w(), g("button", {
27052
27051
  key: e,
27053
- class: b(["pdf-page-button", { "pdf-page-button--active": e === O.value }]),
27052
+ class: b(["pdf-page-button", { "pdf-page-button--active": e === k.value }]),
27054
27053
  type: "button",
27055
- onClick: (t) => Re(e)
27056
- }, [_("span", fk, D(e), 1), _("span", pk, "第 " + D(e) + " 页", 1)], 10, dk))), 128))])) : (w(), g("div", mk, [(w(!0), g(p, null, E(ne.value, (e) => (w(), g("button", {
27054
+ onClick: (t) => ze(e)
27055
+ }, [_("span", fk, D(e), 1), _("span", pk, "第 " + D(e) + " 页", 1)], 10, dk))), 128))])) : (w(), g("div", mk, [(w(!0), g(p, null, E(re.value, (e) => (w(), g("button", {
27057
27056
  key: e.item.id,
27058
27057
  class: "pdf-outline-button",
27059
27058
  type: "button",
27060
27059
  style: x({ "--outline-depth": e.depth }),
27061
- onClick: (t) => He(e.item)
27060
+ onClick: (t) => Ue(e.item)
27062
27061
  }, [_("span", {
27063
27062
  class: b(["pdf-outline-toggle", {
27064
27063
  "pdf-outline-toggle--open": e.item.expanded,
27065
27064
  "pdf-outline-toggle--empty": !e.item.items.length
27066
27065
  }]),
27067
27066
  "aria-hidden": "true",
27068
- onClick: ee((t) => Ve(e.item), ["stop"])
27069
- }, null, 10, gk), _("span", _k, D(e.item.title), 1)], 12, hk))), 128)), te.value ? h("", !0) : (w(), g("div", vk, " 当前 PDF 没有可用目录 "))]))
27067
+ onClick: ee((t) => He(e.item), ["stop"])
27068
+ }, null, 10, gk), _("span", _k, D(e.item.title), 1)], 12, hk))), 128)), ne.value ? h("", !0) : (w(), g("div", vk, " 当前 PDF 没有可用目录 "))]))
27070
27069
  ])) : h("", !0), _("div", yk, [_("div", {
27071
27070
  ref_key: "container",
27072
- ref: s,
27071
+ ref: c,
27073
27072
  class: "pdf-wrapper"
27074
- }, [t[11] || (t[11] = _("div", { class: "pdfViewer" }, null, -1)), f.value === "loading" ? (w(), g("div", bk, "正在加载 PDF...")) : f.value === "error" ? (w(), g("div", xk, D(v.value), 1)) : h("", !0)], 512)])])], 2));
27073
+ }, [t[11] || (t[11] = _("div", { class: "pdfViewer" }, null, -1)), v.value === "loading" ? (w(), g("div", bk, "正在加载 PDF...")) : v.value === "error" ? (w(), g("div", xk, D(O.value), 1)) : h("", !0)], 512)])])], 2));
27075
27074
  }
27076
- }), [["__scopeId", "data-v-7770d843"]]);
27075
+ }), [["__scopeId", "data-v-04cf6787"]]);
27077
27076
  //#endregion
27078
27077
  export { Ok as default };