@gientech/modual 1.0.3 → 1.0.4

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.
@@ -1,133 +1,103 @@
1
- import{j as t}from"./assets/jsx-runtime-vC1aA8e7.js";import C,{forwardRef as f,createElement as $}from"react";import{d as s}from"./assets/styled-components.browser.esm-BKnFpJ_S.js";import"@mxmweb/fviewer";/**
1
+ import{j as t}from"./assets/jsx-runtime-vC1aA8e7.js";import Yu,{useState as w,useRef as Z,useEffect as T,useCallback as l}from"react";import{d as _}from"./assets/styled-components.browser.esm-BKnFpJ_S.js";import{a as ru}from"./assets/index-NIGUFBhG.js";import{c as q}from"./assets/createLucideIcon-Bj5DlX2s.js";import{C as Ju}from"./assets/chevron-right-CrkLSPrQ.js";import{X as Qu}from"./assets/x-CdZQbi--.js";import{parseFile as Du,Fviewer as su}from"@mxmweb/fviewer";/**
2
2
  * @license lucide-react v0.456.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const F=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),k=(...e)=>e.filter((i,r,n)=>!!i&&i.trim()!==""&&n.indexOf(i)===r).join(" ").trim();/**
6
+ */const Vu=q("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
7
7
  * @license lucide-react v0.456.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */var E={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
11
+ */const Nu=q("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
12
12
  * @license lucide-react v0.456.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const z=f(({color:e="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:c="",children:l,iconNode:h,...m},u)=>$("svg",{ref:u,...E,width:i,height:i,stroke:e,strokeWidth:n?Number(r)*24/Number(i):r,className:k("lucide",c),...m},[...h.map(([x,p])=>$(x,p)),...Array.isArray(l)?l:[l]]));/**
16
+ */const zu=q("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
17
17
  * @license lucide-react v0.456.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const a=(e,i)=>{const r=f(({className:n,...c},l)=>$(z,{ref:l,iconNode:i,className:k(`lucide-${F(e)}`,n),...c}));return r.displayName=`${e}`,r};/**
21
+ */const Tu=q("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
22
22
  * @license lucide-react v0.456.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const B=a("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
26
+ */const uo=q("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
27
27
  * @license lucide-react v0.456.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const L=a("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
31
+ */const oo=q("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
32
32
  * @license lucide-react v0.456.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const R=a("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
37
- * @license lucide-react v0.456.0 - ISC
38
- *
39
- * This source code is licensed under the ISC license.
40
- * See the LICENSE file in the root directory of this source tree.
41
- */const M=a("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
42
- * @license lucide-react v0.456.0 - ISC
43
- *
44
- * This source code is licensed under the ISC license.
45
- * See the LICENSE file in the root directory of this source tree.
46
- */const A=a("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
47
- * @license lucide-react v0.456.0 - ISC
48
- *
49
- * This source code is licensed under the ISC license.
50
- * See the LICENSE file in the root directory of this source tree.
51
- */const I=a("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/**
52
- * @license lucide-react v0.456.0 - ISC
53
- *
54
- * This source code is licensed under the ISC license.
55
- * See the LICENSE file in the root directory of this source tree.
56
- */const T=a("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
57
- * @license lucide-react v0.456.0 - ISC
58
- *
59
- * This source code is licensed under the ISC license.
60
- * See the LICENSE file in the root directory of this source tree.
61
- */const D=a("ZoomIn",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);/**
62
- * @license lucide-react v0.456.0 - ISC
63
- *
64
- * This source code is licensed under the ISC license.
65
- * See the LICENSE file in the root directory of this source tree.
66
- */const Z=a("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),q=s.div`
36
+ */const eo=q("ZoomOut",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),to=_.div`
67
37
  display: flex;
68
38
  align-items: center;
69
39
  padding: 0px 12px;
70
40
  justify-content: space-between;
71
- padding: ${e=>e.$theme.space.padding};
72
- border-bottom: 1px solid ${e=>e.$theme.colors.border};
73
- background: ${e=>e.$theme.colors.background};
41
+ padding: ${r=>r.$theme.space.padding};
42
+ border-bottom: 1px solid ${r=>r.$theme.colors.border};
43
+ background: ${r=>r.$theme.colors.background};
74
44
  min-height: 52px;
75
- `,H=s.div`
45
+ `,no=_.div`
76
46
  display: flex;
77
47
  align-items: center;
78
48
  gap: 8px;
79
49
  flex: 1;
80
50
  min-width: 0;
81
- `,N=s.div`
51
+ `,ro=_.div`
82
52
  font-size: 14px;
83
53
  font-weight: 500;
84
- color: ${e=>e.$theme.colors.text};
54
+ color: ${r=>r.$theme.colors.text};
85
55
  white-space: nowrap;
86
56
  overflow: hidden;
87
57
  text-overflow: ellipsis;
88
- `,O=s.div`
58
+ `,so=_.div`
89
59
  font-size: 12px;
90
- color: ${e=>e.$theme.colors.disabledText};
60
+ color: ${r=>r.$theme.colors.disabledText};
91
61
  white-space: nowrap;
92
- `,X=s.div`
62
+ `,ao=_.div`
93
63
  display: flex;
94
64
  align-items: center;
95
65
  gap: 4px;
96
- `,d=s.button`
66
+ `,y=_.button`
97
67
  display: flex;
98
68
  align-items: center;
99
69
  justify-content: center;
100
70
  width: 32px;
101
71
  height: 32px;
102
72
  border: none;
103
- border-radius: ${e=>e.$theme.space.radius};
104
- background: ${e=>e.$active?e.$theme.colors.primary+"20":"transparent"};
105
- color: ${e=>e.$active?e.$theme.colors.primary:e.$theme.colors.text};
73
+ border-radius: ${r=>r.$theme.space.radius};
74
+ background: ${r=>r.$active?r.$theme.colors.primary+"20":"transparent"};
75
+ color: ${r=>r.$active?r.$theme.colors.primary:r.$theme.colors.text};
106
76
  cursor: pointer;
107
77
  transition: all 0.2s ease;
108
78
 
109
79
  &:hover {
110
- background: ${e=>e.$theme.colors.primary+"10"};
111
- color: ${e=>e.$theme.colors.primary};
80
+ background: ${r=>r.$theme.colors.primary+"10"};
81
+ color: ${r=>r.$theme.colors.primary};
112
82
  }
113
83
 
114
84
  &:disabled {
115
85
  opacity: 0.5;
116
86
  cursor: not-allowed;
117
87
  }
118
- `,_=s.div`
88
+ `,co=_.div`
119
89
  font-size: 12px;
120
- color: ${e=>e.$theme.colors.disabledText};
90
+ color: ${r=>r.$theme.colors.disabledText};
121
91
  min-width: 40px;
122
92
  text-align: center;
123
- `,K={colors:{primary:"#007bff",secondary:"#6c757d",success:"#008000",warning:"#FFA500",error:"#FF0000",info:"#0000FF",background:"#f8f9fa",text:"#343a40",border:"#dee2e6",disabled:"#808080",disabledBackground:"#F5F5F5",disabledText:"#808080"},space:{sidebar:"md",size:"md",radius:"md",padding:"md",margin:"md",shadow:"md",lineHeight:"md"}};C.memo(({fileName:e="\u672A\u77E5\u6587\u4EF6",currentPage:i=1,totalPage:r=0,tools:n={annotation:!0,download:!0,zoom:!0,close:!0,navigation:!0,rotate:!0},styles:c,onPrevPage:l,onNextPage:h,onZoomIn:m,onZoomOut:u,onAnnotationToggle:x,onDownload:p,onRotateLeft:j,onRotateRight:b,onClose:w,scale:y=1,isAnnotating:g=!1,className:v})=>{const o=(c==null?void 0:c.theme)||K;return console.log("Header\u7EC4\u4EF6\u6E32\u67D3 - currentPage:",i,"totalPage:",r),t.jsxs(q,{$theme:o,className:v,children:[t.jsx(H,{$theme:o,children:t.jsx(N,{$theme:o,children:e})}),t.jsxs(X,{$theme:o,children:[n.navigation&&t.jsxs(t.Fragment,{children:[t.jsx(d,{$theme:o,onClick:l,disabled:i<=1,title:"\u4E0A\u4E00\u9875",children:t.jsx(B,{size:16})}),r>0&&t.jsxs(O,{$theme:o,children:[i," / ",r]}),t.jsx(d,{$theme:o,onClick:h,disabled:!r||i>=r,title:"\u4E0B\u4E00\u9875",children:t.jsx(L,{size:16})})]}),n.zoom&&t.jsxs(t.Fragment,{children:[t.jsx(d,{$theme:o,onClick:u,disabled:y<=.3,title:"\u7F29\u5C0F",children:t.jsx(Z,{size:16})}),t.jsxs(_,{$theme:o,children:[Math.round(y*100),"%"]}),t.jsx(d,{$theme:o,onClick:m,disabled:y>=3,title:"\u653E\u5927",children:t.jsx(D,{size:16})})]}),n.annotation&&t.jsx(d,{$theme:o,$active:g,onClick:x,title:g?"\u9000\u51FA\u6807\u6CE8":"\u5F00\u59CB\u6807\u6CE8",children:t.jsx(M,{size:16})}),n.download&&t.jsx(d,{$theme:o,onClick:p,title:"\u4E0B\u8F7D",children:t.jsx(R,{size:16})}),n.rotate&&t.jsxs(t.Fragment,{children:[t.jsx(d,{$theme:o,onClick:j,title:"\u5411\u5DE6\u65CB\u8F6C",children:t.jsx(A,{size:16})}),t.jsx(d,{$theme:o,onClick:b,title:"\u5411\u53F3\u65CB\u8F6C",children:t.jsx(I,{size:16})})]}),n.close&&t.jsx(d,{$theme:o,onClick:w,title:"\u5173\u95ED",children:t.jsx(T,{size:16})})]})]})});s.div`
93
+ `,lo={colors:{primary:"#007bff",secondary:"#6c757d",success:"#008000",warning:"#FFA500",error:"#FF0000",info:"#0000FF",background:"#f8f9fa",text:"#343a40",border:"#dee2e6",disabled:"#808080",disabledBackground:"#F5F5F5",disabledText:"#808080"},space:{sidebar:"md",size:"md",radius:"md",padding:"md",margin:"md",shadow:"md",lineHeight:"md"}},_u=Yu.memo(({fileName:r="\u672A\u77E5\u6587\u4EF6",currentPage:d=1,totalPage:e=0,tools:B={annotation:!0,download:!0,zoom:!0,close:!0,navigation:!0,rotate:!0},styles:R,onPrevPage:g,onNextPage:H,onZoomIn:h,onZoomOut:au,onAnnotationToggle:j,onDownload:F,onRotateLeft:c,onRotateRight:Q,onClose:$,scale:m=1,isAnnotating:G=!1,className:uu})=>{const i=(R==null?void 0:R.theme)||lo;return console.log("Header\u7EC4\u4EF6\u6E32\u67D3 - currentPage:",d,"totalPage:",e),t.jsxs(to,{$theme:i,className:uu,children:[t.jsx(no,{$theme:i,children:t.jsx(ro,{$theme:i,children:r})}),t.jsxs(ao,{$theme:i,children:[B.navigation&&t.jsxs(t.Fragment,{children:[t.jsx(y,{$theme:i,onClick:g,disabled:d<=1,title:"\u4E0A\u4E00\u9875",children:t.jsx(Vu,{size:16})}),e>0&&t.jsxs(so,{$theme:i,children:[d," / ",e]}),t.jsx(y,{$theme:i,onClick:H,disabled:!e||d>=e,title:"\u4E0B\u4E00\u9875",children:t.jsx(Ju,{size:16})})]}),B.zoom&&t.jsxs(t.Fragment,{children:[t.jsx(y,{$theme:i,onClick:au,disabled:m<=.3,title:"\u7F29\u5C0F",children:t.jsx(eo,{size:16})}),t.jsxs(co,{$theme:i,children:[Math.round(m*100),"%"]}),t.jsx(y,{$theme:i,onClick:h,disabled:m>=3,title:"\u653E\u5927",children:t.jsx(oo,{size:16})})]}),B.annotation&&t.jsx(y,{$theme:i,$active:G,onClick:j,title:G?"\u9000\u51FA\u6807\u6CE8":"\u5F00\u59CB\u6807\u6CE8",children:t.jsx(zu,{size:16})}),B.download&&t.jsx(y,{$theme:i,onClick:F,title:"\u4E0B\u8F7D",children:t.jsx(Nu,{size:16})}),B.rotate&&t.jsxs(t.Fragment,{children:[t.jsx(y,{$theme:i,onClick:c,title:"\u5411\u5DE6\u65CB\u8F6C",children:t.jsx(Tu,{size:16})}),t.jsx(y,{$theme:i,onClick:Q,title:"\u5411\u53F3\u65CB\u8F6C",children:t.jsx(uo,{size:16})})]}),B.close&&t.jsx(y,{$theme:i,onClick:$,title:"\u5173\u95ED",children:t.jsx(Qu,{size:16})})]})]})}),gu=_.div`
124
94
  display: flex;
125
95
  flex-direction: column;
126
96
  height: 100%;
127
97
  width: 100%;
128
- background: ${e=>e.$theme.colors.background};
129
- border: 1px solid ${e=>e.$theme.colors.border};
130
- border-radius: ${e=>e.$theme.space.radius};
98
+ background: ${r=>r.$theme.colors.background};
99
+ border: 1px solid ${r=>r.$theme.colors.border};
100
+ border-radius: ${r=>r.$theme.space.radius};
131
101
  overflow: hidden;
132
102
  min-height: 0;
133
103
  position: relative; // 添加相对定位,用于loading遮罩的绝对定位
@@ -137,13 +107,36 @@ import{j as t}from"./assets/jsx-runtime-vC1aA8e7.js";import C,{forwardRef as f,c
137
107
  0% { transform: rotate(0deg); }
138
108
  100% { transform: rotate(360deg); }
139
109
  }
140
- `;s.div`
110
+ `,io=({status:r,theme:d})=>t.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100%",padding:"40px",background:d.colors.background},children:[t.jsxs("div",{style:{position:"relative",width:"80px",height:"80px",marginBottom:"24px"},children:[t.jsx("div",{style:{width:"60px",height:"80px",background:d.colors.primary,borderRadius:"8px 8px 0 0",position:"relative",margin:"0 auto"},children:t.jsx("div",{style:{position:"absolute",top:"0",right:"0",width:"0",height:"0",borderStyle:"solid",borderWidth:"0 20px 20px 0",borderColor:`transparent ${d.colors.background} transparent transparent`}})}),t.jsx("div",{style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",width:"20px",height:"20px",borderRadius:"50%",background:d.colors.background,animation:"pulse 1.5s ease-in-out infinite"}})]}),t.jsx("div",{style:{fontSize:"16px",fontWeight:"500",color:d.colors.text,marginBottom:"8px",textAlign:"center"},children:r}),t.jsx("div",{style:{width:"200px",height:"4px",background:d.colors.border,borderRadius:"2px",overflow:"hidden",position:"relative"},children:t.jsx("div",{style:{width:"30%",height:"100%",background:d.colors.primary,borderRadius:"2px",animation:"loading-progress 2s ease-in-out infinite"}})}),t.jsx("style",{children:`
111
+ @keyframes pulse {
112
+ 0%, 100% {
113
+ opacity: 1;
114
+ transform: translate(-50%, -50%) scale(1);
115
+ }
116
+ 50% {
117
+ opacity: 0.5;
118
+ transform: translate(-50%, -50%) scale(1.1);
119
+ }
120
+ }
121
+
122
+ @keyframes loading-progress {
123
+ 0% {
124
+ transform: translateX(-100%);
125
+ }
126
+ 50% {
127
+ transform: translateX(0%);
128
+ }
129
+ 100% {
130
+ transform: translateX(100%);
131
+ }
132
+ }
133
+ `})]}),Fo=_.div`
141
134
  display: flex;
142
135
  flex-direction: column;
143
136
  align-items: center;
144
137
  justify-content: center;
145
138
  height: 100%;
146
- color: ${e=>e.$theme.colors.error};
139
+ color: ${r=>r.$theme.colors.error};
147
140
  text-align: center;
148
141
  padding: 20px;
149
- `;
142
+ `,Do="http://10.15.12.13:9005/proxy/index/knowledgeBase/file/stream",p=300*1e3,go={colors:{primary:"#007bff",secondary:"#6c757d",success:"#008000",warning:"#FFA500",error:"#FF0000",info:"#0000FF",background:"#f8f9fa",text:"#343a40",border:"#dee2e6",disabled:"#808080",disabledBackground:"#F5F5F5",disabledText:"#808080"},space:{sidebar:"md",size:"md",radius:"md",padding:"md",margin:"md",shadow:"md",lineHeight:"md"}},po=({convertedFilePath:r,fileName:d,fileType:e,csrfToken:B,initialPage:R=1,totalPages:g,annotations:H=[],pageSize:h=5,initialZoom:au=100,streamApiUrl:j=Do,authorization:F,eventsEmit:c=()=>{},tools:Q,styles:$,customComponents:m,className:G,headerClass:uu,contentClass:i})=>{const[cu,f]=w(!0),[hu,C]=w("\u6B63\u5728\u52A0\u8F7D\u6587\u6863..."),[lu,I]=w(null),[v,L]=w(R),[x,U]=w(g||0),[A,Iu]=w(au/100),[V,du]=w(0),[vu,mu]=w(null),[Ou,fu]=w(null),[W,Cu]=w(""),[Lu,iu]=w(null),[Mu,Bu]=w(null),[xu,Fu]=w({}),N=Z(!1),ou=Z(!1),Y=Z({}),b=Z({}),J=Z(null),Su=Z(null),M=Z(R),S=($==null?void 0:$.theme)||go;T(()=>{N.current=!1,ou.current=!1},[e,r]);const K=l(()=>{const u={annotation:!0,download:!0,zoom:!0,close:!0,navigation:!0,rotate:!1};let o;switch(e){case"pdf":case"pdf_slides":o={...u,annotation:!1,download:!1,navigation:!0,rotate:!1};break;case"image":o={...u,annotation:!1,download:!1,navigation:!1,rotate:!0,zoom:!0};break;case"markdown":case"markdown_table":o={...u,annotation:!1,download:!1,navigation:!1,rotate:!1,zoom:!1};break;case"text":case"html":case"unknown":o={...u,annotation:!1,download:!1,navigation:!1,rotate:!1,zoom:!1};break;default:o=u}return Q?{...o,...Q}:o},[e,Q])(),O=l((u,o)=>{const s=Math.floor((u-1)/o)*o+1;return`${s}-${s+o-1}`},[]),Eu=l(async u=>{var k;if(!(e==="pdf"||e==="pdf_slides"))return console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u662FPDF\uFF0C\u8DF3\u8FC7\u7F13\u5B58\u68C0\u67E5`),null;console.log(`\u68C0\u67E5\u9875\u9762 ${u} \u662F\u5426\u5728\u7F13\u5B58\u4E2D`);const s=Y.current[u];if(s&&Date.now()-s.timestamp<p)return console.log(`\u4F7F\u7528\u5355\u4E2A\u9875\u9762\u7F13\u5B58: ${u}`),s.pdfDocument?(console.log(`\u76F4\u63A5\u8FD4\u56DE\u7F13\u5B58\u7684PDF\u6587\u6863: ${u}`),s.pdfDocument):null;const n=O(u,h),a=b.current[n];if(console.log(`\u68C0\u67E5chunk\u7F13\u5B58: ${n}, \u5B58\u5728: ${!!a}, \u5305\u542B\u9875\u9762: ${((k=a==null?void 0:a.pages)==null?void 0:k.join(", "))||"\u65E0"}`),a&&Date.now()-a.timestamp<p){if(a.pages.includes(u))return console.log(`\u4F7F\u7528chunk\u7F13\u5B58: ${u} (chunk: ${n})`),a.pdfDocument?(console.log(`\u76F4\u63A5\u8FD4\u56DE\u7F13\u5B58\u7684PDF\u6587\u6863: ${u}`),a.pdfDocument):null;console.log(`\u9875\u9762 ${u} \u4E0D\u5728chunk ${n} \u4E2D\uFF0Cchunk\u5305\u542B: ${a.pages.join(", ")}`)}return console.log(`\u9875\u9762 ${u} \u4E0D\u5728\u4EFB\u4F55\u7F13\u5B58\u4E2D\uFF0C\u9700\u8981\u91CD\u65B0\u8BF7\u6C42`),null},[h,O,e]),wu=l(async u=>{var o;try{if(!(e==="pdf"||e==="pdf_slides"))throw console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u9700\u8981\u5206\u9875\u53C2\u6570\uFF0C\u83B7\u53D6\u5B8C\u6574\u5185\u5BB9`),new Error(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u652F\u6301\u5206\u9875\u52A0\u8F7D`);const n=Math.floor((u-1)/h)*h+1,a=O(u,h);console.log(`\u8BF7\u6C42PDF chunk\u6570\u636E: ${n} (\u5305\u542B\u9875\u9762 ${n}-${n+h-1})`);const k={"Content-Type":"application/json"};F&&(k.Authorization=F),B&&(k["X-CSRF-TOKEN-IN"]=B);const E={convertedFilePath:r,pageNo:n,pageSize:h},D=await ru.post(j,E,{headers:k,responseType:"arraybuffer"}),X=D.headers["x-csrf-token-out"]||D.headers["X-CSRF-TOKEN-OUT"];X&&(console.log("\u83B7\u53D6\u5230\u54CD\u5E94\u5934\u4E2D\u7684CSRF Token:",X),c("request_finish",X));const z=Array.from({length:h},(mo,Wu)=>n+Wu);return b.current[a]={data:D.data,pages:z,timestamp:Date.now(),totalPages:g},console.log(`\u7F13\u5B58PDF chunk\u6570\u636E: ${a}, \u5305\u542B\u9875\u9762: ${z.join(", ")}, \u8BF7\u6C42\u7684\u9875\u9762: ${u}`),console.log("\u5F53\u524D\u6240\u6709\u7F13\u5B58:",Object.keys(b.current)),D.data}catch(s){throw console.error("\u83B7\u53D6PDF stream\u6570\u636E\u5931\u8D25:",s),new Error(`PDF\u8BF7\u6C42\u5931\u8D25: ${((o=s.response)==null?void 0:o.status)||"\u7F51\u7EDC\u9519\u8BEF"}`)}},[j,r,h,F,O,g,x,e,c]),eu=l(async(u,o=!1)=>{var n;if(!u)return;if(!(e==="pdf"||e==="pdf_slides"))return console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u662FPDF\uFF0C\u8DF3\u8FC7PDF\u52A0\u8F7D\u903B\u8F91`),null;try{o?(f(!0),C("\u6B63\u5728\u52A0\u8F7DPDF\u6587\u6863...")):(f(!0),C(`\u6B63\u5728\u52A0\u8F7D\u7B2C ${u} \u9875...`)),I(null),console.log(`\u5F00\u59CB\u52A0\u8F7DPDF\u9875\u9762: ${u}, \u521D\u59CB\u52A0\u8F7D: ${o}`);const a=await Eu(u);if(a)return console.log(`\u4F7F\u7528\u7F13\u5B58\u7684PDF\u6587\u6863: ${u}`),mu(a),f(!1),C(""),console.log(`\u9875\u9762 ${u} \u52A0\u8F7D\u5B8C\u6210\uFF08\u4F7F\u7528\u7F13\u5B58\uFF09`),a;const k=await wu(u),E=await Du(k,{fileName:d||"Stream\u6587\u6863",fileType:"pdf",token:F});if(E.error)throw new Error(E.error);if(E.type!=="pdf"||!((n=E.content)!=null&&n.document))throw new Error("\u89E3\u6790\u7ED3\u679C\u4E0D\u662F\u6709\u6548\u7684PDF\u6587\u6863");const D=E.content.document;console.log("\u8BBE\u7F6EPDF\u6587\u6863:",D),console.log("PDF\u6587\u6863\u7C7B\u578B:",typeof D),console.log("PDF\u6587\u6863\u65B9\u6CD5:",D?Object.getOwnPropertyNames(Object.getPrototypeOf(D)):"\u65E0\u6587\u6863"),console.log("PDF\u6587\u6863\u9875\u6570:",D?D.numPages:"\u65E0\u9875\u6570"),console.log("\u5F53\u524D\u8BF7\u6C42\u7684\u9875\u9762:",u),console.log("PDF\u6587\u6863\u5305\u542B\u7684\u9875\u9762\u8303\u56F4:",D?`1-${D.numPages}`:"\u65E0\u9875\u6570"),mu(D);const X=O(u,h);if(b.current[X]&&(b.current[X].pdfDocument=D,console.log(`\u7F13\u5B58PDF\u6587\u6863\u5230chunk: ${X}`)),g)console.log(`\u4F7F\u7528\u7528\u6237\u4F20\u5165\u7684\u603B\u9875\u6570: ${g}`),U(g);else if(D&&D.numPages){const z=D.numPages;console.log(`\u7528\u6237\u672A\u4F20\u5165\u603B\u9875\u6570\uFF0C\u4ECEPDF\u6587\u6863\u83B7\u53D6\u5B9E\u9645\u603B\u9875\u6570: ${z}`),U(z)}return f(!1),C(""),console.log(`\u9875\u9762 ${u} \u52A0\u8F7D\u5B8C\u6210`),D}catch(a){throw console.error("PDF\u52A0\u8F7D\u5931\u8D25:",a),I(a.message||"PDF\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),f(!1),C(""),a}},[wu,d,F,x,Eu,O,h,e]),ku=l(u=>{if(!(e==="pdf"||e==="pdf_slides"))return!1;const s=Y.current[u];if(s&&Date.now()-s.timestamp<p)return!!s.pdfDocument;const n=O(u,h),a=b.current[n];return a&&Date.now()-a.timestamp<p?a.pages.includes(u)&&!!a.pdfDocument:!1},[h,O,e]),$u=l(()=>{console.log("\u68C0\u67E5markdown\u5185\u5BB9\u662F\u5426\u5728\u7F13\u5B58\u4E2D");const u=J.current;return u&&Date.now()-u.timestamp<p?(console.log("\u4F7F\u7528markdown\u5185\u5BB9\u7F13\u5B58"),u.data):(console.log("markdown\u5185\u5BB9\u4E0D\u5728\u7F13\u5B58\u4E2D\uFF0C\u9700\u8981\u91CD\u65B0\u8BF7\u6C42"),null)},[]),pu=l(async()=>{var u;try{console.log("\u8BF7\u6C42\u5B8C\u6574markdown\u6570\u636E");const o={"Content-Type":"application/json"};F&&(o.Authorization=F),B&&(o["X-CSRF-TOKEN-IN"]=B);const s={convertedFilePath:r};console.log("\u53D1\u9001markdown\u8BF7\u6C42:",s);const n=await ru.post(j,s,{headers:o,responseType:"text"}),a=n.headers["x-csrf-token-out"]||n.headers["X-CSRF-TOKEN-OUT"];return a&&(console.log("\u83B7\u53D6\u5230\u54CD\u5E94\u5934\u4E2D\u7684CSRF Token:",a),c("request_finish",a)),console.log("markdown\u54CD\u5E94\u72B6\u6001:",n.status),console.log("markdown\u54CD\u5E94\u6570\u636E\u957F\u5EA6:",((u=n.data)==null?void 0:u.length)||0),n.data}catch(o){throw console.error("\u83B7\u53D6markdown\u6570\u636E\u5931\u8D25:",o),new Error(`\u83B7\u53D6markdown\u6570\u636E\u5931\u8D25: ${o.message}`)}},[r,F,j,c]),ju=l(async()=>{try{f(!0),C("\u6B63\u5728\u52A0\u8F7Dmarkdown\u6587\u6863..."),I(null),console.log("\u5F00\u59CB\u52A0\u8F7D\u5B8C\u6574markdown\u6587\u6863");const u=$u();if(u)return console.log("\u4F7F\u7528\u7F13\u5B58\u7684markdown\u5185\u5BB9"),Cu(u),f(!1),C(""),u;const o=await pu();return J.current={data:o,timestamp:Date.now()},Cu(o),f(!1),C(""),console.log("\u5B8C\u6574markdown\u6587\u6863\u52A0\u8F7D\u5B8C\u6210"),o}catch(u){throw console.error("markdown\u52A0\u8F7D\u5931\u8D25:",u),I(u.message||"markdown\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),f(!1),C(""),u}},[pu,$u]),Au=l(async()=>{try{const u={"Content-Type":"application/json"};F&&(u.Authorization=F),B&&(u["X-CSRF-TOKEN-IN"]=B);const o={convertedFilePath:r},s=await ru.post(j,o,{headers:u,responseType:"arraybuffer"}),n=s.headers["x-csrf-token-out"]||s.headers["X-CSRF-TOKEN-OUT"];return n&&(console.log("\u83B7\u53D6\u5230\u54CD\u5E94\u5934\u4E2D\u7684CSRF Token:",n),c("request_finish",n)),s.data}catch(u){throw console.error("\u83B7\u53D6\u56FE\u7247\u6570\u636E\u5931\u8D25:",u),new Error(`\u83B7\u53D6\u56FE\u7247\u6570\u636E\u5931\u8D25: ${u.message}`)}},[r,F,j,c]),bu=l(async()=>{try{f(!0),C("\u6B63\u5728\u52A0\u8F7D\u56FE\u7247..."),I(null);const u=await Au(),o=await Du(u,{fileName:d||"\u56FE\u7247",fileType:"image",token:F});if(o.error)throw new Error(o.error);if(o.type!=="image"||!o.content)throw new Error("\u89E3\u6790\u7ED3\u679C\u4E0D\u662F\u6709\u6548\u7684\u56FE\u7247");return fu(o.content),f(!1),C(""),o.content}catch(u){throw console.error("\u56FE\u7247\u52A0\u8F7D\u5931\u8D25:",u),I(u.message||"\u56FE\u7247\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),f(!1),C(""),u}},[F,d,Au]),Pu=l(async()=>{var u;try{console.log(`\u8BF7\u6C42\u901A\u7528\u6587\u4EF6\u6570\u636E\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`);const o={"Content-Type":"application/json"};F&&(o.Authorization=F),B&&(o["X-CSRF-TOKEN-IN"]=B);const s={convertedFilePath:r};console.log("\u53D1\u9001\u901A\u7528\u6587\u4EF6\u8BF7\u6C42:",s);const n=await ru.post(j,s,{headers:o,responseType:"arraybuffer"}),a=n.headers["x-csrf-token-out"]||n.headers["X-CSRF-TOKEN-OUT"];return a&&(console.log("\u83B7\u53D6\u5230\u54CD\u5E94\u5934\u4E2D\u7684CSRF Token:",a),c("request_finish",a)),console.log("\u901A\u7528\u6587\u4EF6\u54CD\u5E94\u72B6\u6001:",n.status),console.log("\u901A\u7528\u6587\u4EF6\u54CD\u5E94\u6570\u636E\u957F\u5EA6:",((u=n.data)==null?void 0:u.byteLength)||0),n.data}catch(o){throw console.error("\u83B7\u53D6\u901A\u7528\u6587\u4EF6\u6570\u636E\u5931\u8D25:",o),new Error(`\u83B7\u53D6\u901A\u7528\u6587\u4EF6\u6570\u636E\u5931\u8D25: ${o.message}`)}},[r,F,j,c]),Ku=l(async()=>{try{if(console.log("=== loadGenericDocument \u88AB\u8C03\u7528 ==="),console.log("\u8C03\u7528\u6808:",new Error().stack),console.log("\u5F53\u524D\u65F6\u95F4:",new Date().toISOString()),N.current){console.log(`\u901A\u7528\u6587\u6863\u6B63\u5728\u52A0\u8F7D\u4E2D\uFF0C\u5FFD\u7565\u91CD\u590D\u8BF7\u6C42\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`);return}if(ou.current){console.log(`\u901A\u7528\u6587\u6863\u5DF2\u7ECF\u52A0\u8F7D\u8FC7\uFF0C\u5FFD\u7565\u91CD\u590D\u8BF7\u6C42\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`);return}const u=`${e}_${r}`,o=xu[u];if(console.log(`\u68C0\u67E5\u901A\u7528\u6587\u6863\u7F13\u5B58\uFF0Ckey: ${u}, \u7F13\u5B58\u5B58\u5728: ${!!o}, \u7F13\u5B58\u65F6\u95F4: ${o?Date.now()-o.timestamp:"N/A"}ms`),o&&Date.now()-o.timestamp<p)return console.log(`\u4F7F\u7528\u7F13\u5B58\u7684\u901A\u7528\u6587\u6863\u5185\u5BB9\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`),e==="text"&&o.content?iu(o.content):e==="html"&&o.content&&Bu(o.content),L(1),U(g||1),f(!1),C(""),o.content;N.current=!0,f(!0),C(`\u6B63\u5728\u52A0\u8F7D${e}\u6587\u6863...`),I(null),console.log(`\u5F00\u59CB\u52A0\u8F7D\u901A\u7528\u6587\u6863\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`);const s=await Pu(),n=await Du(s,{fileName:d||`${e}\u6587\u6863`,fileType:e,token:F});if(n.error)throw new Error(n.error);let a=null;if(n.type==="text"&&n.content)iu(n.content),a=n.content;else if(n.type==="html"&&n.content)Bu(n.content),a=n.content;else if(n.type==="image"&&n.content)fu(n.content),a=n.content;else{const E=new TextDecoder("utf-8").decode(s);iu({type:"text",content:E}),a={type:"text",content:E}}if(a){const k=`${e}_${r}`,E={...xu,[k]:{content:a,timestamp:Date.now()}};Fu(E),console.log(`\u901A\u7528\u6587\u6863\u5185\u5BB9\u5DF2\u7F13\u5B58\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}, \u7F13\u5B58\u952E: ${k}`),console.log("\u5F53\u524D\u7F13\u5B58\u72B6\u6001:",E)}return f(!1),C(""),N.current=!1,ou.current=!0,console.log(`\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5B8C\u6210\uFF0C\u6587\u4EF6\u7C7B\u578B: ${e}`),n}catch(u){throw console.error("\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5931\u8D25:",u),I(u.message||"\u901A\u7528\u6587\u6863\u52A0\u8F7D\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5"),f(!1),C(""),N.current=!1,ou.current=!0,u}},[Pu,d,F]),tu=l(async u=>{if(u===M.current)return;if(cu){console.log("\u9875\u9762\u6B63\u5728\u52A0\u8F7D\u4E2D\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42");return}if(!(e==="pdf"||e==="pdf_slides")){console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u652F\u6301\u7FFB\u9875\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42`);return}console.log("PDF\u9875\u9762\u53D8\u5316:",u,"\u5F53\u524D\u9875:",M.current),console.log(`\u9875\u9762 ${u} \u662F\u5426\u5728\u7F13\u5B58\u4E2D:`,ku(u)),M.current=u,L(u);try{await eu(u,!1),c("pageChange",{pageNumber:u,totalPages:g||x})}catch(s){console.error("PDF\u9875\u9762\u52A0\u8F7D\u5931\u8D25:",s);const n=M.current;L(n)}},[eu,x,c,ku,cu,e]);T(()=>{M.current=v,console.log("\u5F53\u524D\u9875\u72B6\u6001\u66F4\u65B0:",v)},[v]);const nu=l(u=>{Iu(u),c("zoomChange",{scale:u})},[c]),Ru=l(()=>{c("viewer:close")},[c]),Xu=l(()=>{const u=Math.min(3,A+.1);nu(u)},[A,nu]),Zu=l(()=>{const u=Math.max(.3,A-.1);nu(u)},[A,nu]),qu=l(()=>{const u=(V-90+360)%360;du(u),c("rotateChange",{rotation:u})},[V,c]),Hu=l(()=>{const u=(V+90)%360;du(u),c("rotateChange",{rotation:u})},[V,c]),Gu=l(()=>{if(!(e==="pdf"||e==="pdf_slides")){console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u652F\u6301\u7FFB\u9875\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42`);return}const o=M.current-1;o>=1&&tu(o)},[tu,e]),Uu=l(()=>{if(!(e==="pdf"||e==="pdf_slides")){console.log(`\u6587\u4EF6\u7C7B\u578B ${e} \u4E0D\u652F\u6301\u7FFB\u9875\uFF0C\u5FFD\u7565\u7FFB\u9875\u8BF7\u6C42`);return}const o=M.current+1,s=g||x;s&&o<=s&&tu(o)},[x,tu,e]),yu=l(()=>{const u=Date.now();Object.keys(Y.current).forEach(o=>{const s=Y.current[parseInt(o)];u-s.timestamp>p&&(delete Y.current[parseInt(o)],console.log(`\u6E05\u7406\u8FC7\u671F\u9875\u9762\u7F13\u5B58: ${o}`))}),Object.keys(b.current).forEach(o=>{const s=b.current[o];u-s.timestamp>p&&(delete b.current[o],console.log(`\u6E05\u7406\u8FC7\u671Fchunk\u7F13\u5B58: ${o}`))}),J.current&&u-J.current.timestamp>p&&(J.current=null,console.log("\u6E05\u7406\u8FC7\u671Fmarkdown\u5185\u5BB9\u7F13\u5B58")),Fu(o=>{const s={...o};return Object.keys(s).forEach(n=>{u-s[n].timestamp>p&&(delete s[n],console.log(`\u6E05\u7406\u8FC7\u671F\u901A\u7528\u6587\u4EF6\u7F13\u5B58: ${n}`))}),s})},[]),P=l(()=>{if(d)return d;try{const u=new URL(r);return decodeURIComponent(u.pathname.split("/").pop()||"")||"Stream\u6587\u6863"}catch{const u=r.split("/");return decodeURIComponent(u[u.length-1])||"Stream\u6587\u6863"}},[r,d]);return T(()=>{const u=setInterval(yu,p);return()=>clearInterval(u)},[yu]),T(()=>()=>{Y.current={},b.current={},J.current=null,Fu({}),console.log("\u7EC4\u4EF6\u5378\u8F7D\uFF0C\u6E05\u7406\u6240\u6709\u7F13\u5B58")},[]),T(()=>{console.log("=== useEffect \u88AB\u89E6\u53D1 ==="),console.log("\u89E6\u53D1\u65F6\u95F4:",new Date().toISOString()),console.log("\u89E6\u53D1\u539F\u56E0:",{initialPage:R,fileType:e}),(async()=>{try{const o=e==="pdf"||e==="pdf_slides",s=o&&R||1;console.log("\u5F00\u59CB\u521D\u59CB\u52A0\u8F7D\uFF0C\u6587\u4EF6\u7C7B\u578B:",e,"\u6709\u6548\u9875\u7801:",s,"\u662F\u5426PDF:",o),e==="markdown"||e==="markdown_table"?(await ju(),L(1),U(g||1),c("pageChange",{pageNumber:1,totalPages:g||1})):e==="image"?(await bu(),L(1),U(g||1),du(0),c("pageChange",{pageNumber:1,totalPages:g||1})):o?(await eu(s,!0),L(s),setTimeout(()=>{c("pageChange",{pageNumber:s,totalPages:g||x})},0)):(console.log("=== \u521D\u59CB\u52A0\u8F7D\uFF1A\u4F7F\u7528\u901A\u7528\u52A0\u8F7D\u51FD\u6570\u5904\u7406\u6587\u4EF6\u7C7B\u578B ===",e),await Ku(),L(1),U(g||1),c("pageChange",{pageNumber:1,totalPages:g||1}))}catch(o){console.error("\u521D\u59CB\u52A0\u8F7D\u5931\u8D25:",o)}})()},[R,e,eu,ju,bu,c]),lu?t.jsx(gu,{$theme:S,className:G,children:m!=null&&m.ErrorComponent?t.jsx(m.ErrorComponent,{error:lu,theme:S}):t.jsxs(Fo,{$theme:S,children:[t.jsx("div",{children:"\u52A0\u8F7D\u5931\u8D25"}),t.jsx("div",{style:{fontSize:"12px",marginTop:"8px"},children:lu})]})}):cu?t.jsxs(gu,{$theme:S,className:G,children:[t.jsx(_u,{fileName:P(),currentPage:v,totalPage:x,scale:A,isAnnotating:!1,tools:K,styles:$,onPrevPage:()=>{},onNextPage:()=>{},onZoomIn:()=>{},onZoomOut:()=>{},onAnnotationToggle:()=>{},onDownload:()=>{},onClose:Ru,className:uu}),m!=null&&m.LoadingComponent?t.jsx(m.LoadingComponent,{status:hu,theme:S}):t.jsx(io,{status:hu,theme:S})]}):t.jsxs(gu,{$theme:S,className:G,children:[t.jsx(_u,{fileName:P(),currentPage:v,totalPage:x,scale:A,isAnnotating:!1,tools:{...K,navigation:e==="pdf"||e==="pdf_slides"?K.navigation:!1,rotate:e==="image"},styles:$,onPrevPage:Gu,onNextPage:Uu,onZoomIn:Xu,onZoomOut:Zu,onRotateLeft:e==="image"?qu:void 0,onRotateRight:e==="image"?Hu:void 0,onAnnotationToggle:()=>{},onDownload:()=>{},onClose:Ru,className:uu}),e==="markdown"||e==="markdown_table"?t.jsxs("div",{ref:Su,style:{flex:1,overflow:"auto",position:"relative"},className:i,children:[t.jsx(su,{data:{content:W,...P()&&{fileName:P()},...e&&{fileType:e},...x&&{totalPages:x}},annotationData:H,totalPage:x,currentPage:v,scale:A,eventsEmit:(u,o)=>{console.log("Fviewer\u4E8B\u4EF6:",u,o),c(u==="md_annotation_add"?"md_annotation_add":u==="table_annotation_add"?"table_annotation_add":u,o)},styles:$,tools:K,customComponents:m,contentClass:i}),(console.log("=== \u4F20\u9012\u7ED9Fviewer\u7684markdown\u5185\u5BB9 ==="),console.log("markdownContent:",W),console.log("markdownContent\u957F\u5EA6:",W.length),console.log("markdownContent\u524D100\u5B57\u7B26:",W.substring(0,100)),console.log("markdownContent\u540E100\u5B57\u7B26:",W.substring(W.length-100)),null)]}):e==="image"?t.jsx(su,{data:{content:Ou,...P()&&{fileName:P()},...e&&{fileType:e}},annotationData:H,totalPage:1,currentPage:1,scale:A,rotation:V,eventsEmit:c,styles:$,tools:{...K,navigation:!1,rotate:!0},customComponents:m,contentClass:i}):e==="pdf"||e==="pdf_slides"?t.jsx(su,{data:{content:{document:vu},...P()&&{fileName:P()},...e&&{fileType:e},...x&&{totalPages:x},pdfStartPage:Math.floor((v-1)/h)*h+1},annotationData:H,totalPage:x,currentPage:v,scale:A,eventsEmit:(u,o)=>{console.log("Fviewer\u4E8B\u4EF6:",u,o),u==="scaleChange"&&console.log("\u6536\u5230\u7F29\u653E\u53D8\u5316\u4E8B\u4EF6:",o),c(u,o)},styles:$,tools:K,customComponents:m,contentClass:i}):t.jsx(su,{data:{content:Lu||Mu||{type:"text",content:"\u6587\u4EF6\u5185\u5BB9\u52A0\u8F7D\u4E2D..."},...P()&&{fileName:P()},...e&&{fileType:e}},annotationData:H,totalPage:1,currentPage:1,scale:A,eventsEmit:c,styles:$,tools:{...K,navigation:!1},customComponents:m,contentClass:i})]})};export{po as default};
@@ -1 +0,0 @@
1
- var i=256;for(;i--;)(i+256).toString(16).substring(1);