@rhc-office/sdk 6.6.268 → 6.6.351

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 (78) hide show
  1. package/README.md +1 -5
  2. package/dist/api/annotation-tool.d.ts +162 -102
  3. package/dist/api/annotation-tool.d.ts.map +1 -1
  4. package/dist/api/callbacks.d.ts +32 -6
  5. package/dist/api/callbacks.d.ts.map +1 -1
  6. package/dist/api/document-sdk.d.ts +6 -5
  7. package/dist/api/document-sdk.d.ts.map +1 -1
  8. package/dist/api/document-tool.d.ts +16 -11
  9. package/dist/api/document-tool.d.ts.map +1 -1
  10. package/dist/api/menu-visibility.d.ts +6 -1
  11. package/dist/api/menu-visibility.d.ts.map +1 -1
  12. package/dist/api/page-arrange-tool.d.ts +28 -0
  13. package/dist/api/page-arrange-tool.d.ts.map +1 -0
  14. package/dist/api/security-tool.d.ts +21 -0
  15. package/dist/api/security-tool.d.ts.map +1 -0
  16. package/dist/api/ui-tool.d.ts +19 -0
  17. package/dist/api/ui-tool.d.ts.map +1 -1
  18. package/dist/browser/document-viewer.js +1 -1
  19. package/dist/browser/document-viewer.js.map +1 -1
  20. package/dist/index.d.ts +2 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +446 -360
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.umd.cjs +1 -1
  25. package/dist/index.umd.cjs.map +1 -1
  26. package/dist/tools/AnnotationToolImpl.d.ts +5 -27
  27. package/dist/tools/AnnotationToolImpl.d.ts.map +1 -1
  28. package/dist/tools/DigitalSignToolImpl.d.ts.map +1 -1
  29. package/dist/tools/DocumentToolImpl.d.ts.map +1 -1
  30. package/dist/tools/PageArrangeToolImpl.d.ts +21 -0
  31. package/dist/tools/PageArrangeToolImpl.d.ts.map +1 -0
  32. package/dist/tools/SecurityToolImpl.d.ts +12 -0
  33. package/dist/tools/SecurityToolImpl.d.ts.map +1 -0
  34. package/dist/tools/UIToolImpl.d.ts +13 -0
  35. package/dist/tools/UIToolImpl.d.ts.map +1 -1
  36. package/dist/tools/index.d.ts +2 -1
  37. package/dist/tools/index.d.ts.map +1 -1
  38. package/dist/viewer/AdapterProtocol.d.ts +3 -1
  39. package/dist/viewer/AdapterProtocol.d.ts.map +1 -1
  40. package/dist/viewer/BridgeToolAdapter.d.ts +1 -0
  41. package/dist/viewer/BridgeToolAdapter.d.ts.map +1 -1
  42. package/dist/viewer/DocumentSDK.d.ts +7 -4
  43. package/dist/viewer/DocumentSDK.d.ts.map +1 -1
  44. package/dist/viewer/ReaderBridgeClient.d.ts +3 -0
  45. package/dist/viewer/ReaderBridgeClient.d.ts.map +1 -1
  46. package/dist/viewer/ReaderConfiguration.d.ts +0 -1
  47. package/dist/viewer/ReaderConfiguration.d.ts.map +1 -1
  48. package/dist/viewer/ReaderStateStore.d.ts +2 -0
  49. package/dist/viewer/ReaderStateStore.d.ts.map +1 -1
  50. package/dist/viewer/SdkCallbackRegistry.d.ts +2 -2
  51. package/dist/viewer/SdkCallbackRegistry.d.ts.map +1 -1
  52. package/package.json +2 -2
  53. package/src/api/annotation-tool.ts +232 -146
  54. package/src/api/callbacks.ts +48 -7
  55. package/src/api/document-sdk.ts +9 -5
  56. package/src/api/document-tool.ts +25 -13
  57. package/src/api/menu-visibility.ts +10 -1
  58. package/src/api/page-arrange-tool.ts +67 -0
  59. package/src/api/security-tool.ts +32 -0
  60. package/src/api/ui-tool.ts +33 -0
  61. package/src/index.ts +2 -0
  62. package/src/tools/AnnotationToolImpl.ts +71 -165
  63. package/src/tools/DigitalSignToolImpl.ts +13 -2
  64. package/src/tools/DocumentToolImpl.ts +8 -4
  65. package/src/tools/PageArrangeToolImpl.ts +99 -0
  66. package/src/tools/SecurityToolImpl.ts +48 -0
  67. package/src/tools/UIToolImpl.ts +98 -12
  68. package/src/tools/index.ts +2 -1
  69. package/src/viewer/AdapterProtocol.ts +4 -0
  70. package/src/viewer/BridgeToolAdapter.ts +11 -2
  71. package/src/viewer/DocumentSDK.ts +58 -30
  72. package/src/viewer/ReaderBridgeClient.ts +9 -0
  73. package/src/viewer/ReaderConfiguration.ts +0 -2
  74. package/src/viewer/ReaderStateStore.ts +13 -1
  75. package/src/viewer/SdkCallbackRegistry.ts +75 -6
  76. package/dist/tools/Phase1ToolPlaceholder.d.ts +0 -5
  77. package/dist/tools/Phase1ToolPlaceholder.d.ts.map +0 -1
  78. package/src/tools/Phase1ToolPlaceholder.ts +0 -35
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
- var K = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.COMPACT = "compact", t.HIDE = "none", t))(K || {});
2
- const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGITAL_SIGN_ENVIRONMENT__", A = {
1
+ var W = /* @__PURE__ */ ((t) => (t.DEFAULT = "default", t.COMPACT = "compact", t.HIDE = "none", t))(W || {});
2
+ const L = "RIGHT_CENTER", F = "REGULAR_ESM", U = "auto", S = "__RHC_OFFICE_DIGITAL_SIGN_ENVIRONMENT__", v = {
3
3
  defaults: {
4
4
  bjca: {
5
5
  pin: ""
6
6
  },
7
7
  deviceType: "client",
8
- edgePosition: w,
8
+ edgePosition: L,
9
9
  kol: {
10
10
  appId: "",
11
11
  appName: "",
@@ -17,8 +17,8 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
17
17
  pin: "",
18
18
  usbKeyType: 14
19
19
  },
20
- rsaMode: O,
21
- signatureType: M
20
+ rsaMode: U,
21
+ signatureType: F
22
22
  },
23
23
  signServer: {
24
24
  authSource: "Password",
@@ -38,7 +38,7 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
38
38
  usbKeyType: 14
39
39
  }
40
40
  }
41
- }, _ = (t) => ({
41
+ }, N = (t) => ({
42
42
  bjca: {
43
43
  pin: t.bjca.pin
44
44
  },
@@ -57,7 +57,7 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
57
57
  },
58
58
  rsaMode: t.rsaMode,
59
59
  signatureType: t.signatureType
60
- }), F = (t) => ({
60
+ }), B = (t) => ({
61
61
  authSource: t.authSource,
62
62
  defaultLogin: t.defaultLogin,
63
63
  defaultPassword: t.defaultPassword,
@@ -74,10 +74,10 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
74
74
  checkCertificateBinding: t.usbKey.checkCertificateBinding,
75
75
  usbKeyType: t.usbKey.usbKeyType
76
76
  }
77
- }), h = (t) => ({
78
- defaults: _(t.defaults),
79
- signServer: F(t.signServer)
80
- }), L = (t) => ({
77
+ }), m = (t) => ({
78
+ defaults: N(t.defaults),
79
+ signServer: B(t.signServer)
80
+ }), x = (t) => ({
81
81
  defaults: t.defaults ? {
82
82
  ...t.defaults,
83
83
  bjca: t.defaults.bjca ? { ...t.defaults.bjca } : void 0,
@@ -89,7 +89,7 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
89
89
  kol: t.signServer.kol ? { ...t.signServer.kol } : void 0,
90
90
  usbKey: t.signServer.usbKey ? { ...t.signServer.usbKey } : void 0
91
91
  } : void 0
92
- }), G = (t, n) => n ? {
92
+ }), $ = (t, n) => n ? {
93
93
  bjca: {
94
94
  pin: n.bjca?.pin ?? t.bjca.pin
95
95
  },
@@ -108,7 +108,7 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
108
108
  },
109
109
  rsaMode: n.rsaMode ?? t.rsaMode,
110
110
  signatureType: n.signatureType ?? t.signatureType
111
- } : _(t), H = (t, n) => n ? {
111
+ } : N(t), j = (t, n) => n ? {
112
112
  authSource: n.authSource ?? t.authSource,
113
113
  defaultLogin: n.defaultLogin ?? t.defaultLogin,
114
114
  defaultPassword: n.defaultPassword ?? t.defaultPassword,
@@ -125,10 +125,10 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
125
125
  checkCertificateBinding: n.usbKey?.checkCertificateBinding ?? t.usbKey.checkCertificateBinding,
126
126
  usbKeyType: n.usbKey?.usbKeyType ?? t.usbKey.usbKeyType
127
127
  }
