docx 8.3.0 → 8.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/file/core-properties/properties.d.ts +3 -0
- package/build/file/document/body/section-properties/properties/line-number.d.ts +3 -5
- package/build/file/document-wrapper.d.ts +2 -1
- package/build/file/drawing/anchor/anchor.d.ts +5 -1
- package/build/file/drawing/drawing.d.ts +4 -2
- package/build/file/drawing/effect-extent/effect-extent.d.ts +7 -3
- package/build/file/drawing/inline/graphic/graphic-data/graphic-data.d.ts +6 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/pic.d.ts +6 -1
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/no-fill.d.ts +1 -3
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.d.ts +41 -3
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/rgb-color.d.ts +6 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/scheme-color.d.ts +25 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.d.ts +12 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.spec.d.ts +1 -0
- package/build/file/drawing/inline/graphic/graphic-data/pic/shape-properties/shape-properties.d.ts +5 -1
- package/build/file/drawing/inline/graphic/graphic.d.ts +6 -1
- package/build/file/drawing/inline/inline.d.ts +5 -7
- package/build/file/drawing/inline/inline.spec.d.ts +1 -0
- package/build/file/file.d.ts +3 -0
- package/build/file/fonts/create-regular-font.d.ts +8 -0
- package/build/file/fonts/font-table.d.ts +10 -0
- package/build/file/fonts/font-wrapper.d.ts +16 -0
- package/build/file/fonts/font.d.ts +49 -0
- package/build/file/fonts/font.spec.d.ts +1 -0
- package/build/file/fonts/index.d.ts +1 -0
- package/build/file/fonts/obfuscate-ttf-to-odttf.d.ts +2 -0
- package/build/file/fonts/obsfuscate-ttf-to-odtts.spec.d.ts +1 -0
- package/build/file/index.d.ts +1 -0
- package/build/file/paragraph/frame/frame-properties.d.ts +4 -39
- package/build/file/paragraph/links/pageref-field-instruction.d.ts +1 -1
- package/build/file/paragraph/links/pageref.d.ts +4 -1
- package/build/file/paragraph/properties.d.ts +1 -0
- package/build/file/paragraph/run/image-run.d.ts +2 -0
- package/build/file/paragraph/run/page-number.d.ts +3 -0
- package/build/file/paragraph/run/run.d.ts +1 -0
- package/build/file/paragraph/run/sequential-identifier.d.ts +1 -1
- package/build/file/relationships/relationship/relationship.d.ts +1 -1
- package/build/file/settings/settings.d.ts +1 -0
- package/build/file/styles/styles.d.ts +1 -1
- package/build/file/table/table-properties/table-cell-margin.d.ts +1 -1
- package/build/file/track-revision/track-revision-components/deleted-text-run.d.ts +1 -1
- package/build/file/xml-components/imported-xml-component.d.ts +1 -1
- package/build/file/xml-components/initializable-xml-component.d.ts +1 -1
- package/build/file/xml-components/simple-elements.d.ts +3 -2
- package/build/index.cjs +914 -552
- package/build/index.iife.js +914 -552
- package/build/index.mjs +914 -552
- package/build/index.umd.js +914 -552
- package/build/util/convenience-functions.d.ts +1 -0
- package/package.json +14 -14
- package/build/file/drawing/effect-extent/effect-extent-attributes.d.ts +0 -14
- package/build/file/drawing/inline/inline-attributes.d.ts +0 -10
- package/build/file/paragraph/formatting/width.d.ts +0 -0
- package/build/file/paragraph/links/pageref-properties.d.ts +0 -4
package/build/index.cjs
CHANGED
|
@@ -1,10 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
3
8
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
4
21
|
var __publicField = (obj, key, value) => {
|
|
5
22
|
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
6
23
|
return value;
|
|
7
24
|
};
|
|
25
|
+
var __async = (__this, __arguments, generator) => {
|
|
26
|
+
return new Promise((resolve2, reject) => {
|
|
27
|
+
var fulfilled = (value) => {
|
|
28
|
+
try {
|
|
29
|
+
step(generator.next(value));
|
|
30
|
+
} catch (e) {
|
|
31
|
+
reject(e);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
var rejected = (value) => {
|
|
35
|
+
try {
|
|
36
|
+
step(generator.throw(value));
|
|
37
|
+
} catch (e) {
|
|
38
|
+
reject(e);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
var step = (x) => x.done ? resolve2(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
42
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
8
45
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
9
46
|
class BaseXmlComponent {
|
|
10
47
|
constructor(rootKey) {
|
|
@@ -39,6 +76,9 @@ class XmlComponent extends BaseXmlComponent {
|
|
|
39
76
|
[this.rootKey]: children.length ? children.length === 1 && ((_a = children[0]) == null ? void 0 : _a._attr) ? children[0] : children : EMPTY_OBJECT
|
|
40
77
|
};
|
|
41
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* @deprecated Do not use this method. It is only used internally by the library. It will be removed in a future version.
|
|
81
|
+
*/
|
|
42
82
|
addChildElement(child) {
|
|
43
83
|
this.root.push(child);
|
|
44
84
|
return this;
|
|
@@ -77,7 +117,7 @@ class NextAttributeComponent extends BaseXmlComponent {
|
|
|
77
117
|
this.root = root;
|
|
78
118
|
}
|
|
79
119
|
prepForXml(_) {
|
|
80
|
-
const attrs = Object.values(this.root).filter(({ value }) => value !== void 0).reduce((acc, { key, value }) => ({
|
|
120
|
+
const attrs = Object.values(this.root).filter(({ value }) => value !== void 0).reduce((acc, { key, value }) => __spreadProps(__spreadValues({}, acc), { [key]: value }), {});
|
|
81
121
|
return { _attr: attrs };
|
|
82
122
|
}
|
|
83
123
|
}
|
|
@@ -109,7 +149,7 @@ class Attributes extends XmlAttributeComponent {
|
|
|
109
149
|
}
|
|
110
150
|
}
|
|
111
151
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
112
|
-
function getDefaultExportFromCjs(x) {
|
|
152
|
+
function getDefaultExportFromCjs$1(x) {
|
|
113
153
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
114
154
|
}
|
|
115
155
|
var sax$1 = {};
|
|
@@ -507,6 +547,177 @@ if (typeof Object.create === "function") {
|
|
|
507
547
|
};
|
|
508
548
|
}
|
|
509
549
|
var inherits_browserExports = inherits_browser.exports;
|
|
550
|
+
function getDefaultExportFromCjs(x) {
|
|
551
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
552
|
+
}
|
|
553
|
+
var browser$1 = { exports: {} };
|
|
554
|
+
var process = browser$1.exports = {};
|
|
555
|
+
var cachedSetTimeout;
|
|
556
|
+
var cachedClearTimeout;
|
|
557
|
+
function defaultSetTimout() {
|
|
558
|
+
throw new Error("setTimeout has not been defined");
|
|
559
|
+
}
|
|
560
|
+
function defaultClearTimeout() {
|
|
561
|
+
throw new Error("clearTimeout has not been defined");
|
|
562
|
+
}
|
|
563
|
+
(function() {
|
|
564
|
+
try {
|
|
565
|
+
if (typeof setTimeout === "function") {
|
|
566
|
+
cachedSetTimeout = setTimeout;
|
|
567
|
+
} else {
|
|
568
|
+
cachedSetTimeout = defaultSetTimout;
|
|
569
|
+
}
|
|
570
|
+
} catch (e) {
|
|
571
|
+
cachedSetTimeout = defaultSetTimout;
|
|
572
|
+
}
|
|
573
|
+
try {
|
|
574
|
+
if (typeof clearTimeout === "function") {
|
|
575
|
+
cachedClearTimeout = clearTimeout;
|
|
576
|
+
} else {
|
|
577
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
578
|
+
}
|
|
579
|
+
} catch (e) {
|
|
580
|
+
cachedClearTimeout = defaultClearTimeout;
|
|
581
|
+
}
|
|
582
|
+
})();
|
|
583
|
+
function runTimeout(fun) {
|
|
584
|
+
if (cachedSetTimeout === setTimeout) {
|
|
585
|
+
return setTimeout(fun, 0);
|
|
586
|
+
}
|
|
587
|
+
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
588
|
+
cachedSetTimeout = setTimeout;
|
|
589
|
+
return setTimeout(fun, 0);
|
|
590
|
+
}
|
|
591
|
+
try {
|
|
592
|
+
return cachedSetTimeout(fun, 0);
|
|
593
|
+
} catch (e) {
|
|
594
|
+
try {
|
|
595
|
+
return cachedSetTimeout.call(null, fun, 0);
|
|
596
|
+
} catch (e2) {
|
|
597
|
+
return cachedSetTimeout.call(this, fun, 0);
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
function runClearTimeout(marker) {
|
|
602
|
+
if (cachedClearTimeout === clearTimeout) {
|
|
603
|
+
return clearTimeout(marker);
|
|
604
|
+
}
|
|
605
|
+
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
606
|
+
cachedClearTimeout = clearTimeout;
|
|
607
|
+
return clearTimeout(marker);
|
|
608
|
+
}
|
|
609
|
+
try {
|
|
610
|
+
return cachedClearTimeout(marker);
|
|
611
|
+
} catch (e) {
|
|
612
|
+
try {
|
|
613
|
+
return cachedClearTimeout.call(null, marker);
|
|
614
|
+
} catch (e2) {
|
|
615
|
+
return cachedClearTimeout.call(this, marker);
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
var queue = [];
|
|
620
|
+
var draining = false;
|
|
621
|
+
var currentQueue;
|
|
622
|
+
var queueIndex = -1;
|
|
623
|
+
function cleanUpNextTick() {
|
|
624
|
+
if (!draining || !currentQueue) {
|
|
625
|
+
return;
|
|
626
|
+
}
|
|
627
|
+
draining = false;
|
|
628
|
+
if (currentQueue.length) {
|
|
629
|
+
queue = currentQueue.concat(queue);
|
|
630
|
+
} else {
|
|
631
|
+
queueIndex = -1;
|
|
632
|
+
}
|
|
633
|
+
if (queue.length) {
|
|
634
|
+
drainQueue();
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
function drainQueue() {
|
|
638
|
+
if (draining) {
|
|
639
|
+
return;
|
|
640
|
+
}
|
|
641
|
+
var timeout = runTimeout(cleanUpNextTick);
|
|
642
|
+
draining = true;
|
|
643
|
+
var len = queue.length;
|
|
644
|
+
while (len) {
|
|
645
|
+
currentQueue = queue;
|
|
646
|
+
queue = [];
|
|
647
|
+
while (++queueIndex < len) {
|
|
648
|
+
if (currentQueue) {
|
|
649
|
+
currentQueue[queueIndex].run();
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
queueIndex = -1;
|
|
653
|
+
len = queue.length;
|
|
654
|
+
}
|
|
655
|
+
currentQueue = null;
|
|
656
|
+
draining = false;
|
|
657
|
+
runClearTimeout(timeout);
|
|
658
|
+
}
|
|
659
|
+
process.nextTick = function(fun) {
|
|
660
|
+
var args = new Array(arguments.length - 1);
|
|
661
|
+
if (arguments.length > 1) {
|
|
662
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
663
|
+
args[i - 1] = arguments[i];
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
queue.push(new Item(fun, args));
|
|
667
|
+
if (queue.length === 1 && !draining) {
|
|
668
|
+
runTimeout(drainQueue);
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
function Item(fun, array) {
|
|
672
|
+
this.fun = fun;
|
|
673
|
+
this.array = array;
|
|
674
|
+
}
|
|
675
|
+
Item.prototype.run = function() {
|
|
676
|
+
this.fun.apply(null, this.array);
|
|
677
|
+
};
|
|
678
|
+
process.title = "browser";
|
|
679
|
+
process.browser = true;
|
|
680
|
+
process.env = {};
|
|
681
|
+
process.argv = [];
|
|
682
|
+
process.version = "";
|
|
683
|
+
process.versions = {};
|
|
684
|
+
function noop() {
|
|
685
|
+
}
|
|
686
|
+
process.on = noop;
|
|
687
|
+
process.addListener = noop;
|
|
688
|
+
process.once = noop;
|
|
689
|
+
process.off = noop;
|
|
690
|
+
process.removeListener = noop;
|
|
691
|
+
process.removeAllListeners = noop;
|
|
692
|
+
process.emit = noop;
|
|
693
|
+
process.prependListener = noop;
|
|
694
|
+
process.prependOnceListener = noop;
|
|
695
|
+
process.listeners = function(name) {
|
|
696
|
+
return [];
|
|
697
|
+
};
|
|
698
|
+
process.binding = function(name) {
|
|
699
|
+
throw new Error("process.binding is not supported");
|
|
700
|
+
};
|
|
701
|
+
process.cwd = function() {
|
|
702
|
+
return "/";
|
|
703
|
+
};
|
|
704
|
+
process.chdir = function(dir) {
|
|
705
|
+
throw new Error("process.chdir is not supported");
|
|
706
|
+
};
|
|
707
|
+
process.umask = function() {
|
|
708
|
+
return 0;
|
|
709
|
+
};
|
|
710
|
+
var browserExports = browser$1.exports;
|
|
711
|
+
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
712
|
+
var streamBrowser;
|
|
713
|
+
var hasRequiredStreamBrowser;
|
|
714
|
+
function requireStreamBrowser() {
|
|
715
|
+
if (hasRequiredStreamBrowser)
|
|
716
|
+
return streamBrowser;
|
|
717
|
+
hasRequiredStreamBrowser = 1;
|
|
718
|
+
streamBrowser = eventsExports.EventEmitter;
|
|
719
|
+
return streamBrowser;
|
|
720
|
+
}
|
|
510
721
|
var buffer = {};
|
|
511
722
|
var base64Js = {};
|
|
512
723
|
var hasRequiredBase64Js;
|
|
@@ -2176,195 +2387,6 @@ function requireBuffer() {
|
|
|
2176
2387
|
})(buffer);
|
|
2177
2388
|
return buffer;
|
|
2178
2389
|
}
|
|
2179
|
-
requireBuffer();
|
|
2180
|
-
var browser$1 = { exports: {} };
|
|
2181
|
-
var process = browser$1.exports = {};
|
|
2182
|
-
var cachedSetTimeout;
|
|
2183
|
-
var cachedClearTimeout;
|
|
2184
|
-
function defaultSetTimout() {
|
|
2185
|
-
throw new Error("setTimeout has not been defined");
|
|
2186
|
-
}
|
|
2187
|
-
function defaultClearTimeout() {
|
|
2188
|
-
throw new Error("clearTimeout has not been defined");
|
|
2189
|
-
}
|
|
2190
|
-
(function() {
|
|
2191
|
-
try {
|
|
2192
|
-
if (typeof setTimeout === "function") {
|
|
2193
|
-
cachedSetTimeout = setTimeout;
|
|
2194
|
-
} else {
|
|
2195
|
-
cachedSetTimeout = defaultSetTimout;
|
|
2196
|
-
}
|
|
2197
|
-
} catch (e) {
|
|
2198
|
-
cachedSetTimeout = defaultSetTimout;
|
|
2199
|
-
}
|
|
2200
|
-
try {
|
|
2201
|
-
if (typeof clearTimeout === "function") {
|
|
2202
|
-
cachedClearTimeout = clearTimeout;
|
|
2203
|
-
} else {
|
|
2204
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
2205
|
-
}
|
|
2206
|
-
} catch (e) {
|
|
2207
|
-
cachedClearTimeout = defaultClearTimeout;
|
|
2208
|
-
}
|
|
2209
|
-
})();
|
|
2210
|
-
function runTimeout(fun) {
|
|
2211
|
-
if (cachedSetTimeout === setTimeout) {
|
|
2212
|
-
return setTimeout(fun, 0);
|
|
2213
|
-
}
|
|
2214
|
-
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
|
|
2215
|
-
cachedSetTimeout = setTimeout;
|
|
2216
|
-
return setTimeout(fun, 0);
|
|
2217
|
-
}
|
|
2218
|
-
try {
|
|
2219
|
-
return cachedSetTimeout(fun, 0);
|
|
2220
|
-
} catch (e) {
|
|
2221
|
-
try {
|
|
2222
|
-
return cachedSetTimeout.call(null, fun, 0);
|
|
2223
|
-
} catch (e2) {
|
|
2224
|
-
return cachedSetTimeout.call(this, fun, 0);
|
|
2225
|
-
}
|
|
2226
|
-
}
|
|
2227
|
-
}
|
|
2228
|
-
function runClearTimeout(marker) {
|
|
2229
|
-
if (cachedClearTimeout === clearTimeout) {
|
|
2230
|
-
return clearTimeout(marker);
|
|
2231
|
-
}
|
|
2232
|
-
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
|
|
2233
|
-
cachedClearTimeout = clearTimeout;
|
|
2234
|
-
return clearTimeout(marker);
|
|
2235
|
-
}
|
|
2236
|
-
try {
|
|
2237
|
-
return cachedClearTimeout(marker);
|
|
2238
|
-
} catch (e) {
|
|
2239
|
-
try {
|
|
2240
|
-
return cachedClearTimeout.call(null, marker);
|
|
2241
|
-
} catch (e2) {
|
|
2242
|
-
return cachedClearTimeout.call(this, marker);
|
|
2243
|
-
}
|
|
2244
|
-
}
|
|
2245
|
-
}
|
|
2246
|
-
var queue = [];
|
|
2247
|
-
var draining = false;
|
|
2248
|
-
var currentQueue;
|
|
2249
|
-
var queueIndex = -1;
|
|
2250
|
-
function cleanUpNextTick() {
|
|
2251
|
-
if (!draining || !currentQueue) {
|
|
2252
|
-
return;
|
|
2253
|
-
}
|
|
2254
|
-
draining = false;
|
|
2255
|
-
if (currentQueue.length) {
|
|
2256
|
-
queue = currentQueue.concat(queue);
|
|
2257
|
-
} else {
|
|
2258
|
-
queueIndex = -1;
|
|
2259
|
-
}
|
|
2260
|
-
if (queue.length) {
|
|
2261
|
-
drainQueue();
|
|
2262
|
-
}
|
|
2263
|
-
}
|
|
2264
|
-
function drainQueue() {
|
|
2265
|
-
if (draining) {
|
|
2266
|
-
return;
|
|
2267
|
-
}
|
|
2268
|
-
var timeout = runTimeout(cleanUpNextTick);
|
|
2269
|
-
draining = true;
|
|
2270
|
-
var len = queue.length;
|
|
2271
|
-
while (len) {
|
|
2272
|
-
currentQueue = queue;
|
|
2273
|
-
queue = [];
|
|
2274
|
-
while (++queueIndex < len) {
|
|
2275
|
-
if (currentQueue) {
|
|
2276
|
-
currentQueue[queueIndex].run();
|
|
2277
|
-
}
|
|
2278
|
-
}
|
|
2279
|
-
queueIndex = -1;
|
|
2280
|
-
len = queue.length;
|
|
2281
|
-
}
|
|
2282
|
-
currentQueue = null;
|
|
2283
|
-
draining = false;
|
|
2284
|
-
runClearTimeout(timeout);
|
|
2285
|
-
}
|
|
2286
|
-
process.nextTick = function(fun) {
|
|
2287
|
-
var args = new Array(arguments.length - 1);
|
|
2288
|
-
if (arguments.length > 1) {
|
|
2289
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
2290
|
-
args[i - 1] = arguments[i];
|
|
2291
|
-
}
|
|
2292
|
-
}
|
|
2293
|
-
queue.push(new Item(fun, args));
|
|
2294
|
-
if (queue.length === 1 && !draining) {
|
|
2295
|
-
runTimeout(drainQueue);
|
|
2296
|
-
}
|
|
2297
|
-
};
|
|
2298
|
-
function Item(fun, array) {
|
|
2299
|
-
this.fun = fun;
|
|
2300
|
-
this.array = array;
|
|
2301
|
-
}
|
|
2302
|
-
Item.prototype.run = function() {
|
|
2303
|
-
this.fun.apply(null, this.array);
|
|
2304
|
-
};
|
|
2305
|
-
process.title = "browser";
|
|
2306
|
-
process.browser = true;
|
|
2307
|
-
process.env = {};
|
|
2308
|
-
process.argv = [];
|
|
2309
|
-
process.version = "";
|
|
2310
|
-
process.versions = {};
|
|
2311
|
-
function noop() {
|
|
2312
|
-
}
|
|
2313
|
-
process.on = noop;
|
|
2314
|
-
process.addListener = noop;
|
|
2315
|
-
process.once = noop;
|
|
2316
|
-
process.off = noop;
|
|
2317
|
-
process.removeListener = noop;
|
|
2318
|
-
process.removeAllListeners = noop;
|
|
2319
|
-
process.emit = noop;
|
|
2320
|
-
process.prependListener = noop;
|
|
2321
|
-
process.prependOnceListener = noop;
|
|
2322
|
-
process.listeners = function(name) {
|
|
2323
|
-
return [];
|
|
2324
|
-
};
|
|
2325
|
-
process.binding = function(name) {
|
|
2326
|
-
throw new Error("process.binding is not supported");
|
|
2327
|
-
};
|
|
2328
|
-
process.cwd = function() {
|
|
2329
|
-
return "/";
|
|
2330
|
-
};
|
|
2331
|
-
process.chdir = function(dir) {
|
|
2332
|
-
throw new Error("process.chdir is not supported");
|
|
2333
|
-
};
|
|
2334
|
-
process.umask = function() {
|
|
2335
|
-
return 0;
|
|
2336
|
-
};
|
|
2337
|
-
var browserExports = browser$1.exports;
|
|
2338
|
-
const process$1 = /* @__PURE__ */ getDefaultExportFromCjs(browserExports);
|
|
2339
|
-
(function(Object2) {
|
|
2340
|
-
function get() {
|
|
2341
|
-
var _global2 = this || self;
|
|
2342
|
-
delete Object2.prototype.__magic__;
|
|
2343
|
-
return _global2;
|
|
2344
|
-
}
|
|
2345
|
-
if (typeof globalThis === "object") {
|
|
2346
|
-
return globalThis;
|
|
2347
|
-
}
|
|
2348
|
-
if (this) {
|
|
2349
|
-
return get();
|
|
2350
|
-
} else {
|
|
2351
|
-
Object2.defineProperty(Object2.prototype, "__magic__", {
|
|
2352
|
-
configurable: true,
|
|
2353
|
-
get
|
|
2354
|
-
});
|
|
2355
|
-
var _global = __magic__;
|
|
2356
|
-
return _global;
|
|
2357
|
-
}
|
|
2358
|
-
})(Object);
|
|
2359
|
-
var streamBrowser;
|
|
2360
|
-
var hasRequiredStreamBrowser;
|
|
2361
|
-
function requireStreamBrowser() {
|
|
2362
|
-
if (hasRequiredStreamBrowser)
|
|
2363
|
-
return streamBrowser;
|
|
2364
|
-
hasRequiredStreamBrowser = 1;
|
|
2365
|
-
streamBrowser = eventsExports.EventEmitter;
|
|
2366
|
-
return streamBrowser;
|
|
2367
|
-
}
|
|
2368
2390
|
var util = {};
|
|
2369
2391
|
var types = {};
|
|
2370
2392
|
var shams$1;
|
|
@@ -9426,6 +9448,12 @@ class StringValueElement extends XmlComponent {
|
|
|
9426
9448
|
this.root.push(new Attributes({ val }));
|
|
9427
9449
|
}
|
|
9428
9450
|
}
|
|
9451
|
+
const createStringElement = (name, value) => new BuilderElement({
|
|
9452
|
+
name,
|
|
9453
|
+
attributes: {
|
|
9454
|
+
value: { key: "w:val", value }
|
|
9455
|
+
}
|
|
9456
|
+
});
|
|
9429
9457
|
class NumberValueElement extends XmlComponent {
|
|
9430
9458
|
constructor(name, val) {
|
|
9431
9459
|
super(name);
|
|
@@ -9445,10 +9473,17 @@ class StringContainer extends XmlComponent {
|
|
|
9445
9473
|
}
|
|
9446
9474
|
}
|
|
9447
9475
|
class BuilderElement extends XmlComponent {
|
|
9448
|
-
constructor(
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
|
|
9476
|
+
constructor({
|
|
9477
|
+
name,
|
|
9478
|
+
attributes,
|
|
9479
|
+
children
|
|
9480
|
+
}) {
|
|
9481
|
+
super(name);
|
|
9482
|
+
if (attributes) {
|
|
9483
|
+
this.root.push(new NextAttributeComponent(attributes));
|
|
9484
|
+
}
|
|
9485
|
+
if (children) {
|
|
9486
|
+
this.root.push(...children);
|
|
9452
9487
|
}
|
|
9453
9488
|
}
|
|
9454
9489
|
}
|
|
@@ -9751,6 +9786,13 @@ class NumberOfPagesSection extends XmlComponent {
|
|
|
9751
9786
|
this.root.push("SECTIONPAGES");
|
|
9752
9787
|
}
|
|
9753
9788
|
}
|
|
9789
|
+
class CurrentSection extends XmlComponent {
|
|
9790
|
+
constructor() {
|
|
9791
|
+
super("w:instrText");
|
|
9792
|
+
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
|
9793
|
+
this.root.push("SECTION");
|
|
9794
|
+
}
|
|
9795
|
+
}
|
|
9754
9796
|
class ShadingAttributes extends XmlAttributeComponent {
|
|
9755
9797
|
constructor() {
|
|
9756
9798
|
super(...arguments);
|
|
@@ -9996,6 +10038,7 @@ const TextEffect = {
|
|
|
9996
10038
|
};
|
|
9997
10039
|
class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
9998
10040
|
constructor(options2) {
|
|
10041
|
+
var _a, _b;
|
|
9999
10042
|
super("w:rPr");
|
|
10000
10043
|
if (!options2) {
|
|
10001
10044
|
return;
|
|
@@ -10007,13 +10050,13 @@ class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
10007
10050
|
this.push(new OnOffElement("w:b", options2.bold));
|
|
10008
10051
|
}
|
|
10009
10052
|
if (options2.boldComplexScript === void 0 && options2.bold !== void 0 || options2.boldComplexScript) {
|
|
10010
|
-
this.push(new OnOffElement("w:bCs", options2.boldComplexScript
|
|
10053
|
+
this.push(new OnOffElement("w:bCs", (_a = options2.boldComplexScript) != null ? _a : options2.bold));
|
|
10011
10054
|
}
|
|
10012
10055
|
if (options2.italics !== void 0) {
|
|
10013
10056
|
this.push(new OnOffElement("w:i", options2.italics));
|
|
10014
10057
|
}
|
|
10015
10058
|
if (options2.italicsComplexScript === void 0 && options2.italics !== void 0 || options2.italicsComplexScript) {
|
|
10016
|
-
this.push(new OnOffElement("w:iCs", options2.italicsComplexScript
|
|
10059
|
+
this.push(new OnOffElement("w:iCs", (_b = options2.italicsComplexScript) != null ? _b : options2.italics));
|
|
10017
10060
|
}
|
|
10018
10061
|
if (options2.underline) {
|
|
10019
10062
|
this.push(new Underline(options2.underline.type, options2.underline.color));
|
|
@@ -10135,13 +10178,14 @@ class RunPropertiesChange extends XmlComponent {
|
|
|
10135
10178
|
}
|
|
10136
10179
|
class Text extends XmlComponent {
|
|
10137
10180
|
constructor(options2) {
|
|
10181
|
+
var _a;
|
|
10138
10182
|
super("w:t");
|
|
10139
10183
|
if (typeof options2 === "string") {
|
|
10140
10184
|
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
|
10141
10185
|
this.root.push(options2);
|
|
10142
10186
|
return this;
|
|
10143
10187
|
} else {
|
|
10144
|
-
this.root.push(new TextAttributes({ space: options2.space
|
|
10188
|
+
this.root.push(new TextAttributes({ space: (_a = options2.space) != null ? _a : SpaceType.DEFAULT }));
|
|
10145
10189
|
this.root.push(options2.text);
|
|
10146
10190
|
return this;
|
|
10147
10191
|
}
|
|
@@ -10150,7 +10194,8 @@ class Text extends XmlComponent {
|
|
|
10150
10194
|
const PageNumber = {
|
|
10151
10195
|
CURRENT: "CURRENT",
|
|
10152
10196
|
TOTAL_PAGES: "TOTAL_PAGES",
|
|
10153
|
-
TOTAL_PAGES_IN_SECTION: "TOTAL_PAGES_IN_SECTION"
|
|
10197
|
+
TOTAL_PAGES_IN_SECTION: "TOTAL_PAGES_IN_SECTION",
|
|
10198
|
+
CURRENT_SECTION: "SECTION"
|
|
10154
10199
|
};
|
|
10155
10200
|
class Run extends XmlComponent {
|
|
10156
10201
|
constructor(options2) {
|
|
@@ -10185,6 +10230,12 @@ class Run extends XmlComponent {
|
|
|
10185
10230
|
this.root.push(new Separate());
|
|
10186
10231
|
this.root.push(new End());
|
|
10187
10232
|
break;
|
|
10233
|
+
case PageNumber.CURRENT_SECTION:
|
|
10234
|
+
this.root.push(new Begin());
|
|
10235
|
+
this.root.push(new CurrentSection());
|
|
10236
|
+
this.root.push(new Separate());
|
|
10237
|
+
this.root.push(new End());
|
|
10238
|
+
break;
|
|
10188
10239
|
default:
|
|
10189
10240
|
this.root.push(new Text(child));
|
|
10190
10241
|
break;
|
|
@@ -10235,6 +10286,16 @@ class SymbolRun extends Run {
|
|
|
10235
10286
|
}
|
|
10236
10287
|
}
|
|
10237
10288
|
let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
10289
|
+
let customAlphabet = (alphabet, defaultSize = 21) => {
|
|
10290
|
+
return (size = defaultSize) => {
|
|
10291
|
+
let id = "";
|
|
10292
|
+
let i = size;
|
|
10293
|
+
while (i--) {
|
|
10294
|
+
id += alphabet[Math.random() * alphabet.length | 0];
|
|
10295
|
+
}
|
|
10296
|
+
return id;
|
|
10297
|
+
};
|
|
10298
|
+
};
|
|
10238
10299
|
let nanoid = (size = 21) => {
|
|
10239
10300
|
let id = "";
|
|
10240
10301
|
let i = size;
|
|
@@ -10254,6 +10315,8 @@ const concreteNumUniqueNumericIdGen = () => uniqueNumericIdCreator(1);
|
|
|
10254
10315
|
const docPropertiesUniqueNumericIdGen = () => uniqueNumericIdCreator();
|
|
10255
10316
|
const bookmarkUniqueNumericIdGen = () => uniqueNumericIdCreator();
|
|
10256
10317
|
const uniqueId = () => nanoid().toLowerCase();
|
|
10318
|
+
const generateUuidPart = (count) => customAlphabet("1234567890abcdef", count)();
|
|
10319
|
+
const uniqueUuid = () => `${generateUuidPart(8)}-${generateUuidPart(4)}-${generateUuidPart(4)}-${generateUuidPart(4)}-${generateUuidPart(12)}`;
|
|
10257
10320
|
const HorizontalPositionRelativeFrom = {
|
|
10258
10321
|
CHARACTER: "character",
|
|
10259
10322
|
COLUMN: "column",
|
|
@@ -10436,18 +10499,17 @@ class ChildNonVisualProperties extends XmlComponent {
|
|
|
10436
10499
|
}
|
|
10437
10500
|
const createHyperlinkClick = (linkId, hasXmlNs) => new BuilderElement({
|
|
10438
10501
|
name: "a:hlinkClick",
|
|
10439
|
-
attributes: {
|
|
10440
|
-
|
|
10441
|
-
xmlns:
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
} : {},
|
|
10502
|
+
attributes: __spreadProps(__spreadValues({}, hasXmlNs ? {
|
|
10503
|
+
xmlns: {
|
|
10504
|
+
key: "xmlns:a",
|
|
10505
|
+
value: "http://schemas.openxmlformats.org/drawingml/2006/main"
|
|
10506
|
+
}
|
|
10507
|
+
} : {}), {
|
|
10446
10508
|
id: {
|
|
10447
10509
|
key: "r:id",
|
|
10448
10510
|
value: `rId${linkId}`
|
|
10449
10511
|
}
|
|
10450
|
-
}
|
|
10512
|
+
})
|
|
10451
10513
|
});
|
|
10452
10514
|
class NonVisualPropertiesAttributes extends XmlAttributeComponent {
|
|
10453
10515
|
constructor() {
|
|
@@ -10564,6 +10626,59 @@ class Form extends XmlComponent {
|
|
|
10564
10626
|
this.root.push(this.extents);
|
|
10565
10627
|
}
|
|
10566
10628
|
}
|
|
10629
|
+
const createNoFill = () => new BuilderElement({ name: "a:noFill" });
|
|
10630
|
+
const createSchemeColor = (options2) => new BuilderElement({
|
|
10631
|
+
name: "a:schemeClr",
|
|
10632
|
+
attributes: {
|
|
10633
|
+
value: {
|
|
10634
|
+
key: "val",
|
|
10635
|
+
value: options2.value
|
|
10636
|
+
}
|
|
10637
|
+
}
|
|
10638
|
+
});
|
|
10639
|
+
const createSolidRgbColor = (options2) => new BuilderElement({
|
|
10640
|
+
name: "a:srgbClr",
|
|
10641
|
+
attributes: {
|
|
10642
|
+
value: {
|
|
10643
|
+
key: "val",
|
|
10644
|
+
value: options2.value
|
|
10645
|
+
}
|
|
10646
|
+
}
|
|
10647
|
+
});
|
|
10648
|
+
const createSolidFill = (options2) => new BuilderElement({
|
|
10649
|
+
name: "a:solidFill",
|
|
10650
|
+
children: [options2.type === "rgb" ? createSolidRgbColor(options2) : createSchemeColor(options2)]
|
|
10651
|
+
});
|
|
10652
|
+
const createOutline = (options2) => new BuilderElement({
|
|
10653
|
+
name: "a:ln",
|
|
10654
|
+
attributes: {
|
|
10655
|
+
width: {
|
|
10656
|
+
key: "w",
|
|
10657
|
+
value: options2.width
|
|
10658
|
+
},
|
|
10659
|
+
cap: {
|
|
10660
|
+
key: "cap",
|
|
10661
|
+
value: options2.cap
|
|
10662
|
+
},
|
|
10663
|
+
compoundLine: {
|
|
10664
|
+
key: "cmpd",
|
|
10665
|
+
value: options2.compoundLine
|
|
10666
|
+
},
|
|
10667
|
+
align: {
|
|
10668
|
+
key: "algn",
|
|
10669
|
+
value: options2.align
|
|
10670
|
+
}
|
|
10671
|
+
},
|
|
10672
|
+
children: [
|
|
10673
|
+
options2.type === "noFill" ? createNoFill() : options2.solidFillType === "rgb" ? createSolidFill({
|
|
10674
|
+
type: "rgb",
|
|
10675
|
+
value: options2.value
|
|
10676
|
+
}) : createSolidFill({
|
|
10677
|
+
type: "scheme",
|
|
10678
|
+
value: options2.value
|
|
10679
|
+
})
|
|
10680
|
+
]
|
|
10681
|
+
});
|
|
10567
10682
|
class AdjustmentValues extends XmlComponent {
|
|
10568
10683
|
constructor() {
|
|
10569
10684
|
super("a:avLst");
|
|
@@ -10597,7 +10712,7 @@ class ShapePropertiesAttributes extends XmlAttributeComponent {
|
|
|
10597
10712
|
}
|
|
10598
10713
|
}
|
|
10599
10714
|
class ShapeProperties extends XmlComponent {
|
|
10600
|
-
constructor(transform) {
|
|
10715
|
+
constructor({ outline, transform }) {
|
|
10601
10716
|
super("pic:spPr");
|
|
10602
10717
|
__publicField(this, "form");
|
|
10603
10718
|
this.root.push(
|
|
@@ -10608,10 +10723,18 @@ class ShapeProperties extends XmlComponent {
|
|
|
10608
10723
|
this.form = new Form(transform);
|
|
10609
10724
|
this.root.push(this.form);
|
|
10610
10725
|
this.root.push(new PresetGeometry());
|
|
10726
|
+
if (outline) {
|
|
10727
|
+
this.root.push(createNoFill());
|
|
10728
|
+
this.root.push(createOutline(outline));
|
|
10729
|
+
}
|
|
10611
10730
|
}
|
|
10612
10731
|
}
|
|
10613
10732
|
class Pic extends XmlComponent {
|
|
10614
|
-
constructor(
|
|
10733
|
+
constructor({
|
|
10734
|
+
mediaData,
|
|
10735
|
+
transform,
|
|
10736
|
+
outline
|
|
10737
|
+
}) {
|
|
10615
10738
|
super("pic:pic");
|
|
10616
10739
|
this.root.push(
|
|
10617
10740
|
new PicAttributes({
|
|
@@ -10620,11 +10743,15 @@ class Pic extends XmlComponent {
|
|
|
10620
10743
|
);
|
|
10621
10744
|
this.root.push(new NonVisualPicProperties());
|
|
10622
10745
|
this.root.push(new BlipFill(mediaData));
|
|
10623
|
-
this.root.push(new ShapeProperties(transform));
|
|
10746
|
+
this.root.push(new ShapeProperties({ transform, outline }));
|
|
10624
10747
|
}
|
|
10625
10748
|
}
|
|
10626
10749
|
class GraphicData extends XmlComponent {
|
|
10627
|
-
constructor(
|
|
10750
|
+
constructor({
|
|
10751
|
+
mediaData,
|
|
10752
|
+
transform,
|
|
10753
|
+
outline
|
|
10754
|
+
}) {
|
|
10628
10755
|
super("a:graphicData");
|
|
10629
10756
|
__publicField(this, "pic");
|
|
10630
10757
|
this.root.push(
|
|
@@ -10632,7 +10759,7 @@ class GraphicData extends XmlComponent {
|
|
|
10632
10759
|
uri: "http://schemas.openxmlformats.org/drawingml/2006/picture"
|
|
10633
10760
|
})
|
|
10634
10761
|
);
|
|
10635
|
-
this.pic = new Pic(mediaData, transform);
|
|
10762
|
+
this.pic = new Pic({ mediaData, transform, outline });
|
|
10636
10763
|
this.root.push(this.pic);
|
|
10637
10764
|
}
|
|
10638
10765
|
}
|
|
@@ -10645,7 +10772,11 @@ class GraphicAttributes extends XmlAttributeComponent {
|
|
|
10645
10772
|
}
|
|
10646
10773
|
}
|
|
10647
10774
|
class Graphic extends XmlComponent {
|
|
10648
|
-
constructor(
|
|
10775
|
+
constructor({
|
|
10776
|
+
mediaData,
|
|
10777
|
+
transform,
|
|
10778
|
+
outline
|
|
10779
|
+
}) {
|
|
10649
10780
|
super("a:graphic");
|
|
10650
10781
|
__publicField(this, "data");
|
|
10651
10782
|
this.root.push(
|
|
@@ -10653,7 +10784,7 @@ class Graphic extends XmlComponent {
|
|
|
10653
10784
|
a: "http://schemas.openxmlformats.org/drawingml/2006/main"
|
|
10654
10785
|
})
|
|
10655
10786
|
);
|
|
10656
|
-
this.data = new GraphicData(mediaData, transform);
|
|
10787
|
+
this.data = new GraphicData({ mediaData, transform, outline });
|
|
10657
10788
|
this.root.push(this.data);
|
|
10658
10789
|
}
|
|
10659
10790
|
}
|
|
@@ -10788,30 +10919,27 @@ class DocProperties extends XmlComponent {
|
|
|
10788
10919
|
return super.prepForXml(context);
|
|
10789
10920
|
}
|
|
10790
10921
|
}
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
|
|
10800
|
-
|
|
10801
|
-
}
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
|
|
10805
|
-
|
|
10806
|
-
|
|
10807
|
-
|
|
10808
|
-
|
|
10809
|
-
|
|
10810
|
-
t: 0
|
|
10811
|
-
})
|
|
10812
|
-
);
|
|
10922
|
+
const createEffectExtent = ({ top, right, bottom, left }) => new BuilderElement({
|
|
10923
|
+
name: "wp:effectExtent",
|
|
10924
|
+
attributes: {
|
|
10925
|
+
top: {
|
|
10926
|
+
key: "t",
|
|
10927
|
+
value: top
|
|
10928
|
+
},
|
|
10929
|
+
right: {
|
|
10930
|
+
key: "r",
|
|
10931
|
+
value: right
|
|
10932
|
+
},
|
|
10933
|
+
bottom: {
|
|
10934
|
+
key: "b",
|
|
10935
|
+
value: bottom
|
|
10936
|
+
},
|
|
10937
|
+
left: {
|
|
10938
|
+
key: "l",
|
|
10939
|
+
value: left
|
|
10940
|
+
}
|
|
10813
10941
|
}
|
|
10814
|
-
}
|
|
10942
|
+
});
|
|
10815
10943
|
class ExtentAttributes extends XmlAttributeComponent {
|
|
10816
10944
|
constructor() {
|
|
10817
10945
|
super(...arguments);
|
|
@@ -10876,17 +11004,20 @@ class AnchorAttributes extends XmlAttributeComponent {
|
|
|
10876
11004
|
}
|
|
10877
11005
|
}
|
|
10878
11006
|
class Anchor extends XmlComponent {
|
|
10879
|
-
constructor(
|
|
11007
|
+
constructor({
|
|
11008
|
+
mediaData,
|
|
11009
|
+
transform,
|
|
11010
|
+
drawingOptions
|
|
11011
|
+
}) {
|
|
10880
11012
|
super("wp:anchor");
|
|
10881
|
-
const floating = {
|
|
11013
|
+
const floating = __spreadValues({
|
|
10882
11014
|
allowOverlap: true,
|
|
10883
11015
|
behindDocument: false,
|
|
10884
11016
|
lockAnchor: false,
|
|
10885
11017
|
layoutInCell: true,
|
|
10886
11018
|
verticalPosition: {},
|
|
10887
|
-
horizontalPosition: {}
|
|
10888
|
-
|
|
10889
|
-
};
|
|
11019
|
+
horizontalPosition: {}
|
|
11020
|
+
}, drawingOptions.floating);
|
|
10890
11021
|
this.root.push(
|
|
10891
11022
|
new AnchorAttributes({
|
|
10892
11023
|
distT: floating.margins ? floating.margins.top || 0 : 0,
|
|
@@ -10906,7 +11037,7 @@ class Anchor extends XmlComponent {
|
|
|
10906
11037
|
this.root.push(new HorizontalPosition(floating.horizontalPosition));
|
|
10907
11038
|
this.root.push(new VerticalPosition(floating.verticalPosition));
|
|
10908
11039
|
this.root.push(new Extent(transform.emus.x, transform.emus.y));
|
|
10909
|
-
this.root.push(
|
|
11040
|
+
this.root.push(createEffectExtent({ top: 0, right: 0, bottom: 0, left: 0 }));
|
|
10910
11041
|
if (drawingOptions.floating !== void 0 && drawingOptions.floating.wrap !== void 0) {
|
|
10911
11042
|
switch (drawingOptions.floating.wrap.type) {
|
|
10912
11043
|
case TextWrappingType.SQUARE:
|
|
@@ -10927,54 +11058,61 @@ class Anchor extends XmlComponent {
|
|
|
10927
11058
|
}
|
|
10928
11059
|
this.root.push(new DocProperties(drawingOptions.docProperties));
|
|
10929
11060
|
this.root.push(new GraphicFrameProperties());
|
|
10930
|
-
this.root.push(new Graphic(mediaData, transform));
|
|
10931
|
-
}
|
|
10932
|
-
}
|
|
10933
|
-
class InlineAttributes extends XmlAttributeComponent {
|
|
10934
|
-
constructor() {
|
|
10935
|
-
super(...arguments);
|
|
10936
|
-
__publicField(this, "xmlKeys", {
|
|
10937
|
-
distT: "distT",
|
|
10938
|
-
distB: "distB",
|
|
10939
|
-
distL: "distL",
|
|
10940
|
-
distR: "distR"
|
|
10941
|
-
});
|
|
10942
|
-
}
|
|
10943
|
-
}
|
|
10944
|
-
class Inline extends XmlComponent {
|
|
10945
|
-
constructor({ mediaData, transform, docProperties }) {
|
|
10946
|
-
super("wp:inline");
|
|
10947
|
-
__publicField(this, "extent");
|
|
10948
|
-
__publicField(this, "graphic");
|
|
10949
|
-
this.root.push(
|
|
10950
|
-
new InlineAttributes({
|
|
10951
|
-
distT: 0,
|
|
10952
|
-
distB: 0,
|
|
10953
|
-
distL: 0,
|
|
10954
|
-
distR: 0
|
|
10955
|
-
})
|
|
10956
|
-
);
|
|
10957
|
-
this.extent = new Extent(transform.emus.x, transform.emus.y);
|
|
10958
|
-
this.graphic = new Graphic(mediaData, transform);
|
|
10959
|
-
this.root.push(this.extent);
|
|
10960
|
-
this.root.push(new EffectExtent());
|
|
10961
|
-
this.root.push(new DocProperties(docProperties));
|
|
10962
|
-
this.root.push(new GraphicFrameProperties());
|
|
10963
|
-
this.root.push(this.graphic);
|
|
11061
|
+
this.root.push(new Graphic({ mediaData, transform, outline: drawingOptions.outline }));
|
|
10964
11062
|
}
|
|
10965
11063
|
}
|
|
11064
|
+
const createInline = ({ mediaData, transform, docProperties, outline }) => {
|
|
11065
|
+
var _a, _b, _c, _d;
|
|
11066
|
+
return new BuilderElement({
|
|
11067
|
+
name: "wp:inline",
|
|
11068
|
+
attributes: {
|
|
11069
|
+
distanceTop: {
|
|
11070
|
+
key: "distT",
|
|
11071
|
+
value: 0
|
|
11072
|
+
},
|
|
11073
|
+
distanceBottom: {
|
|
11074
|
+
key: "distB",
|
|
11075
|
+
value: 0
|
|
11076
|
+
},
|
|
11077
|
+
distanceLeft: {
|
|
11078
|
+
key: "distL",
|
|
11079
|
+
value: 0
|
|
11080
|
+
},
|
|
11081
|
+
distanceRight: {
|
|
11082
|
+
key: "distR",
|
|
11083
|
+
value: 0
|
|
11084
|
+
}
|
|
11085
|
+
},
|
|
11086
|
+
children: [
|
|
11087
|
+
new Extent(transform.emus.x, transform.emus.y),
|
|
11088
|
+
createEffectExtent(
|
|
11089
|
+
outline ? {
|
|
11090
|
+
top: ((_a = outline.width) != null ? _a : 9525) * 2,
|
|
11091
|
+
right: ((_b = outline.width) != null ? _b : 9525) * 2,
|
|
11092
|
+
bottom: ((_c = outline.width) != null ? _c : 9525) * 2,
|
|
11093
|
+
left: ((_d = outline.width) != null ? _d : 9525) * 2
|
|
11094
|
+
} : { top: 0, right: 0, bottom: 0, left: 0 }
|
|
11095
|
+
),
|
|
11096
|
+
new DocProperties(docProperties),
|
|
11097
|
+
new GraphicFrameProperties(),
|
|
11098
|
+
new Graphic({ mediaData, transform, outline })
|
|
11099
|
+
]
|
|
11100
|
+
});
|
|
11101
|
+
};
|
|
10966
11102
|
class Drawing extends XmlComponent {
|
|
10967
11103
|
constructor(imageData, drawingOptions = {}) {
|
|
10968
11104
|
super("w:drawing");
|
|
10969
11105
|
if (!drawingOptions.floating) {
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
10975
|
-
|
|
11106
|
+
this.root.push(
|
|
11107
|
+
createInline({
|
|
11108
|
+
mediaData: imageData,
|
|
11109
|
+
transform: imageData.transformation,
|
|
11110
|
+
docProperties: drawingOptions.docProperties,
|
|
11111
|
+
outline: drawingOptions.outline
|
|
11112
|
+
})
|
|
11113
|
+
);
|
|
10976
11114
|
} else {
|
|
10977
|
-
this.root.push(new Anchor(imageData, imageData.transformation, drawingOptions));
|
|
11115
|
+
this.root.push(new Anchor({ mediaData: imageData, transform: imageData.transformation, drawingOptions }));
|
|
10978
11116
|
}
|
|
10979
11117
|
}
|
|
10980
11118
|
}
|
|
@@ -11000,7 +11138,11 @@ class ImageRun extends Run {
|
|
|
11000
11138
|
rotation: options2.transformation.rotation ? options2.transformation.rotation * 6e4 : void 0
|
|
11001
11139
|
}
|
|
11002
11140
|
};
|
|
11003
|
-
const drawing = new Drawing(this.imageData, {
|
|
11141
|
+
const drawing = new Drawing(this.imageData, {
|
|
11142
|
+
floating: options2.floating,
|
|
11143
|
+
docProperties: options2.altText,
|
|
11144
|
+
outline: options2.outline
|
|
11145
|
+
});
|
|
11004
11146
|
this.root.push(drawing);
|
|
11005
11147
|
}
|
|
11006
11148
|
prepForXml(context) {
|
|
@@ -11714,22 +11856,18 @@ const LineNumberRestartFormat = {
|
|
|
11714
11856
|
NEW_SECTION: "newSection",
|
|
11715
11857
|
CONTINUOUS: "continuous"
|
|
11716
11858
|
};
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
value: distance === void 0 ? void 0 : twipsMeasureValue(distance)
|
|
11728
|
-
}
|
|
11729
|
-
})
|
|
11730
|
-
);
|
|
11859
|
+
const createLineNumberType = ({ countBy, start, restart, distance }) => new BuilderElement({
|
|
11860
|
+
name: "w:lnNumType",
|
|
11861
|
+
attributes: {
|
|
11862
|
+
countBy: { key: "w:countBy", value: countBy === void 0 ? void 0 : decimalNumber(countBy) },
|
|
11863
|
+
start: { key: "w:start", value: start === void 0 ? void 0 : decimalNumber(start) },
|
|
11864
|
+
restart: { key: "w:restart", value: restart },
|
|
11865
|
+
distance: {
|
|
11866
|
+
key: "w:distance",
|
|
11867
|
+
value: distance === void 0 ? void 0 : twipsMeasureValue(distance)
|
|
11868
|
+
}
|
|
11731
11869
|
}
|
|
11732
|
-
}
|
|
11870
|
+
});
|
|
11733
11871
|
const PageBorderDisplay = {
|
|
11734
11872
|
ALL_PAGES: "allPages",
|
|
11735
11873
|
FIRST_PAGE: "firstPage",
|
|
@@ -11945,7 +12083,7 @@ class SectionProperties extends XmlComponent {
|
|
|
11945
12083
|
this.root.push(new PageBorders(borders));
|
|
11946
12084
|
}
|
|
11947
12085
|
if (lineNumbers) {
|
|
11948
|
-
this.root.push(
|
|
12086
|
+
this.root.push(createLineNumberType(lineNumbers));
|
|
11949
12087
|
}
|
|
11950
12088
|
this.root.push(new PageNumberType(pageNumbers));
|
|
11951
12089
|
if (column) {
|
|
@@ -12234,55 +12372,77 @@ const FrameWrap = {
|
|
|
12234
12372
|
THROUGH: "through",
|
|
12235
12373
|
TIGHT: "tight"
|
|
12236
12374
|
};
|
|
12237
|
-
|
|
12238
|
-
|
|
12239
|
-
|
|
12240
|
-
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12259
|
-
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
|
|
12264
|
-
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12268
|
-
|
|
12269
|
-
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12274
|
-
|
|
12275
|
-
|
|
12276
|
-
|
|
12277
|
-
|
|
12278
|
-
|
|
12279
|
-
|
|
12280
|
-
|
|
12281
|
-
|
|
12282
|
-
|
|
12283
|
-
|
|
12375
|
+
const createFrameProperties = (options2) => {
|
|
12376
|
+
var _a, _b;
|
|
12377
|
+
return new BuilderElement({
|
|
12378
|
+
name: "w:framePr",
|
|
12379
|
+
attributes: {
|
|
12380
|
+
anchorLock: {
|
|
12381
|
+
key: "w:anchorLock",
|
|
12382
|
+
value: options2.anchorLock
|
|
12383
|
+
},
|
|
12384
|
+
dropCap: {
|
|
12385
|
+
key: "w:dropCap",
|
|
12386
|
+
value: options2.dropCap
|
|
12387
|
+
},
|
|
12388
|
+
width: {
|
|
12389
|
+
key: "w:w",
|
|
12390
|
+
value: options2.width
|
|
12391
|
+
},
|
|
12392
|
+
height: {
|
|
12393
|
+
key: "w:h",
|
|
12394
|
+
value: options2.height
|
|
12395
|
+
},
|
|
12396
|
+
x: {
|
|
12397
|
+
key: "w:x",
|
|
12398
|
+
value: options2.position ? options2.position.x : void 0
|
|
12399
|
+
},
|
|
12400
|
+
y: {
|
|
12401
|
+
key: "w:y",
|
|
12402
|
+
value: options2.position ? options2.position.y : void 0
|
|
12403
|
+
},
|
|
12404
|
+
anchorHorizontal: {
|
|
12405
|
+
key: "w:hAnchor",
|
|
12406
|
+
value: options2.anchor.horizontal
|
|
12407
|
+
},
|
|
12408
|
+
anchorVertical: {
|
|
12409
|
+
key: "w:vAnchor",
|
|
12410
|
+
value: options2.anchor.vertical
|
|
12411
|
+
},
|
|
12412
|
+
spaceHorizontal: {
|
|
12413
|
+
key: "w:hSpace",
|
|
12414
|
+
value: (_a = options2.space) == null ? void 0 : _a.horizontal
|
|
12415
|
+
},
|
|
12416
|
+
spaceVertical: {
|
|
12417
|
+
key: "w:vSpace",
|
|
12418
|
+
value: (_b = options2.space) == null ? void 0 : _b.vertical
|
|
12419
|
+
},
|
|
12420
|
+
rule: {
|
|
12421
|
+
key: "w:hRule",
|
|
12422
|
+
value: options2.rule
|
|
12423
|
+
},
|
|
12424
|
+
alignmentX: {
|
|
12425
|
+
key: "w:xAlign",
|
|
12426
|
+
value: options2.alignment ? options2.alignment.x : void 0
|
|
12427
|
+
},
|
|
12428
|
+
alignmentY: {
|
|
12429
|
+
key: "w:yAlign",
|
|
12430
|
+
value: options2.alignment ? options2.alignment.y : void 0
|
|
12431
|
+
},
|
|
12432
|
+
lines: {
|
|
12433
|
+
key: "w:lines",
|
|
12434
|
+
value: options2.lines
|
|
12435
|
+
},
|
|
12436
|
+
wrap: {
|
|
12437
|
+
key: "w:wrap",
|
|
12438
|
+
value: options2.wrap
|
|
12439
|
+
}
|
|
12440
|
+
}
|
|
12441
|
+
});
|
|
12442
|
+
};
|
|
12284
12443
|
class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
|
|
12285
12444
|
constructor(options2) {
|
|
12445
|
+
var _a, _b;
|
|
12286
12446
|
super("w:pPr");
|
|
12287
12447
|
// eslint-disable-next-line functional/prefer-readonly-type
|
|
12288
12448
|
__publicField(this, "numberingReferences", []);
|
|
@@ -12315,7 +12475,7 @@ class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
12315
12475
|
this.push(new PageBreakBefore());
|
|
12316
12476
|
}
|
|
12317
12477
|
if (options2.frame) {
|
|
12318
|
-
this.push(
|
|
12478
|
+
this.push(createFrameProperties(options2.frame));
|
|
12319
12479
|
}
|
|
12320
12480
|
if (options2.widowControl !== void 0) {
|
|
12321
12481
|
this.push(new OnOffElement("w:widowControl", options2.widowControl));
|
|
@@ -12326,9 +12486,9 @@ class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
12326
12486
|
if (options2.numbering) {
|
|
12327
12487
|
this.numberingReferences.push({
|
|
12328
12488
|
reference: options2.numbering.reference,
|
|
12329
|
-
instance: options2.numbering.instance
|
|
12489
|
+
instance: (_a = options2.numbering.instance) != null ? _a : 0
|
|
12330
12490
|
});
|
|
12331
|
-
this.push(new NumberProperties(`${options2.numbering.reference}-${options2.numbering.instance
|
|
12491
|
+
this.push(new NumberProperties(`${options2.numbering.reference}-${(_b = options2.numbering.instance) != null ? _b : 0}`, options2.numbering.level));
|
|
12332
12492
|
}
|
|
12333
12493
|
if (options2.border) {
|
|
12334
12494
|
this.push(new Border(options2.border));
|
|
@@ -12342,10 +12502,13 @@ class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
|
|
|
12342
12502
|
if (options2.wordWrap) {
|
|
12343
12503
|
this.push(new WordWrap());
|
|
12344
12504
|
}
|
|
12505
|
+
if (options2.overflowPunctuation) {
|
|
12506
|
+
this.push(new OnOffElement("w:overflowPunct", options2.overflowPunctuation));
|
|
12507
|
+
}
|
|
12345
12508
|
const tabDefinitions = [
|
|
12346
|
-
...options2.rightTabStop ? [{ type: TabStopType.RIGHT, position: options2.rightTabStop }] : [],
|
|
12509
|
+
...options2.rightTabStop !== void 0 ? [{ type: TabStopType.RIGHT, position: options2.rightTabStop }] : [],
|
|
12347
12510
|
...options2.tabStops ? options2.tabStops : [],
|
|
12348
|
-
...options2.leftTabStop ? [{ type: TabStopType.LEFT, position: options2.leftTabStop }] : []
|
|
12511
|
+
...options2.leftTabStop !== void 0 ? [{ type: TabStopType.LEFT, position: options2.leftTabStop }] : []
|
|
12349
12512
|
];
|
|
12350
12513
|
if (tabDefinitions.length > 0) {
|
|
12351
12514
|
this.push(new TabStop(tabDefinitions));
|
|
@@ -13199,8 +13362,8 @@ class Table extends FileChild {
|
|
|
13199
13362
|
super("w:tbl");
|
|
13200
13363
|
this.root.push(
|
|
13201
13364
|
new TableProperties({
|
|
13202
|
-
borders: borders
|
|
13203
|
-
width: width
|
|
13365
|
+
borders: borders != null ? borders : {},
|
|
13366
|
+
width: width != null ? width : { size: 100 },
|
|
13204
13367
|
indent,
|
|
13205
13368
|
float,
|
|
13206
13369
|
layout,
|
|
@@ -13412,6 +13575,7 @@ class ContentTypes extends XmlComponent {
|
|
|
13412
13575
|
this.root.push(new Default("image/gif", "gif"));
|
|
13413
13576
|
this.root.push(new Default("application/vnd.openxmlformats-package.relationships+xml", "rels"));
|
|
13414
13577
|
this.root.push(new Default("application/xml", "xml"));
|
|
13578
|
+
this.root.push(new Default("application/vnd.openxmlformats-officedocument.obfuscatedFont", "odttf"));
|
|
13415
13579
|
this.root.push(
|
|
13416
13580
|
new Override("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml", "/word/document.xml")
|
|
13417
13581
|
);
|
|
@@ -13423,6 +13587,7 @@ class ContentTypes extends XmlComponent {
|
|
|
13423
13587
|
this.root.push(new Override("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml", "/word/footnotes.xml"));
|
|
13424
13588
|
this.root.push(new Override("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml", "/word/settings.xml"));
|
|
13425
13589
|
this.root.push(new Override("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml", "/word/comments.xml"));
|
|
13590
|
+
this.root.push(new Override("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml", "/word/fontTable.xml"));
|
|
13426
13591
|
}
|
|
13427
13592
|
addFooter(index) {
|
|
13428
13593
|
this.root.push(
|
|
@@ -14652,7 +14817,7 @@ class SettingsAttributes extends XmlAttributeComponent {
|
|
|
14652
14817
|
}
|
|
14653
14818
|
class Settings extends XmlComponent {
|
|
14654
14819
|
constructor(options2) {
|
|
14655
|
-
var _a;
|
|
14820
|
+
var _a, _b, _c, _d;
|
|
14656
14821
|
super("w:settings");
|
|
14657
14822
|
this.root.push(
|
|
14658
14823
|
new SettingsAttributes({
|
|
@@ -14685,11 +14850,13 @@ class Settings extends XmlComponent {
|
|
|
14685
14850
|
if (options2.updateFields !== void 0) {
|
|
14686
14851
|
this.root.push(new OnOffElement("w:updateFields", options2.updateFields));
|
|
14687
14852
|
}
|
|
14853
|
+
if (options2.defaultTabStop !== void 0) {
|
|
14854
|
+
this.root.push(new NumberValueElement("w:defaultTabStop", options2.defaultTabStop));
|
|
14855
|
+
}
|
|
14688
14856
|
this.root.push(
|
|
14689
|
-
new Compatibility({
|
|
14690
|
-
|
|
14691
|
-
|
|
14692
|
-
})
|
|
14857
|
+
new Compatibility(__spreadProps(__spreadValues({}, (_a = options2.compatibility) != null ? _a : {}), {
|
|
14858
|
+
version: (_d = (_c = (_b = options2.compatibility) == null ? void 0 : _b.version) != null ? _c : options2.compatibilityModeVersion) != null ? _d : 15
|
|
14859
|
+
}))
|
|
14693
14860
|
);
|
|
14694
14861
|
}
|
|
14695
14862
|
}
|
|
@@ -14767,11 +14934,10 @@ class StyleForCharacter extends Style2 {
|
|
|
14767
14934
|
constructor(options2) {
|
|
14768
14935
|
super(
|
|
14769
14936
|
{ type: "character", styleId: options2.id },
|
|
14770
|
-
{
|
|
14937
|
+
__spreadValues({
|
|
14771
14938
|
uiPriority: 99,
|
|
14772
|
-
unhideWhenUsed: true
|
|
14773
|
-
|
|
14774
|
-
}
|
|
14939
|
+
unhideWhenUsed: true
|
|
14940
|
+
}, options2)
|
|
14775
14941
|
);
|
|
14776
14942
|
__publicField(this, "runProperties");
|
|
14777
14943
|
this.runProperties = new RunProperties(options2.run);
|
|
@@ -14780,100 +14946,90 @@ class StyleForCharacter extends Style2 {
|
|
|
14780
14946
|
}
|
|
14781
14947
|
class HeadingStyle extends StyleForParagraph {
|
|
14782
14948
|
constructor(options2) {
|
|
14783
|
-
super({
|
|
14949
|
+
super(__spreadValues({
|
|
14784
14950
|
basedOn: "Normal",
|
|
14785
14951
|
next: "Normal",
|
|
14786
|
-
quickFormat: true
|
|
14787
|
-
|
|
14788
|
-
});
|
|
14952
|
+
quickFormat: true
|
|
14953
|
+
}, options2));
|
|
14789
14954
|
}
|
|
14790
14955
|
}
|
|
14791
14956
|
class TitleStyle extends HeadingStyle {
|
|
14792
14957
|
constructor(options2) {
|
|
14793
|
-
super({
|
|
14958
|
+
super(__spreadValues({
|
|
14794
14959
|
id: "Title",
|
|
14795
|
-
name: "Title"
|
|
14796
|
-
|
|
14797
|
-
});
|
|
14960
|
+
name: "Title"
|
|
14961
|
+
}, options2));
|
|
14798
14962
|
}
|
|
14799
14963
|
}
|
|
14800
14964
|
class Heading1Style extends HeadingStyle {
|
|
14801
14965
|
constructor(options2) {
|
|
14802
|
-
super({
|
|
14966
|
+
super(__spreadValues({
|
|
14803
14967
|
id: "Heading1",
|
|
14804
|
-
name: "Heading 1"
|
|
14805
|
-
|
|
14806
|
-
});
|
|
14968
|
+
name: "Heading 1"
|
|
14969
|
+
}, options2));
|
|
14807
14970
|
}
|
|
14808
14971
|
}
|
|
14809
14972
|
class Heading2Style extends HeadingStyle {
|
|
14810
14973
|
constructor(options2) {
|
|
14811
|
-
super({
|
|
14974
|
+
super(__spreadValues({
|
|
14812
14975
|
id: "Heading2",
|
|
14813
|
-
name: "Heading 2"
|
|
14814
|
-
|
|
14815
|
-
});
|
|
14976
|
+
name: "Heading 2"
|
|
14977
|
+
}, options2));
|
|
14816
14978
|
}
|
|
14817
14979
|
}
|
|
14818
14980
|
class Heading3Style extends HeadingStyle {
|
|
14819
14981
|
constructor(options2) {
|
|
14820
|
-
super({
|
|
14982
|
+
super(__spreadValues({
|
|
14821
14983
|
id: "Heading3",
|
|
14822
|
-
name: "Heading 3"
|
|
14823
|
-
|
|
14824
|
-
});
|
|
14984
|
+
name: "Heading 3"
|
|
14985
|
+
}, options2));
|
|
14825
14986
|
}
|
|
14826
14987
|
}
|
|
14827
14988
|
class Heading4Style extends HeadingStyle {
|
|
14828
14989
|
constructor(options2) {
|
|
14829
|
-
super({
|
|
14990
|
+
super(__spreadValues({
|
|
14830
14991
|
id: "Heading4",
|
|
14831
|
-
name: "Heading 4"
|
|
14832
|
-
|
|
14833
|
-
});
|
|
14992
|
+
name: "Heading 4"
|
|
14993
|
+
}, options2));
|
|
14834
14994
|
}
|
|
14835
14995
|
}
|
|
14836
14996
|
class Heading5Style extends HeadingStyle {
|
|
14837
14997
|
constructor(options2) {
|
|
14838
|
-
super({
|
|
14998
|
+
super(__spreadValues({
|
|
14839
14999
|
id: "Heading5",
|
|
14840
|
-
name: "Heading 5"
|
|
14841
|
-
|
|
14842
|
-
});
|
|
15000
|
+
name: "Heading 5"
|
|
15001
|
+
}, options2));
|
|
14843
15002
|
}
|
|
14844
15003
|
}
|
|
14845
15004
|
class Heading6Style extends HeadingStyle {
|
|
14846
15005
|
constructor(options2) {
|
|
14847
|
-
super({
|
|
15006
|
+
super(__spreadValues({
|
|
14848
15007
|
id: "Heading6",
|
|
14849
|
-
name: "Heading 6"
|
|
14850
|
-
|
|
14851
|
-
});
|
|
15008
|
+
name: "Heading 6"
|
|
15009
|
+
}, options2));
|
|
14852
15010
|
}
|
|
14853
15011
|
}
|
|
14854
15012
|
class StrongStyle extends HeadingStyle {
|
|
14855
15013
|
constructor(options2) {
|
|
14856
|
-
super({
|
|
15014
|
+
super(__spreadValues({
|
|
14857
15015
|
id: "Strong",
|
|
14858
|
-
name: "Strong"
|
|
14859
|
-
|
|
14860
|
-
});
|
|
15016
|
+
name: "Strong"
|
|
15017
|
+
}, options2));
|
|
14861
15018
|
}
|
|
14862
15019
|
}
|
|
14863
15020
|
class ListParagraph extends StyleForParagraph {
|
|
14864
15021
|
constructor(options2) {
|
|
14865
|
-
super({
|
|
15022
|
+
super(__spreadValues({
|
|
14866
15023
|
id: "ListParagraph",
|
|
14867
15024
|
name: "List Paragraph",
|
|
14868
15025
|
basedOn: "Normal",
|
|
14869
|
-
quickFormat: true
|
|
14870
|
-
|
|
14871
|
-
});
|
|
15026
|
+
quickFormat: true
|
|
15027
|
+
}, options2));
|
|
14872
15028
|
}
|
|
14873
15029
|
}
|
|
14874
15030
|
class FootnoteText extends StyleForParagraph {
|
|
14875
15031
|
constructor(options2) {
|
|
14876
|
-
super({
|
|
15032
|
+
super(__spreadValues({
|
|
14877
15033
|
id: "FootnoteText",
|
|
14878
15034
|
name: "footnote text",
|
|
14879
15035
|
link: "FootnoteTextChar",
|
|
@@ -14890,28 +15046,26 @@ class FootnoteText extends StyleForParagraph {
|
|
|
14890
15046
|
},
|
|
14891
15047
|
run: {
|
|
14892
15048
|
size: 20
|
|
14893
|
-
}
|
|
14894
|
-
|
|
14895
|
-
});
|
|
15049
|
+
}
|
|
15050
|
+
}, options2));
|
|
14896
15051
|
}
|
|
14897
15052
|
}
|
|
14898
15053
|
class FootnoteReferenceStyle extends StyleForCharacter {
|
|
14899
15054
|
constructor(options2) {
|
|
14900
|
-
super({
|
|
15055
|
+
super(__spreadValues({
|
|
14901
15056
|
id: "FootnoteReference",
|
|
14902
15057
|
name: "footnote reference",
|
|
14903
15058
|
basedOn: "DefaultParagraphFont",
|
|
14904
15059
|
semiHidden: true,
|
|
14905
15060
|
run: {
|
|
14906
15061
|
superScript: true
|
|
14907
|
-
}
|
|
14908
|
-
|
|
14909
|
-
});
|
|
15062
|
+
}
|
|
15063
|
+
}, options2));
|
|
14910
15064
|
}
|
|
14911
15065
|
}
|
|
14912
15066
|
class FootnoteTextChar extends StyleForCharacter {
|
|
14913
15067
|
constructor(options2) {
|
|
14914
|
-
super({
|
|
15068
|
+
super(__spreadValues({
|
|
14915
15069
|
id: "FootnoteTextChar",
|
|
14916
15070
|
name: "Footnote Text Char",
|
|
14917
15071
|
basedOn: "DefaultParagraphFont",
|
|
@@ -14919,14 +15073,13 @@ class FootnoteTextChar extends StyleForCharacter {
|
|
|
14919
15073
|
semiHidden: true,
|
|
14920
15074
|
run: {
|
|
14921
15075
|
size: 20
|
|
14922
|
-
}
|
|
14923
|
-
|
|
14924
|
-
});
|
|
15076
|
+
}
|
|
15077
|
+
}, options2));
|
|
14925
15078
|
}
|
|
14926
15079
|
}
|
|
14927
15080
|
class HyperlinkStyle extends StyleForCharacter {
|
|
14928
15081
|
constructor(options2) {
|
|
14929
|
-
super({
|
|
15082
|
+
super(__spreadValues({
|
|
14930
15083
|
id: "Hyperlink",
|
|
14931
15084
|
name: "Hyperlink",
|
|
14932
15085
|
basedOn: "DefaultParagraphFont",
|
|
@@ -14935,9 +15088,8 @@ class HyperlinkStyle extends StyleForCharacter {
|
|
|
14935
15088
|
underline: {
|
|
14936
15089
|
type: UnderlineType.SINGLE
|
|
14937
15090
|
}
|
|
14938
|
-
}
|
|
14939
|
-
|
|
14940
|
-
});
|
|
15091
|
+
}
|
|
15092
|
+
}, options2));
|
|
14941
15093
|
}
|
|
14942
15094
|
}
|
|
14943
15095
|
class Styles extends XmlComponent {
|
|
@@ -15031,6 +15183,7 @@ class ExternalStylesFactory {
|
|
|
15031
15183
|
}
|
|
15032
15184
|
class DefaultStylesFactory {
|
|
15033
15185
|
newInstance(options2 = {}) {
|
|
15186
|
+
var _a;
|
|
15034
15187
|
const documentAttributes = new DocumentAttributes({
|
|
15035
15188
|
mc: "http://schemas.openxmlformats.org/markup-compatibility/2006",
|
|
15036
15189
|
r: "http://schemas.openxmlformats.org/officeDocument/2006/relationships",
|
|
@@ -15042,59 +15195,51 @@ class DefaultStylesFactory {
|
|
|
15042
15195
|
return {
|
|
15043
15196
|
initialStyles: documentAttributes,
|
|
15044
15197
|
importedStyles: [
|
|
15045
|
-
new DocumentDefaults(options2.document
|
|
15046
|
-
new TitleStyle({
|
|
15198
|
+
new DocumentDefaults((_a = options2.document) != null ? _a : {}),
|
|
15199
|
+
new TitleStyle(__spreadValues({
|
|
15047
15200
|
run: {
|
|
15048
15201
|
size: 56
|
|
15049
|
-
}
|
|
15050
|
-
|
|
15051
|
-
|
|
15052
|
-
new Heading1Style({
|
|
15202
|
+
}
|
|
15203
|
+
}, options2.title)),
|
|
15204
|
+
new Heading1Style(__spreadValues({
|
|
15053
15205
|
run: {
|
|
15054
15206
|
color: "2E74B5",
|
|
15055
15207
|
size: 32
|
|
15056
|
-
}
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
new Heading2Style({
|
|
15208
|
+
}
|
|
15209
|
+
}, options2.heading1)),
|
|
15210
|
+
new Heading2Style(__spreadValues({
|
|
15060
15211
|
run: {
|
|
15061
15212
|
color: "2E74B5",
|
|
15062
15213
|
size: 26
|
|
15063
|
-
}
|
|
15064
|
-
|
|
15065
|
-
|
|
15066
|
-
new Heading3Style({
|
|
15214
|
+
}
|
|
15215
|
+
}, options2.heading2)),
|
|
15216
|
+
new Heading3Style(__spreadValues({
|
|
15067
15217
|
run: {
|
|
15068
15218
|
color: "1F4D78",
|
|
15069
15219
|
size: 24
|
|
15070
|
-
}
|
|
15071
|
-
|
|
15072
|
-
|
|
15073
|
-
new Heading4Style({
|
|
15220
|
+
}
|
|
15221
|
+
}, options2.heading3)),
|
|
15222
|
+
new Heading4Style(__spreadValues({
|
|
15074
15223
|
run: {
|
|
15075
15224
|
color: "2E74B5",
|
|
15076
15225
|
italics: true
|
|
15077
|
-
}
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
new Heading5Style({
|
|
15226
|
+
}
|
|
15227
|
+
}, options2.heading4)),
|
|
15228
|
+
new Heading5Style(__spreadValues({
|
|
15081
15229
|
run: {
|
|
15082
15230
|
color: "2E74B5"
|
|
15083
|
-
}
|
|
15084
|
-
|
|
15085
|
-
|
|
15086
|
-
new Heading6Style({
|
|
15231
|
+
}
|
|
15232
|
+
}, options2.heading5)),
|
|
15233
|
+
new Heading6Style(__spreadValues({
|
|
15087
15234
|
run: {
|
|
15088
15235
|
color: "1F4D78"
|
|
15089
|
-
}
|
|
15090
|
-
|
|
15091
|
-
|
|
15092
|
-
new StrongStyle({
|
|
15236
|
+
}
|
|
15237
|
+
}, options2.heading6)),
|
|
15238
|
+
new StrongStyle(__spreadValues({
|
|
15093
15239
|
run: {
|
|
15094
15240
|
bold: true
|
|
15095
|
-
}
|
|
15096
|
-
|
|
15097
|
-
}),
|
|
15241
|
+
}
|
|
15242
|
+
}, options2.strong)),
|
|
15098
15243
|
new ListParagraph(options2.listParagraph || {}),
|
|
15099
15244
|
new HyperlinkStyle(options2.hyperlink || {}),
|
|
15100
15245
|
new FootnoteReferenceStyle(options2.footnoteReference || {}),
|
|
@@ -15104,6 +15249,165 @@ class DefaultStylesFactory {
|
|
|
15104
15249
|
};
|
|
15105
15250
|
}
|
|
15106
15251
|
}
|
|
15252
|
+
const CharacterSet = {
|
|
15253
|
+
ANSI: "00",
|
|
15254
|
+
DEFAULT: "01",
|
|
15255
|
+
SYMBOL: "02",
|
|
15256
|
+
MAC: "4D",
|
|
15257
|
+
JIS: "80",
|
|
15258
|
+
HANGUL: "81",
|
|
15259
|
+
JOHAB: "82",
|
|
15260
|
+
GB_2312: "86",
|
|
15261
|
+
CHINESEBIG5: "88",
|
|
15262
|
+
GREEK: "A1",
|
|
15263
|
+
TURKISH: "A2",
|
|
15264
|
+
VIETNAMESE: "A3",
|
|
15265
|
+
HEBREW: "B1",
|
|
15266
|
+
ARABIC: "B2",
|
|
15267
|
+
BALTIC: "BA",
|
|
15268
|
+
RUSSIAN: "CC",
|
|
15269
|
+
THAI: "DE",
|
|
15270
|
+
EASTEUROPE: "EE",
|
|
15271
|
+
OEM: "FF"
|
|
15272
|
+
};
|
|
15273
|
+
const createFontRelationship = ({ id, fontKey, subsetted }, name) => new BuilderElement({
|
|
15274
|
+
name,
|
|
15275
|
+
attributes: __spreadValues({
|
|
15276
|
+
id: { key: "r:id", value: id }
|
|
15277
|
+
}, fontKey ? { fontKey: { key: "w:fontKey", value: `{${fontKey}}` } } : {}),
|
|
15278
|
+
children: [...subsetted ? [new OnOffElement("w:subsetted", subsetted)] : []]
|
|
15279
|
+
});
|
|
15280
|
+
const createFont = ({
|
|
15281
|
+
name,
|
|
15282
|
+
altName,
|
|
15283
|
+
panose1,
|
|
15284
|
+
charset,
|
|
15285
|
+
family,
|
|
15286
|
+
notTrueType,
|
|
15287
|
+
pitch,
|
|
15288
|
+
sig,
|
|
15289
|
+
embedRegular,
|
|
15290
|
+
embedBold,
|
|
15291
|
+
embedItalic,
|
|
15292
|
+
embedBoldItalic
|
|
15293
|
+
}) => (
|
|
15294
|
+
// http://www.datypic.com/sc/ooxml/e-w_font-1.html
|
|
15295
|
+
new BuilderElement({
|
|
15296
|
+
name: "w:font",
|
|
15297
|
+
attributes: {
|
|
15298
|
+
name: { key: "w:name", value: name }
|
|
15299
|
+
},
|
|
15300
|
+
children: [
|
|
15301
|
+
// http://www.datypic.com/sc/ooxml/e-w_altName-1.html
|
|
15302
|
+
...altName ? [createStringElement("w:altName", altName)] : [],
|
|
15303
|
+
// http://www.datypic.com/sc/ooxml/e-w_panose1-1.html
|
|
15304
|
+
...panose1 ? [createStringElement("w:panose1", panose1)] : [],
|
|
15305
|
+
// http://www.datypic.com/sc/ooxml/e-w_charset-1.html
|
|
15306
|
+
...charset ? [createStringElement("w:charset", charset)] : [],
|
|
15307
|
+
// http://www.datypic.com/sc/ooxml/e-w_family-1.html
|
|
15308
|
+
...family ? [createStringElement("w:family", family)] : [],
|
|
15309
|
+
// http://www.datypic.com/sc/ooxml/e-w_notTrueType-1.html
|
|
15310
|
+
...notTrueType ? [new OnOffElement("w:notTrueType", notTrueType)] : [],
|
|
15311
|
+
...pitch ? [createStringElement("w:pitch", pitch)] : [],
|
|
15312
|
+
// http://www.datypic.com/sc/ooxml/e-w_sig-1.html
|
|
15313
|
+
...sig ? [
|
|
15314
|
+
new BuilderElement({
|
|
15315
|
+
name: "w:sig",
|
|
15316
|
+
attributes: {
|
|
15317
|
+
usb0: { key: "w:usb0", value: sig.usb0 },
|
|
15318
|
+
usb1: { key: "w:usb1", value: sig.usb1 },
|
|
15319
|
+
usb2: { key: "w:usb2", value: sig.usb2 },
|
|
15320
|
+
usb3: { key: "w:usb3", value: sig.usb3 },
|
|
15321
|
+
csb0: { key: "w:csb0", value: sig.csb0 },
|
|
15322
|
+
csb1: { key: "w:csb1", value: sig.csb1 }
|
|
15323
|
+
}
|
|
15324
|
+
})
|
|
15325
|
+
] : [],
|
|
15326
|
+
// http://www.datypic.com/sc/ooxml/e-w_embedRegular-1.html
|
|
15327
|
+
...embedRegular ? [createFontRelationship(embedRegular, "w:embedRegular")] : [],
|
|
15328
|
+
// http://www.datypic.com/sc/ooxml/e-w_embedBold-1.html
|
|
15329
|
+
...embedBold ? [createFontRelationship(embedBold, "w:embedBold")] : [],
|
|
15330
|
+
// http://www.datypic.com/sc/ooxml/e-w_embedItalic-1.html
|
|
15331
|
+
...embedItalic ? [createFontRelationship(embedItalic, "w:embedItalic")] : [],
|
|
15332
|
+
// http://www.datypic.com/sc/ooxml/e-w_embedBoldItalic-1.html
|
|
15333
|
+
...embedBoldItalic ? [createFontRelationship(embedBoldItalic, "w:embedBoldItalic")] : []
|
|
15334
|
+
]
|
|
15335
|
+
})
|
|
15336
|
+
);
|
|
15337
|
+
const createRegularFont = ({
|
|
15338
|
+
name,
|
|
15339
|
+
index,
|
|
15340
|
+
fontKey,
|
|
15341
|
+
characterSet
|
|
15342
|
+
}) => createFont({
|
|
15343
|
+
name,
|
|
15344
|
+
sig: {
|
|
15345
|
+
usb0: "E0002AFF",
|
|
15346
|
+
usb1: "C000247B",
|
|
15347
|
+
usb2: "00000009",
|
|
15348
|
+
usb3: "00000000",
|
|
15349
|
+
csb0: "000001FF",
|
|
15350
|
+
csb1: "00000000"
|
|
15351
|
+
},
|
|
15352
|
+
charset: characterSet,
|
|
15353
|
+
family: "auto",
|
|
15354
|
+
pitch: "variable",
|
|
15355
|
+
embedRegular: {
|
|
15356
|
+
fontKey,
|
|
15357
|
+
id: `rId${index}`
|
|
15358
|
+
}
|
|
15359
|
+
});
|
|
15360
|
+
const createFontTable = (fonts) => (
|
|
15361
|
+
// https://c-rex.net/projects/samples/ooxml/e1/Part4/OOXML_P4_DOCX_Font_topic_ID0ERNCU.html
|
|
15362
|
+
// http://www.datypic.com/sc/ooxml/e-w_fonts.html
|
|
15363
|
+
new BuilderElement({
|
|
15364
|
+
name: "w:fonts",
|
|
15365
|
+
attributes: {
|
|
15366
|
+
mc: { key: "xmlns:mc", value: "http://schemas.openxmlformats.org/markup-compatibility/2006" },
|
|
15367
|
+
r: { key: "xmlns:r", value: "http://schemas.openxmlformats.org/officeDocument/2006/relationships" },
|
|
15368
|
+
w: { key: "xmlns:w", value: "http://schemas.openxmlformats.org/wordprocessingml/2006/main" },
|
|
15369
|
+
w14: { key: "xmlns:w14", value: "http://schemas.microsoft.com/office/word/2010/wordml" },
|
|
15370
|
+
w15: { key: "xmlns:w15", value: "http://schemas.microsoft.com/office/word/2012/wordml" },
|
|
15371
|
+
w16cex: { key: "xmlns:w16cex", value: "http://schemas.microsoft.com/office/word/2018/wordml/cex" },
|
|
15372
|
+
w16cid: { key: "xmlns:w16cid", value: "http://schemas.microsoft.com/office/word/2016/wordml/cid" },
|
|
15373
|
+
w16: { key: "xmlns:w16", value: "http://schemas.microsoft.com/office/word/2018/wordml" },
|
|
15374
|
+
w16sdtdh: { key: "xmlns:w16sdtdh", value: "http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash" },
|
|
15375
|
+
w16se: { key: "xmlns:w16se", value: "http://schemas.microsoft.com/office/word/2015/wordml/symex" },
|
|
15376
|
+
Ignorable: { key: "mc:Ignorable", value: "w14 w15 w16se w16cid w16 w16cex w16sdtdh" }
|
|
15377
|
+
},
|
|
15378
|
+
children: fonts.map(
|
|
15379
|
+
(font, i) => createRegularFont({
|
|
15380
|
+
name: font.name,
|
|
15381
|
+
index: i + 1,
|
|
15382
|
+
fontKey: font.fontKey
|
|
15383
|
+
})
|
|
15384
|
+
)
|
|
15385
|
+
})
|
|
15386
|
+
);
|
|
15387
|
+
class FontWrapper {
|
|
15388
|
+
constructor(options2) {
|
|
15389
|
+
__publicField(this, "fontTable");
|
|
15390
|
+
__publicField(this, "relationships");
|
|
15391
|
+
__publicField(this, "fontOptionsWithKey", []);
|
|
15392
|
+
this.options = options2;
|
|
15393
|
+
this.fontOptionsWithKey = options2.map((o) => __spreadProps(__spreadValues({}, o), { fontKey: uniqueUuid() }));
|
|
15394
|
+
this.fontTable = createFontTable(this.fontOptionsWithKey);
|
|
15395
|
+
this.relationships = new Relationships();
|
|
15396
|
+
for (let i = 0; i < options2.length; i++) {
|
|
15397
|
+
this.relationships.createRelationship(
|
|
15398
|
+
i + 1,
|
|
15399
|
+
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/font",
|
|
15400
|
+
`fonts/${options2[i].name}.odttf`
|
|
15401
|
+
);
|
|
15402
|
+
}
|
|
15403
|
+
}
|
|
15404
|
+
get View() {
|
|
15405
|
+
return this.fontTable;
|
|
15406
|
+
}
|
|
15407
|
+
get Relationships() {
|
|
15408
|
+
return this.relationships;
|
|
15409
|
+
}
|
|
15410
|
+
}
|
|
15107
15411
|
class File {
|
|
15108
15412
|
constructor(options2) {
|
|
15109
15413
|
// eslint-disable-next-line functional/prefer-readonly-type
|
|
@@ -15124,17 +15428,17 @@ class File {
|
|
|
15124
15428
|
__publicField(this, "appProperties");
|
|
15125
15429
|
__publicField(this, "styles");
|
|
15126
15430
|
__publicField(this, "comments");
|
|
15127
|
-
|
|
15128
|
-
|
|
15129
|
-
|
|
15130
|
-
creator: options2.creator
|
|
15131
|
-
revision: options2.revision
|
|
15132
|
-
lastModifiedBy: options2.lastModifiedBy
|
|
15133
|
-
});
|
|
15431
|
+
__publicField(this, "fontWrapper");
|
|
15432
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
15433
|
+
this.coreProperties = new CoreProperties(__spreadProps(__spreadValues({}, options2), {
|
|
15434
|
+
creator: (_a = options2.creator) != null ? _a : "Un-named",
|
|
15435
|
+
revision: (_b = options2.revision) != null ? _b : 1,
|
|
15436
|
+
lastModifiedBy: (_c = options2.lastModifiedBy) != null ? _c : "Un-named"
|
|
15437
|
+
}));
|
|
15134
15438
|
this.numbering = new Numbering(options2.numbering ? options2.numbering : { config: [] });
|
|
15135
|
-
this.comments = new Comments(options2.comments
|
|
15439
|
+
this.comments = new Comments((_d = options2.comments) != null ? _d : { children: [] });
|
|
15136
15440
|
this.fileRelationships = new Relationships();
|
|
15137
|
-
this.customProperties = new CustomProperties(options2.customProperties
|
|
15441
|
+
this.customProperties = new CustomProperties((_e = options2.customProperties) != null ? _e : []);
|
|
15138
15442
|
this.appProperties = new AppProperties();
|
|
15139
15443
|
this.footnotesWrapper = new FootnotesWrapper();
|
|
15140
15444
|
this.contentTypes = new ContentTypes();
|
|
@@ -15143,8 +15447,9 @@ class File {
|
|
|
15143
15447
|
compatibilityModeVersion: options2.compatabilityModeVersion,
|
|
15144
15448
|
compatibility: options2.compatibility,
|
|
15145
15449
|
evenAndOddHeaders: options2.evenAndOddHeaderAndFooters ? true : false,
|
|
15146
|
-
trackRevisions: (
|
|
15147
|
-
updateFields: (
|
|
15450
|
+
trackRevisions: (_f = options2.features) == null ? void 0 : _f.trackRevisions,
|
|
15451
|
+
updateFields: (_g = options2.features) == null ? void 0 : _g.updateFields,
|
|
15452
|
+
defaultTabStop: options2.defaultTabStop
|
|
15148
15453
|
});
|
|
15149
15454
|
this.media = new Media();
|
|
15150
15455
|
if (options2.externalStyles) {
|
|
@@ -15153,10 +15458,7 @@ class File {
|
|
|
15153
15458
|
} else if (options2.styles) {
|
|
15154
15459
|
const stylesFactory = new DefaultStylesFactory();
|
|
15155
15460
|
const defaultStyles = stylesFactory.newInstance(options2.styles.default);
|
|
15156
|
-
this.styles = new Styles({
|
|
15157
|
-
...defaultStyles,
|
|
15158
|
-
...options2.styles
|
|
15159
|
-
});
|
|
15461
|
+
this.styles = new Styles(__spreadValues(__spreadValues({}, defaultStyles), options2.styles));
|
|
15160
15462
|
} else {
|
|
15161
15463
|
const stylesFactory = new DefaultStylesFactory();
|
|
15162
15464
|
this.styles = new Styles(stylesFactory.newInstance());
|
|
@@ -15170,10 +15472,10 @@ class File {
|
|
|
15170
15472
|
this.footnotesWrapper.View.createFootNote(parseFloat(key), options2.footnotes[key].children);
|
|
15171
15473
|
}
|
|
15172
15474
|
}
|
|
15475
|
+
this.fontWrapper = new FontWrapper((_h = options2.fonts) != null ? _h : []);
|
|
15173
15476
|
}
|
|
15174
15477
|
addSection({ headers = {}, footers = {}, children, properties }) {
|
|
15175
|
-
this.documentWrapper.View.Body.addSection({
|
|
15176
|
-
...properties,
|
|
15478
|
+
this.documentWrapper.View.Body.addSection(__spreadProps(__spreadValues({}, properties), {
|
|
15177
15479
|
headerWrapperGroup: {
|
|
15178
15480
|
default: headers.default ? this.createHeader(headers.default) : void 0,
|
|
15179
15481
|
first: headers.first ? this.createHeader(headers.first) : void 0,
|
|
@@ -15184,7 +15486,7 @@ class File {
|
|
|
15184
15486
|
first: footers.first ? this.createFooter(footers.first) : void 0,
|
|
15185
15487
|
even: footers.even ? this.createFooter(footers.even) : void 0
|
|
15186
15488
|
}
|
|
15187
|
-
});
|
|
15489
|
+
}));
|
|
15188
15490
|
for (const child of children) {
|
|
15189
15491
|
this.documentWrapper.View.add(child);
|
|
15190
15492
|
}
|
|
@@ -15317,6 +15619,9 @@ class File {
|
|
|
15317
15619
|
get Comments() {
|
|
15318
15620
|
return this.comments;
|
|
15319
15621
|
}
|
|
15622
|
+
get FontTable() {
|
|
15623
|
+
return this.fontWrapper;
|
|
15624
|
+
}
|
|
15320
15625
|
}
|
|
15321
15626
|
class FieldInstruction extends XmlComponent {
|
|
15322
15627
|
constructor(properties = {}) {
|
|
@@ -18266,7 +18571,7 @@ var jszip_min = { exports: {} };
|
|
|
18266
18571
|
});
|
|
18267
18572
|
})(jszip_min);
|
|
18268
18573
|
var jszip_minExports = jszip_min.exports;
|
|
18269
|
-
const JSZip = /* @__PURE__ */ getDefaultExportFromCjs(jszip_minExports);
|
|
18574
|
+
const JSZip = /* @__PURE__ */ getDefaultExportFromCjs$1(jszip_minExports);
|
|
18270
18575
|
var xml$2 = { exports: {} };
|
|
18271
18576
|
var XML_CHARACTER_MAP = {
|
|
18272
18577
|
"&": "&",
|
|
@@ -18514,7 +18819,23 @@ function attribute(key, value) {
|
|
|
18514
18819
|
xml$2.exports = xml;
|
|
18515
18820
|
xml$2.exports.element = xml$2.exports.Element = element;
|
|
18516
18821
|
var xmlExports = xml$2.exports;
|
|
18517
|
-
const xml$1 = /* @__PURE__ */ getDefaultExportFromCjs(xmlExports);
|
|
18822
|
+
const xml$1 = /* @__PURE__ */ getDefaultExportFromCjs$1(xmlExports);
|
|
18823
|
+
const obfuscatedStartOffset = 0;
|
|
18824
|
+
const obfuscatedEndOffset = 32;
|
|
18825
|
+
const guidSize = 32;
|
|
18826
|
+
const obfuscate = (buf, fontKey) => {
|
|
18827
|
+
const guid = fontKey.replace(/-/g, "");
|
|
18828
|
+
if (guid.length !== guidSize) {
|
|
18829
|
+
throw new Error(`Error: Cannot extract GUID from font filename: ${fontKey}`);
|
|
18830
|
+
}
|
|
18831
|
+
const hexStrings = guid.replace(/(..)/g, "$1 ").trim().split(" ");
|
|
18832
|
+
const hexNumbers = hexStrings.map((hexString) => parseInt(hexString, 16));
|
|
18833
|
+
hexNumbers.reverse();
|
|
18834
|
+
const bytesToObfuscate = buf.slice(obfuscatedStartOffset, obfuscatedEndOffset);
|
|
18835
|
+
const obfuscatedBytes = bytesToObfuscate.map((byte, i) => byte ^ hexNumbers[i % hexNumbers.length]);
|
|
18836
|
+
const out = Buffer.concat([buf.slice(0, obfuscatedStartOffset), obfuscatedBytes, buf.slice(obfuscatedEndOffset)]);
|
|
18837
|
+
return out;
|
|
18838
|
+
};
|
|
18518
18839
|
class Formatter {
|
|
18519
18840
|
// tslint:disable-next-line: no-object-literal-type-assertion
|
|
18520
18841
|
format(input, context = { stack: [] }) {
|
|
@@ -18575,6 +18896,10 @@ class Compiler {
|
|
|
18575
18896
|
for (const { stream, fileName } of file.Media.Array) {
|
|
18576
18897
|
zip.file(`word/media/${fileName}`, stream);
|
|
18577
18898
|
}
|
|
18899
|
+
for (const { data: buffer2, name, fontKey } of file.FontTable.fontOptionsWithKey) {
|
|
18900
|
+
const [nameWithoutExtension] = name.split(".");
|
|
18901
|
+
zip.file(`word/fonts/${nameWithoutExtension}.odttf`, obfuscate(buffer2, fontKey));
|
|
18902
|
+
}
|
|
18578
18903
|
return zip;
|
|
18579
18904
|
}
|
|
18580
18905
|
xmlifyFile(file, prettify) {
|
|
@@ -18936,6 +19261,39 @@ class Compiler {
|
|
|
18936
19261
|
}
|
|
18937
19262
|
),
|
|
18938
19263
|
path: "word/comments.xml"
|
|
19264
|
+
},
|
|
19265
|
+
FontTable: {
|
|
19266
|
+
data: xml$1(
|
|
19267
|
+
this.formatter.format(file.FontTable.View, {
|
|
19268
|
+
viewWrapper: file.Document,
|
|
19269
|
+
file,
|
|
19270
|
+
stack: []
|
|
19271
|
+
}),
|
|
19272
|
+
{
|
|
19273
|
+
indent: prettify,
|
|
19274
|
+
declaration: {
|
|
19275
|
+
standalone: "yes",
|
|
19276
|
+
encoding: "UTF-8"
|
|
19277
|
+
}
|
|
19278
|
+
}
|
|
19279
|
+
),
|
|
19280
|
+
path: "word/fontTable.xml"
|
|
19281
|
+
},
|
|
19282
|
+
FontTableRelationships: {
|
|
19283
|
+
data: (() => xml$1(
|
|
19284
|
+
this.formatter.format(file.FontTable.Relationships, {
|
|
19285
|
+
viewWrapper: file.Document,
|
|
19286
|
+
file,
|
|
19287
|
+
stack: []
|
|
19288
|
+
}),
|
|
19289
|
+
{
|
|
19290
|
+
indent: prettify,
|
|
19291
|
+
declaration: {
|
|
19292
|
+
encoding: "UTF-8"
|
|
19293
|
+
}
|
|
19294
|
+
}
|
|
19295
|
+
))(),
|
|
19296
|
+
path: "word/_rels/fontTable.xml.rels"
|
|
18939
19297
|
}
|
|
18940
19298
|
};
|
|
18941
19299
|
}
|
|
@@ -18949,41 +19307,49 @@ const PrettifyType = {
|
|
|
18949
19307
|
};
|
|
18950
19308
|
const convertPrettifyType = (prettify) => prettify === true ? PrettifyType.WITH_2_BLANKS : prettify === false ? void 0 : prettify;
|
|
18951
19309
|
class Packer {
|
|
18952
|
-
static
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
|
|
18957
|
-
|
|
19310
|
+
static toString(file, prettify) {
|
|
19311
|
+
return __async(this, null, function* () {
|
|
19312
|
+
const zip = this.compiler.compile(file, convertPrettifyType(prettify));
|
|
19313
|
+
const zipData = yield zip.generateAsync({
|
|
19314
|
+
type: "string",
|
|
19315
|
+
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19316
|
+
compression: "DEFLATE"
|
|
19317
|
+
});
|
|
19318
|
+
return zipData;
|
|
18958
19319
|
});
|
|
18959
|
-
return zipData;
|
|
18960
19320
|
}
|
|
18961
|
-
static
|
|
18962
|
-
|
|
18963
|
-
|
|
18964
|
-
|
|
18965
|
-
|
|
18966
|
-
|
|
19321
|
+
static toBuffer(file, prettify) {
|
|
19322
|
+
return __async(this, null, function* () {
|
|
19323
|
+
const zip = this.compiler.compile(file, convertPrettifyType(prettify));
|
|
19324
|
+
const zipData = yield zip.generateAsync({
|
|
19325
|
+
type: "nodebuffer",
|
|
19326
|
+
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19327
|
+
compression: "DEFLATE"
|
|
19328
|
+
});
|
|
19329
|
+
return zipData;
|
|
18967
19330
|
});
|
|
18968
|
-
return zipData;
|
|
18969
19331
|
}
|
|
18970
|
-
static
|
|
18971
|
-
|
|
18972
|
-
|
|
18973
|
-
|
|
18974
|
-
|
|
18975
|
-
|
|
19332
|
+
static toBase64String(file, prettify) {
|
|
19333
|
+
return __async(this, null, function* () {
|
|
19334
|
+
const zip = this.compiler.compile(file, convertPrettifyType(prettify));
|
|
19335
|
+
const zipData = yield zip.generateAsync({
|
|
19336
|
+
type: "base64",
|
|
19337
|
+
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19338
|
+
compression: "DEFLATE"
|
|
19339
|
+
});
|
|
19340
|
+
return zipData;
|
|
18976
19341
|
});
|
|
18977
|
-
return zipData;
|
|
18978
19342
|
}
|
|
18979
|
-
static
|
|
18980
|
-
|
|
18981
|
-
|
|
18982
|
-
|
|
18983
|
-
|
|
18984
|
-
|
|
19343
|
+
static toBlob(file, prettify) {
|
|
19344
|
+
return __async(this, null, function* () {
|
|
19345
|
+
const zip = this.compiler.compile(file, convertPrettifyType(prettify));
|
|
19346
|
+
const zipData = yield zip.generateAsync({
|
|
19347
|
+
type: "blob",
|
|
19348
|
+
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19349
|
+
compression: "DEFLATE"
|
|
19350
|
+
});
|
|
19351
|
+
return zipData;
|
|
18985
19352
|
});
|
|
18986
|
-
return zipData;
|
|
18987
19353
|
}
|
|
18988
19354
|
static toStream(file, prettify) {
|
|
18989
19355
|
const stream = new streamBrowserify.Stream();
|
|
@@ -19006,18 +19372,18 @@ const toJson = (xmlData) => {
|
|
|
19006
19372
|
return xmlObj;
|
|
19007
19373
|
};
|
|
19008
19374
|
const createTextElementContents = (text) => {
|
|
19375
|
+
var _a;
|
|
19009
19376
|
const textJson = toJson(xml$1(formatter$1.format(new Text({ text }))));
|
|
19010
|
-
return textJson.elements[0].elements
|
|
19377
|
+
return (_a = textJson.elements[0].elements) != null ? _a : [];
|
|
19011
19378
|
};
|
|
19012
|
-
const patchSpaceAttribute = (element2) => ({
|
|
19013
|
-
...element2,
|
|
19379
|
+
const patchSpaceAttribute = (element2) => __spreadProps(__spreadValues({}, element2), {
|
|
19014
19380
|
attributes: {
|
|
19015
19381
|
"xml:space": "preserve"
|
|
19016
19382
|
}
|
|
19017
19383
|
});
|
|
19018
19384
|
const getFirstLevelElements = (relationships, id) => {
|
|
19019
|
-
var _a;
|
|
19020
|
-
return ((_a = relationships.elements) == null ? void 0 : _a.filter((e) => e.name === id)[0].elements)
|
|
19385
|
+
var _a, _b;
|
|
19386
|
+
return (_b = (_a = relationships.elements) == null ? void 0 : _a.filter((e) => e.name === id)[0].elements) != null ? _b : [];
|
|
19021
19387
|
};
|
|
19022
19388
|
const ReplaceMode = {
|
|
19023
19389
|
START: 0,
|
|
@@ -19071,16 +19437,16 @@ const patchTextElement = (element2, text) => {
|
|
|
19071
19437
|
return element2;
|
|
19072
19438
|
};
|
|
19073
19439
|
const findRunElementIndexWithToken = (paragraphElement, token) => {
|
|
19074
|
-
var _a, _b;
|
|
19075
|
-
for (let i = 0; i < (paragraphElement.elements
|
|
19440
|
+
var _a, _b, _c, _d;
|
|
19441
|
+
for (let i = 0; i < ((_a = paragraphElement.elements) != null ? _a : []).length; i++) {
|
|
19076
19442
|
const element2 = paragraphElement.elements[i];
|
|
19077
19443
|
if (element2.type === "element" && element2.name === "w:r") {
|
|
19078
|
-
const textElement = (element2.elements
|
|
19444
|
+
const textElement = ((_b = element2.elements) != null ? _b : []).filter((e) => e.type === "element" && e.name === "w:t");
|
|
19079
19445
|
for (const text of textElement) {
|
|
19080
|
-
if (!((
|
|
19446
|
+
if (!((_c = text.elements) == null ? void 0 : _c[0])) {
|
|
19081
19447
|
continue;
|
|
19082
19448
|
}
|
|
19083
|
-
if ((
|
|
19449
|
+
if ((_d = text.elements[0].text) == null ? void 0 : _d.includes(token)) {
|
|
19084
19450
|
return i;
|
|
19085
19451
|
}
|
|
19086
19452
|
}
|
|
@@ -19089,16 +19455,14 @@ const findRunElementIndexWithToken = (paragraphElement, token) => {
|
|
|
19089
19455
|
throw new Error("Token not found");
|
|
19090
19456
|
};
|
|
19091
19457
|
const splitRunElement = (runElement, token) => {
|
|
19092
|
-
var _a;
|
|
19458
|
+
var _a, _b;
|
|
19093
19459
|
let splitIndex = 0;
|
|
19094
|
-
const splitElements = ((_a = runElement.elements) == null ? void 0 : _a.map((e, i) => {
|
|
19095
|
-
var _a2;
|
|
19460
|
+
const splitElements = (_b = (_a = runElement.elements) == null ? void 0 : _a.map((e, i) => {
|
|
19461
|
+
var _a2, _b2;
|
|
19096
19462
|
if (e.type === "element" && e.name === "w:t") {
|
|
19097
|
-
const text = ((_a2 = e.elements) == null ? void 0 : _a2[0].text)
|
|
19463
|
+
const text = (_b2 = (_a2 = e.elements) == null ? void 0 : _a2[0].text) != null ? _b2 : "";
|
|
19098
19464
|
const splitText = text.split(token);
|
|
19099
|
-
const newElements = splitText.map((t) => ({
|
|
19100
|
-
...e,
|
|
19101
|
-
...patchSpaceAttribute(e),
|
|
19465
|
+
const newElements = splitText.map((t) => __spreadProps(__spreadValues(__spreadValues({}, e), patchSpaceAttribute(e)), {
|
|
19102
19466
|
elements: createTextElementContents(t)
|
|
19103
19467
|
}));
|
|
19104
19468
|
splitIndex = i;
|
|
@@ -19106,15 +19470,13 @@ const splitRunElement = (runElement, token) => {
|
|
|
19106
19470
|
} else {
|
|
19107
19471
|
return e;
|
|
19108
19472
|
}
|
|
19109
|
-
}).flat())
|
|
19110
|
-
const leftRunElement = {
|
|
19111
|
-
...JSON.parse(JSON.stringify(runElement)),
|
|
19473
|
+
}).flat()) != null ? _b : [];
|
|
19474
|
+
const leftRunElement = __spreadProps(__spreadValues({}, JSON.parse(JSON.stringify(runElement))), {
|
|
19112
19475
|
elements: splitElements.slice(0, splitIndex + 1)
|
|
19113
|
-
};
|
|
19114
|
-
const rightRunElement = {
|
|
19115
|
-
...JSON.parse(JSON.stringify(runElement)),
|
|
19476
|
+
});
|
|
19477
|
+
const rightRunElement = __spreadProps(__spreadValues({}, JSON.parse(JSON.stringify(runElement))), {
|
|
19116
19478
|
elements: splitElements.slice(splitIndex + 1)
|
|
19117
|
-
};
|
|
19479
|
+
});
|
|
19118
19480
|
return { left: leftRunElement, right: rightRunElement };
|
|
19119
19481
|
};
|
|
19120
19482
|
const formatter = new Formatter();
|
|
@@ -19147,14 +19509,12 @@ const replacer = (json, patch, patchText, renderedParagraphs, context, keepOrigi
|
|
|
19147
19509
|
const runElementNonTextualElements = runElementToBeReplaced.elements.filter(
|
|
19148
19510
|
(e) => e.type === "element" && e.name !== "w:t"
|
|
19149
19511
|
);
|
|
19150
|
-
newRunElements = textJson.map((e) => ({
|
|
19151
|
-
...e,
|
|
19512
|
+
newRunElements = textJson.map((e) => __spreadProps(__spreadValues({}, e), {
|
|
19152
19513
|
elements: [...runElementNonTextualElements, ...e.elements]
|
|
19153
19514
|
}));
|
|
19154
|
-
patchedRightElement = {
|
|
19155
|
-
...right,
|
|
19515
|
+
patchedRightElement = __spreadProps(__spreadValues({}, right), {
|
|
19156
19516
|
elements: [...runElementNonTextualElements, ...right.elements]
|
|
19157
|
-
};
|
|
19517
|
+
});
|
|
19158
19518
|
}
|
|
19159
19519
|
paragraphElement.elements.splice(index, 1, left, ...newRunElements, patchedRightElement);
|
|
19160
19520
|
break;
|
|
@@ -19216,14 +19576,14 @@ const renderRunNode = (node, index, currentRunStringIndex) => {
|
|
|
19216
19576
|
let currentTextStringIndex = currentRunStringIndex;
|
|
19217
19577
|
const parts = node.elements.map(
|
|
19218
19578
|
(element2, i) => {
|
|
19219
|
-
var _a;
|
|
19579
|
+
var _a, _b;
|
|
19220
19580
|
return element2.name === "w:t" && element2.elements && element2.elements.length > 0 ? {
|
|
19221
|
-
text: ((_a = element2.elements[0].text) == null ? void 0 : _a.toString())
|
|
19581
|
+
text: (_b = (_a = element2.elements[0].text) == null ? void 0 : _a.toString()) != null ? _b : "",
|
|
19222
19582
|
index: i,
|
|
19223
19583
|
start: currentTextStringIndex,
|
|
19224
19584
|
end: (() => {
|
|
19225
|
-
var _a2;
|
|
19226
|
-
currentTextStringIndex += (((_a2 = element2.elements[0].text) == null ? void 0 : _a2.toString())
|
|
19585
|
+
var _a2, _b2;
|
|
19586
|
+
currentTextStringIndex += ((_b2 = (_a2 = element2.elements[0].text) == null ? void 0 : _a2.toString()) != null ? _b2 : "").length - 1;
|
|
19227
19587
|
return currentTextStringIndex;
|
|
19228
19588
|
})()
|
|
19229
19589
|
} : void 0;
|
|
@@ -19240,12 +19600,12 @@ const renderRunNode = (node, index, currentRunStringIndex) => {
|
|
|
19240
19600
|
};
|
|
19241
19601
|
const buildNodePath = (node) => node.parent ? [...buildNodePath(node.parent), node.index] : [node.index];
|
|
19242
19602
|
const elementsToWrapper = (wrapper) => {
|
|
19243
|
-
var _a;
|
|
19244
|
-
return ((_a = wrapper.element.elements) == null ? void 0 : _a.map((e, i) => ({
|
|
19603
|
+
var _a, _b;
|
|
19604
|
+
return (_b = (_a = wrapper.element.elements) == null ? void 0 : _a.map((e, i) => ({
|
|
19245
19605
|
element: e,
|
|
19246
19606
|
index: i,
|
|
19247
19607
|
parent: wrapper
|
|
19248
|
-
})))
|
|
19608
|
+
}))) != null ? _b : [];
|
|
19249
19609
|
};
|
|
19250
19610
|
const findLocationOfText = (node, text) => {
|
|
19251
19611
|
let renderedParagraphs = [];
|
|
@@ -19274,8 +19634,8 @@ const getIdFromRelationshipId = (relationshipId) => {
|
|
|
19274
19634
|
const getNextRelationshipIndex = (relationships) => {
|
|
19275
19635
|
const relationshipElements = getFirstLevelElements(relationships, "Relationships");
|
|
19276
19636
|
return relationshipElements.map((e) => {
|
|
19277
|
-
var _a, _b;
|
|
19278
|
-
return getIdFromRelationshipId(((_b = (_a = e.attributes) == null ? void 0 : _a.Id) == null ? void 0 : _b.toString())
|
|
19637
|
+
var _a, _b, _c;
|
|
19638
|
+
return getIdFromRelationshipId((_c = (_b = (_a = e.attributes) == null ? void 0 : _a.Id) == null ? void 0 : _b.toString()) != null ? _c : "");
|
|
19279
19639
|
}).reduce((acc, curr) => Math.max(acc, curr), 0) + 1;
|
|
19280
19640
|
};
|
|
19281
19641
|
const appendRelationship = (relationships, id, type, target, targetMode) => {
|
|
@@ -19317,8 +19677,9 @@ const PatchType = {
|
|
|
19317
19677
|
PARAGRAPH: "paragraph"
|
|
19318
19678
|
};
|
|
19319
19679
|
const imageReplacer = new ImageReplacer();
|
|
19320
|
-
const patchDocument =
|
|
19321
|
-
|
|
19680
|
+
const patchDocument = (data, options2) => __async(exports, null, function* () {
|
|
19681
|
+
var _a, _b;
|
|
19682
|
+
const zipContent = yield JSZip.loadAsync(data);
|
|
19322
19683
|
const contexts = /* @__PURE__ */ new Map();
|
|
19323
19684
|
const file = {
|
|
19324
19685
|
Media: new Media()
|
|
@@ -19330,10 +19691,10 @@ const patchDocument = async (data, options2) => {
|
|
|
19330
19691
|
const binaryContentMap = /* @__PURE__ */ new Map();
|
|
19331
19692
|
for (const [key, value] of Object.entries(zipContent.files)) {
|
|
19332
19693
|
if (!key.endsWith(".xml") && !key.endsWith(".rels")) {
|
|
19333
|
-
binaryContentMap.set(key,
|
|
19694
|
+
binaryContentMap.set(key, yield value.async("uint8array"));
|
|
19334
19695
|
continue;
|
|
19335
19696
|
}
|
|
19336
|
-
const json = toJson(
|
|
19697
|
+
const json = toJson(yield value.async("text"));
|
|
19337
19698
|
if (key.startsWith("word/") && !key.endsWith(".xml.rels")) {
|
|
19338
19699
|
const context = {
|
|
19339
19700
|
file,
|
|
@@ -19358,8 +19719,7 @@ const patchDocument = async (data, options2) => {
|
|
|
19358
19719
|
const renderedParagraphs = findLocationOfText(json, patchText);
|
|
19359
19720
|
replacer(
|
|
19360
19721
|
json,
|
|
19361
|
-
{
|
|
19362
|
-
...patchValue,
|
|
19722
|
+
__spreadProps(__spreadValues({}, patchValue), {
|
|
19363
19723
|
children: patchValue.children.map((element2) => {
|
|
19364
19724
|
if (element2 instanceof ExternalHyperlink) {
|
|
19365
19725
|
const concreteHyperlink = new ConcreteHyperlink(element2.options.children, uniqueId());
|
|
@@ -19376,7 +19736,7 @@ const patchDocument = async (data, options2) => {
|
|
|
19376
19736
|
}
|
|
19377
19737
|
})
|
|
19378
19738
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19379
|
-
},
|
|
19739
|
+
}),
|
|
19380
19740
|
patchText,
|
|
19381
19741
|
renderedParagraphs,
|
|
19382
19742
|
context,
|
|
@@ -19396,7 +19756,7 @@ const patchDocument = async (data, options2) => {
|
|
|
19396
19756
|
}
|
|
19397
19757
|
for (const { key, mediaDatas } of imageRelationshipAdditions) {
|
|
19398
19758
|
const relationshipKey = `word/_rels/${key.split("/").pop()}.rels`;
|
|
19399
|
-
const relationshipsJson = map.get(relationshipKey)
|
|
19759
|
+
const relationshipsJson = (_a = map.get(relationshipKey)) != null ? _a : createRelationshipFile();
|
|
19400
19760
|
map.set(relationshipKey, relationshipsJson);
|
|
19401
19761
|
const index = getNextRelationshipIndex(relationshipsJson);
|
|
19402
19762
|
const newJson = imageReplacer.replace(JSON.stringify(map.get(key)), mediaDatas, index);
|
|
@@ -19413,7 +19773,7 @@ const patchDocument = async (data, options2) => {
|
|
|
19413
19773
|
}
|
|
19414
19774
|
for (const { key, hyperlink } of hyperlinkRelationshipAdditions) {
|
|
19415
19775
|
const relationshipKey = `word/_rels/${key.split("/").pop()}.rels`;
|
|
19416
|
-
const relationshipsJson = map.get(relationshipKey)
|
|
19776
|
+
const relationshipsJson = (_b = map.get(relationshipKey)) != null ? _b : createRelationshipFile();
|
|
19417
19777
|
map.set(relationshipKey, relationshipsJson);
|
|
19418
19778
|
appendRelationship(
|
|
19419
19779
|
relationshipsJson,
|
|
@@ -19450,7 +19810,7 @@ const patchDocument = async (data, options2) => {
|
|
|
19450
19810
|
mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
19451
19811
|
compression: "DEFLATE"
|
|
19452
19812
|
});
|
|
19453
|
-
};
|
|
19813
|
+
});
|
|
19454
19814
|
const toXml = (jsonObj) => {
|
|
19455
19815
|
const output = lib.js2xml(jsonObj);
|
|
19456
19816
|
return output;
|
|
@@ -19491,6 +19851,7 @@ exports.BorderElement = BorderElement;
|
|
|
19491
19851
|
exports.BorderStyle = BorderStyle;
|
|
19492
19852
|
exports.BuilderElement = BuilderElement;
|
|
19493
19853
|
exports.CarriageReturn = CarriageReturn;
|
|
19854
|
+
exports.CharacterSet = CharacterSet;
|
|
19494
19855
|
exports.CheckBox = CheckBox;
|
|
19495
19856
|
exports.CheckBoxSymbolElement = CheckBoxSymbolElement;
|
|
19496
19857
|
exports.CheckBoxUtil = CheckBoxUtil;
|
|
@@ -19534,8 +19895,6 @@ exports.FootnoteReference = FootnoteReference;
|
|
|
19534
19895
|
exports.FootnoteReferenceElement = FootnoteReferenceElement;
|
|
19535
19896
|
exports.FootnoteReferenceRun = FootnoteReferenceRun;
|
|
19536
19897
|
exports.FrameAnchorType = FrameAnchorType;
|
|
19537
|
-
exports.FrameProperties = FrameProperties;
|
|
19538
|
-
exports.FramePropertiesAttributes = FramePropertiesAttributes;
|
|
19539
19898
|
exports.FrameWrap = FrameWrap;
|
|
19540
19899
|
exports.GridSpan = GridSpan;
|
|
19541
19900
|
exports.Header = Header2;
|
|
@@ -19567,7 +19926,6 @@ exports.LevelFormat = LevelFormat;
|
|
|
19567
19926
|
exports.LevelOverride = LevelOverride;
|
|
19568
19927
|
exports.LevelSuffix = LevelSuffix;
|
|
19569
19928
|
exports.LineNumberRestartFormat = LineNumberRestartFormat;
|
|
19570
|
-
exports.LineNumberType = LineNumberType;
|
|
19571
19929
|
exports.LineRuleType = LineRuleType;
|
|
19572
19930
|
exports.Math = Math$1;
|
|
19573
19931
|
exports.MathAccentCharacter = MathAccentCharacter;
|
|
@@ -19725,6 +20083,9 @@ exports.concreteNumUniqueNumericIdGen = concreteNumUniqueNumericIdGen;
|
|
|
19725
20083
|
exports.convertInchesToTwip = convertInchesToTwip;
|
|
19726
20084
|
exports.convertMillimetersToTwip = convertMillimetersToTwip;
|
|
19727
20085
|
exports.convertToXmlComponent = convertToXmlComponent;
|
|
20086
|
+
exports.createFrameProperties = createFrameProperties;
|
|
20087
|
+
exports.createLineNumberType = createLineNumberType;
|
|
20088
|
+
exports.createStringElement = createStringElement;
|
|
19728
20089
|
exports.dateTimeValue = dateTimeValue;
|
|
19729
20090
|
exports.decimalNumber = decimalNumber;
|
|
19730
20091
|
exports.docPropertiesUniqueNumericIdGen = docPropertiesUniqueNumericIdGen;
|
|
@@ -19746,5 +20107,6 @@ exports.twipsMeasureValue = twipsMeasureValue;
|
|
|
19746
20107
|
exports.uCharHexNumber = uCharHexNumber;
|
|
19747
20108
|
exports.uniqueId = uniqueId;
|
|
19748
20109
|
exports.uniqueNumericIdCreator = uniqueNumericIdCreator;
|
|
20110
|
+
exports.uniqueUuid = uniqueUuid;
|
|
19749
20111
|
exports.universalMeasureValue = universalMeasureValue;
|
|
19750
20112
|
exports.unsignedDecimalNumber = unsignedDecimalNumber;
|