@rhc-office/sdk 6.6.268 → 6.6.363

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 +187 -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 +19 -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 +469 -359
  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 +8 -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 +10 -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 +257 -140
  54. package/src/api/callbacks.ts +48 -7
  55. package/src/api/document-sdk.ts +9 -5
  56. package/src/api/document-tool.ts +28 -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 +84 -163
  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 +120 -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 F = "RIGHT_CENTER", U = "REGULAR_ESM", N = "auto", k = "__RHC_OFFICE_DIGITAL_SIGN_ENVIRONMENT__", y = {
3
3
  defaults: {
4
4
  bjca: {
5
5
  pin: ""
6
6
  },
7
7
  deviceType: "client",
8
- edgePosition: w,
8
+ edgePosition: F,
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: N,
21
+ signatureType: U
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
+ }, B = (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
+ }), x = (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: B(t.defaults),
79
+ signServer: x(t.signServer)
80
+ }), V = (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
+ } : B(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
+ } : x(t), K = (t, n) => ({
129
+ defaults: $(t.defaults, n.defaults),
130
+ signServer: j(t.signServer, n.signServer)
131
+ }), X = (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();
162
- return t[S] || (t[S] = {
163
- current: h(A),
164
- defaults: h(A),
160
+ }), J = () => globalThis, b = () => {
161
+ const t = J();
162
+ return t[k] || (t[k] = {
163
+ current: m(y),
164
+ defaults: m(y),
165
165
  overrides: {}
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) => {
166
+ }), t[k];
167
+ }, lt = () => b().current, ct = (t) => {
168
+ const n = b();
169
+ return n.defaults = m(t), n.current = K(n.defaults, n.overrides), n.current;
170
+ }, ht = (t) => {
171
+ const n = b();
172
+ return n.current = m(t), n.overrides = V(t), n.current;
173
+ }, gt = (t) => {
174
+ const n = b();
175
+ return n.overrides = X(n.overrides, V(t)), n.current = K(n.current, t), n.current;
176
+ }, mt = (t) => {
177
+ const n = b();
178
+ return t && (n.defaults = m(t)), n.overrides = {}, n.current = m(n.defaults), n.current;
179
+ }, pt = {
180
+ EDGE_POSITION: F,
181
+ RSA_MODE: N,
182
+ SIGNATURE_TYPE: U
183
+ }, R = (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, R(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, R(l)).then((h) => {
208
+ const Y = a.mapCallbackResult?.(h) ?? [h];
209
+ c?.(...Y);
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, R(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
+ ), Z = (t) => typeof t == "object" && t !== null && !Array.isArray(t) && "id" in t, E = (t) => t.annotations?.filter(Z).map((n) => ({ ...n })) ?? [], ee = (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
+ }, te = {
221
245
  addAnnotationEventCallback: {
222
246
  kind: "callbackRegister",
223
247
  callback: (t, n) => {
@@ -225,88 +249,58 @@ 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) => ee(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) => E(t)
250
263
  },
251
- isInAnnotationMode: {
264
+ getAnnotationsCount: {
252
265
  kind: "stateGetter",
253
- state: (t) => t.annotationEnabled
266
+ state: (t) => E(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
+ getCustomStamps: { kind: "query" },
279
+ addCustomTextStamp: { kind: "query" },
280
+ addCustomImageStamp: { kind: "query" },
278
281
  setAnnotationPenColor: { kind: "command" },
279
282
  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" }
283
+ setAnnotationPenStyle: { kind: "command" }
290
284
  };
291
- class W {
285
+ class ne {
292
286
  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(
287
+ 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.getCustomStamps = () => this.adapter.getCustomStamps(), this.addCustomTextStamp = (e) => this.adapter.addCustomTextStamp(e), this.addCustomImageStamp = (e) => this.adapter.addCustomImageStamp(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
288
  "annotation",
295
- z,
289
+ te,
296
290
  n
297
291
  );
298
292
  }
299
293
  }
300
- const $ = {
294
+ const ie = {
301
295
  configSecurityProvider: { kind: "command" },
302
296
  getSecurityProviders: { kind: "query" }
303
297
  };
304
- class Y {
298
+ class re {
305
299
  constructor(n) {
306
- this.configSecurityProvider = (e) => this.adapter.configSecurityProvider(e), this.getSecurityProviders = () => this.adapter.getSecurityProviders(), this.adapter = c("crypto", $, n);
300
+ this.configSecurityProvider = (e) => this.adapter.configSecurityProvider(e), this.getSecurityProviders = () => this.adapter.getSecurityProviders(), this.adapter = d("crypto", ie, n);
307
301
  }
308
302
  }
309
- const j = {
303
+ const P = (t) => t.digitalSignatures ? [...t.digitalSignatures] : [], ae = {
310
304
  addDigitalSignatureRetrieveCallback: {
311
305
  kind: "callbackRegister",
312
306
  callback: (t, n) => {
@@ -341,21 +335,27 @@ const j = {
341
335
  addDigitalSignature: { kind: "callbackQuery" },
342
336
  addDigitalSignatureBySelectedSearchHighlight: { kind: "command" },
343
337
  listDigitalSignatures: { kind: "callbackQuery" },
344
- getDigitalSignatures: { kind: "stateGetter", state: () => [] },
345
- getDigitalSignaturesCount: { kind: "stateGetter", state: () => 0 },
338
+ getDigitalSignatures: {
339
+ kind: "stateGetter",
340
+ state: (t) => P(t)
341
+ },
342
+ getDigitalSignaturesCount: {
343
+ kind: "stateGetter",
344
+ state: (t) => P(t).length
345
+ },
346
346
  enableDigitalSignatureInfoView: { kind: "command" },
347
347
  enableDigitalSignatureRevocation: { kind: "command" }
348
348
  };
349
- class X {
349
+ class se {
350
350
  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(
351
+ 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
352
  "digitalSign",
353
- j,
353
+ ae,
354
354
  n
355
355
  );
356
356
  }
357
357
  }
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 = {
358
+ const oe = "rhc-office.editor-adapter", de = 1, ue = "__RHC_OFFICE_EDITOR_ADAPTER__", C = "rhcOfficeAdapterReady", A = "rhcOfficeAdapterEvent", G = "data-rhc-office-reader-id", le = {
359
359
  addDocumentOpenedCallback: {
360
360
  kind: "callbackRegister",
361
361
  callback: (t, n) => {
@@ -390,10 +390,7 @@ const J = "rhc-office.editor-adapter", Z = 1, ee = "__RHC_OFFICE_EDITOR_ADAPTER_
390
390
  saveAs: { kind: "query" },
391
391
  getDocumentContent: {
392
392
  kind: "callbackQuery",
393
- mapCallbackResult: (t) => {
394
- const n = t;
395
- return [n?.fileCacheId, n?.fileBuffer];
396
- }
393
+ mapCallbackResult: (t) => [t]
397
394
  },
398
395
  closeDocument: { kind: "callbackQuery" },
399
396
  isDocumentOpened: {
@@ -407,9 +404,9 @@ const J = "rhc-office.editor-adapter", Z = 1, ee = "__RHC_OFFICE_EDITOR_ADAPTER_
407
404
  print: { kind: "command" },
408
405
  createPreview: { kind: "command" }
409
406
  };
410
- class ne {
407
+ class ce {
411
408
  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) => {
409
+ 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
410
  const i = this.context.bridge.getReaderId();
414
411
  if (!i)
415
412
  return Promise.resolve({
@@ -418,42 +415,67 @@ class ne {
418
415
  filename: e?.filename,
419
416
  error: "Reader is not mounted or does not expose saveAs."
420
417
  });
421
- const a = document.querySelector(
422
- `[${N}="${i}"]`
418
+ const r = document.querySelector(
419
+ `[${G}="${i}"]`
423
420
  );
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(
421
+ return typeof r?.saveAs == "function" ? r.saveAs(e) : this.adapter.saveAs(e);
422
+ }, 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
423
  "document",
427
- te,
424
+ le,
428
425
  n
429
426
  );
430
427
  }
431
428
  }
432
- const ie = {
429
+ const he = {
433
430
  clearFind: { kind: "command" },
434
431
  findNext: { kind: "command" },
435
432
  findPrevious: { kind: "command" }
436
433
  };
437
- class ae {
434
+ class ge {
438
435
  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);
436
+ this.clearFind = () => this.adapter.clearFind(), this.findNext = (e) => this.adapter.findNext(e), this.findPrevious = (e) => this.adapter.findPrevious(e), this.adapter = d("find", he, n);
440
437
  }
441
438
  }
442
- const re = {
439
+ const me = {
443
440
  configFileUpload: { kind: "command" },
444
441
  setHttpHeaders: { kind: "command" },
445
442
  setHttpFormFields: { kind: "command" }
446
443
  };
447
- class se {
444
+ class pe {
448
445
  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(
446
+ 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
447
  "networking",
451
- re,
448
+ me,
452
449
  n
453
450
  );
454
451
  }
455
452
  }
456
- const oe = (t) => ({
453
+ const be = () => ({
454
+ clearContent: { kind: "command", returnsResult: !0 },
455
+ commit: { kind: "command", returnsResult: !0 },
456
+ deletePages: { kind: "command", returnsResult: !0 },
457
+ duplicatePages: { kind: "command", returnsResult: !0 },
458
+ execute: { kind: "command", returnsResult: !0 },
459
+ extractPages: { kind: "command", returnsResult: !0 },
460
+ getSnapshot: { kind: "query" },
461
+ importDocument: { kind: "command", returnsResult: !0 },
462
+ moveAfter: { kind: "command", returnsResult: !0 },
463
+ moveBefore: { kind: "command", returnsResult: !0 },
464
+ newPage: { kind: "command", returnsResult: !0 },
465
+ rotateLeft: { kind: "command", returnsResult: !0 },
466
+ rotateRight: { kind: "command", returnsResult: !0 },
467
+ undo: { kind: "command", returnsResult: !0 }
468
+ }), Se = (t) => t instanceof Uint8Array ? t : new Uint8Array(t);
469
+ class ke {
470
+ constructor(n) {
471
+ 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(Se(e), i), this.extractPages = (e, i) => this.adapter.extractPages(e, i), this.undo = () => this.adapter.undo(), this.commit = () => this.adapter.commit(), this.adapter = d(
472
+ "pageArrange",
473
+ be(),
474
+ n
475
+ );
476
+ }
477
+ }
478
+ const Re = (t) => ({
457
479
  addPageChangeCallback: {
458
480
  kind: "callbackRegister",
459
481
  callback: (n, e) => {
@@ -503,16 +525,16 @@ const oe = (t) => ({
503
525
  gotoPreviousPage: { kind: "command" },
504
526
  rotatePage: { kind: "command" }
505
527
  });
506
- class de {
528
+ class fe {
507
529
  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(
530
+ 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
531
  "page",
510
- oe(n),
532
+ Re(n),
511
533
  n
512
534
  );
513
535
  }
514
536
  }
515
- const le = {
537
+ const Te = {
516
538
  open: { kind: "command" },
517
539
  setFormFieldValue: { kind: "command" },
518
540
  setFormFieldReadonly: { kind: "command" },
@@ -529,54 +551,39 @@ const le = {
529
551
  mapCallbackResult: (t) => [Array.isArray(t) ? t : []]
530
552
  }
531
553
  };
532
- class ce {
554
+ class ve {
533
555
  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(
556
+ 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
557
  "pdfFormFiller",
536
- le,
558
+ Te,
537
559
  n
538
560
  );
539
561
  }
540
562
  }
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) => {
563
+ const ye = /\s*,\s*/, Ee = /\s*-\s*/, f = (t) => {
557
564
  const n = Number.parseInt(t.trim(), 10);
558
565
  return !Number.isFinite(n) || n <= 0 ? null : n;
559
- }, pe = (t) => {
560
- const n = t.split(ge);
566
+ }, Pe = (t) => {
567
+ const n = t.split(Ee);
561
568
  if (n.length === 1) {
562
- const a = b(n[0] ?? "");
563
- return a ? [a] : [];
569
+ const r = f(n[0] ?? "");
570
+ return r ? [r] : [];
564
571
  }
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 {
572
+ const e = f(n[0] ?? ""), i = f(n[1] ?? "");
573
+ return !e || !i || i < e ? [] : Array.from({ length: i - e + 1 }, (r, a) => e + a);
574
+ }, Ce = (t) => t ? t.split(ye).flatMap((e) => Pe(e)).filter((e, i, r) => r.indexOf(e) === i) : [];
575
+ class Ae {
569
576
  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;
577
+ this.setFieldName = (r) => {
578
+ this.key = r;
579
+ }, this.setFieldValue = (r) => {
580
+ this.value = r;
581
+ }, this.setDescription = (r) => {
582
+ this.description = r;
576
583
  }, this.key = n, this.value = e, this.description = i;
577
584
  }
578
585
  }
579
- class fe {
586
+ class De {
580
587
  constructor() {
581
588
  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
589
  this.signType = n;
@@ -586,7 +593,7 @@ class fe {
586
593
  this.sealPosition = n;
587
594
  }, this.setPageRange = (n) => {
588
595
  this.pageRange = n;
589
- }, this.getPageRange = () => this.pageRange, this.getPageRanges = () => ke(this.pageRange), this.setSignUserData = (n) => {
596
+ }, this.getPageRange = () => this.pageRange, this.getPageRanges = () => Ce(this.pageRange), this.setSignUserData = (n) => {
590
597
  this.signUserData = n;
591
598
  }, this.setPrintMargin = (n) => {
592
599
  this.printMargin = n;
@@ -599,7 +606,23 @@ class fe {
599
606
  };
600
607
  }
601
608
  }
602
- const be = {
609
+ const Me = {
610
+ getSecuritySettings: { kind: "query" },
611
+ isSecuritySettingsLocalEditable: { kind: "query" },
612
+ setSecuritySettingsLocalEditable: { kind: "query" },
613
+ setSecuritySettings: { kind: "query" },
614
+ openSecuritySettingsDialog: { kind: "command" }
615
+ };
616
+ class we {
617
+ constructor(n) {
618
+ 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(
619
+ "security",
620
+ Me,
621
+ n
622
+ );
623
+ }
624
+ }
625
+ const Ie = {
603
626
  setSignServer: { kind: "command" },
604
627
  addSignServerAuthCallback: {
605
628
  kind: "callbackRegister",
@@ -619,28 +642,28 @@ const be = {
619
642
  setSignServerLoginFromUSBKey: { kind: "command" },
620
643
  setUserAuthSource: { kind: "command" }
621
644
  };
622
- class Te {
645
+ class _e {
623
646
  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(
647
+ 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
648
  "signServer",
626
- be,
649
+ Ie,
627
650
  n
628
651
  );
629
652
  }
630
653
  }
631
- const ve = {
654
+ const Oe = {
632
655
  createPDF417Barcode: { kind: "command" }
633
656
  };
634
- class Ae {
657
+ class Le {
635
658
  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(
659
+ this.createPDF417Barcode = (e, i, r, a, s, o, u) => this.adapter.createPDF417Barcode(e, i, r, a, s, o, u), this.adapter = d(
637
660
  "symbology",
638
- ve,
661
+ Oe,
639
662
  n
640
663
  );
641
664
  }
642
665
  }
643
- const Re = {
666
+ const Fe = {
644
667
  setup: { kind: "command" },
645
668
  create: { kind: "command" },
646
669
  getMarkups: { kind: "callbackQuery" },
@@ -648,16 +671,16 @@ const Re = {
648
671
  removeAllMarkups: { kind: "command" },
649
672
  sign: { kind: "callbackQuery" }
650
673
  };
651
- class Ee {
674
+ class Ue {
652
675
  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(
676
+ 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
677
  "templateSign",
655
- Re,
678
+ Fe,
656
679
  n
657
680
  );
658
681
  }
659
682
  }
660
- const ye = /* @__PURE__ */ new Set([2, 5]), Pe = (t) => ({
683
+ const Ne = /* @__PURE__ */ new Set([2, 5]), Be = (t) => ({
661
684
  showToolbarMenu: { kind: "command" },
662
685
  hideToolbarMenu: { kind: "command" },
663
686
  setupToolbarMenu: { kind: "command" },
@@ -672,10 +695,22 @@ const ye = /* @__PURE__ */ new Set([2, 5]), Pe = (t) => ({
672
695
  hideRibbonMenuItem: { kind: "command" },
673
696
  showRibbonTitleBar: { kind: "command" },
674
697
  hideRibbonTitleBar: { kind: "command" },
698
+ showRibbonTabs: { kind: "command" },
699
+ hideRibbonTabs: { kind: "command" },
675
700
  selectRibbonMenu: { kind: "command" },
701
+ setupRibbonMenuTab: { kind: "command" },
702
+ showRibbonMenuTab: { kind: "command" },
703
+ hideRibbonMenuTab: { kind: "command" },
704
+ enableRibbonMenuTab: { kind: "command" },
705
+ disableRibbonMenuTab: { kind: "command" },
706
+ setupRibbonMenuItemState: { kind: "command" },
707
+ enableRibbonMenuItem: { kind: "command" },
708
+ disableRibbonMenuItem: { kind: "command" },
676
709
  setRibbonMenuButtonStyle: { kind: "command" },
677
710
  setWatermark: { kind: "command" },
678
711
  setCompactMode: { kind: "command" },
712
+ setRulerVisible: { kind: "command" },
713
+ toggleSidebar: { kind: "command" },
679
714
  enterBookViewMode: {
680
715
  kind: "callbackQuery",
681
716
  mapCallbackResult: () => []
@@ -683,18 +718,27 @@ const ye = /* @__PURE__ */ new Set([2, 5]), Pe = (t) => ({
683
718
  exitBookViewMode: { kind: "command" },
684
719
  isBookViewActivated: {
685
720
  kind: "stateGetter",
686
- state: () => ye.has(t.state.snapshot().pageMode)
721
+ state: () => Ne.has(t.state.snapshot().pageMode)
687
722
  },
688
723
  requestFullScreen: { kind: "command" },
689
724
  exitFullScreen: { kind: "command" },
690
725
  invalidateView: { kind: "command" }
691
726
  });
692
- class De {
727
+ class xe {
693
728
  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);
729
+ this.showToolbarMenu = () => (this.warnLegacyRibbonMethod("showToolbarMenu", "showRibbonMenu"), this.showRibbonMenu()), this.hideToolbarMenu = () => (this.warnLegacyRibbonMethod("hideToolbarMenu", "hideRibbonMenu"), this.hideRibbonMenu()), this.setupToolbarMenu = (e) => (this.warnLegacyRibbonMethod(
730
+ "setupToolbarMenu",
731
+ "showRibbonMenu/hideRibbonMenu/setupRibbonMenuTab"
732
+ ), 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(
733
+ "setupRibbonMenu",
734
+ "showRibbonMenu/hideRibbonMenu/setupRibbonMenuTab"
735
+ ), 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", Be(n), n);
736
+ }
737
+ warnLegacyRibbonMethod(n, e) {
738
+ console.warn(`[RHC Office SDK] ui.${n} is deprecated. Use ui.${e} instead.`);
695
739
  }
696
740
  }
697
- const Ce = (t) => {
741
+ const Ve = (t) => {
698
742
  if (!t)
699
743
  return;
700
744
  const n = t.trim().toLowerCase();
@@ -702,93 +746,92 @@ const Ce = (t) => {
702
746
  return "auto";
703
747
  if (n === "light" || n === "dark" || n === "high-contrast" || n === "auto")
704
748
  return n;
705
- }, x = (t) => {
749
+ }, q = (t) => {
706
750
  const n = new URL(t, globalThis.location?.href ?? "http://localhost/");
707
751
  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);
752
+ }, Ke = (t) => new URL("editors.bootstrap.js", t).toString(), Ge = (t, n) => {
753
+ const e = q(t);
710
754
  return {
711
755
  ...n,
712
756
  appUrl: e,
713
- scrollIntoView: n.scrollIntoView ?? !0,
714
- theme: Ce(n.theme)
757
+ theme: Ve(n.theme)
715
758
  };
716
- }, u = "rhc-office-editor", T = "__RHC_OFFICE_SDK_READER_LOADER__", B = () => {
759
+ }, g = "rhc-office-editor", T = "__RHC_OFFICE_SDK_READER_LOADER__", H = () => {
717
760
  const t = globalThis;
718
761
  return t[T] || (t[T] = {
719
762
  activeAppUrl: null,
720
763
  loadPromises: /* @__PURE__ */ new Map()
721
764
  }), t[T];
722
- }, Me = (t) => Array.from(document.querySelectorAll("script")).find((n) => n.src === t) ?? null;
723
- class y extends Error {
765
+ }, qe = (t) => Array.from(document.querySelectorAll("script")).find((n) => n.src === t) ?? null;
766
+ class D extends Error {
724
767
  constructor(n) {
725
768
  super(`Failed to load reader bootstrap script: ${n}`), this.name = "ReaderScriptLoadError";
726
769
  }
727
770
  }
728
- class Oe extends Error {
771
+ class He extends Error {
729
772
  constructor(n, e) {
730
773
  super(
731
- `Reader Web Component "${u}" is already bound to ${n} and cannot be reloaded from ${e}.`
774
+ `Reader Web Component "${g}" is already bound to ${n} and cannot be reloaded from ${e}.`
732
775
  ), this.name = "ReaderSourceConflictError";
733
776
  }
734
777
  }
735
- const V = (t) => {
736
- const n = B();
778
+ const z = (t) => {
779
+ const n = H();
737
780
  if (n.activeAppUrl && n.activeAppUrl !== t)
738
- throw new Oe(n.activeAppUrl, t);
739
- }, _e = (t) => {
740
- const n = B();
741
- V(t);
781
+ throw new He(n.activeAppUrl, t);
782
+ }, ze = (t) => {
783
+ const n = H();
784
+ z(t);
742
785
  const e = n.loadPromises.get(t);
743
786
  if (e)
744
787
  return e;
745
- if (globalThis.customElements?.get(u)) {
788
+ if (globalThis.customElements?.get(g)) {
746
789
  n.activeAppUrl = t;
747
790
  const s = Promise.resolve();
748
791
  return n.loadPromises.set(t, s), s;
749
792
  }
750
- const i = Ie(t), a = Me(i);
793
+ const i = Ke(t), r = qe(i);
751
794
  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(() => {
795
+ const a = new Promise((s, o) => {
796
+ const u = (h) => {
797
+ h?.remove(), o(new D(i));
798
+ }, c = () => {
799
+ globalThis.customElements.whenDefined(g).then(() => {
757
800
  s();
758
801
  }).catch(o);
759
802
  };
760
- if (a) {
761
- if (globalThis.customElements?.get(u)) {
803
+ if (r) {
804
+ if (globalThis.customElements?.get(g)) {
762
805
  s();
763
806
  return;
764
807
  }
765
- a.addEventListener(
808
+ r.addEventListener(
766
809
  "error",
767
- () => o(new y(i)),
810
+ () => o(new D(i)),
768
811
  {
769
812
  once: !0
770
813
  }
771
- ), m();
814
+ ), c();
772
815
  return;
773
816
  }
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);
817
+ const l = document.createElement("script");
818
+ 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
819
  }).catch((s) => {
777
- throw n.loadPromises.delete(t), !globalThis.customElements?.get(u) && n.activeAppUrl === t && (n.activeAppUrl = null), s;
820
+ throw n.loadPromises.delete(t), !globalThis.customElements?.get(g) && n.activeAppUrl === t && (n.activeAppUrl = null), s;
778
821
  });
779
- return n.loadPromises.set(t, r), r;
780
- }, Fe = 5e3, Le = 5e3, Ue = () => {
822
+ return n.loadPromises.set(t, a), a;
823
+ }, Qe = 5e3, Ye = 5e3, We = () => {
781
824
  const t = globalThis.crypto;
782
825
  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 {
826
+ }, p = () => globalThis[ue];
827
+ class $e extends Error {
785
828
  constructor(n, e, i) {
786
829
  super(e), this.name = "ReaderBridgeError", this.code = n, this.details = i;
787
830
  }
788
831
  }
789
- class xe {
832
+ class je {
790
833
  constructor(n) {
791
- this.readerId = null, this.readyTimeoutMs = n?.readyTimeoutMs ?? Le, this.requestTimeoutMs = n?.requestTimeoutMs ?? Fe;
834
+ this.readerId = null, this.readyTimeoutMs = n?.readyTimeoutMs ?? Ye, this.requestTimeoutMs = n?.requestTimeoutMs ?? Qe;
792
835
  }
793
836
  configureTimeouts(n) {
794
837
  this.readyTimeoutMs = n?.readyTimeoutMs ?? this.readyTimeoutMs, this.requestTimeoutMs = n?.requestTimeoutMs ?? this.requestTimeoutMs;
@@ -799,17 +842,17 @@ class xe {
799
842
  getReaderId() {
800
843
  return this.readerId;
801
844
  }
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
845
+ async request(n, e, i, r) {
846
+ const a = await this.requestRaw(n, e, i, r);
847
+ if (a.ok)
848
+ return a.result;
849
+ throw new $e(
850
+ a.error.code,
851
+ a.error.message,
852
+ a.error.details
810
853
  );
811
854
  }
812
- async requestRaw(n, e, i, a) {
855
+ async requestRaw(n, e, i, r) {
813
856
  if (!this.readerId)
814
857
  return {
815
858
  ok: !1,
@@ -819,8 +862,8 @@ class xe {
819
862
  message: "Reader is not mounted."
820
863
  }
821
864
  };
822
- const r = await this.waitForAdapter(this.readerId, a?.timeoutMs);
823
- if (!r)
865
+ const a = await this.waitForAdapter(this.readerId, r?.timeoutMs);
866
+ if (!a)
824
867
  return {
825
868
  ok: !1,
826
869
  requestId: "",
@@ -830,44 +873,47 @@ class xe {
830
873
  }
831
874
  };
832
875
  const s = {
833
- protocol: J,
834
- version: Z,
835
- requestId: Ue(),
876
+ protocol: oe,
877
+ version: de,
878
+ requestId: We(),
836
879
  readerId: this.readerId,
837
880
  tool: n,
838
881
  method: e,
839
882
  params: i
840
883
  };
841
884
  return this.withTimeout(
842
- r.request(s),
885
+ a.request(s),
843
886
  s.requestId,
844
- a?.timeoutMs ?? this.requestTimeoutMs
887
+ r?.timeoutMs ?? this.requestTimeoutMs
845
888
  );
846
889
  }
847
890
  getCapabilities() {
848
- return this.readerId ? g()?.getCapabilities(this.readerId) ?? null : null;
891
+ return this.readerId ? p()?.getCapabilities(this.readerId) ?? null : null;
892
+ }
893
+ async waitForReady(n) {
894
+ return this.readerId ? !!await this.waitForAdapter(this.readerId, n?.timeoutMs) : !1;
849
895
  }
850
896
  async waitForAdapter(n, e = this.readyTimeoutMs) {
851
- const i = g();
852
- return i?.getCapabilities(n) ? i : new Promise((a) => {
853
- let r;
897
+ const i = p();
898
+ return i?.getCapabilities(n) ? i : new Promise((r) => {
899
+ let a;
854
900
  const s = () => {
855
- r && clearTimeout(r), globalThis.removeEventListener(R, o);
856
- }, o = (l) => {
857
- if ((l instanceof CustomEvent ? l.detail : void 0)?.readerId !== n)
901
+ a && clearTimeout(a), globalThis.removeEventListener(C, o);
902
+ }, o = (u) => {
903
+ if ((u instanceof CustomEvent ? u.detail : void 0)?.readerId !== n)
858
904
  return;
859
- const d = g();
860
- s(), a(d ?? null);
905
+ const l = p();
906
+ s(), r(l ?? null);
861
907
  };
862
- globalThis.addEventListener(R, o), r = setTimeout(() => {
863
- s(), a(g()?.getCapabilities(n) ? g() : null);
908
+ globalThis.addEventListener(C, o), a = setTimeout(() => {
909
+ s(), r(p()?.getCapabilities(n) ? p() : null);
864
910
  }, e);
865
911
  });
866
912
  }
867
913
  async withTimeout(n, e, i) {
868
- return new Promise((a) => {
869
- const r = setTimeout(() => {
870
- a({
914
+ return new Promise((r) => {
915
+ const a = setTimeout(() => {
916
+ r({
871
917
  ok: !1,
872
918
  requestId: e,
873
919
  error: {
@@ -876,8 +922,8 @@ class xe {
876
922
  }
877
923
  });
878
924
  }, i);
879
- n.then((s) => a(s)).catch((s) => {
880
- a({
925
+ n.then((s) => r(s)).catch((s) => {
926
+ r({
881
927
  ok: !1,
882
928
  requestId: e,
883
929
  error: {
@@ -886,12 +932,12 @@ class xe {
886
932
  }
887
933
  });
888
934
  }).finally(() => {
889
- clearTimeout(r);
935
+ clearTimeout(a);
890
936
  });
891
937
  });
892
938
  }
893
939
  }
894
- const P = {
940
+ const M = {
895
941
  annotationEnabled: !1,
896
942
  documentModified: !1,
897
943
  documentOpened: !1,
@@ -900,17 +946,19 @@ const P = {
900
946
  pageMode: 0,
901
947
  zoomLevel: 100
902
948
  };
903
- class Be {
949
+ class Xe {
904
950
  constructor() {
905
- this.state = { ...P };
951
+ this.state = { ...M };
906
952
  }
907
953
  reset() {
908
- this.state = { ...P };
954
+ this.state = { ...M };
909
955
  }
910
956
  update(n) {
911
957
  n && (this.state = {
912
958
  ...this.state,
913
- ...n
959
+ ...n,
960
+ annotations: n.annotations ? [...n.annotations] : this.state.annotations,
961
+ digitalSignatures: n.digitalSignatures ? [...n.digitalSignatures] : this.state.digitalSignatures
914
962
  });
915
963
  }
916
964
  setDocumentOpened(n) {
@@ -920,19 +968,46 @@ class Be {
920
968
  };
921
969
  }
922
970
  snapshot() {
923
- return { ...this.state };
971
+ return {
972
+ ...this.state,
973
+ annotations: this.state.annotations ? [...this.state.annotations] : void 0,
974
+ digitalSignatures: this.state.digitalSignatures ? [...this.state.digitalSignatures] : void 0
975
+ };
924
976
  }
925
977
  }
926
- class Ve {
978
+ const Je = (t) => typeof t == "object" && t !== null && !Array.isArray(t) ? t : void 0, Q = (t) => typeof t == "object" && t !== null && !Array.isArray(t), w = (t) => {
979
+ if (!Q(t))
980
+ return;
981
+ const n = {};
982
+ 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;
983
+ }, Ze = (t) => {
984
+ if (!Q(t))
985
+ return {
986
+ success: !0,
987
+ status: "ok"
988
+ };
989
+ const n = w(t.state), e = w(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";
990
+ return {
991
+ success: r,
992
+ status: a,
993
+ error: i,
994
+ state: n ?? e
995
+ };
996
+ };
997
+ class et {
927
998
  constructor() {
928
999
  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
1000
  }
930
1001
  emit(n, e) {
931
1002
  switch (n) {
932
1003
  case "documentOpened":
933
- case "documentLoaded":
934
- this.documentOpened.forEach((i) => i("ok", ""));
1004
+ case "documentLoaded": {
1005
+ const i = Ze(e);
1006
+ this.documentOpened.forEach(
1007
+ (r) => r(i.status ?? "ok", i.error ?? "", i)
1008
+ );
935
1009
  return;
1010
+ }
936
1011
  case "documentSaved":
937
1012
  this.documentSaved.forEach((i) => i(e));
938
1013
  return;
@@ -942,19 +1017,22 @@ class Ve {
942
1017
  case "pageChange": {
943
1018
  const i = e;
944
1019
  this.pageChange.forEach(
945
- (a) => a(i.pageIndex ?? 1, i.pageCount ?? 0)
1020
+ (r) => r(i.pageIndex ?? 1, i.pageCount ?? 0)
946
1021
  );
947
1022
  return;
948
1023
  }
949
1024
  case "pageModeChange": {
950
1025
  const i = e;
951
- this.pageModeChange.forEach((a) => a(i.pageMode ?? 0));
1026
+ this.pageModeChange.forEach((r) => r(i.pageMode ?? 0));
952
1027
  return;
953
1028
  }
954
1029
  case "annotationEvent": {
955
1030
  const i = e;
956
1031
  this.annotationEvents.forEach(
957
- (a) => a(i.event ?? "annotationEvent", i.payload)
1032
+ (r) => r(
1033
+ i.event ?? "annotationEvent",
1034
+ Je(i.payload)
1035
+ )
958
1036
  );
959
1037
  return;
960
1038
  }
@@ -990,15 +1068,15 @@ class Ve {
990
1068
  }
991
1069
  }
992
1070
  }
993
- const Ke = [
1071
+ const S = "__RHC_OFFICE_READER_RUNTIME__", tt = "__rhcOfficeReaderRuntimeConfig", nt = [
994
1072
  "documentLoaded",
995
1073
  "documentStateChange",
996
1074
  "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) => ({
1075
+ ], it = "readerReady", rt = "readerUnload", v = "readerError", at = () => typeof globalThis.crypto?.randomUUID == "function" ? globalThis.crypto.randomUUID() : `rhc-reader-${Date.now()}-${Math.random().toString(36).slice(2)}`, I = (t, n) => ({
998
1076
  appUrl: n?.appUrl ?? null,
999
1077
  configuration: n,
1000
1078
  element: t
1001
- }), Qe = (t) => {
1079
+ }), st = (t) => {
1002
1080
  if (typeof t == "string") {
1003
1081
  const n = document.getElementById(t);
1004
1082
  if (!n)
@@ -1010,56 +1088,60 @@ const Ke = [
1010
1088
  if (!(t instanceof HTMLDivElement))
1011
1089
  throw new Error("Reader container must be a div element.");
1012
1090
  return t;
1013
- }, ze = () => {
1091
+ }, ot = () => {
1014
1092
  const t = typeof globalThis.matchMedia == "function";
1015
1093
  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) => {
1094
+ }, _ = (t, n) => {
1017
1095
  const e = t;
1018
1096
  if (typeof e.addEventListener == "function") {
1019
1097
  e.addEventListener("change", n);
1020
1098
  return;
1021
1099
  }
1022
1100
  typeof e.addListener == "function" && e.addListener(n);
1023
- }, I = (t, n) => {
1101
+ }, O = (t, n) => {
1024
1102
  const e = t;
1025
1103
  if (typeof e.removeEventListener == "function") {
1026
1104
  e.removeEventListener("change", n);
1027
1105
  return;
1028
1106
  }
1029
1107
  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;
1108
+ }, dt = (t) => {
1109
+ t.style.display || (t.style.display = "block"), t.style.width || (t.style.width = "100%"), t.style.height || (t.style.height = "100%");
1110
+ }, L = (t, n) => {
1111
+ const e = n;
1034
1112
  if (!e)
1035
1113
  return t.removeAttribute("theme"), null;
1036
1114
  if (e !== "auto")
1037
1115
  return t.setAttribute("theme", e), null;
1038
1116
  const i = () => {
1039
- t.setAttribute("theme", ze());
1117
+ t.setAttribute("theme", ot());
1040
1118
  };
1041
1119
  if (i(), typeof globalThis.matchMedia != "function")
1042
1120
  return null;
1043
- const a = globalThis.matchMedia("(prefers-color-scheme: dark)"), r = globalThis.matchMedia("(prefers-contrast: more)"), s = () => {
1121
+ const r = globalThis.matchMedia("(prefers-color-scheme: dark)"), a = globalThis.matchMedia("(prefers-contrast: more)"), s = () => {
1044
1122
  i();
1045
1123
  };
1046
- return C(a, s), C(r, s), () => {
1047
- I(a, s), I(r, s);
1124
+ return _(r, s), _(a, s), () => {
1125
+ O(r, s), O(a, s);
1048
1126
  };
1049
1127
  };
1050
- class Ye {
1128
+ class ut {
1051
1129
  constructor(n) {
1052
- this.bridge = new xe(), this.callbacks = new Ve(), this.readerState = new Be(), this.bridgeToolContext = {
1130
+ this.bridge = new je(), this.callbacks = new et(), this.readerState = new Xe(), this.bridgeToolContext = {
1053
1131
  bridge: this.bridge,
1054
1132
  callbacks: this.callbacks,
1055
1133
  debug: () => this.debugEnabled,
1056
1134
  onAsyncError: (e) => this.reportAdapterError(e),
1057
1135
  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) => {
1136
+ }, this.documentTool = new ce(this.bridgeToolContext), this.uiTool = new xe(this.bridgeToolContext), this.pageTool = new fe(this.bridgeToolContext), this.pageArrangeTool = new ke(this.bridgeToolContext), this.findTool = new ge(this.bridgeToolContext), this.signServerTool = new _e(this.bridgeToolContext), this.digitalSignTool = new se(this.bridgeToolContext), this.symbologyTool = new Le(this.bridgeToolContext), this.annotationTool = new ne(this.bridgeToolContext), this.templateSignTool = new Ue(this.bridgeToolContext), this.pdfFormFiller = new ve(this.bridgeToolContext), this.networkingTool = new pe(this.bridgeToolContext), this.cryptoTool = new re(this.bridgeToolContext), this.securityTool = new we(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.runtimeRestoreState = null, this.nativeEventCleanupCallbacks = [], this.themeCleanup = null, this.enableDebug = (e) => {
1059
1137
  this.debugEnabled = e;
1060
- }, this.changeLanguage = () => {
1061
- }, this.setLicense = (e, i) => {
1062
- this.license = { license: e, feature: i };
1138
+ }, this.changeLanguage = (e) => {
1139
+ this.readerElement && this.readerElement.setAttribute("language", e);
1140
+ }, this.setThemeMode = (e) => {
1141
+ this.themeCleanup?.(), this.themeCleanup = null, this.normalizedConfiguration = this.normalizedConfiguration ? {
1142
+ ...this.normalizedConfiguration,
1143
+ theme: e
1144
+ } : null, this.readerElement && (this.themeCleanup = L(this.readerElement, e));
1063
1145
  }, this.setSessionUser = (e) => {
1064
1146
  this.sessionUser = e;
1065
1147
  }, this.setSessionUserId = (e) => {
@@ -1082,50 +1164,57 @@ class Ye {
1082
1164
  this.unloadCallbacks.push(e);
1083
1165
  }, this.setReaderEventListener = (e) => {
1084
1166
  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);
1167
+ }, this.embedReader = (e, i, r) => {
1168
+ const a = st(e), s = q(i);
1169
+ z(s);
1170
+ const o = Ge(s, r), u = this.mountToken + 1;
1171
+ this.removeReader(), this.mountToken = u, this.removed = !1, this.hostContainer = a, this.normalizedConfiguration = o, this.mountReader(a, o, u);
1090
1172
  }, this.removeReader = () => {
1091
1173
  const e = !!(this.readerElement || this.hostContainer);
1092
- 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)
1174
+ if (this.mountToken += 1, this.cleanupNativeEventForwarders(), this.cleanupThemeBinding(), this.restoreReaderRuntimeConfig(), 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
1175
  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) => {
1176
+ const i = I(null, null);
1177
+ this.emitReaderEvent(rt, i), this.unloadCallbacks.forEach((r) => r());
1178
+ }, 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 Ae(e, i, r), this.mountReader = async (e, i, r) => {
1097
1179
  try {
1098
- if (await _e(i.appUrl), this.mountToken !== a)
1180
+ if (await ze(i.appUrl), this.mountToken !== r)
1099
1181
  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)
1182
+ const a = document.createElement(g), s = at();
1183
+ a.setAttribute(G, s), this.readerId = s, this.bridge.setReaderId(s), dt(a), this.applyReaderRuntimeConfig(a, i);
1184
+ const o = i.compactViewer === !0 && i.keepPCMenu !== !0;
1185
+ if (a.toggleAttribute("data-sdk-compact-mode", o), a.setAttribute("language", i.language ?? "zh_CN"), this.themeCleanup = L(a, i.theme), this.bindNativeReaderEvents(a), e.replaceChildren(a), this.readerElement = a, await Promise.resolve(), 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
+ const u = await this.bridge.waitForReady();
1188
+ if (this.mountToken !== r)
1108
1189
  return;
1109
- this.reportReaderError(r);
1190
+ if (!u)
1191
+ throw new Error("Editor adapter is not available.");
1192
+ this.isReady = !0;
1193
+ const c = I(a, i);
1194
+ this.emitReaderEvent(it, c), this.readyCallbacks.forEach((l) => l());
1195
+ } catch (a) {
1196
+ if (this.mountToken !== r)
1197
+ return;
1198
+ this.reportReaderError(a);
1110
1199
  }
1111
1200
  }, this.bindNativeReaderEvents = (e) => {
1112
1201
  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));
1202
+ const i = (r) => {
1203
+ const a = r instanceof CustomEvent ? r.detail : null;
1204
+ !a || a.readerId !== this.readerId || (this.readerState.update(a.statePatch), this.callbacks.emit(a.event, a.payload), this.emitReaderEvent(a.event, a.payload));
1116
1205
  };
1117
- e.addEventListener(E, i), this.nativeEventCleanupCallbacks.push(() => {
1206
+ e.addEventListener(A, i), this.nativeEventCleanupCallbacks.push(() => {
1118
1207
  e.removeEventListener(
1119
- E,
1208
+ A,
1120
1209
  i
1121
1210
  );
1122
- }), Ke.forEach((a) => {
1123
- const r = (s) => {
1211
+ }), nt.forEach((r) => {
1212
+ const a = (s) => {
1124
1213
  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);
1214
+ r === "documentLoaded" && this.readerState.setDocumentOpened(!0), this.emitReaderEvent(r, o), r === "documentError" && this.emitReaderEvent(v, o);
1126
1215
  };
1127
- e.addEventListener(a, r), this.nativeEventCleanupCallbacks.push(() => {
1128
- e.removeEventListener(a, r);
1216
+ e.addEventListener(r, a), this.nativeEventCleanupCallbacks.push(() => {
1217
+ e.removeEventListener(r, a);
1129
1218
  });
1130
1219
  });
1131
1220
  }, this.cleanupNativeEventForwarders = () => {
@@ -1139,37 +1228,58 @@ class Ye {
1139
1228
  }, this.reportAdapterError = (e) => {
1140
1229
  this.debugEnabled && console.error("[RHC Office SDK] Adapter command failed", e), this.emitReaderEvent(v, e);
1141
1230
  }, this.bridge.configureTimeouts({
1142
- readyTimeoutMs: n?.adapterReadyTimeoutMs,
1143
- requestTimeoutMs: n?.adapterRequestTimeoutMs
1231
+ readyTimeoutMs: n?.readyTimeoutMs,
1232
+ requestTimeoutMs: n?.requestTimeoutMs
1144
1233
  });
1145
1234
  }
1235
+ applyReaderRuntimeConfig(n, e) {
1236
+ this.restoreReaderRuntimeConfig();
1237
+ const i = {
1238
+ hostKind: "server",
1239
+ server: {
1240
+ baseUrl: e.appUrl
1241
+ }
1242
+ }, r = n;
1243
+ r[tt] = i;
1244
+ const a = globalThis, s = a[S];
1245
+ this.runtimeRestoreState = {
1246
+ hadPreviousRuntime: s !== void 0,
1247
+ ...s !== void 0 ? { previousRuntime: s } : {}
1248
+ }, a[S] = i;
1249
+ }
1250
+ restoreReaderRuntimeConfig() {
1251
+ if (!this.runtimeRestoreState)
1252
+ return;
1253
+ const n = globalThis;
1254
+ this.runtimeRestoreState.hadPreviousRuntime ? n[S] = this.runtimeRestoreState.previousRuntime : Reflect.deleteProperty(n, S), this.runtimeRestoreState = null;
1255
+ }
1146
1256
  }
1147
- const it = (t) => new Ye(t);
1257
+ const bt = (t) => new ut(t);
1148
1258
  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
1259
+ ne as AnnotationToolImpl,
1260
+ re as CryptoToolImpl,
1261
+ pt as DIGITAL_SIGN_DEFAULTS,
1262
+ De as DigitalSignOptions,
1263
+ se as DigitalSignToolImpl,
1264
+ ut as DocumentSDK,
1265
+ ce as DocumentToolImpl,
1266
+ ge as FindToolImpl,
1267
+ Ae as KVField,
1268
+ pe as NetworkingToolImpl,
1269
+ ke as PageArrangeToolImpl,
1270
+ fe as PageToolImpl,
1271
+ ve as PdfFormFillerImpl,
1272
+ we as SecurityToolImpl,
1273
+ _e as SignServerToolImpl,
1274
+ Le as SymbologyToolImpl,
1275
+ Ue as TemplateSignToolImpl,
1276
+ xe as UIToolImpl,
1277
+ W as WatermarkDisplay,
1278
+ bt as createNewDocumentSdk,
1279
+ lt as getDigitalSignEnvironment,
1280
+ ct as initializeDigitalSignEnvironment,
1281
+ gt as patchDigitalSignEnvironment,
1282
+ mt as resetDigitalSignEnvironment,
1283
+ ht as setDigitalSignEnvironment
1174
1284
  };
1175
1285
  //# sourceMappingURL=index.js.map