128
- } : F(t), U = (t, n) => ({
129
- defaults: G(t.defaults, n.defaults),
130
- signServer: H(t.signServer, n.signServer)
131
- }), q = (t, n) => ({
128
+ } : B(t), V = (t, n) => ({
129
+ defaults: $(t.defaults, n.defaults),
130
+ signServer: j(t.signServer, n.signServer)
131
+ }), Y = (t, n) => ({
132
132
  defaults: t.defaults || n.defaults ? {
133
133
  ...t.defaults,
134
134
  ...n.defaults,
@@ -157,67 +157,91 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
157
157
  ...n.signServer?.usbKey ?? {}
158
158
  }
159
159
  } : void 0
160
- }), Q = () => globalThis, p = () => {
161
- const t = Q();
160
+ }), X = () => globalThis, b = () => {
161
+ const t = X();
162
162
  return t[S] || (t[S] = {
163
- current: h(A),
164
- defaults: h(A),
163
+ current: m(v),
164
+ defaults: m(v),
165
165
  overrides: {}
166
166
  }), t[S];
167
- }, je = () => p().current, Xe = (t) => {
168
- const n = p();
169
- return n.defaults = h(t), n.current = U(n.defaults, n.overrides), n.current;
170
- }, Je = (t) => {
171
- const n = p();
172
- return n.current = h(t), n.overrides = L(t), n.current;
173
- }, Ze = (t) => {
174
- const n = p();
175
- return n.overrides = q(n.overrides, L(t)), n.current = U(n.current, t), n.current;
176
- }, et = (t) => {
177
- const n = p();
178
- return t && (n.defaults = h(t)), n.overrides = {}, n.current = h(n.defaults), n.current;
179
- }, tt = {
180
- EDGE_POSITION: w,
181
- RSA_MODE: O,
182
- SIGNATURE_TYPE: M
183
- }, f = (t) => {
167
+ }, dt = () => b().current, ut = (t) => {
168
+ const n = b();
169
+ return n.defaults = m(t), n.current = V(n.defaults, n.overrides), n.current;
170
+ }, lt = (t) => {
171
+ const n = b();
172
+ return n.current = m(t), n.overrides = x(t), n.current;
173
+ }, ct = (t) => {
174
+ const n = b();
175
+ return n.overrides = Y(n.overrides, x(t)), n.current = V(n.current, t), n.current;
176
+ }, ht = (t) => {
177
+ const n = b();
178
+ return t && (n.defaults = m(t)), n.overrides = {}, n.current = m(n.defaults), n.current;
179
+ }, gt = {
180
+ EDGE_POSITION: L,
181
+ RSA_MODE: U,
182
+ SIGNATURE_TYPE: F
183
+ }, k = (t) => {
184
184
  if (t.length !== 0)
185
185
  return t.length === 1 ? t[0] : t;
186
- }, c = (t, n, e) => new Proxy(
186
+ }, d = (t, n, e) => new Proxy(
187
187
  {},
188
188
  {
189
- get: (i, a) => {
190
- if (a === "then")
189
+ get: (i, r) => {
190
+ if (r === "then")
191
191
  return;
192
- if (typeof a == "symbol")
193
- return a === Symbol.toStringTag ? t : void 0;
194
- const r = n[a];
195
- return r ? (...s) => {
196
- if (r.kind === "callbackRegister") {
197
- r.callback?.(e.callbacks, s);
192
+ if (typeof r == "symbol")
193
+ return r === Symbol.toStringTag ? t : void 0;
194
+ const a = n[r];
195
+ return a ? (...s) => {
196
+ if (a.kind === "callbackRegister") {
197
+ a.callback?.(e.callbacks, s);
198
198
  return;
199
199
  }
200
- if (r.kind === "stateGetter")
201
- return r.state?.(e.state.snapshot(), s);
202
- const o = r.adapterMethod ?? a;
203
- if (r.kind === "query")
204
- return e.bridge.request(t, o, f(s));
205
- if (r.kind === "callbackQuery") {
206
- const l = s.find((d) => typeof d == "function"), m = s.filter((d) => typeof d != "function");
207
- e.bridge.request(t, o, f(m)).then((d) => {
208
- const k = r.mapCallbackResult?.(d) ?? [d];
209
- l?.(...k);
200
+ if (a.kind === "stateGetter")
201
+ return a.state?.(e.state.snapshot(), s);
202
+ const o = a.adapterMethod ?? r;
203
+ if (a.kind === "query")
204
+ return e.bridge.request(t, o, k(s));
205
+ if (a.kind === "callbackQuery") {
206
+ const c = s.find((h) => typeof h == "function"), l = s.filter((h) => typeof h != "function");
207
+ e.bridge.request(t, o, k(l)).then((h) => {
208
+ const Q = a.mapCallbackResult?.(h) ?? [h];
209
+ c?.(...Q);
210
210
  }).catch(e.onAsyncError);
211
211
  return;
212
212
  }
213
- e.bridge.request(t, o, f(s)).catch(e.onAsyncError);
213
+ const u = e.bridge.request(t, o, k(s)).catch((c) => {
214
+ e.onAsyncError(c);
215
+ });
216
+ if (a.returnsResult)
217
+ return u;
214
218
  } : (...s) => {
215
- const o = new Error(`${t}.${a} is not implemented by the SDK adapter.`);
219
+ const o = new Error(`${t}.${r} is not implemented by the SDK adapter.`);
216
220
  e.onAsyncError(o);
217
221
  };
218
222
  }
219
223
  }
220
- ), z = {
224
+ ), J = (t) => typeof t == "object" && t !== null && !Array.isArray(t) && "id" in t, y = (t) => t.annotations?.filter(J).map((n) => ({ ...n })) ?? [], Z = (t) => {
225
+ switch (t) {
226
+ case "select":
227
+ case "pen":
228
+ case "eraser":
229
+ case "line":
230
+ case "arrow":
231
+ case "rectangle":
232
+ case "circle":
233
+ case "text-highlight":
234
+ case "text-underline":
235
+ case "text-strikethrough":
236
+ case "text-squiggly":
237
+ case "text-note":
238
+ case "stamp":
239
+ return t;
240
+ case "none":
241
+ default:
242
+ return "none";
243
+ }
244
+ }, ee = {
221
245
  addAnnotationEventCallback: {
222
246
  kind: "callbackRegister",
223
247
  callback: (t, n) => {
@@ -225,88 +249,55 @@ const w = "RIGHT_CENTER", M = "REGULAR_ESM", O = "auto", S = "__RHC_OFFICE_DIGIT
225
249
  typeof e == "function" && t.annotationEvents.push(e);
226
250
  }
227
251
  },
228
- addAnnotationPersistCallback: {
229
- kind: "callbackRegister",
230
- callback: (t, n) => {
231
- const e = n[0];
232
- typeof e == "function" && t.annotationPersist.push(e);
233
- }
252
+ isInAnnotationMode: {
253
+ kind: "stateGetter",
254
+ state: (t) => t.annotationEnabled
234
255
  },
235
- addAnnotationRetrieveCallback: {
236
- kind: "callbackRegister",
237
- callback: (t, n) => {
238
- const e = n[0];
239
- typeof e == "function" && t.annotationRetrieve.push(e);
240
- }
256
+ getAnnotationMode: {
257
+ kind: "stateGetter",
258
+ state: (t) => Z(t.annotationMode)
241
259
  },
242
- addDigitalAnnotationRetrieveCallback: {
243
- kind: "callbackRegister",
244
- callback: (t, n) => {
245
- const e = n[0];
246
- typeof e == "function" && t.digitalAnnotationRetrieve.push(
247
- e
248
- );
249
- }
260
+ getAnnotations: {
261
+ kind: "stateGetter",
262
+ state: (t) => y(t)
250
263
  },
251
- isInAnnotationMode: {
264
+ getAnnotationsCount: {
252
265
  kind: "stateGetter",
253
- state: (t) => t.annotationEnabled
266
+ state: (t) => y(t).length
254
267
  },
255
- getAnnotations: { kind: "stateGetter", state: () => [] },
256
- getAnnotationsCount: { kind: "stateGetter", state: () => 0 },
257
- queryAnnotationsBy: { kind: "stateGetter", state: () => [] },
258
- setToolSource: { kind: "command" },
259
268
  openAnnotationView: { kind: "command" },
260
269
  closeAnnotationView: { kind: "command" },
261
- openTextAnnotationView: { kind: "command" },
262
- setTextAnnotationFontColor: { kind: "command" },
263
- setTextAnnotationFontSize: { kind: "command" },
264
- closeTextAnnotationView: { kind: "command" },
265
- createTextAnnotation: { kind: "command" },
266
- setPersistToDocument: { kind: "command" },
267
270
  saveAnnotations: { kind: "callbackQuery" },
268
- saveTextAnnotations: { kind: "command" },
269
- clearAnnotations: { kind: "command" },
270
- clearTextAnnotations: { kind: "command" },
271
- undoAnnotation: { kind: "command" },
272
- redoAnnotation: { kind: "command" },
271
+ clearAnnotations: { kind: "command", returnsResult: !0 },
272
+ undoAnnotation: { kind: "command", returnsResult: !0 },
273
+ redoAnnotation: { kind: "command", returnsResult: !0 },
274
+ canUndoAnnotation: { kind: "query" },
275
+ canRedoAnnotation: { kind: "query" },
273
276
  selectAnnotationTool: { kind: "command" },
274
- showAnnotationColorPicker: { kind: "command" },
275
- setAnnotationPenType: { kind: "command" },
276
- appendAnnotations: { kind: "callbackQuery" },
277
- batchAppendAnnotations: { kind: "callbackQuery" },
277
+ selectAnnotationStamp: { kind: "command" },
278
278
  setAnnotationPenColor: { kind: "command" },
279
279
  setAnnotationPenWidth: { kind: "command" },
280
- setAnnotationPenThickness: { kind: "command" },
281
- enableAnnotationsInfoView: { kind: "command" },
282
- enableAnnotationsDeletion: { kind: "command" },
283
- enableAnnotationsDeletionOnlyByAuthor: { kind: "command" },
284
- listDigitalStamps: { kind: "command" },
285
- listAnnotations: { kind: "command" },
286
- deleteAnnotationsBy: { kind: "command" },
287
- deleteAnnotationsById: { kind: "command" },
288
- addDigitalAnnotation: { kind: "command" },
289
- addInkAnnotationCallback: { kind: "callbackRegister" }
280
+ setAnnotationPenStyle: { kind: "command" }
290
281
  };
291
- class W {
282
+ class te {
292
283
  constructor(n) {
293
- this.setToolSource = (e) => this.adapter.setToolSource(e), this.openAnnotationView = (e) => this.adapter.openAnnotationView(e), this.closeAnnotationView = (e) => this.adapter.closeAnnotationView(e), this.openTextAnnotationView = () => this.adapter.openTextAnnotationView(), this.setTextAnnotationFontColor = (e) => this.adapter.setTextAnnotationFontColor(e), this.setTextAnnotationFontSize = (e) => this.adapter.setTextAnnotationFontSize(e), this.closeTextAnnotationView = (e) => this.adapter.closeTextAnnotationView(e), this.createTextAnnotation = (e) => this.adapter.createTextAnnotation(e), this.setPersistToDocument = (e) => this.adapter.setPersistToDocument(e), this.saveAnnotations = (e) => this.adapter.saveAnnotations(e), this.saveTextAnnotations = () => this.adapter.saveTextAnnotations(), this.clearAnnotations = () => this.adapter.clearAnnotations(), this.clearTextAnnotations = () => this.adapter.clearTextAnnotations(), this.undoAnnotation = () => this.adapter.undoAnnotation(), this.redoAnnotation = () => this.adapter.redoAnnotation(), this.selectAnnotationTool = (e) => this.adapter.selectAnnotationTool(e), this.showAnnotationColorPicker = () => this.adapter.showAnnotationColorPicker(), this.setAnnotationPenType = (e) => this.adapter.setAnnotationPenType(e), this.appendAnnotations = (e, i) => this.adapter.appendAnnotations(e, i), this.batchAppendAnnotations = (e, i) => this.adapter.batchAppendAnnotations(e, i), this.setAnnotationPenColor = (e) => this.adapter.setAnnotationPenColor(e), this.setAnnotationPenWidth = (e) => this.adapter.setAnnotationPenWidth(e), this.setAnnotationPenThickness = (e) => this.adapter.setAnnotationPenThickness(e), this.enableAnnotationsInfoView = (e) => this.adapter.enableAnnotationsInfoView(e), this.enableAnnotationsDeletion = (e) => this.adapter.enableAnnotationsDeletion(e), this.enableAnnotationsDeletionOnlyByAuthor = (e) => this.adapter.enableAnnotationsDeletionOnlyByAuthor(e), this.listDigitalStamps = () => this.adapter.listDigitalStamps(), this.isInAnnotationMode = () => this.adapter.isInAnnotationMode(), this.listAnnotations = (e) => this.adapter.listAnnotations(e), this.getAnnotations = () => this.adapter.getAnnotations(), this.getAnnotationsCount = () => this.adapter.getAnnotationsCount(), this.queryAnnotationsBy = (e) => this.adapter.queryAnnotationsBy(e), this.deleteAnnotationsBy = (e, i) => this.adapter.deleteAnnotationsBy(e, i), this.deleteAnnotationsById = (e, i) => this.adapter.deleteAnnotationsById(e, i), this.addDigitalAnnotation = (e) => this.adapter.addDigitalAnnotation(e), this.addInkAnnotationCallback = (e) => this.adapter.addInkAnnotationCallback(e), this.addAnnotationEventCallback = (e) => this.adapter.addAnnotationEventCallback(e), this.addAnnotationPersistCallback = (e) => this.adapter.addAnnotationPersistCallback(e), this.addAnnotationRetrieveCallback = (e) => this.adapter.addAnnotationRetrieveCallback(e), this.addDigitalAnnotationRetrieveCallback = (e) => this.adapter.addDigitalAnnotationRetrieveCallback(e), this.adapter = c(
284
+ this.openAnnotationView = (e) => this.adapter.openAnnotationView(e), this.closeAnnotationView = () => this.adapter.closeAnnotationView(), this.saveAnnotations = (e) => this.adapter.saveAnnotations(e), this.clearAnnotations = () => this.adapter.clearAnnotations(), this.undoAnnotation = () => this.adapter.undoAnnotation(), this.redoAnnotation = () => this.adapter.redoAnnotation(), this.canUndoAnnotation = () => this.adapter.canUndoAnnotation(), this.canRedoAnnotation = () => this.adapter.canRedoAnnotation(), this.selectAnnotationTool = (e, i) => this.adapter.selectAnnotationTool(e, i), this.selectAnnotationStamp = (e) => this.adapter.selectAnnotationStamp(e), this.setAnnotationPenColor = (e) => this.adapter.setAnnotationPenColor(e), this.setAnnotationPenWidth = (e) => this.adapter.setAnnotationPenWidth(e), this.setAnnotationPenStyle = (e) => this.adapter.setAnnotationPenStyle(e), this.isInAnnotationMode = () => this.adapter.isInAnnotationMode(), this.getAnnotationMode = () => this.adapter.getAnnotationMode(), this.getAnnotations = () => this.adapter.getAnnotations(), this.getAnnotationsCount = () => this.adapter.getAnnotationsCount(), this.addAnnotationEventCallback = (e) => this.adapter.addAnnotationEventCallback(e), this.adapter = d(
294
285
  "annotation",
295
- z,
286
+ ee,
296
287
  n
297
288
  );
298
289
  }
299
290
  }
300
- const $ = {
291
+ const ne = {
301
292
  configSecurityProvider: { kind: "command" },
302
293
  getSecurityProviders: { kind: "query" }
303
294
  };
304
- class Y {
295
+ class ie {
305
296
  constructor(n) {
306
- this.configSecurityProvider = (e) => this.adapter.configSecurityProvider(e), this.getSecurityProviders = () => this.adapter.getSecurityProviders(), this.adapter = c("crypto", $, n);
297
+ this.configSecurityProvider = (e) => this.adapter.configSecurityProvider(e), this.getSecurityProviders = () => this.adapter.getSecurityProviders(), this.adapter = d("crypto", ne, n);
307
298
  }
308
299
  }
309
- const j = {
300
+ const E = (t) => t.digitalSignatures ? [...t.digitalSignatures] : [], re = {
310
301
  addDigitalSignatureRetrieveCallback: {
311
302
  kind: "callbackRegister",
312
303
  callback: (t, n) => {
@@ -341,21 +332,27 @@ const j = {
341
332
  addDigitalSignature: { kind: "callbackQuery" },
342
333
  addDigitalSignatureBySelectedSearchHighlight: { kind: "command" },
343
334
  listDigitalSignatures: { kind: "callbackQuery" },
344
- getDigitalSignatures: { kind: "stateGetter", state: () => [] },
345
- getDigitalSignaturesCount: { kind: "stateGetter", state: () => 0 },
335
+ getDigitalSignatures: {
336
+ kind: "stateGetter",
337
+ state: (t) => E(t)
338
+ },
339
+ getDigitalSignaturesCount: {
340
+ kind: "stateGetter",
341
+ state: (t) => E(t).length
342
+ },
346
343
  enableDigitalSignatureInfoView: { kind: "command" },
347
344
  enableDigitalSignatureRevocation: { kind: "command" }
348
345
  };
349
- class X {
346
+ class ae {
350
347
  constructor(n) {
351
- this.addDigitalSignatureRetrieveCallback = (e) => this.adapter.addDigitalSignatureRetrieveCallback(e), this.addDigitalSignatureParseCallback = (e) => this.adapter.addDigitalSignatureParseCallback(e), this.setCryptoProvider = (e, i, a) => this.adapter.setCryptoProvider(e, i, a), this.setSealSource = (e) => this.adapter.setSealSource(e), this.setDefaultStampPassword = (e) => this.adapter.setDefaultStampPassword(e), this.setDefaultSealPassword = (e) => this.adapter.setDefaultSealPassword(e), this.setDefaultKeystorePassword = (e) => this.adapter.setDefaultKeystorePassword(e), this.setDefaultUSBKeyPassword = (e) => this.adapter.setDefaultUSBKeyPassword(e), this.addDigitalSignCallback = (e) => this.adapter.addDigitalSignCallback(e), this.setupExternalSealServer = (e) => this.adapter.setupExternalSealServer(e), this.setDigitalSignOptions = (e) => this.adapter.setDigitalSignOptions(e), this.setExternalDigitalSignOptions = (e) => this.adapter.setExternalDigitalSignOptions(e), this.setPDFDigitalSignCaptionOptions = (e) => this.adapter.setPDFDigitalSignCaptionOptions(e), this.addDigitalSignature = (e, i) => this.adapter.addDigitalSignature(e, i), this.addDigitalSignatureBySelectedSearchHighlight = (e) => this.adapter.addDigitalSignatureBySelectedSearchHighlight(e), this.listDigitalSignatures = (e) => this.adapter.listDigitalSignatures(e), this.getDigitalSignatures = () => this.adapter.getDigitalSignatures(), this.getDigitalSignaturesCount = () => this.adapter.getDigitalSignaturesCount(), this.enableDigitalSignatureInfoView = (e) => this.adapter.enableDigitalSignatureInfoView(e), this.enableDigitalSignatureRevocation = (e) => this.adapter.enableDigitalSignatureRevocation(e), this.adapter = c(
348
+ this.addDigitalSignatureRetrieveCallback = (e) => this.adapter.addDigitalSignatureRetrieveCallback(e), this.addDigitalSignatureParseCallback = (e) => this.adapter.addDigitalSignatureParseCallback(e), this.setCryptoProvider = (e, i, r) => this.adapter.setCryptoProvider(e, i, r), this.setSealSource = (e) => this.adapter.setSealSource(e), this.setDefaultStampPassword = (e) => this.adapter.setDefaultStampPassword(e), this.setDefaultSealPassword = (e) => this.adapter.setDefaultSealPassword(e), this.setDefaultKeystorePassword = (e) => this.adapter.setDefaultKeystorePassword(e), this.setDefaultUSBKeyPassword = (e) => this.adapter.setDefaultUSBKeyPassword(e), this.addDigitalSignCallback = (e) => this.adapter.addDigitalSignCallback(e), this.setupExternalSealServer = (e) => this.adapter.setupExternalSealServer(e), this.setDigitalSignOptions = (e) => this.adapter.setDigitalSignOptions(e), this.setExternalDigitalSignOptions = (e) => this.adapter.setExternalDigitalSignOptions(e), this.setPDFDigitalSignCaptionOptions = (e) => this.adapter.setPDFDigitalSignCaptionOptions(e), this.addDigitalSignature = (e, i) => this.adapter.addDigitalSignature(e, i), this.addDigitalSignatureBySelectedSearchHighlight = (e) => this.adapter.addDigitalSignatureBySelectedSearchHighlight(e), this.listDigitalSignatures = (e) => this.adapter.listDigitalSignatures(e), this.getDigitalSignatures = () => this.adapter.getDigitalSignatures(), this.getDigitalSignaturesCount = () => this.adapter.getDigitalSignaturesCount(), this.enableDigitalSignatureInfoView = (e) => this.adapter.enableDigitalSignatureInfoView(e), this.enableDigitalSignatureRevocation = (e) => this.adapter.enableDigitalSignatureRevocation(e), this.adapter = d(
352
349
  "digitalSign",
353
- j,
350
+ re,
354
351
  n
355
352
  );
356
353
  }
357
354
  }
358
- const J = "rhc-office.editor-adapter", Z = 1, ee = "__RHC_OFFICE_EDITOR_ADAPTER__", R = "rhcOfficeAdapterReady", E = "rhcOfficeAdapterEvent", N = "data-rhc-office-reader-id", te = {
355
+ const se = "rhc-office.editor-adapter", oe = 1, de = "__RHC_OFFICE_EDITOR_ADAPTER__", P = "rhcOfficeAdapterReady", C = "rhcOfficeAdapterEvent", K = "data-rhc-office-reader-id", ue = {
359
356
  addDocumentOpenedCallback: {
360
357
  kind: "callbackRegister",
361
358
  callback: (t, n) => {
@@ -390,10 +387,7 @@ const J = "rhc-office.editor-adapter", Z = 1, ee = "__RHC_OFFICE_EDITOR_ADAPTER_
390
387
  saveAs: { kind: "query" },
391
388
  getDocumentContent: {
392
389
  kind: "callbackQuery",
393
- mapCallbackResult: (t) => {
394
- const n = t;
395
- return [n?.fileCacheId, n?.fileBuffer];
396
- }
390
+ mapCallbackResult: (t) => [t]
397
391
  },
398
392
  closeDocument: { kind: "callbackQuery" },
399
393
  isDocumentOpened: {
@@ -407,9 +401,9 @@ const J = "rhc-office.editor-adapter", Z = 1, ee = "__RHC_OFFICE_EDITOR_ADAPTER_
407
401
  print: { kind: "command" },
408
402
  createPreview: { kind: "command" }
409
403
  };
410
- class ne {
404
+ class le {
411
405
  constructor(n) {
412
- this.context = n, this.addDocumentOpenedCallback = (e) => this.adapter.addDocumentOpenedCallback(e), this.addDocumentSavedCallback = (e) => this.adapter.addDocumentSavedCallback(e), this.addDocumentClosedCallback = (e) => this.adapter.addDocumentClosedCallback(e), this.openPDFDocument = (e, i) => this.adapter.openPDFDocument(e, i), this.openPdfDocument = (e, i) => this.adapter.openPdfDocument(e, i), this.openOFDDocument = (e, i) => this.adapter.openOFDDocument(e, i), this.openOfdDocument = (e, i) => this.adapter.openOfdDocument(e, i), this.openOfficeDocument = (e, i) => this.adapter.openOfficeDocument(e, i), this.openImageDocument = (e, i) => this.adapter.openImageDocument(e, i), this.openTextDocument = (e, i) => this.adapter.openTextDocument(e, i), this.openFromLocalStorage = () => this.adapter.openFromLocalStorage(), this.setUploadUrl = (e) => this.adapter.setUploadUrl(e), this.save = (e, i, a) => this.adapter.save(e, i, a), this.saveAs = (e) => {
406
+ this.context = n, this.addDocumentOpenedCallback = (e) => this.adapter.addDocumentOpenedCallback(e), this.addDocumentSavedCallback = (e) => this.adapter.addDocumentSavedCallback(e), this.addDocumentClosedCallback = (e) => this.adapter.addDocumentClosedCallback(e), this.openPDFDocument = (e, i) => this.adapter.openPDFDocument(e, i), this.openPdfDocument = (e, i) => this.adapter.openPdfDocument(e, i), this.openOFDDocument = (e, i) => this.adapter.openOFDDocument(e, i), this.openOfdDocument = (e, i) => this.adapter.openOfdDocument(e, i), this.openOfficeDocument = (e, i) => this.adapter.openOfficeDocument(e, i), this.openImageDocument = (e, i) => this.adapter.openImageDocument(e, i), this.openTextDocument = (e, i) => this.adapter.openTextDocument(e, i), this.openFromLocalStorage = () => this.adapter.openFromLocalStorage(), this.setUploadUrl = (e) => this.adapter.setUploadUrl(e), this.save = (e, i, r) => this.adapter.save(e, i, r), this.saveAs = (e) => {
413
407
  const i = this.context.bridge.getReaderId();
414
408
  if (!i)
415
409
  return Promise.resolve({
@@ -418,42 +412,67 @@ class ne {
418
412
  filename: e?.filename,
419
413
  error: "Reader is not mounted or does not expose saveAs."
420
414
  });
421
- const a = document.querySelector(
422
- `[${N}="${i}"]`
415
+ const r = document.querySelector(
416
+ `[${K}="${i}"]`
423
417
  );
424
- return typeof a?.saveAs == "function" ? a.saveAs(e) : this.adapter.saveAs(e);
425
- }, this.getDocumentContent = (e) => this.adapter.getDocumentContent(e), this.closeDocument = (e, i, a) => this.adapter.closeDocument(e, i, a), this.isDocumentOpened = () => this.adapter.isDocumentOpened(), this.isDocumentModified = () => this.adapter.isDocumentModified(), this.print = () => this.adapter.print(), this.createPreview = (e, i) => this.adapter.createPreview(e, i), this.adapter = c(
418
+ return typeof r?.saveAs == "function" ? r.saveAs(e) : this.adapter.saveAs(e);
419
+ }, this.getDocumentContent = (e) => this.adapter.getDocumentContent(e), this.closeDocument = (e, i, r) => this.adapter.closeDocument(e, i, r), this.isDocumentOpened = () => this.adapter.isDocumentOpened(), this.isDocumentModified = () => this.adapter.isDocumentModified(), this.print = () => this.adapter.print(), this.createPreview = (e, i) => this.adapter.createPreview(e, i), this.adapter = d(
426
420
  "document",
427
- te,
421
+ ue,
428
422
  n
429
423
  );
430
424
  }
431
425
  }
432
- const ie = {
426
+ const ce = {
433
427
  clearFind: { kind: "command" },
434
428
  findNext: { kind: "command" },
435
429
  findPrevious: { kind: "command" }
436
430
  };
437
- class ae {
431
+ class he {
438
432
  constructor(n) {
439
- this.clearFind = () => this.adapter.clearFind(), this.findNext = (e) => this.adapter.findNext(e), this.findPrevious = (e) => this.adapter.findPrevious(e), this.adapter = c("find", ie, n);
433
+ this.clearFind = () => this.adapter.clearFind(), this.findNext = (e) => this.adapter.findNext(e), this.findPrevious = (e) => this.adapter.findPrevious(e), this.adapter = d("find", ce, n);
440
434
  }
441
435
  }
442
- const re = {
436
+ const ge = {
443
437
  configFileUpload: { kind: "command" },
444
438
  setHttpHeaders: { kind: "command" },
445
439
  setHttpFormFields: { kind: "command" }
446
440
  };
447
- class se {
441
+ class me {
448
442
  constructor(n) {
449
- this.configFileUpload = (e) => this.adapter.configFileUpload(e), this.setHttpHeaders = (e) => this.adapter.setHttpHeaders(e), this.setHttpFormFields = (e) => this.adapter.setHttpFormFields(e), this.adapter = c(
443
+ this.configFileUpload = (e) => this.adapter.configFileUpload(e), this.setHttpHeaders = (e) => this.adapter.setHttpHeaders(e), this.setHttpFormFields = (e) => this.adapter.setHttpFormFields(e), this.adapter = d(
450
444
  "networking",
451
- re,
445
+ ge,
446
+ n
447
+ );
448
+ }
449
+ }
450
+ const pe = () => ({
451
+ clearContent: { kind: "command", returnsResult: !0 },
452
+ commit: { kind: "command", returnsResult: !0 },
453
+ deletePages: { kind: "command", returnsResult: !0 },
454
+ duplicatePages: { kind: "command", returnsResult: !0 },
455
+ execute: { kind: "command", returnsResult: !0 },
456
+ extractPages: { kind: "command", returnsResult: !0 },
457
+ getSnapshot: { kind: "query" },
458
+ importDocument: { kind: "command", returnsResult: !0 },
459
+ moveAfter: { kind: "command", returnsResult: !0 },
460
+ moveBefore: { kind: "command", returnsResult: !0 },
461
+ newPage: { kind: "command", returnsResult: !0 },
462
+ rotateLeft: { kind: "command", returnsResult: !0 },
463
+ rotateRight: { kind: "command", returnsResult: !0 },
464
+ undo: { kind: "command", returnsResult: !0 }
465
+ }), be = (t) => t instanceof Uint8Array ? t : new Uint8Array(t);
466
+ class Se {
467
+ constructor(n) {
468
+ this.getSnapshot = () => this.adapter.getSnapshot(), this.execute = (e) => this.adapter.execute(e), this.newPage = (e, i) => this.adapter.newPage(e, i), this.deletePages = (e) => this.adapter.deletePages(e), this.duplicatePages = (e, i) => this.adapter.duplicatePages(e, i), this.rotateLeft = (e) => this.adapter.rotateLeft(e), this.rotateRight = (e) => this.adapter.rotateRight(e), this.clearContent = (e) => this.adapter.clearContent(e), this.moveBefore = (e, i) => this.adapter.moveBefore(e, i), this.moveAfter = (e, i) => this.adapter.moveAfter(e, i), this.importDocument = (e, i) => this.adapter.importDocument(be(e), i), this.extractPages = (e, i) => this.adapter.extractPages(e, i), this.undo = () => this.adapter.undo(), this.commit = () => this.adapter.commit(), this.adapter = d(
469
+ "pageArrange",
470
+ pe(),
452
471
  n
453
472
  );
454
473
  }
455
474
  }
456
- const oe = (t) => ({
475
+ const ke = (t) => ({
457
476
  addPageChangeCallback: {
458
477
  kind: "callbackRegister",
459
478
  callback: (n, e) => {
@@ -503,16 +522,16 @@ const oe = (t) => ({
503
522
  gotoPreviousPage: { kind: "command" },
504
523
  rotatePage: { kind: "command" }
505
524
  });
506
- class de {
525
+ class fe {
507
526
  constructor(n) {
508
- this.addPageChangeCallback = (e) => this.adapter.addPageChangeCallback(e), this.addPageModeChangeCallback = (e) => this.adapter.addPageModeChangeCallback(e), this.getPageCount = (e) => this.adapter.getPageCount(e), this.getPageIndex = (e) => this.adapter.getPageIndex(e), this.setSinglePageViewMode = () => this.adapter.setSinglePageViewMode(), this.setTwoPagesViewMode = () => this.adapter.setTwoPagesViewMode(), this.setPageScrollVertical = () => this.adapter.setPageScrollVertical(), this.setPageScrollHorizontal = () => this.adapter.setPageScrollHorizontal(), this.setPageCursorPanDrag = () => this.adapter.setPageCursorPanDrag(), this.setPageCursorTextSelect = () => this.adapter.setPageCursorTextSelect(), this.rotateCW = () => this.adapter.rotateCW(), this.rotateCCW = () => this.adapter.rotateCCW(), this.autoFitPage = () => this.adapter.autoFitPage(), this.fitPageSize = () => this.adapter.fitPageSize(), this.fitPageWidth = () => this.adapter.fitPageWidth(), this.fitPageHeight = () => this.adapter.fitPageHeight(), this.increasePageScale = () => this.adapter.increasePageScale(), this.decreasePageScale = () => this.adapter.decreasePageScale(), this.setPageScale = (e) => this.adapter.setPageScale(e), this.setPageBlendColor = (e, i, a, r) => this.adapter.setPageBlendColor(e, i, a, r), this.gotoPage = (e, i, a) => this.adapter.gotoPage(e, i, a), this.gotoNextPage = () => this.adapter.gotoNextPage(), this.gotoPreviousPage = () => this.adapter.gotoPreviousPage(), this.rotatePage = (e) => this.adapter.rotatePage(e), this.adapter = c(
527
+ this.addPageChangeCallback = (e) => this.adapter.addPageChangeCallback(e), this.addPageModeChangeCallback = (e) => this.adapter.addPageModeChangeCallback(e), this.getPageCount = (e) => this.adapter.getPageCount(e), this.getPageIndex = (e) => this.adapter.getPageIndex(e), this.setSinglePageViewMode = () => this.adapter.setSinglePageViewMode(), this.setTwoPagesViewMode = () => this.adapter.setTwoPagesViewMode(), this.setPageScrollVertical = () => this.adapter.setPageScrollVertical(), this.setPageScrollHorizontal = () => this.adapter.setPageScrollHorizontal(), this.setPageCursorPanDrag = () => this.adapter.setPageCursorPanDrag(), this.setPageCursorTextSelect = () => this.adapter.setPageCursorTextSelect(), this.rotateCW = () => this.adapter.rotateCW(), this.rotateCCW = () => this.adapter.rotateCCW(), this.autoFitPage = () => this.adapter.autoFitPage(), this.fitPageSize = () => this.adapter.fitPageSize(), this.fitPageWidth = () => this.adapter.fitPageWidth(), this.fitPageHeight = () => this.adapter.fitPageHeight(), this.increasePageScale = () => this.adapter.increasePageScale(), this.decreasePageScale = () => this.adapter.decreasePageScale(), this.setPageScale = (e) => this.adapter.setPageScale(e), this.setPageBlendColor = (e, i, r, a) => this.adapter.setPageBlendColor(e, i, r, a), this.gotoPage = (e, i, r) => this.adapter.gotoPage(e, i, r), this.gotoNextPage = () => this.adapter.gotoNextPage(), this.gotoPreviousPage = () => this.adapter.gotoPreviousPage(), this.rotatePage = (e) => this.adapter.rotatePage(e), this.adapter = d(
509
528
  "page",
510
- oe(n),
529
+ ke(n),
511
530
  n
512
531
  );
513
532
  }
514
533
  }
515
- const le = {
534
+ const Re = {
516
535
  open: { kind: "command" },
517
536
  setFormFieldValue: { kind: "command" },
518
537
  setFormFieldReadonly: { kind: "command" },
@@ -529,54 +548,39 @@ const le = {
529
548
  mapCallbackResult: (t) => [Array.isArray(t) ? t : []]
530
549
  }
531
550
  };
532
- class ce {
551
+ class Te {
533
552
  constructor(n) {
534
- this.open = () => this.adapter.open(), this.setFormFieldValue = (e, i) => this.adapter.setFormFieldValue(e, i), this.setFormFieldReadonly = (e, i) => this.adapter.setFormFieldReadonly(e, i), this.commit = (e) => this.adapter.commit(e), this.clear = (e) => this.adapter.clear(e), this.toKeyValue = (e) => this.adapter.toKeyValue(e), this.adapter = c(
553
+ this.open = () => this.adapter.open(), this.setFormFieldValue = (e, i) => this.adapter.setFormFieldValue(e, i), this.setFormFieldReadonly = (e, i) => this.adapter.setFormFieldReadonly(e, i), this.commit = (e) => this.adapter.commit(e), this.clear = (e) => this.adapter.clear(e), this.toKeyValue = (e) => this.adapter.toKeyValue(e), this.adapter = d(
535
554
  "pdfFormFiller",
536
- le,
555
+ Re,
537
556
  n
538
557
  );
539
558
  }
540
559
  }
541
- class ue extends Error {
542
- constructor(n, e) {
543
- super(`[Phase 1] ${n}.${e} is not implemented yet.`), this.name = "SDKPhase1NotImplementedError";
544
- }
545
- }
546
- const he = (t, n) => () => {
547
- throw new ue(t, n);
548
- }, nt = (t) => new Proxy(
549
- {},
550
- {
551
- get: (n, e) => {
552
- if (e !== "then")
553
- return typeof e == "symbol" ? e === Symbol.toStringTag ? t : void 0 : he(t, e);
554
- }
555
- }
556
- ), me = /\s*,\s*/, ge = /\s*-\s*/, b = (t) => {
560
+ const ve = /\s*,\s*/, ye = /\s*-\s*/, f = (t) => {
557
561
  const n = Number.parseInt(t.trim(), 10);
558
562
  return !Number.isFinite(n) || n <= 0 ? null : n;
559
- }, pe = (t) => {
560
- const n = t.split(ge);
563
+ }, Ee = (t) => {
564
+ const n = t.split(ye);
561
565
  if (n.length === 1) {
562
- const a = b(n[0] ?? "");
563
- return a ? [a] : [];
566
+ const r = f(n[0] ?? "");
567
+ return r ? [r] : [];
564
568
  }
565
- const e = b(n[0] ?? ""), i = b(n[1] ?? "");
566
- return !e || !i || i < e ? [] : Array.from({ length: i - e + 1 }, (a, r) => e + r);
567
- }, ke = (t) => t ? t.split(me).flatMap((e) => pe(e)).filter((e, i, a) => a.indexOf(e) === i) : [];
568
- class Se {
569
+ const e = f(n[0] ?? ""), i = f(n[1] ?? "");
570
+ return !e || !i || i < e ? [] : Array.from({ length: i - e + 1 }, (r, a) => e + a);
571
+ }, Pe = (t) => t ? t.split(ve).flatMap((e) => Ee(e)).filter((e, i, r) => r.indexOf(e) === i) : [];
572
+ class Ce {
569
573
  constructor(n, e, i) {
570
- this.setFieldName = (a) => {
571
- this.key = a;
572
- }, this.setFieldValue = (a) => {
573
- this.value = a;
574
- }, this.setDescription = (a) => {
575
- this.description = a;
574
+ this.setFieldName = (r) => {
575
+ this.key = r;
576
+ }, this.setFieldValue = (r) => {
577
+ this.value = r;
578
+ }, this.setDescription = (r) => {
579
+ this.description = r;
576
580
  }, this.key = n, this.value = e, this.description = i;
577
581
  }
578
582
  }
579
- class fe {
583
+ class De {
580
584
  constructor() {
581
585
  this.fields = [], this.keywordTextFixedPositions = void 0, this.keywordOffsetX = 0, this.keywordOffsetY = 0, this.bookmarkOffsetX = 0, this.bookmarkOffsetY = 0, this.printMargin = 0, this.grayscaleSealImage = !1, this.signType = 0, this.sealPosition = 0, this.getSignType = () => this.signType, this.setSignType = (n) => {
582
586
  this.signType = n;
@@ -586,7 +590,7 @@ class fe {
586
590
  this.sealPosition = n;
587
591
  }, this.setPageRange = (n) => {
588
592
  this.pageRange = n;
589
- }, this.getPageRange = () => this.pageRange, this.getPageRanges = () => ke(this.pageRange), this.setSignUserData = (n) => {
593
+ }, this.getPageRange = () => this.pageRange, this.getPageRanges = () => Pe(this.pageRange), this.setSignUserData = (n) => {
590
594
  this.signUserData = n;
591
595
  }, this.setPrintMargin = (n) => {
592
596
  this.printMargin = n;
@@ -599,7 +603,23 @@ class fe {
599
603
  };
600
604
  }
601
605
  }
602
- const be = {
606
+ const Ae = {
607
+ getSecuritySettings: { kind: "query" },
608
+ isSecuritySettingsLocalEditable: { kind: "query" },
609
+ setSecuritySettingsLocalEditable: { kind: "query" },
610
+ setSecuritySettings: { kind: "query" },
611
+ openSecuritySettingsDialog: { kind: "command" }
612
+ };
613
+ class Me {
614
+ constructor(n) {
615
+ this.getSecuritySettings = () => this.adapter.getSecuritySettings(), this.setSecuritySettings = (e) => this.adapter.setSecuritySettings(e), this.isSecuritySettingsLocalEditable = () => this.adapter.isSecuritySettingsLocalEditable(), this.setSecuritySettingsLocalEditable = (e) => this.adapter.setSecuritySettingsLocalEditable(e), this.openSecuritySettingsDialog = () => this.adapter.openSecuritySettingsDialog(), this.adapter = d(
616
+ "security",
617
+ Ae,
618
+ n
619
+ );
620
+ }
621
+ }
622
+ const we = {
603
623
  setSignServer: { kind: "command" },
604
624
  addSignServerAuthCallback: {
605
625
  kind: "callbackRegister",
@@ -619,28 +639,28 @@ const be = {
619
639
  setSignServerLoginFromUSBKey: { kind: "command" },
620
640
  setUserAuthSource: { kind: "command" }
621
641
  };
622
- class Te {
642
+ class Ie {
623
643
  constructor(n) {
624
- this.setSignServer = (e) => this.adapter.setSignServer(e), this.addSignServerAuthCallback = (e) => this.adapter.addSignServerAuthCallback(e), this.setSignServerDefaultLogin = (e) => this.adapter.setSignServerDefaultLogin(e), this.setDefaultSignServerLogin = (e) => this.adapter.setDefaultSignServerLogin(e), this.setSignServerDefaultPassword = (e) => this.adapter.setSignServerDefaultPassword(e), this.setDefaultSignServerPassword = (e) => this.adapter.setDefaultSignServerPassword(e), this.loginNTKOSignServer = (e, i, a) => this.adapter.loginNTKOSignServer(e, i, a), this.loginSignServer = (e, i, a, r) => this.adapter.loginSignServer(e, i, a, r), this.signOutSignServer = () => this.adapter.signOutSignServer(), this.isAuthenticatedOnSignServer = () => this.adapter.isAuthenticatedOnSignServer(), this.setSignServerLoginFromUSBKey = (e, i) => this.adapter.setSignServerLoginFromUSBKey(e, i), this.setUserAuthSource = (e) => this.adapter.setUserAuthSource(e), this.adapter = c(
644
+ this.setSignServer = (e) => this.adapter.setSignServer(e), this.addSignServerAuthCallback = (e) => this.adapter.addSignServerAuthCallback(e), this.setSignServerDefaultLogin = (e) => this.adapter.setSignServerDefaultLogin(e), this.setDefaultSignServerLogin = (e) => this.adapter.setDefaultSignServerLogin(e), this.setSignServerDefaultPassword = (e) => this.adapter.setSignServerDefaultPassword(e), this.setDefaultSignServerPassword = (e) => this.adapter.setDefaultSignServerPassword(e), this.loginNTKOSignServer = (e, i, r) => this.adapter.loginNTKOSignServer(e, i, r), this.loginSignServer = (e, i, r, a) => this.adapter.loginSignServer(e, i, r, a), this.signOutSignServer = () => this.adapter.signOutSignServer(), this.isAuthenticatedOnSignServer = () => this.adapter.isAuthenticatedOnSignServer(), this.setSignServerLoginFromUSBKey = (e, i) => this.adapter.setSignServerLoginFromUSBKey(e, i), this.setUserAuthSource = (e) => this.adapter.setUserAuthSource(e), this.adapter = d(
625
645
  "signServer",
626
- be,
646
+ we,
627
647
  n
628
648
  );
629
649
  }
630
650
  }
631
- const ve = {
651
+ const Oe = {
632
652
  createPDF417Barcode: { kind: "command" }
633
653
  };
634
- class Ae {
654
+ class _e {
635
655
  constructor(n) {
636
- this.createPDF417Barcode = (e, i, a, r, s, o, l) => this.adapter.createPDF417Barcode(e, i, a, r, s, o, l), this.adapter = c(
656
+ this.createPDF417Barcode = (e, i, r, a, s, o, u) => this.adapter.createPDF417Barcode(e, i, r, a, s, o, u), this.adapter = d(
637
657
  "symbology",
638
- ve,
658
+ Oe,
639
659
  n
640
660
  );
641
661
  }
642
662
  }
643
- const Re = {
663
+ const Le = {
644
664
  setup: { kind: "command" },
645
665
  create: { kind: "command" },
646
666
  getMarkups: { kind: "callbackQuery" },
@@ -648,16 +668,16 @@ const Re = {
648
668
  removeAllMarkups: { kind: "command" },
649
669
  sign: { kind: "callbackQuery" }
650
670
  };
651
- class Ee {
671
+ class Fe {
652
672
  constructor(n) {
653
- this.setup = (e) => this.adapter.setup(e), this.create = (e) => this.adapter.create(e), this.getMarkups = (e) => this.adapter.getMarkups(e), this.removeMarkup = (e, i) => this.adapter.removeMarkup(e, i), this.removeAllMarkups = (e) => this.adapter.removeAllMarkups(e), this.sign = (e) => this.adapter.sign(e), this.adapter = c(
673
+ this.setup = (e) => this.adapter.setup(e), this.create = (e) => this.adapter.create(e), this.getMarkups = (e) => this.adapter.getMarkups(e), this.removeMarkup = (e, i) => this.adapter.removeMarkup(e, i), this.removeAllMarkups = (e) => this.adapter.removeAllMarkups(e), this.sign = (e) => this.adapter.sign(e), this.adapter = d(
654
674
  "templateSign",
655
- Re,
675
+ Le,
656
676
  n
657
677
  );
658
678
  }
659
679
  }
660
- const ye = /* @__PURE__ */ new Set([2, 5]), Pe = (t) => ({
680
+ const Ue = /* @__PURE__ */ new Set([2, 5]), Ne = (t) => ({
661
681
  showToolbarMenu: { kind: "command" },
662
682
  hideToolbarMenu: { kind: "command" },
663
683
  setupToolbarMenu: { kind: "command" },
@@ -672,10 +692,22 @@ const ye = /* @__PURE__ */ new Set([2, 5]), Pe = (t) => ({
672
692
  hideRibbonMenuItem: { kind: "command" },
673
693
  showRibbonTitleBar: { kind: "command" },
674
694
  hideRibbonTitleBar: { kind: "command" },
695
+ showRibbonTabs: { kind: "command" },
696
+ hideRibbonTabs: { kind: "command" },
675
697
  selectRibbonMenu: { kind: "command" },
698
+ setupRibbonMenuTab: { kind: "command" },
699
+ showRibbonMenuTab: { kind: "command" },
700
+ hideRibbonMenuTab: { kind: "command" },
701
+ enableRibbonMenuTab: { kind: "command" },
702
+ disableRibbonMenuTab: { kind: "command" },
703
+ setupRibbonMenuItemState: { kind: "command" },
704
+ enableRibbonMenuItem: { kind: "command" },
705
+ disableRibbonMenuItem: { kind: "command" },
676
706
  setRibbonMenuButtonStyle: { kind: "command" },
677
707
  setWatermark: { kind: "command" },
678
708
  setCompactMode: { kind: "command" },
709
+ setRulerVisible: { kind: "command" },
710
+ toggleSidebar: { kind: "command" },
679
711
  enterBookViewMode: {
680
712
  kind: "callbackQuery",
681
713
  mapCallbackResult: () => []
@@ -683,18 +715,27 @@ const ye = /* @__PURE__ */ new Set([2, 5]), Pe = (t) => ({
683
715
  exitBookViewMode: { kind: "command" },
684
716
  isBookViewActivated: {
685
717
  kind: "stateGetter",
686
- state: () => ye.has(t.state.snapshot().pageMode)
718
+ state: () => Ue.has(t.state.snapshot().pageMode)
687
719
  },
688
720
  requestFullScreen: { kind: "command" },
689
721
  exitFullScreen: { kind: "command" },
690
722
  invalidateView: { kind: "command" }
691
723
  });
692
- class De {
724
+ class Be {
693
725
  constructor(n) {
694
- this.showToolbarMenu = () => this.adapter.showToolbarMenu(), this.hideToolbarMenu = () => this.adapter.hideToolbarMenu(), this.setupToolbarMenu = (e) => this.adapter.setupToolbarMenu(e), this.showToolbarMenuItem = (e) => this.adapter.showToolbarMenuItem(e), this.hideToolbarMenuItem = (e) => this.adapter.hideToolbarMenuItem(e), this.setupRibbonMenu = (e) => this.adapter.setupRibbonMenu(e), this.setupRibbonMenuItem = (e, i, a) => this.adapter.setupRibbonMenuItem(e, i, a), this.setupRibbonTitleBar = (e) => this.adapter.setupRibbonTitleBar(e), this.showRibbonMenu = () => this.adapter.showRibbonMenu(), this.hideRibbonMenu = () => this.adapter.hideRibbonMenu(), this.showRibbonMenuItem = (e, i) => this.adapter.showRibbonMenuItem(e, i), this.hideRibbonMenuItem = (e, i) => this.adapter.hideRibbonMenuItem(e, i), this.showRibbonTitleBar = () => this.adapter.showRibbonTitleBar(), this.hideRibbonTitleBar = () => this.adapter.hideRibbonTitleBar(), this.selectRibbonMenu = (e) => this.adapter.selectRibbonMenu(e), this.setRibbonMenuButtonStyle = (e, i) => this.adapter.setRibbonMenuButtonStyle(e, i), this.setWatermark = (e) => this.adapter.setWatermark(e), this.setCompactMode = (e) => this.adapter.setCompactMode(e), this.enterBookViewMode = (e) => this.adapter.enterBookViewMode(e), this.exitBookViewMode = () => this.adapter.exitBookViewMode(), this.isBookViewActivated = () => this.adapter.isBookViewActivated(), this.requestFullScreen = () => this.adapter.requestFullScreen(), this.exitFullScreen = () => this.adapter.exitFullScreen(), this.invalidateView = () => this.adapter.invalidateView(), this.adapter = c("ui", Pe(n), n);
726
+ this.showToolbarMenu = () => (this.warnLegacyRibbonMethod("showToolbarMenu", "showRibbonMenu"), this.showRibbonMenu()), this.hideToolbarMenu = () => (this.warnLegacyRibbonMethod("hideToolbarMenu", "hideRibbonMenu"), this.hideRibbonMenu()), this.setupToolbarMenu = (e) => (this.warnLegacyRibbonMethod(
727
+ "setupToolbarMenu",
728
+ "showRibbonMenu/hideRibbonMenu/setupRibbonMenuTab"
729
+ ), this.setupRibbonMenu(e)), this.showToolbarMenuItem = (e) => (this.warnLegacyRibbonMethod("showToolbarMenuItem", "showRibbonMenuItem"), this.showRibbonMenuItem(e)), this.hideToolbarMenuItem = (e) => (this.warnLegacyRibbonMethod("hideToolbarMenuItem", "hideRibbonMenuItem"), this.hideRibbonMenuItem(e)), this.setupRibbonMenu = (e) => (this.warnLegacyRibbonMethod(
730
+ "setupRibbonMenu",
731
+ "showRibbonMenu/hideRibbonMenu/setupRibbonMenuTab"
732
+ ), typeof e == "boolean" ? e ? this.showRibbonMenu() : this.hideRibbonMenu() : this.setupRibbonMenuTab(e.menu, { visible: e.visible })), this.setupRibbonMenuItem = (e, i, r) => (this.warnLegacyRibbonMethod("setupRibbonMenuItem", "setupRibbonMenuItemState"), this.setupRibbonMenuItemState(e, { visible: i, config: r })), this.setupRibbonTitleBar = (e) => (this.warnLegacyRibbonMethod("setupRibbonTitleBar", "showRibbonTabs/hideRibbonTabs"), e ? this.showRibbonTabs() : this.hideRibbonTabs()), this.showRibbonMenu = () => this.adapter.showRibbonMenu(), this.hideRibbonMenu = () => this.adapter.hideRibbonMenu(), this.showRibbonMenuItem = (e, i) => (this.warnLegacyRibbonMethod("showRibbonMenuItem", "setupRibbonMenuItemState"), this.setupRibbonMenuItemState(e, { visible: !0, config: i })), this.hideRibbonMenuItem = (e, i) => (this.warnLegacyRibbonMethod("hideRibbonMenuItem", "setupRibbonMenuItemState"), this.setupRibbonMenuItemState(e, { visible: !1, config: i })), this.showRibbonTitleBar = () => (this.warnLegacyRibbonMethod("showRibbonTitleBar", "showRibbonTabs"), this.showRibbonTabs()), this.hideRibbonTitleBar = () => (this.warnLegacyRibbonMethod("hideRibbonTitleBar", "hideRibbonTabs"), this.hideRibbonTabs()), this.showRibbonTabs = () => this.adapter.showRibbonTabs(), this.hideRibbonTabs = () => this.adapter.hideRibbonTabs(), this.selectRibbonMenu = (e) => this.adapter.selectRibbonMenu(e), this.setupRibbonMenuTab = (e, i) => this.adapter.setupRibbonMenuTab(e, i), this.showRibbonMenuTab = (e) => this.adapter.showRibbonMenuTab(e), this.hideRibbonMenuTab = (e) => this.adapter.hideRibbonMenuTab(e), this.enableRibbonMenuTab = (e) => this.adapter.enableRibbonMenuTab(e), this.disableRibbonMenuTab = (e) => this.adapter.disableRibbonMenuTab(e), this.setupRibbonMenuItemState = (e, i) => this.adapter.setupRibbonMenuItemState(e, i), this.enableRibbonMenuItem = (e, i) => this.setupRibbonMenuItemState(e, { disabled: !1, config: i }), this.disableRibbonMenuItem = (e, i) => this.setupRibbonMenuItemState(e, { disabled: !0, config: i }), this.setRibbonMenuButtonStyle = (e, i) => this.adapter.setRibbonMenuButtonStyle(e, i), this.setWatermark = (e) => this.adapter.setWatermark(e), this.setCompactMode = (e) => this.adapter.setCompactMode(e), this.setRulerVisible = (e) => this.adapter.setRulerVisible(e), this.toggleSidebar = () => this.adapter.toggleSidebar(), this.enterBookViewMode = (e) => this.adapter.enterBookViewMode(e), this.exitBookViewMode = () => this.adapter.exitBookViewMode(), this.isBookViewActivated = () => this.adapter.isBookViewActivated(), this.requestFullScreen = () => this.adapter.requestFullScreen(), this.exitFullScreen = () => this.adapter.exitFullScreen(), this.invalidateView = () => this.adapter.invalidateView(), this.adapter = d("ui", Ne(n), n);
733
+ }
734
+ warnLegacyRibbonMethod(n, e) {
735
+ console.warn(`[RHC Office SDK] ui.${n} is deprecated. Use ui.${e} instead.`);
695
736
  }
696
737
  }
697
- const Ce = (t) => {
738
+ const xe = (t) => {
698
739
  if (!t)
699
740
  return;
700
741
  const n = t.trim().toLowerCase();
@@ -702,93 +743,92 @@ const Ce = (t) => {
702
743
  return "auto";
703
744
  if (n === "light" || n === "dark" || n === "high-contrast" || n === "auto")
704
745
  return n;
705
- }, x = (t) => {
746
+ }, G = (t) => {
706
747
  const n = new URL(t, globalThis.location?.href ?? "http://localhost/");
707
748
  return n.hash = "", n.pathname.endsWith("/") || (n.pathname = `${n.pathname}/`), n.toString();
708
- }, Ie = (t) => new URL("editors.bootstrap.js", t).toString(), we = (t, n) => {
709
- const e = x(t);
749
+ }, Ve = (t) => new URL("editors.bootstrap.js", t).toString(), Ke = (t, n) => {
750
+ const e = G(t);
710
751
  return {
711
752
  ...n,
712
753
  appUrl: e,
713
- scrollIntoView: n.scrollIntoView ?? !0,
714
- theme: Ce(n.theme)
754
+ theme: xe(n.theme)
715
755
  };
716
- }, u = "rhc-office-editor", T = "__RHC_OFFICE_SDK_READER_LOADER__", B = () => {
756
+ }, g = "rhc-office-editor", R = "__RHC_OFFICE_SDK_READER_LOADER__", q = () => {
717
757
  const t = globalThis;
718
- return t[T] || (t[T] = {
758
+ return t[R] || (t[R] = {
719
759
  activeAppUrl: null,
720
760
  loadPromises: /* @__PURE__ */ new Map()
721
- }), t[T];
722
- }, Me = (t) => Array.from(document.querySelectorAll("script")).find((n) => n.src === t) ?? null;
723
- class y extends Error {
761
+ }), t[R];
762
+ }, Ge = (t) => Array.from(document.querySelectorAll("script")).find((n) => n.src === t) ?? null;
763
+ class D extends Error {
724
764
  constructor(n) {
725
765
  super(`Failed to load reader bootstrap script: ${n}`), this.name = "ReaderScriptLoadError";
726
766
  }
727
767
  }
728
- class Oe extends Error {
768
+ class qe extends Error {
729
769
  constructor(n, e) {
730
770
  super(
731
- `Reader Web Component "${u}" is already bound to ${n} and cannot be reloaded from ${e}.`
771
+ `Reader Web Component "${g}" is already bound to ${n} and cannot be reloaded from ${e}.`
732
772
  ), this.name = "ReaderSourceConflictError";
733
773
  }
734
774
  }
735
- const V = (t) => {
736
- const n = B();
775
+ const H = (t) => {
776
+ const n = q();
737
777
  if (n.activeAppUrl && n.activeAppUrl !== t)
738
- throw new Oe(n.activeAppUrl, t);
739
- }, _e = (t) => {
740
- const n = B();
741
- V(t);
778
+ throw new qe(n.activeAppUrl, t);
779
+ }, He = (t) => {
780
+ const n = q();
781
+ H(t);
742
782
  const e = n.loadPromises.get(t);
743
783
  if (e)
744
784
  return e;
745
- if (globalThis.customElements?.get(u)) {
785
+ if (globalThis.customElements?.get(g)) {
746
786
  n.activeAppUrl = t;
747
787
  const s = Promise.resolve();
748
788
  return n.loadPromises.set(t, s), s;
749
789
  }
750
- const i = Ie(t), a = Me(i);
790
+ const i = Ve(t), r = Ge(i);
751
791
  n.activeAppUrl = t;
752
- const r = new Promise((s, o) => {
753
- const l = (k) => {
754
- k?.remove(), o(new y(i));
755
- }, m = () => {
756
- globalThis.customElements.whenDefined(u).then(() => {
792
+ const a = new Promise((s, o) => {
793
+ const u = (h) => {
794
+ h?.remove(), o(new D(i));
795
+ }, c = () => {
796
+ globalThis.customElements.whenDefined(g).then(() => {
757
797
  s();
758
798
  }).catch(o);
759
799
  };
760
- if (a) {
761
- if (globalThis.customElements?.get(u)) {
800
+ if (r) {
801
+ if (globalThis.customElements?.get(g)) {
762
802
  s();
763
803
  return;
764
804
  }
765
- a.addEventListener(
805
+ r.addEventListener(
766
806
  "error",
767
- () => o(new y(i)),
807
+ () => o(new D(i)),
768
808
  {
769
809
  once: !0
770
810
  }
771
- ), m();
811
+ ), c();
772
812
  return;
773
813
  }
774
- const d = document.createElement("script");
775
- d.src = i, d.async = !0, d.dataset.rhcOfficeSdkReader = t, d.addEventListener("load", m, { once: !0 }), d.addEventListener("error", () => l(d), { once: !0 }), document.head.appendChild(d);
814
+ const l = document.createElement("script");
815
+ l.src = i, l.async = !0, l.dataset.rhcOfficeSdkReader = t, l.addEventListener("load", c, { once: !0 }), l.addEventListener("error", () => u(l), { once: !0 }), document.head.appendChild(l);
776
816
  }).catch((s) => {
777
- throw n.loadPromises.delete(t), !globalThis.customElements?.get(u) && n.activeAppUrl === t && (n.activeAppUrl = null), s;
817
+ throw n.loadPromises.delete(t), !globalThis.customElements?.get(g) && n.activeAppUrl === t && (n.activeAppUrl = null), s;
778
818
  });
779
- return n.loadPromises.set(t, r), r;
780
- }, Fe = 5e3, Le = 5e3, Ue = () => {
819
+ return n.loadPromises.set(t, a), a;
820
+ }, ze = 5e3, Qe = 5e3, We = () => {
781
821
  const t = globalThis.crypto;
782
822
  return typeof t?.randomUUID == "function" ? t.randomUUID() : `adapter-${Date.now()}-${Math.random().toString(36).slice(2)}`;
783
- }, g = () => globalThis[ee];
784
- class Ne extends Error {
823
+ }, p = () => globalThis[de];
824
+ class $e extends Error {
785
825
  constructor(n, e, i) {
786
826
  super(e), this.name = "ReaderBridgeError", this.code = n, this.details = i;
787
827
  }
788
828
  }
789
- class xe {
829
+ class je {
790
830
  constructor(n) {
791
- this.readerId = null, this.readyTimeoutMs = n?.readyTimeoutMs ?? Le, this.requestTimeoutMs = n?.requestTimeoutMs ?? Fe;
831
+ this.readerId = null, this.readyTimeoutMs = n?.readyTimeoutMs ?? Qe, this.requestTimeoutMs = n?.requestTimeoutMs ?? ze;
792
832
  }
793
833
  configureTimeouts(n) {
794
834
  this.readyTimeoutMs = n?.readyTimeoutMs ?? this.readyTimeoutMs, this.requestTimeoutMs = n?.requestTimeoutMs ?? this.requestTimeoutMs;
@@ -799,17 +839,17 @@ class xe {
799
839
  getReaderId() {
800
840
  return this.readerId;
801
841
  }
802
- async request(n, e, i, a) {
803
- const r = await this.requestRaw(n, e, i, a);
804
- if (r.ok)
805
- return r.result;
806
- throw new Ne(
807
- r.error.code,
808
- r.error.message,
809
- r.error.details
842
+ async request(n, e, i, r) {
843
+ const a = await this.requestRaw(n, e, i, r);
844
+ if (a.ok)
845
+ return a.result;
846
+ throw new $e(
847
+ a.error.code,
848
+ a.error.message,
849
+ a.error.details
810
850
  );
811
851
  }
812
- async requestRaw(n, e, i, a) {
852
+ async requestRaw(n, e, i, r) {
813
853
  if (!this.readerId)
814
854
  return {
815
855
  ok: !1,
@@ -819,8 +859,8 @@ class xe {
819
859
  message: "Reader is not mounted."
820
860
  }
821
861
  };
822
- const r = await this.waitForAdapter(this.readerId, a?.timeoutMs);
823
- if (!r)
862
+ const a = await this.waitForAdapter(this.readerId, r?.timeoutMs);
863
+ if (!a)
824
864
  return {
825
865
  ok: !1,
826
866
  requestId: "",
@@ -830,44 +870,47 @@ class xe {
830
870
  }
831
871
  };
832
872
  const s = {
833
- protocol: J,
834
- version: Z,
835
- requestId: Ue(),
873
+ protocol: se,
874
+ version: oe,
875
+ requestId: We(),
836
876
  readerId: this.readerId,
837
877
  tool: n,
838
878
  method: e,
839
879
  params: i
840
880
  };
841
881
  return this.withTimeout(
842
- r.request(s),
882
+ a.request(s),
843
883
  s.requestId,
844
- a?.timeoutMs ?? this.requestTimeoutMs
884
+ r?.timeoutMs ?? this.requestTimeoutMs
845
885
  );
846
886
  }
847
887
  getCapabilities() {
848
- return this.readerId ? g()?.getCapabilities(this.readerId) ?? null : null;
888
+ return this.readerId ? p()?.getCapabilities(this.readerId) ?? null : null;
889
+ }
890
+ async waitForReady(n) {
891
+ return this.readerId ? !!await this.waitForAdapter(this.readerId, n?.timeoutMs) : !1;
849
892
  }
850
893
  async waitForAdapter(n, e = this.readyTimeoutMs) {
851
- const i = g();
852
- return i?.getCapabilities(n) ? i : new Promise((a) => {
853
- let r;
894
+ const i = p();
895
+ return i?.getCapabilities(n) ? i : new Promise((r) => {
896
+ let a;
854
897
  const s = () => {
855
- r && clearTimeout(r), globalThis.removeEventListener(R, o);
856
- }, o = (l) => {
857
- if ((l instanceof CustomEvent ? l.detail : void 0)?.readerId !== n)
898
+ a && clearTimeout(a), globalThis.removeEventListener(P, o);
899
+ }, o = (u) => {
900
+ if ((u instanceof CustomEvent ? u.detail : void 0)?.readerId !== n)
858
901
  return;
859
- const d = g();
860
- s(), a(d ?? null);
902
+ const l = p();
903
+ s(), r(l ?? null);
861
904
  };
862
- globalThis.addEventListener(R, o), r = setTimeout(() => {
863
- s(), a(g()?.getCapabilities(n) ? g() : null);
905
+ globalThis.addEventListener(P, o), a = setTimeout(() => {
906
+ s(), r(p()?.getCapabilities(n) ? p() : null);
864
907
  }, e);
865
908
  });
866
909
  }
867
910
  async withTimeout(n, e, i) {
868
- return new Promise((a) => {
869
- const r = setTimeout(() => {
870
- a({
911
+ return new Promise((r) => {
912
+ const a = setTimeout(() => {
913
+ r({
871
914
  ok: !1,
872
915
  requestId: e,
873
916
  error: {
@@ -876,8 +919,8 @@ class xe {
876
919
  }
877
920
  });
878
921
  }, i);
879
- n.then((s) => a(s)).catch((s) => {
880
- a({
922
+ n.then((s) => r(s)).catch((s) => {
923
+ r({
881
924
  ok: !1,
882
925
  requestId: e,
883
926
  error: {
@@ -886,12 +929,12 @@ class xe {
886
929
  }
887
930
  });
888
931
  }).finally(() => {
889
- clearTimeout(r);
932
+ clearTimeout(a);
890
933
  });
891
934
  });
892
935
  }
893
936
  }
894
- const P = {
937
+ const A = {
895
938
  annotationEnabled: !1,
896
939
  documentModified: !1,
897
940
  documentOpened: !1,
@@ -900,17 +943,19 @@ const P = {
900
943
  pageMode: 0,
901
944
  zoomLevel: 100
902
945
  };
903
- class Be {
946
+ class Ye {
904
947
  constructor() {
905
- this.state = { ...P };
948
+ this.state = { ...A };
906
949
  }
907
950
  reset() {
908
- this.state = { ...P };
951
+ this.state = { ...A };
909
952
  }
910
953
  update(n) {
911
954
  n && (this.state = {
912
955
  ...this.state,
913
- ...n
956
+ ...n,
957
+ annotations: n.annotations ? [...n.annotations] : this.state.annotations,
958
+ digitalSignatures: n.digitalSignatures ? [...n.digitalSignatures] : this.state.digitalSignatures
914
959
  });
915
960
  }
916
961
  setDocumentOpened(n) {
@@ -920,19 +965,46 @@ class Be {
920
965
  };
921
966
  }
922
967
  snapshot() {
923
- return { ...this.state };
968
+ return {
969
+ ...this.state,
970
+ annotations: this.state.annotations ? [...this.state.annotations] : void 0,
971
+ digitalSignatures: this.state.digitalSignatures ? [...this.state.digitalSignatures] : void 0
972
+ };
924
973
  }
925
974
  }
926
- class Ve {
975
+ const Xe = (t) => typeof t == "object" && t !== null && !Array.isArray(t) ? t : void 0, z = (t) => typeof t == "object" && t !== null && !Array.isArray(t), M = (t) => {
976
+ if (!z(t))
977
+ return;
978
+ const n = {};
979
+ return typeof t.currentPage == "number" && (n.currentPage = t.currentPage), typeof t.documentType == "string" && (n.documentType = t.documentType), typeof t.totalPages == "number" ? n.totalPages = t.totalPages : typeof t.pageCount == "number" && (n.totalPages = t.pageCount), typeof t.zoomLevel == "number" && (n.zoomLevel = t.zoomLevel), Object.keys(n).length > 0 ? n : void 0;
980
+ }, Je = (t) => {
981
+ if (!z(t))
982
+ return {
983
+ success: !0,
984
+ status: "ok"
985
+ };
986
+ const n = M(t.state), e = M(t), i = typeof t.error == "string" ? t.error : void 0, r = typeof t.success == "boolean" ? t.success : !i, a = typeof t.status == "string" ? t.status : r ? "ok" : "error";
987
+ return {
988
+ success: r,
989
+ status: a,
990
+ error: i,
991
+ state: n ?? e
992
+ };
993
+ };
994
+ class Ze {
927
995
  constructor() {
928
996
  this.annotationEvents = [], this.annotationPersist = [], this.annotationRetrieve = [], this.digitalAnnotationRetrieve = [], this.digitalSign = [], this.digitalSignatureParse = [], this.digitalSignatureRetrieve = [], this.documentClosed = [], this.documentOpened = [], this.documentSaved = [], this.pageChange = [], this.pageModeChange = [], this.signServerAuth = [];
929
997
  }
930
998
  emit(n, e) {
931
999
  switch (n) {
932
1000
  case "documentOpened":
933
- case "documentLoaded":
934
- this.documentOpened.forEach((i) => i("ok", ""));
1001
+ case "documentLoaded": {
1002
+ const i = Je(e);
1003
+ this.documentOpened.forEach(
1004
+ (r) => r(i.status ?? "ok", i.error ?? "", i)
1005
+ );
935
1006
  return;
1007
+ }
936
1008
  case "documentSaved":
937
1009
  this.documentSaved.forEach((i) => i(e));
938
1010
  return;
@@ -942,19 +1014,22 @@ class Ve {
942
1014
  case "pageChange": {
943
1015
  const i = e;
944
1016
  this.pageChange.forEach(
945
- (a) => a(i.pageIndex ?? 1, i.pageCount ?? 0)
1017
+ (r) => r(i.pageIndex ?? 1, i.pageCount ?? 0)
946
1018
  );
947
1019
  return;
948
1020
  }
949
1021
  case "pageModeChange": {
950
1022
  const i = e;
951
- this.pageModeChange.forEach((a) => a(i.pageMode ?? 0));
1023
+ this.pageModeChange.forEach((r) => r(i.pageMode ?? 0));
952
1024
  return;
953
1025
  }
954
1026
  case "annotationEvent": {
955
1027
  const i = e;
956
1028
  this.annotationEvents.forEach(
957
- (a) => a(i.event ?? "annotationEvent", i.payload)
1029
+ (r) => r(
1030
+ i.event ?? "annotationEvent",
1031
+ Xe(i.payload)
1032
+ )
958
1033
  );
959
1034
  return;
960
1035
  }
@@ -990,15 +1065,15 @@ class Ve {
990
1065
  }
991
1066
  }
992
1067
  }
993
- const Ke = [
1068
+ const et = [
994
1069
  "documentLoaded",
995
1070
  "documentStateChange",
996
1071
  "documentError"
997
- ], Ge = "readerReady", He = "readerUnload", v = "readerError", qe = () => typeof globalThis.crypto?.randomUUID == "function" ? globalThis.crypto.randomUUID() : `rhc-reader-${Date.now()}-${Math.random().toString(36).slice(2)}`, D = (t, n) => ({
1072
+ ], tt = "readerReady", nt = "readerUnload", T = "readerError", it = () => typeof globalThis.crypto?.randomUUID == "function" ? globalThis.crypto.randomUUID() : `rhc-reader-${Date.now()}-${Math.random().toString(36).slice(2)}`, w = (t, n) => ({
998
1073
  appUrl: n?.appUrl ?? null,
999
1074
  configuration: n,
1000
1075
  element: t
1001
- }), Qe = (t) => {
1076
+ }), rt = (t) => {
1002
1077
  if (typeof t == "string") {
1003
1078
  const n = document.getElementById(t);
1004
1079
  if (!n)
@@ -1010,56 +1085,60 @@ const Ke = [
1010
1085
  if (!(t instanceof HTMLDivElement))
1011
1086
  throw new Error("Reader container must be a div element.");
1012
1087
  return t;
1013
- }, ze = () => {
1088
+ }, at = () => {
1014
1089
  const t = typeof globalThis.matchMedia == "function";
1015
1090
  return (t ? globalThis.matchMedia("(prefers-contrast: more)").matches : !1) ? "high-contrast" : (t ? globalThis.matchMedia("(prefers-color-scheme: dark)").matches : !1) ? "dark" : "light";
1016
- }, C = (t, n) => {
1091
+ }, I = (t, n) => {
1017
1092
  const e = t;
1018
1093
  if (typeof e.addEventListener == "function") {
1019
1094
  e.addEventListener("change", n);
1020
1095
  return;
1021
1096
  }
1022
1097
  typeof e.addListener == "function" && e.addListener(n);
1023
- }, I = (t, n) => {
1098
+ }, O = (t, n) => {
1024
1099
  const e = t;
1025
1100
  if (typeof e.removeEventListener == "function") {
1026
1101
  e.removeEventListener("change", n);
1027
1102
  return;
1028
1103
  }
1029
1104
  typeof e.removeListener == "function" && e.removeListener(n);
1030
- }, We = (t, n) => {
1031
- n.style && (t.style.cssText = n.style), t.style.display || (t.style.display = "block"), t.style.width ? n.width && (t.style.width = n.width) : t.style.width = n.width ?? "100%", t.style.height ? n.height && (t.style.height = n.height) : t.style.height = n.height ?? "100%";
1032
- }, $e = (t, n) => {
1033
- const e = n.theme;
1105
+ }, st = (t) => {
1106
+ t.style.display || (t.style.display = "block"), t.style.width || (t.style.width = "100%"), t.style.height || (t.style.height = "100%");
1107
+ }, _ = (t, n) => {
1108
+ const e = n;
1034
1109
  if (!e)
1035
1110
  return t.removeAttribute("theme"), null;
1036
1111
  if (e !== "auto")
1037
1112
  return t.setAttribute("theme", e), null;
1038
1113
  const i = () => {
1039
- t.setAttribute("theme", ze());
1114
+ t.setAttribute("theme", at());
1040
1115
  };
1041
1116
  if (i(), typeof globalThis.matchMedia != "function")
1042
1117
  return null;
1043
- const a = globalThis.matchMedia("(prefers-color-scheme: dark)"), r = globalThis.matchMedia("(prefers-contrast: more)"), s = () => {
1118
+ const r = globalThis.matchMedia("(prefers-color-scheme: dark)"), a = globalThis.matchMedia("(prefers-contrast: more)"), s = () => {
1044
1119
  i();
1045
1120
  };
1046
- return C(a, s), C(r, s), () => {
1047
- I(a, s), I(r, s);
1121
+ return I(r, s), I(a, s), () => {
1122
+ O(r, s), O(a, s);
1048
1123
  };
1049
1124
  };
1050
- class Ye {
1125
+ class ot {
1051
1126
  constructor(n) {
1052
- this.bridge = new xe(), this.callbacks = new Ve(), this.readerState = new Be(), this.bridgeToolContext = {
1127
+ this.bridge = new je(), this.callbacks = new Ze(), this.readerState = new Ye(), this.bridgeToolContext = {
1053
1128
  bridge: this.bridge,
1054
1129
  callbacks: this.callbacks,
1055
1130
  debug: () => this.debugEnabled,
1056
1131
  onAsyncError: (e) => this.reportAdapterError(e),
1057
1132
  state: this.readerState
1058
- }, this.documentTool = new ne(this.bridgeToolContext), this.uiTool = new De(this.bridgeToolContext), this.pageTool = new de(this.bridgeToolContext), this.findTool = new ae(this.bridgeToolContext), this.signServerTool = new Te(this.bridgeToolContext), this.digitalSignTool = new X(this.bridgeToolContext), this.symbologyTool = new Ae(this.bridgeToolContext), this.annotationTool = new W(this.bridgeToolContext), this.templateSignTool = new Ee(this.bridgeToolContext), this.pdfFormFiller = new ce(this.bridgeToolContext), this.networkingTool = new se(this.bridgeToolContext), this.cryptoTool = new Y(this.bridgeToolContext), this.readyCallbacks = [], this.unloadCallbacks = [], this.debugEnabled = !1, this.isReady = !1, this.removed = !1, this.mountToken = 0, this.hostContainer = null, this.readerElement = null, this.readerId = null, this.normalizedConfiguration = null, this.nativeEventCleanupCallbacks = [], this.themeCleanup = null, this.enableDebug = (e) => {
1133
+ }, this.documentTool = new le(this.bridgeToolContext), this.uiTool = new Be(this.bridgeToolContext), this.pageTool = new fe(this.bridgeToolContext), this.pageArrangeTool = new Se(this.bridgeToolContext), this.findTool = new he(this.bridgeToolContext), this.signServerTool = new Ie(this.bridgeToolContext), this.digitalSignTool = new ae(this.bridgeToolContext), this.symbologyTool = new _e(this.bridgeToolContext), this.annotationTool = new te(this.bridgeToolContext), this.templateSignTool = new Fe(this.bridgeToolContext), this.pdfFormFiller = new Te(this.bridgeToolContext), this.networkingTool = new me(this.bridgeToolContext), this.cryptoTool = new ie(this.bridgeToolContext), this.securityTool = new Me(this.bridgeToolContext), this.readyCallbacks = [], this.unloadCallbacks = [], this.debugEnabled = !1, this.isReady = !1, this.removed = !1, this.mountToken = 0, this.hostContainer = null, this.readerElement = null, this.readerId = null, this.normalizedConfiguration = null, this.nativeEventCleanupCallbacks = [], this.themeCleanup = null, this.enableDebug = (e) => {
1059
1134
  this.debugEnabled = e;
1060
- }, this.changeLanguage = () => {
1061
- }, this.setLicense = (e, i) => {
1062
- this.license = { license: e, feature: i };
1135
+ }, this.changeLanguage = (e) => {
1136
+ this.readerElement && this.readerElement.setAttribute("language", e);
1137
+ }, this.setThemeMode = (e) => {
1138
+ this.themeCleanup?.(), this.themeCleanup = null, this.normalizedConfiguration = this.normalizedConfiguration ? {
1139
+ ...this.normalizedConfiguration,
1140
+ theme: e
1141
+ } : null, this.readerElement && (this.themeCleanup = _(this.readerElement, e));
1063
1142
  }, this.setSessionUser = (e) => {
1064
1143
  this.sessionUser = e;
1065
1144
  }, this.setSessionUserId = (e) => {
@@ -1082,50 +1161,57 @@ class Ye {
1082
1161
  this.unloadCallbacks.push(e);
1083
1162
  }, this.setReaderEventListener = (e) => {
1084
1163
  this.readerEventListener = e;
1085
- }, this.embedReader = (e, i, a) => {
1086
- const r = Qe(e), s = x(i);
1087
- V(s);
1088
- const o = we(s, a), l = this.mountToken + 1;
1089
- this.removeReader(), this.mountToken = l, this.removed = !1, this.hostContainer = r, this.normalizedConfiguration = o, this.mountReader(r, o, l);
1164
+ }, this.embedReader = (e, i, r) => {
1165
+ const a = rt(e), s = G(i);
1166
+ H(s);
1167
+ const o = Ke(s, r), u = this.mountToken + 1;
1168
+ this.removeReader(), this.mountToken = u, this.removed = !1, this.hostContainer = a, this.normalizedConfiguration = o, this.mountReader(a, o, u);
1090
1169
  }, this.removeReader = () => {
1091
1170
  const e = !!(this.readerElement || this.hostContainer);
1092
1171
  if (this.mountToken += 1, this.cleanupNativeEventForwarders(), this.cleanupThemeBinding(), this.readerElement?.parentNode && this.readerElement.parentNode.removeChild(this.readerElement), this.readerElement = null, this.readerId = null, this.bridge.setReaderId(null), this.readerState.reset(), this.hostContainer = null, this.normalizedConfiguration = null, this.isReady = !1, this.removed = !0, !e)
1093
1172
  return;
1094
- const i = D(null, null);
1095
- this.emitReaderEvent(He, i), this.unloadCallbacks.forEach((a) => a());
1096
- }, this.getDocumentTool = () => this.documentTool, this.getUITool = () => this.uiTool, this.getPageTool = () => this.pageTool, this.getFindTool = () => this.findTool, this.getSignServerTool = () => this.signServerTool, this.getDigitalSignTool = () => this.digitalSignTool, this.getSymbologyTool = () => this.symbologyTool, this.getAnnotationTool = () => this.annotationTool, this.getTemplateSignTool = () => this.templateSignTool, this.getPdfFormFiller = () => this.pdfFormFiller, this.getNetworkingTool = () => this.networkingTool, this.getCryptoTool = () => this.cryptoTool, this.createDigitalSignOptions = () => new fe(), this.createKVField = (e, i, a) => new Se(e, i, a), this.mountReader = async (e, i, a) => {
1173
+ const i = w(null, null);
1174
+ this.emitReaderEvent(nt, i), this.unloadCallbacks.forEach((r) => r());
1175
+ }, this.getDocumentTool = () => this.documentTool, this.getUITool = () => this.uiTool, this.getPageTool = () => this.pageTool, this.getPageArrangeTool = () => this.pageArrangeTool, this.getFindTool = () => this.findTool, this.getSignServerTool = () => this.signServerTool, this.getDigitalSignTool = () => this.digitalSignTool, this.getSymbologyTool = () => this.symbologyTool, this.getAnnotationTool = () => this.annotationTool, this.getTemplateSignTool = () => this.templateSignTool, this.getPdfFormFiller = () => this.pdfFormFiller, this.getNetworkingTool = () => this.networkingTool, this.getCryptoTool = () => this.cryptoTool, this.getSecurityTool = () => this.securityTool, this.createDigitalSignOptions = () => new De(), this.createKVField = (e, i, r) => new Ce(e, i, r), this.mountReader = async (e, i, r) => {
1097
1176
  try {
1098
- if (await _e(i.appUrl), this.mountToken !== a)
1177
+ if (await He(i.appUrl), this.mountToken !== r)
1178
+ return;
1179
+ const a = document.createElement(g), s = it();
1180
+ a.setAttribute(K, s), this.readerId = s, this.bridge.setReaderId(s), st(a);
1181
+ const o = i.compactViewer === !0 && i.keepPCMenu !== !0;
1182
+ if (a.toggleAttribute("data-sdk-compact-mode", o), a.setAttribute("language", i.language ?? "zh_CN"), this.themeCleanup = _(a, i.theme), this.bindNativeReaderEvents(a), e.replaceChildren(a), this.readerElement = a, await Promise.resolve(), this.mountToken !== r)
1099
1183
  return;
1100
- const r = document.createElement(u), s = qe();
1101
- if (r.setAttribute(N, s), this.readerId = s, this.bridge.setReaderId(s), We(r, i), this.themeCleanup = $e(r, i), this.bindNativeReaderEvents(r), e.replaceChildren(r), this.readerElement = r, await Promise.resolve(), this.mountToken !== a)
1184
+ const u = await this.bridge.waitForReady();
1185
+ if (this.mountToken !== r)
1102
1186
  return;
1103
- i.scrollIntoView && typeof e.scrollIntoView == "function" && e.scrollIntoView({ behavior: "smooth", block: "nearest" }), this.isReady = !0;
1104
- const o = D(r, i);
1105
- this.emitReaderEvent(Ge, o), this.readyCallbacks.forEach((l) => l());
1106
- } catch (r) {
1107
- if (this.mountToken !== a)
1187
+ if (!u)
1188
+ throw new Error("Editor adapter is not available.");
1189
+ this.isReady = !0;
1190
+ const c = w(a, i);
1191
+ this.emitReaderEvent(tt, c), this.readyCallbacks.forEach((l) => l());
1192
+ } catch (a) {
1193
+ if (this.mountToken !== r)
1108
1194
  return;
1109
- this.reportReaderError(r);
1195
+ this.reportReaderError(a);
1110
1196
  }
1111
1197
  }, this.bindNativeReaderEvents = (e) => {
1112
1198
  this.cleanupNativeEventForwarders();
1113
- const i = (a) => {
1114
- const r = a instanceof CustomEvent ? a.detail : null;
1115
- !r || r.readerId !== this.readerId || (this.readerState.update(r.statePatch), this.callbacks.emit(r.event, r.payload), this.emitReaderEvent(r.event, r.payload));
1199
+ const i = (r) => {
1200
+ const a = r instanceof CustomEvent ? r.detail : null;
1201
+ !a || a.readerId !== this.readerId || (this.readerState.update(a.statePatch), this.callbacks.emit(a.event, a.payload), this.emitReaderEvent(a.event, a.payload));
1116
1202
  };
1117
- e.addEventListener(E, i), this.nativeEventCleanupCallbacks.push(() => {
1203
+ e.addEventListener(C, i), this.nativeEventCleanupCallbacks.push(() => {
1118
1204
  e.removeEventListener(
1119
- E,
1205
+ C,
1120
1206
  i
1121
1207
  );
1122
- }), Ke.forEach((a) => {
1123
- const r = (s) => {
1208
+ }), et.forEach((r) => {
1209
+ const a = (s) => {
1124
1210
  const o = s instanceof CustomEvent ? s.detail : s;
1125
- a === "documentLoaded" && this.readerState.setDocumentOpened(!0), this.emitReaderEvent(a, o), a === "documentError" && this.emitReaderEvent(v, o);
1211
+ r === "documentLoaded" && this.readerState.setDocumentOpened(!0), this.emitReaderEvent(r, o), r === "documentError" && this.emitReaderEvent(T, o);
1126
1212
  };
1127
- e.addEventListener(a, r), this.nativeEventCleanupCallbacks.push(() => {
1128
- e.removeEventListener(a, r);
1213
+ e.addEventListener(r, a), this.nativeEventCleanupCallbacks.push(() => {
1214
+ e.removeEventListener(r, a);
1129
1215
  });
1130
1216
  });
1131
1217
  }, this.cleanupNativeEventForwarders = () => {
@@ -1135,41 +1221,41 @@ class Ye {
1135
1221
  }, this.emitReaderEvent = (e, i) => {
1136
1222
  this.readerEventListener?.(e, i);
1137
1223
  }, this.reportReaderError = (e) => {
1138
- this.isReady = !1, this.debugEnabled && console.error("[RHC Office SDK] Reader mount failed", e), this.emitReaderEvent(v, e);
1224
+ this.isReady = !1, this.debugEnabled && console.error("[RHC Office SDK] Reader mount failed", e), this.emitReaderEvent(T, e);
1139
1225
  }, this.reportAdapterError = (e) => {
1140
- this.debugEnabled && console.error("[RHC Office SDK] Adapter command failed", e), this.emitReaderEvent(v, e);
1226
+ this.debugEnabled && console.error("[RHC Office SDK] Adapter command failed", e), this.emitReaderEvent(T, e);
1141
1227
  }, this.bridge.configureTimeouts({
1142
- readyTimeoutMs: n?.adapterReadyTimeoutMs,
1143
- requestTimeoutMs: n?.adapterRequestTimeoutMs
1228
+ readyTimeoutMs: n?.readyTimeoutMs,
1229
+ requestTimeoutMs: n?.requestTimeoutMs
1144
1230
  });
1145
1231
  }
1146
1232
  }
1147
- const it = (t) => new Ye(t);
1233
+ const mt = (t) => new ot(t);
1148
1234
  export {
1149
- W as AnnotationToolImpl,
1150
- Y as CryptoToolImpl,
1151
- tt as DIGITAL_SIGN_DEFAULTS,
1152
- fe as DigitalSignOptions,
1153
- X as DigitalSignToolImpl,
1154
- Ye as DocumentSDK,
1155
- ne as DocumentToolImpl,
1156
- ae as FindToolImpl,
1157
- Se as KVField,
1158
- se as NetworkingToolImpl,
1159
- de as PageToolImpl,
1160
- ce as PdfFormFillerImpl,
1161
- ue as SDKPhase1NotImplementedError,
1162
- Te as SignServerToolImpl,
1163
- Ae as SymbologyToolImpl,
1164
- Ee as TemplateSignToolImpl,
1165
- De as UIToolImpl,
1166
- K as WatermarkDisplay,
1167
- it as createNewDocumentSdk,
1168
- nt as createPhase1ToolPlaceholder,
1169
- je as getDigitalSignEnvironment,
1170
- Xe as initializeDigitalSignEnvironment,
1171
- Ze as patchDigitalSignEnvironment,
1172
- et as resetDigitalSignEnvironment,
1173
- Je as setDigitalSignEnvironment
1235
+ te as AnnotationToolImpl,
1236
+ ie as CryptoToolImpl,
1237
+ gt as DIGITAL_SIGN_DEFAULTS,
1238
+ De as DigitalSignOptions,
1239
+ ae as DigitalSignToolImpl,
1240
+ ot as DocumentSDK,
1241
+ le as DocumentToolImpl,
1242
+ he as FindToolImpl,
1243
+ Ce as KVField,
1244
+ me as NetworkingToolImpl,
1245
+ Se as PageArrangeToolImpl,
1246
+ fe as PageToolImpl,
1247
+ Te as PdfFormFillerImpl,
1248
+ Me as SecurityToolImpl,
1249
+ Ie as SignServerToolImpl,
1250
+ _e as SymbologyToolImpl,
1251
+ Fe as TemplateSignToolImpl,
1252
+ Be as UIToolImpl,
1253
+ W as WatermarkDisplay,
1254
+ mt as createNewDocumentSdk,
1255
+ dt as getDigitalSignEnvironment,
1256
+ ut as initializeDigitalSignEnvironment,
1257
+ ct as patchDigitalSignEnvironment,
1258
+ ht as resetDigitalSignEnvironment,
1259
+ lt as setDigitalSignEnvironment
1174
1260
  };
1175
1261
  //# sourceMappingURL=index.js.map