docx 8.2.3 → 8.3.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/export/packer/next-compiler.d.ts +1 -1
- package/build/export/packer/packer.d.ts +11 -11
- package/build/file/border/border.d.ts +30 -30
- package/build/file/document/body/section-properties/properties/doc-grid.d.ts +8 -8
- package/build/file/document/body/section-properties/properties/header-footer-reference.d.ts +11 -11
- package/build/file/document/body/section-properties/properties/line-number.d.ts +6 -6
- package/build/file/document/body/section-properties/properties/page-borders.d.ts +16 -16
- package/build/file/document/body/section-properties/properties/page-number.d.ts +9 -9
- package/build/file/document/body/section-properties/properties/page-size.d.ts +6 -6
- package/build/file/document/body/section-properties/properties/page-text-direction.d.ts +5 -5
- package/build/file/document/body/section-properties/properties/section-type.d.ts +9 -9
- package/build/file/document/body/section-properties/section-properties.d.ts +9 -9
- package/build/file/drawing/floating/align.d.ts +1 -1
- package/build/file/drawing/floating/floating-position.d.ts +24 -24
- package/build/file/drawing/text-wrap/text-wrapping.d.ts +14 -14
- package/build/file/footer-wrapper.d.ts +1 -1
- package/build/file/footnotes/footnote/footnote.d.ts +5 -5
- package/build/file/header-wrapper.d.ts +1 -1
- package/build/file/numbering/level.d.ts +73 -73
- package/build/file/paragraph/formatting/alignment.d.ts +17 -17
- package/build/file/paragraph/formatting/spacing.d.ts +7 -7
- package/build/file/paragraph/formatting/style.d.ts +9 -9
- package/build/file/paragraph/formatting/tab-stop.d.ts +26 -26
- package/build/file/paragraph/frame/frame-properties.d.ts +32 -32
- package/build/file/paragraph/links/hyperlink.d.ts +4 -4
- package/build/file/paragraph/properties.d.ts +4 -2
- package/build/file/paragraph/run/emphasis-mark.d.ts +5 -5
- package/build/file/paragraph/run/positional-tab.d.ts +19 -19
- package/build/file/paragraph/run/properties.d.ts +12 -12
- package/build/file/paragraph/run/run-components/text.d.ts +1 -1
- package/build/file/paragraph/run/run.d.ts +6 -6
- package/build/file/paragraph/run/text-attributes.d.ts +1 -1
- package/build/file/paragraph/run/underline.d.ts +21 -21
- package/build/file/relationships/relationship/relationship.d.ts +4 -4
- package/build/file/relationships/relationships.d.ts +1 -1
- package/build/file/shading/shading.d.ts +40 -40
- package/build/file/shared/alignment.d.ts +14 -14
- package/build/file/shared/number-format.d.ts +64 -64
- package/build/file/shared/space-type.d.ts +4 -4
- package/build/file/table/table-cell/table-cell-components.d.ts +11 -11
- package/build/file/table/table-cell/table-cell-properties.d.ts +3 -3
- package/build/file/table/table-properties/table-borders.d.ts +7 -7
- package/build/file/table/table-properties/table-cell-margin.d.ts +7 -7
- package/build/file/table/table-properties/table-float-properties.d.ts +29 -29
- package/build/file/table/table-properties/table-layout.d.ts +5 -5
- package/build/file/table/table-properties/table-properties.d.ts +2 -2
- package/build/file/table/table-row/table-row-height.d.ts +7 -7
- package/build/file/table/table-row/table-row-properties.d.ts +1 -1
- package/build/file/table/table-width.d.ts +7 -7
- package/build/file/table/table.d.ts +2 -2
- package/build/file/vertical-align/vertical-align.d.ts +7 -7
- package/build/file/xml-components/xmlable-object.d.ts +1 -1
- package/build/index.cjs +973 -788
- package/build/index.iife.js +973 -788
- package/build/index.mjs +973 -788
- package/build/index.umd.js +973 -788
- package/build/patcher/from-docx.d.ts +7 -6
- package/build/patcher/relationship-manager.d.ts +1 -1
- package/build/patcher/replacer.d.ts +1 -1
- package/package.json +14 -15
package/build/index.umd.js
CHANGED
|
@@ -2150,11 +2150,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2150
2150
|
function base64ToBytes(str) {
|
|
2151
2151
|
return base64.toByteArray(base64clean(str));
|
|
2152
2152
|
}
|
|
2153
|
-
function blitBuffer(
|
|
2153
|
+
function blitBuffer(src, dst, offset, length) {
|
|
2154
2154
|
for (var i = 0; i < length; ++i) {
|
|
2155
|
-
if (i + offset >= dst.length || i >=
|
|
2155
|
+
if (i + offset >= dst.length || i >= src.length)
|
|
2156
2156
|
break;
|
|
2157
|
-
dst[i + offset] =
|
|
2157
|
+
dst[i + offset] = src[i];
|
|
2158
2158
|
}
|
|
2159
2159
|
return i;
|
|
2160
2160
|
}
|
|
@@ -2459,6 +2459,21 @@ var __publicField = (obj, key, value) => {
|
|
|
2459
2459
|
};
|
|
2460
2460
|
return hasSymbols;
|
|
2461
2461
|
}
|
|
2462
|
+
var hasProto;
|
|
2463
|
+
var hasRequiredHasProto;
|
|
2464
|
+
function requireHasProto() {
|
|
2465
|
+
if (hasRequiredHasProto)
|
|
2466
|
+
return hasProto;
|
|
2467
|
+
hasRequiredHasProto = 1;
|
|
2468
|
+
var test = {
|
|
2469
|
+
foo: {}
|
|
2470
|
+
};
|
|
2471
|
+
var $Object = Object;
|
|
2472
|
+
hasProto = function hasProto2() {
|
|
2473
|
+
return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
|
|
2474
|
+
};
|
|
2475
|
+
return hasProto;
|
|
2476
|
+
}
|
|
2462
2477
|
var implementation;
|
|
2463
2478
|
var hasRequiredImplementation;
|
|
2464
2479
|
function requireImplementation() {
|
|
@@ -2466,39 +2481,65 @@ var __publicField = (obj, key, value) => {
|
|
|
2466
2481
|
return implementation;
|
|
2467
2482
|
hasRequiredImplementation = 1;
|
|
2468
2483
|
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
2469
|
-
var slice = Array.prototype.slice;
|
|
2470
2484
|
var toStr = Object.prototype.toString;
|
|
2485
|
+
var max = Math.max;
|
|
2471
2486
|
var funcType = "[object Function]";
|
|
2487
|
+
var concatty = function concatty2(a, b) {
|
|
2488
|
+
var arr = [];
|
|
2489
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
2490
|
+
arr[i] = a[i];
|
|
2491
|
+
}
|
|
2492
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
2493
|
+
arr[j + a.length] = b[j];
|
|
2494
|
+
}
|
|
2495
|
+
return arr;
|
|
2496
|
+
};
|
|
2497
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
2498
|
+
var arr = [];
|
|
2499
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
2500
|
+
arr[j] = arrLike[i];
|
|
2501
|
+
}
|
|
2502
|
+
return arr;
|
|
2503
|
+
};
|
|
2504
|
+
var joiny = function(arr, joiner) {
|
|
2505
|
+
var str = "";
|
|
2506
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
2507
|
+
str += arr[i];
|
|
2508
|
+
if (i + 1 < arr.length) {
|
|
2509
|
+
str += joiner;
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
return str;
|
|
2513
|
+
};
|
|
2472
2514
|
implementation = function bind(that) {
|
|
2473
2515
|
var target = this;
|
|
2474
|
-
if (typeof target !== "function" || toStr.
|
|
2516
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
|
2475
2517
|
throw new TypeError(ERROR_MESSAGE + target);
|
|
2476
2518
|
}
|
|
2477
|
-
var args =
|
|
2519
|
+
var args = slicy(arguments, 1);
|
|
2478
2520
|
var bound;
|
|
2479
2521
|
var binder = function() {
|
|
2480
2522
|
if (this instanceof bound) {
|
|
2481
2523
|
var result = target.apply(
|
|
2482
2524
|
this,
|
|
2483
|
-
args
|
|
2525
|
+
concatty(args, arguments)
|
|
2484
2526
|
);
|
|
2485
2527
|
if (Object(result) === result) {
|
|
2486
2528
|
return result;
|
|
2487
2529
|
}
|
|
2488
2530
|
return this;
|
|
2489
|
-
} else {
|
|
2490
|
-
return target.apply(
|
|
2491
|
-
that,
|
|
2492
|
-
args.concat(slice.call(arguments))
|
|
2493
|
-
);
|
|
2494
2531
|
}
|
|
2532
|
+
return target.apply(
|
|
2533
|
+
that,
|
|
2534
|
+
concatty(args, arguments)
|
|
2535
|
+
);
|
|
2495
2536
|
};
|
|
2496
|
-
var boundLength =
|
|
2537
|
+
var boundLength = max(0, target.length - args.length);
|
|
2497
2538
|
var boundArgs = [];
|
|
2498
2539
|
for (var i = 0; i < boundLength; i++) {
|
|
2499
|
-
boundArgs
|
|
2540
|
+
boundArgs[i] = "$" + i;
|
|
2500
2541
|
}
|
|
2501
|
-
bound = Function("binder", "return function (" + boundArgs
|
|
2542
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
2502
2543
|
if (target.prototype) {
|
|
2503
2544
|
var Empty = function Empty2() {
|
|
2504
2545
|
};
|
|
@@ -2520,15 +2561,17 @@ var __publicField = (obj, key, value) => {
|
|
|
2520
2561
|
functionBind = Function.prototype.bind || implementation2;
|
|
2521
2562
|
return functionBind;
|
|
2522
2563
|
}
|
|
2523
|
-
var
|
|
2524
|
-
var
|
|
2525
|
-
function
|
|
2526
|
-
if (
|
|
2527
|
-
return
|
|
2528
|
-
|
|
2564
|
+
var hasown;
|
|
2565
|
+
var hasRequiredHasown;
|
|
2566
|
+
function requireHasown() {
|
|
2567
|
+
if (hasRequiredHasown)
|
|
2568
|
+
return hasown;
|
|
2569
|
+
hasRequiredHasown = 1;
|
|
2570
|
+
var call = Function.prototype.call;
|
|
2571
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
2529
2572
|
var bind = requireFunctionBind();
|
|
2530
|
-
|
|
2531
|
-
return
|
|
2573
|
+
hasown = bind.call(call, $hasOwn);
|
|
2574
|
+
return hasown;
|
|
2532
2575
|
}
|
|
2533
2576
|
var getIntrinsic;
|
|
2534
2577
|
var hasRequiredGetIntrinsic;
|
|
@@ -2570,16 +2613,17 @@ var __publicField = (obj, key, value) => {
|
|
|
2570
2613
|
}
|
|
2571
2614
|
}() : throwTypeError;
|
|
2572
2615
|
var hasSymbols2 = requireHasSymbols()();
|
|
2573
|
-
var
|
|
2616
|
+
var hasProto2 = requireHasProto()();
|
|
2617
|
+
var getProto = Object.getPrototypeOf || (hasProto2 ? function(x) {
|
|
2574
2618
|
return x.__proto__;
|
|
2575
|
-
};
|
|
2619
|
+
} : null);
|
|
2576
2620
|
var needsEval = {};
|
|
2577
|
-
var TypedArray = typeof Uint8Array === "undefined" ? undefined$1 : getProto(Uint8Array);
|
|
2621
|
+
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
2578
2622
|
var INTRINSICS = {
|
|
2579
2623
|
"%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
|
|
2580
2624
|
"%Array%": Array,
|
|
2581
2625
|
"%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
|
|
2582
|
-
"%ArrayIteratorPrototype%": hasSymbols2 ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
2626
|
+
"%ArrayIteratorPrototype%": hasSymbols2 && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
2583
2627
|
"%AsyncFromSyncIteratorPrototype%": undefined$1,
|
|
2584
2628
|
"%AsyncFunction%": needsEval,
|
|
2585
2629
|
"%AsyncGenerator%": needsEval,
|
|
@@ -2587,6 +2631,8 @@ var __publicField = (obj, key, value) => {
|
|
|
2587
2631
|
"%AsyncIteratorPrototype%": needsEval,
|
|
2588
2632
|
"%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
|
|
2589
2633
|
"%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
|
|
2634
|
+
"%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
|
|
2635
|
+
"%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
|
|
2590
2636
|
"%Boolean%": Boolean,
|
|
2591
2637
|
"%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
|
|
2592
2638
|
"%Date%": Date,
|
|
@@ -2608,10 +2654,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2608
2654
|
"%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
|
|
2609
2655
|
"%isFinite%": isFinite,
|
|
2610
2656
|
"%isNaN%": isNaN,
|
|
2611
|
-
"%IteratorPrototype%": hasSymbols2 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
2657
|
+
"%IteratorPrototype%": hasSymbols2 && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
2612
2658
|
"%JSON%": typeof JSON === "object" ? JSON : undefined$1,
|
|
2613
2659
|
"%Map%": typeof Map === "undefined" ? undefined$1 : Map,
|
|
2614
|
-
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2660
|
+
"%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
|
|
2615
2661
|
"%Math%": Math,
|
|
2616
2662
|
"%Number%": Number,
|
|
2617
2663
|
"%Object%": Object,
|
|
@@ -2624,10 +2670,10 @@ var __publicField = (obj, key, value) => {
|
|
|
2624
2670
|
"%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
|
|
2625
2671
|
"%RegExp%": RegExp,
|
|
2626
2672
|
"%Set%": typeof Set === "undefined" ? undefined$1 : Set,
|
|
2627
|
-
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2673
|
+
"%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto ? undefined$1 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
|
|
2628
2674
|
"%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
|
|
2629
2675
|
"%String%": String,
|
|
2630
|
-
"%StringIteratorPrototype%": hasSymbols2 ? getProto(""[Symbol.iterator]()) : undefined$1,
|
|
2676
|
+
"%StringIteratorPrototype%": hasSymbols2 && getProto ? getProto(""[Symbol.iterator]()) : undefined$1,
|
|
2631
2677
|
"%Symbol%": hasSymbols2 ? Symbol : undefined$1,
|
|
2632
2678
|
"%SyntaxError%": $SyntaxError,
|
|
2633
2679
|
"%ThrowTypeError%": ThrowTypeError,
|
|
@@ -2642,6 +2688,14 @@ var __publicField = (obj, key, value) => {
|
|
|
2642
2688
|
"%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
|
|
2643
2689
|
"%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet
|
|
2644
2690
|
};
|
|
2691
|
+
if (getProto) {
|
|
2692
|
+
try {
|
|
2693
|
+
null.error;
|
|
2694
|
+
} catch (e) {
|
|
2695
|
+
var errorProto = getProto(getProto(e));
|
|
2696
|
+
INTRINSICS["%Error.prototype%"] = errorProto;
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2645
2699
|
var doEval = function doEval2(name) {
|
|
2646
2700
|
var value;
|
|
2647
2701
|
if (name === "%AsyncFunction%") {
|
|
@@ -2657,7 +2711,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2657
2711
|
}
|
|
2658
2712
|
} else if (name === "%AsyncIteratorPrototype%") {
|
|
2659
2713
|
var gen = doEval2("%AsyncGenerator%");
|
|
2660
|
-
if (gen) {
|
|
2714
|
+
if (gen && getProto) {
|
|
2661
2715
|
value = getProto(gen.prototype);
|
|
2662
2716
|
}
|
|
2663
2717
|
}
|
|
@@ -2718,7 +2772,7 @@ var __publicField = (obj, key, value) => {
|
|
|
2718
2772
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
2719
2773
|
};
|
|
2720
2774
|
var bind = requireFunctionBind();
|
|
2721
|
-
var hasOwn =
|
|
2775
|
+
var hasOwn = requireHasown();
|
|
2722
2776
|
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
2723
2777
|
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
2724
2778
|
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
@@ -2827,6 +2881,156 @@ var __publicField = (obj, key, value) => {
|
|
|
2827
2881
|
return getIntrinsic;
|
|
2828
2882
|
}
|
|
2829
2883
|
var callBind = { exports: {} };
|
|
2884
|
+
var hasPropertyDescriptors_1;
|
|
2885
|
+
var hasRequiredHasPropertyDescriptors;
|
|
2886
|
+
function requireHasPropertyDescriptors() {
|
|
2887
|
+
if (hasRequiredHasPropertyDescriptors)
|
|
2888
|
+
return hasPropertyDescriptors_1;
|
|
2889
|
+
hasRequiredHasPropertyDescriptors = 1;
|
|
2890
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
2891
|
+
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
|
|
2892
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
2893
|
+
if ($defineProperty) {
|
|
2894
|
+
try {
|
|
2895
|
+
$defineProperty({}, "a", { value: 1 });
|
|
2896
|
+
return true;
|
|
2897
|
+
} catch (e) {
|
|
2898
|
+
return false;
|
|
2899
|
+
}
|
|
2900
|
+
}
|
|
2901
|
+
return false;
|
|
2902
|
+
};
|
|
2903
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
2904
|
+
if (!hasPropertyDescriptors()) {
|
|
2905
|
+
return null;
|
|
2906
|
+
}
|
|
2907
|
+
try {
|
|
2908
|
+
return $defineProperty([], "length", { value: 1 }).length !== 1;
|
|
2909
|
+
} catch (e) {
|
|
2910
|
+
return true;
|
|
2911
|
+
}
|
|
2912
|
+
};
|
|
2913
|
+
hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
2914
|
+
return hasPropertyDescriptors_1;
|
|
2915
|
+
}
|
|
2916
|
+
var gopd;
|
|
2917
|
+
var hasRequiredGopd;
|
|
2918
|
+
function requireGopd() {
|
|
2919
|
+
if (hasRequiredGopd)
|
|
2920
|
+
return gopd;
|
|
2921
|
+
hasRequiredGopd = 1;
|
|
2922
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
2923
|
+
var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
|
|
2924
|
+
if ($gOPD) {
|
|
2925
|
+
try {
|
|
2926
|
+
$gOPD([], "length");
|
|
2927
|
+
} catch (e) {
|
|
2928
|
+
$gOPD = null;
|
|
2929
|
+
}
|
|
2930
|
+
}
|
|
2931
|
+
gopd = $gOPD;
|
|
2932
|
+
return gopd;
|
|
2933
|
+
}
|
|
2934
|
+
var defineDataProperty;
|
|
2935
|
+
var hasRequiredDefineDataProperty;
|
|
2936
|
+
function requireDefineDataProperty() {
|
|
2937
|
+
if (hasRequiredDefineDataProperty)
|
|
2938
|
+
return defineDataProperty;
|
|
2939
|
+
hasRequiredDefineDataProperty = 1;
|
|
2940
|
+
var hasPropertyDescriptors = requireHasPropertyDescriptors()();
|
|
2941
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
2942
|
+
var $defineProperty = hasPropertyDescriptors && GetIntrinsic("%Object.defineProperty%", true);
|
|
2943
|
+
if ($defineProperty) {
|
|
2944
|
+
try {
|
|
2945
|
+
$defineProperty({}, "a", { value: 1 });
|
|
2946
|
+
} catch (e) {
|
|
2947
|
+
$defineProperty = false;
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
var $SyntaxError = GetIntrinsic("%SyntaxError%");
|
|
2951
|
+
var $TypeError = GetIntrinsic("%TypeError%");
|
|
2952
|
+
var gopd2 = requireGopd();
|
|
2953
|
+
defineDataProperty = function defineDataProperty2(obj, property, value) {
|
|
2954
|
+
if (!obj || typeof obj !== "object" && typeof obj !== "function") {
|
|
2955
|
+
throw new $TypeError("`obj` must be an object or a function`");
|
|
2956
|
+
}
|
|
2957
|
+
if (typeof property !== "string" && typeof property !== "symbol") {
|
|
2958
|
+
throw new $TypeError("`property` must be a string or a symbol`");
|
|
2959
|
+
}
|
|
2960
|
+
if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
|
|
2961
|
+
throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
|
|
2962
|
+
}
|
|
2963
|
+
if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
|
|
2964
|
+
throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
|
|
2965
|
+
}
|
|
2966
|
+
if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
|
|
2967
|
+
throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
|
|
2968
|
+
}
|
|
2969
|
+
if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
|
|
2970
|
+
throw new $TypeError("`loose`, if provided, must be a boolean");
|
|
2971
|
+
}
|
|
2972
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
2973
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
2974
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
2975
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
2976
|
+
var desc = !!gopd2 && gopd2(obj, property);
|
|
2977
|
+
if ($defineProperty) {
|
|
2978
|
+
$defineProperty(obj, property, {
|
|
2979
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
2980
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
2981
|
+
value,
|
|
2982
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
2983
|
+
});
|
|
2984
|
+
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
|
2985
|
+
obj[property] = value;
|
|
2986
|
+
} else {
|
|
2987
|
+
throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
2988
|
+
}
|
|
2989
|
+
};
|
|
2990
|
+
return defineDataProperty;
|
|
2991
|
+
}
|
|
2992
|
+
var setFunctionLength;
|
|
2993
|
+
var hasRequiredSetFunctionLength;
|
|
2994
|
+
function requireSetFunctionLength() {
|
|
2995
|
+
if (hasRequiredSetFunctionLength)
|
|
2996
|
+
return setFunctionLength;
|
|
2997
|
+
hasRequiredSetFunctionLength = 1;
|
|
2998
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
2999
|
+
var define2 = requireDefineDataProperty();
|
|
3000
|
+
var hasDescriptors = requireHasPropertyDescriptors()();
|
|
3001
|
+
var gOPD = requireGopd();
|
|
3002
|
+
var $TypeError = GetIntrinsic("%TypeError%");
|
|
3003
|
+
var $floor = GetIntrinsic("%Math.floor%");
|
|
3004
|
+
setFunctionLength = function setFunctionLength2(fn, length) {
|
|
3005
|
+
if (typeof fn !== "function") {
|
|
3006
|
+
throw new $TypeError("`fn` is not a function");
|
|
3007
|
+
}
|
|
3008
|
+
if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
|
|
3009
|
+
throw new $TypeError("`length` must be a positive 32-bit integer");
|
|
3010
|
+
}
|
|
3011
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
3012
|
+
var functionLengthIsConfigurable = true;
|
|
3013
|
+
var functionLengthIsWritable = true;
|
|
3014
|
+
if ("length" in fn && gOPD) {
|
|
3015
|
+
var desc = gOPD(fn, "length");
|
|
3016
|
+
if (desc && !desc.configurable) {
|
|
3017
|
+
functionLengthIsConfigurable = false;
|
|
3018
|
+
}
|
|
3019
|
+
if (desc && !desc.writable) {
|
|
3020
|
+
functionLengthIsWritable = false;
|
|
3021
|
+
}
|
|
3022
|
+
}
|
|
3023
|
+
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
3024
|
+
if (hasDescriptors) {
|
|
3025
|
+
define2(fn, "length", length, true, true);
|
|
3026
|
+
} else {
|
|
3027
|
+
define2(fn, "length", length);
|
|
3028
|
+
}
|
|
3029
|
+
}
|
|
3030
|
+
return fn;
|
|
3031
|
+
};
|
|
3032
|
+
return setFunctionLength;
|
|
3033
|
+
}
|
|
2830
3034
|
var hasRequiredCallBind;
|
|
2831
3035
|
function requireCallBind() {
|
|
2832
3036
|
if (hasRequiredCallBind)
|
|
@@ -2835,10 +3039,11 @@ var __publicField = (obj, key, value) => {
|
|
|
2835
3039
|
(function(module2) {
|
|
2836
3040
|
var bind = requireFunctionBind();
|
|
2837
3041
|
var GetIntrinsic = requireGetIntrinsic();
|
|
3042
|
+
var setFunctionLength2 = requireSetFunctionLength();
|
|
3043
|
+
var $TypeError = GetIntrinsic("%TypeError%");
|
|
2838
3044
|
var $apply = GetIntrinsic("%Function.prototype.apply%");
|
|
2839
3045
|
var $call = GetIntrinsic("%Function.prototype.call%");
|
|
2840
3046
|
var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
|
|
2841
|
-
var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
|
|
2842
3047
|
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true);
|
|
2843
3048
|
var $max = GetIntrinsic("%Math.max%");
|
|
2844
3049
|
if ($defineProperty) {
|
|
@@ -2849,18 +3054,15 @@ var __publicField = (obj, key, value) => {
|
|
|
2849
3054
|
}
|
|
2850
3055
|
}
|
|
2851
3056
|
module2.exports = function callBind2(originalFunction) {
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
var desc = $gOPD(func, "length");
|
|
2855
|
-
if (desc.configurable) {
|
|
2856
|
-
$defineProperty(
|
|
2857
|
-
func,
|
|
2858
|
-
"length",
|
|
2859
|
-
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
2860
|
-
);
|
|
2861
|
-
}
|
|
3057
|
+
if (typeof originalFunction !== "function") {
|
|
3058
|
+
throw new $TypeError("a function is required");
|
|
2862
3059
|
}
|
|
2863
|
-
|
|
3060
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
3061
|
+
return setFunctionLength2(
|
|
3062
|
+
func,
|
|
3063
|
+
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
3064
|
+
true
|
|
3065
|
+
);
|
|
2864
3066
|
};
|
|
2865
3067
|
var applyBind = function applyBind2() {
|
|
2866
3068
|
return $reflectApply(bind, $apply, arguments);
|
|
@@ -3170,38 +3372,23 @@ var __publicField = (obj, key, value) => {
|
|
|
3170
3372
|
};
|
|
3171
3373
|
return availableTypedArrays;
|
|
3172
3374
|
}
|
|
3173
|
-
var
|
|
3174
|
-
var
|
|
3175
|
-
function
|
|
3176
|
-
if (
|
|
3177
|
-
return
|
|
3178
|
-
|
|
3179
|
-
var GetIntrinsic = requireGetIntrinsic();
|
|
3180
|
-
var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
|
|
3181
|
-
if ($gOPD) {
|
|
3182
|
-
try {
|
|
3183
|
-
$gOPD([], "length");
|
|
3184
|
-
} catch (e) {
|
|
3185
|
-
$gOPD = null;
|
|
3186
|
-
}
|
|
3187
|
-
}
|
|
3188
|
-
gopd = $gOPD;
|
|
3189
|
-
return gopd;
|
|
3190
|
-
}
|
|
3191
|
-
var isTypedArray;
|
|
3192
|
-
var hasRequiredIsTypedArray;
|
|
3193
|
-
function requireIsTypedArray() {
|
|
3194
|
-
if (hasRequiredIsTypedArray)
|
|
3195
|
-
return isTypedArray;
|
|
3196
|
-
hasRequiredIsTypedArray = 1;
|
|
3375
|
+
var whichTypedArray;
|
|
3376
|
+
var hasRequiredWhichTypedArray;
|
|
3377
|
+
function requireWhichTypedArray() {
|
|
3378
|
+
if (hasRequiredWhichTypedArray)
|
|
3379
|
+
return whichTypedArray;
|
|
3380
|
+
hasRequiredWhichTypedArray = 1;
|
|
3197
3381
|
var forEach = requireForEach();
|
|
3198
3382
|
var availableTypedArrays2 = requireAvailableTypedArrays();
|
|
3383
|
+
var callBind2 = requireCallBind();
|
|
3199
3384
|
var callBound2 = requireCallBound();
|
|
3385
|
+
var gOPD = requireGopd();
|
|
3200
3386
|
var $toString = callBound2("Object.prototype.toString");
|
|
3201
3387
|
var hasToStringTag = requireShams()();
|
|
3202
|
-
var gOPD = requireGopd();
|
|
3203
3388
|
var g = typeof globalThis === "undefined" ? commonjsGlobal : globalThis;
|
|
3204
3389
|
var typedArrays = availableTypedArrays2();
|
|
3390
|
+
var $slice = callBound2("String.prototype.slice");
|
|
3391
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
3205
3392
|
var $indexOf = callBound2("Array.prototype.indexOf", true) || function indexOf(array, value) {
|
|
3206
3393
|
for (var i = 0; i < array.length; i += 1) {
|
|
3207
3394
|
if (array[i] === value) {
|
|
@@ -3210,9 +3397,7 @@ var __publicField = (obj, key, value) => {
|
|
|
3210
3397
|
}
|
|
3211
3398
|
return -1;
|
|
3212
3399
|
};
|
|
3213
|
-
var
|
|
3214
|
-
var toStrTags = {};
|
|
3215
|
-
var getPrototypeOf = Object.getPrototypeOf;
|
|
3400
|
+
var cache = { __proto__: null };
|
|
3216
3401
|
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
3217
3402
|
forEach(typedArrays, function(typedArray) {
|
|
3218
3403
|
var arr = new g[typedArray]();
|
|
@@ -3223,97 +3408,78 @@ var __publicField = (obj, key, value) => {
|
|
|
3223
3408
|
var superProto = getPrototypeOf(proto);
|
|
3224
3409
|
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
3225
3410
|
}
|
|
3226
|
-
|
|
3411
|
+
cache["$" + typedArray] = callBind2(descriptor.get);
|
|
3412
|
+
}
|
|
3413
|
+
});
|
|
3414
|
+
} else {
|
|
3415
|
+
forEach(typedArrays, function(typedArray) {
|
|
3416
|
+
var arr = new g[typedArray]();
|
|
3417
|
+
var fn = arr.slice || arr.set;
|
|
3418
|
+
if (fn) {
|
|
3419
|
+
cache["$" + typedArray] = callBind2(fn);
|
|
3227
3420
|
}
|
|
3228
3421
|
});
|
|
3229
3422
|
}
|
|
3230
3423
|
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
3231
|
-
var
|
|
3232
|
-
forEach(
|
|
3233
|
-
if (!
|
|
3424
|
+
var found = false;
|
|
3425
|
+
forEach(cache, function(getter, typedArray) {
|
|
3426
|
+
if (!found) {
|
|
3234
3427
|
try {
|
|
3235
|
-
|
|
3428
|
+
if ("$" + getter(value) === typedArray) {
|
|
3429
|
+
found = $slice(typedArray, 1);
|
|
3430
|
+
}
|
|
3236
3431
|
} catch (e) {
|
|
3237
3432
|
}
|
|
3238
3433
|
}
|
|
3239
3434
|
});
|
|
3240
|
-
return
|
|
3241
|
-
};
|
|
3242
|
-
isTypedArray = function isTypedArray2(value) {
|
|
3243
|
-
if (!value || typeof value !== "object") {
|
|
3244
|
-
return false;
|
|
3245
|
-
}
|
|
3246
|
-
if (!hasToStringTag || !(Symbol.toStringTag in value)) {
|
|
3247
|
-
var tag = $slice($toString(value), 8, -1);
|
|
3248
|
-
return $indexOf(typedArrays, tag) > -1;
|
|
3249
|
-
}
|
|
3250
|
-
if (!gOPD) {
|
|
3251
|
-
return false;
|
|
3252
|
-
}
|
|
3253
|
-
return tryTypedArrays(value);
|
|
3435
|
+
return found;
|
|
3254
3436
|
};
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
function requireWhichTypedArray() {
|
|
3260
|
-
if (hasRequiredWhichTypedArray)
|
|
3261
|
-
return whichTypedArray;
|
|
3262
|
-
hasRequiredWhichTypedArray = 1;
|
|
3263
|
-
var forEach = requireForEach();
|
|
3264
|
-
var availableTypedArrays2 = requireAvailableTypedArrays();
|
|
3265
|
-
var callBound2 = requireCallBound();
|
|
3266
|
-
var gOPD = requireGopd();
|
|
3267
|
-
var $toString = callBound2("Object.prototype.toString");
|
|
3268
|
-
var hasToStringTag = requireShams()();
|
|
3269
|
-
var g = typeof globalThis === "undefined" ? commonjsGlobal : globalThis;
|
|
3270
|
-
var typedArrays = availableTypedArrays2();
|
|
3271
|
-
var $slice = callBound2("String.prototype.slice");
|
|
3272
|
-
var toStrTags = {};
|
|
3273
|
-
var getPrototypeOf = Object.getPrototypeOf;
|
|
3274
|
-
if (hasToStringTag && gOPD && getPrototypeOf) {
|
|
3275
|
-
forEach(typedArrays, function(typedArray) {
|
|
3276
|
-
if (typeof g[typedArray] === "function") {
|
|
3277
|
-
var arr = new g[typedArray]();
|
|
3278
|
-
if (Symbol.toStringTag in arr) {
|
|
3279
|
-
var proto = getPrototypeOf(arr);
|
|
3280
|
-
var descriptor = gOPD(proto, Symbol.toStringTag);
|
|
3281
|
-
if (!descriptor) {
|
|
3282
|
-
var superProto = getPrototypeOf(proto);
|
|
3283
|
-
descriptor = gOPD(superProto, Symbol.toStringTag);
|
|
3284
|
-
}
|
|
3285
|
-
toStrTags[typedArray] = descriptor.get;
|
|
3286
|
-
}
|
|
3287
|
-
}
|
|
3288
|
-
});
|
|
3289
|
-
}
|
|
3290
|
-
var tryTypedArrays = function tryAllTypedArrays(value) {
|
|
3291
|
-
var foundName = false;
|
|
3292
|
-
forEach(toStrTags, function(getter, typedArray) {
|
|
3293
|
-
if (!foundName) {
|
|
3437
|
+
var trySlices = function tryAllSlices(value) {
|
|
3438
|
+
var found = false;
|
|
3439
|
+
forEach(cache, function(getter, name) {
|
|
3440
|
+
if (!found) {
|
|
3294
3441
|
try {
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
foundName = name;
|
|
3298
|
-
}
|
|
3442
|
+
getter(value);
|
|
3443
|
+
found = $slice(name, 1);
|
|
3299
3444
|
} catch (e) {
|
|
3300
3445
|
}
|
|
3301
3446
|
}
|
|
3302
3447
|
});
|
|
3303
|
-
return
|
|
3448
|
+
return found;
|
|
3304
3449
|
};
|
|
3305
|
-
var isTypedArray2 = requireIsTypedArray();
|
|
3306
3450
|
whichTypedArray = function whichTypedArray2(value) {
|
|
3307
|
-
if (!
|
|
3451
|
+
if (!value || typeof value !== "object") {
|
|
3308
3452
|
return false;
|
|
3309
3453
|
}
|
|
3310
|
-
if (!hasToStringTag
|
|
3311
|
-
|
|
3454
|
+
if (!hasToStringTag) {
|
|
3455
|
+
var tag = $slice($toString(value), 8, -1);
|
|
3456
|
+
if ($indexOf(typedArrays, tag) > -1) {
|
|
3457
|
+
return tag;
|
|
3458
|
+
}
|
|
3459
|
+
if (tag !== "Object") {
|
|
3460
|
+
return false;
|
|
3461
|
+
}
|
|
3462
|
+
return trySlices(value);
|
|
3463
|
+
}
|
|
3464
|
+
if (!gOPD) {
|
|
3465
|
+
return null;
|
|
3312
3466
|
}
|
|
3313
3467
|
return tryTypedArrays(value);
|
|
3314
3468
|
};
|
|
3315
3469
|
return whichTypedArray;
|
|
3316
3470
|
}
|
|
3471
|
+
var isTypedArray;
|
|
3472
|
+
var hasRequiredIsTypedArray;
|
|
3473
|
+
function requireIsTypedArray() {
|
|
3474
|
+
if (hasRequiredIsTypedArray)
|
|
3475
|
+
return isTypedArray;
|
|
3476
|
+
hasRequiredIsTypedArray = 1;
|
|
3477
|
+
var whichTypedArray2 = requireWhichTypedArray();
|
|
3478
|
+
isTypedArray = function isTypedArray2(value) {
|
|
3479
|
+
return !!whichTypedArray2(value);
|
|
3480
|
+
};
|
|
3481
|
+
return isTypedArray;
|
|
3482
|
+
}
|
|
3317
3483
|
var hasRequiredTypes;
|
|
3318
3484
|
function requireTypes() {
|
|
3319
3485
|
if (hasRequiredTypes)
|
|
@@ -4194,8 +4360,8 @@ var __publicField = (obj, key, value) => {
|
|
|
4194
4360
|
var _require = requireBuffer(), Buffer2 = _require.Buffer;
|
|
4195
4361
|
var _require2 = requireUtil(), inspect = _require2.inspect;
|
|
4196
4362
|
var custom = inspect && inspect.custom || "inspect";
|
|
4197
|
-
function copyBuffer(
|
|
4198
|
-
Buffer2.prototype.copy.call(
|
|
4363
|
+
function copyBuffer(src, target, offset) {
|
|
4364
|
+
Buffer2.prototype.copy.call(src, target, offset);
|
|
4199
4365
|
}
|
|
4200
4366
|
buffer_list = /* @__PURE__ */ function() {
|
|
4201
4367
|
function BufferList() {
|
|
@@ -5249,9 +5415,9 @@ var __publicField = (obj, key, value) => {
|
|
|
5249
5415
|
(function(module2, exports3) {
|
|
5250
5416
|
var buffer2 = requireBuffer();
|
|
5251
5417
|
var Buffer2 = buffer2.Buffer;
|
|
5252
|
-
function copyProps(
|
|
5253
|
-
for (var key in
|
|
5254
|
-
dst[key] =
|
|
5418
|
+
function copyProps(src, dst) {
|
|
5419
|
+
for (var key in src) {
|
|
5420
|
+
dst[key] = src[key];
|
|
5255
5421
|
}
|
|
5256
5422
|
}
|
|
5257
5423
|
if (Buffer2.from && Buffer2.alloc && Buffer2.allocUnsafe && Buffer2.allocUnsafeSlow) {
|
|
@@ -6238,7 +6404,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6238
6404
|
errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED("_read()"));
|
|
6239
6405
|
};
|
|
6240
6406
|
Readable.prototype.pipe = function(dest, pipeOpts) {
|
|
6241
|
-
var
|
|
6407
|
+
var src = this;
|
|
6242
6408
|
var state2 = this._readableState;
|
|
6243
6409
|
switch (state2.pipesCount) {
|
|
6244
6410
|
case 0:
|
|
@@ -6258,11 +6424,11 @@ var __publicField = (obj, key, value) => {
|
|
|
6258
6424
|
if (state2.endEmitted)
|
|
6259
6425
|
process$1.nextTick(endFn);
|
|
6260
6426
|
else
|
|
6261
|
-
|
|
6427
|
+
src.once("end", endFn);
|
|
6262
6428
|
dest.on("unpipe", onunpipe);
|
|
6263
6429
|
function onunpipe(readable, unpipeInfo) {
|
|
6264
6430
|
debug("onunpipe");
|
|
6265
|
-
if (readable ===
|
|
6431
|
+
if (readable === src) {
|
|
6266
6432
|
if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
|
|
6267
6433
|
unpipeInfo.hasUnpiped = true;
|
|
6268
6434
|
cleanup();
|
|
@@ -6273,7 +6439,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6273
6439
|
debug("onend");
|
|
6274
6440
|
dest.end();
|
|
6275
6441
|
}
|
|
6276
|
-
var ondrain = pipeOnDrain(
|
|
6442
|
+
var ondrain = pipeOnDrain(src);
|
|
6277
6443
|
dest.on("drain", ondrain);
|
|
6278
6444
|
var cleanedUp = false;
|
|
6279
6445
|
function cleanup() {
|
|
@@ -6283,14 +6449,14 @@ var __publicField = (obj, key, value) => {
|
|
|
6283
6449
|
dest.removeListener("drain", ondrain);
|
|
6284
6450
|
dest.removeListener("error", onerror);
|
|
6285
6451
|
dest.removeListener("unpipe", onunpipe);
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6452
|
+
src.removeListener("end", onend);
|
|
6453
|
+
src.removeListener("end", unpipe);
|
|
6454
|
+
src.removeListener("data", ondata);
|
|
6289
6455
|
cleanedUp = true;
|
|
6290
6456
|
if (state2.awaitDrain && (!dest._writableState || dest._writableState.needDrain))
|
|
6291
6457
|
ondrain();
|
|
6292
6458
|
}
|
|
6293
|
-
|
|
6459
|
+
src.on("data", ondata);
|
|
6294
6460
|
function ondata(chunk) {
|
|
6295
6461
|
debug("ondata");
|
|
6296
6462
|
var ret = dest.write(chunk);
|
|
@@ -6300,7 +6466,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6300
6466
|
debug("false write response, pause", state2.awaitDrain);
|
|
6301
6467
|
state2.awaitDrain++;
|
|
6302
6468
|
}
|
|
6303
|
-
|
|
6469
|
+
src.pause();
|
|
6304
6470
|
}
|
|
6305
6471
|
}
|
|
6306
6472
|
function onerror(er) {
|
|
@@ -6324,24 +6490,24 @@ var __publicField = (obj, key, value) => {
|
|
|
6324
6490
|
dest.once("finish", onfinish);
|
|
6325
6491
|
function unpipe() {
|
|
6326
6492
|
debug("unpipe");
|
|
6327
|
-
|
|
6493
|
+
src.unpipe(dest);
|
|
6328
6494
|
}
|
|
6329
|
-
dest.emit("pipe",
|
|
6495
|
+
dest.emit("pipe", src);
|
|
6330
6496
|
if (!state2.flowing) {
|
|
6331
6497
|
debug("pipe resume");
|
|
6332
|
-
|
|
6498
|
+
src.resume();
|
|
6333
6499
|
}
|
|
6334
6500
|
return dest;
|
|
6335
6501
|
};
|
|
6336
|
-
function pipeOnDrain(
|
|
6502
|
+
function pipeOnDrain(src) {
|
|
6337
6503
|
return function pipeOnDrainFunctionResult() {
|
|
6338
|
-
var state2 =
|
|
6504
|
+
var state2 = src._readableState;
|
|
6339
6505
|
debug("pipeOnDrain", state2.awaitDrain);
|
|
6340
6506
|
if (state2.awaitDrain)
|
|
6341
6507
|
state2.awaitDrain--;
|
|
6342
|
-
if (state2.awaitDrain === 0 && EElistenerCount(
|
|
6508
|
+
if (state2.awaitDrain === 0 && EElistenerCount(src, "data")) {
|
|
6343
6509
|
state2.flowing = true;
|
|
6344
|
-
flow(
|
|
6510
|
+
flow(src);
|
|
6345
6511
|
}
|
|
6346
6512
|
};
|
|
6347
6513
|
}
|
|
@@ -6509,7 +6675,7 @@ var __publicField = (obj, key, value) => {
|
|
|
6509
6675
|
});
|
|
6510
6676
|
for (var i in stream) {
|
|
6511
6677
|
if (this[i] === void 0 && typeof stream[i] === "function") {
|
|
6512
|
-
this[i] = function methodWrap(method) {
|
|
6678
|
+
this[i] = /* @__PURE__ */ function methodWrap(method) {
|
|
6513
6679
|
return function methodWrapReturnFunction() {
|
|
6514
6680
|
return stream[method].apply(stream, arguments);
|
|
6515
6681
|
};
|
|
@@ -9288,22 +9454,34 @@ var __publicField = (obj, key, value) => {
|
|
|
9288
9454
|
}
|
|
9289
9455
|
}
|
|
9290
9456
|
}
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
|
|
9296
|
-
|
|
9297
|
-
|
|
9298
|
-
|
|
9299
|
-
|
|
9300
|
-
|
|
9301
|
-
|
|
9302
|
-
|
|
9303
|
-
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
|
|
9457
|
+
const AlignmentType = {
|
|
9458
|
+
/** Align Start */
|
|
9459
|
+
START: "start",
|
|
9460
|
+
/** Align Center */
|
|
9461
|
+
CENTER: "center",
|
|
9462
|
+
/** End */
|
|
9463
|
+
END: "end",
|
|
9464
|
+
/** Justified */
|
|
9465
|
+
BOTH: "both",
|
|
9466
|
+
/** Medium Kashida Length */
|
|
9467
|
+
MEDIUM_KASHIDA: "mediumKashida",
|
|
9468
|
+
/** Distribute All Characters Equally */
|
|
9469
|
+
DISTRIBUTE: "distribute",
|
|
9470
|
+
/** Align to List Tab */
|
|
9471
|
+
NUM_TAB: "numTab",
|
|
9472
|
+
/** Widest Kashida Length */
|
|
9473
|
+
HIGH_KASHIDA: "highKashida",
|
|
9474
|
+
/** Low Kashida Length */
|
|
9475
|
+
LOW_KASHIDA: "lowKashida",
|
|
9476
|
+
/** Thai Language Justification */
|
|
9477
|
+
THAI_DISTRIBUTE: "thaiDistribute",
|
|
9478
|
+
/** Align Left */
|
|
9479
|
+
LEFT: "left",
|
|
9480
|
+
/** Align Right */
|
|
9481
|
+
RIGHT: "right",
|
|
9482
|
+
/** Justified */
|
|
9483
|
+
JUSTIFIED: "both"
|
|
9484
|
+
};
|
|
9307
9485
|
class AlignmentAttributes extends XmlAttributeComponent {
|
|
9308
9486
|
constructor() {
|
|
9309
9487
|
super(...arguments);
|
|
@@ -9340,36 +9518,35 @@ var __publicField = (obj, key, value) => {
|
|
|
9340
9518
|
});
|
|
9341
9519
|
}
|
|
9342
9520
|
}
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
})(BorderStyle || {});
|
|
9521
|
+
const BorderStyle = {
|
|
9522
|
+
SINGLE: "single",
|
|
9523
|
+
DASH_DOT_STROKED: "dashDotStroked",
|
|
9524
|
+
DASHED: "dashed",
|
|
9525
|
+
DASH_SMALL_GAP: "dashSmallGap",
|
|
9526
|
+
DOT_DASH: "dotDash",
|
|
9527
|
+
DOT_DOT_DASH: "dotDotDash",
|
|
9528
|
+
DOTTED: "dotted",
|
|
9529
|
+
DOUBLE: "double",
|
|
9530
|
+
DOUBLE_WAVE: "doubleWave",
|
|
9531
|
+
INSET: "inset",
|
|
9532
|
+
NIL: "nil",
|
|
9533
|
+
NONE: "none",
|
|
9534
|
+
OUTSET: "outset",
|
|
9535
|
+
THICK: "thick",
|
|
9536
|
+
THICK_THIN_LARGE_GAP: "thickThinLargeGap",
|
|
9537
|
+
THICK_THIN_MEDIUM_GAP: "thickThinMediumGap",
|
|
9538
|
+
THICK_THIN_SMALL_GAP: "thickThinSmallGap",
|
|
9539
|
+
THIN_THICK_LARGE_GAP: "thinThickLargeGap",
|
|
9540
|
+
THIN_THICK_MEDIUM_GAP: "thinThickMediumGap",
|
|
9541
|
+
THIN_THICK_SMALL_GAP: "thinThickSmallGap",
|
|
9542
|
+
THIN_THICK_THIN_LARGE_GAP: "thinThickThinLargeGap",
|
|
9543
|
+
THIN_THICK_THIN_MEDIUM_GAP: "thinThickThinMediumGap",
|
|
9544
|
+
THIN_THICK_THIN_SMALL_GAP: "thinThickThinSmallGap",
|
|
9545
|
+
THREE_D_EMBOSS: "threeDEmboss",
|
|
9546
|
+
THREE_D_ENGRAVE: "threeDEngrave",
|
|
9547
|
+
TRIPLE: "triple",
|
|
9548
|
+
WAVE: "wave"
|
|
9549
|
+
};
|
|
9373
9550
|
class Border extends IgnoreIfEmptyXmlComponent {
|
|
9374
9551
|
constructor(options2) {
|
|
9375
9552
|
super("w:pBdr");
|
|
@@ -9437,6 +9614,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9437
9614
|
super("w:br");
|
|
9438
9615
|
}
|
|
9439
9616
|
};
|
|
9617
|
+
const FieldCharacterType = {
|
|
9618
|
+
BEGIN: "begin",
|
|
9619
|
+
END: "end",
|
|
9620
|
+
SEPARATE: "separate"
|
|
9621
|
+
};
|
|
9440
9622
|
class FidCharAttrs extends XmlAttributeComponent {
|
|
9441
9623
|
constructor() {
|
|
9442
9624
|
super(...arguments);
|
|
@@ -9446,107 +9628,104 @@ var __publicField = (obj, key, value) => {
|
|
|
9446
9628
|
class Begin extends XmlComponent {
|
|
9447
9629
|
constructor(dirty) {
|
|
9448
9630
|
super("w:fldChar");
|
|
9449
|
-
this.root.push(new FidCharAttrs({ type:
|
|
9631
|
+
this.root.push(new FidCharAttrs({ type: FieldCharacterType.BEGIN, dirty }));
|
|
9450
9632
|
}
|
|
9451
9633
|
}
|
|
9452
9634
|
class Separate extends XmlComponent {
|
|
9453
9635
|
constructor(dirty) {
|
|
9454
9636
|
super("w:fldChar");
|
|
9455
|
-
this.root.push(new FidCharAttrs({ type:
|
|
9637
|
+
this.root.push(new FidCharAttrs({ type: FieldCharacterType.SEPARATE, dirty }));
|
|
9456
9638
|
}
|
|
9457
9639
|
}
|
|
9458
9640
|
class End extends XmlComponent {
|
|
9459
9641
|
constructor(dirty) {
|
|
9460
9642
|
super("w:fldChar");
|
|
9461
|
-
this.root.push(new FidCharAttrs({ type:
|
|
9462
|
-
}
|
|
9463
|
-
}
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9467
|
-
|
|
9468
|
-
|
|
9469
|
-
|
|
9470
|
-
|
|
9471
|
-
|
|
9472
|
-
|
|
9473
|
-
|
|
9474
|
-
|
|
9475
|
-
|
|
9476
|
-
|
|
9477
|
-
|
|
9478
|
-
|
|
9479
|
-
|
|
9480
|
-
|
|
9481
|
-
|
|
9482
|
-
|
|
9483
|
-
|
|
9484
|
-
|
|
9485
|
-
|
|
9486
|
-
|
|
9487
|
-
|
|
9488
|
-
|
|
9489
|
-
|
|
9490
|
-
|
|
9491
|
-
|
|
9492
|
-
|
|
9493
|
-
|
|
9494
|
-
|
|
9495
|
-
|
|
9496
|
-
|
|
9497
|
-
|
|
9498
|
-
|
|
9499
|
-
|
|
9500
|
-
|
|
9501
|
-
|
|
9502
|
-
|
|
9503
|
-
|
|
9504
|
-
|
|
9505
|
-
|
|
9506
|
-
|
|
9507
|
-
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9511
|
-
|
|
9512
|
-
|
|
9513
|
-
|
|
9514
|
-
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9518
|
-
|
|
9519
|
-
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
|
|
9535
|
-
|
|
9536
|
-
|
|
9537
|
-
|
|
9538
|
-
|
|
9539
|
-
|
|
9540
|
-
|
|
9541
|
-
|
|
9542
|
-
|
|
9543
|
-
|
|
9544
|
-
|
|
9545
|
-
|
|
9546
|
-
|
|
9547
|
-
SpaceType2["PRESERVE"] = "preserve";
|
|
9548
|
-
return SpaceType2;
|
|
9549
|
-
})(SpaceType || {});
|
|
9643
|
+
this.root.push(new FidCharAttrs({ type: FieldCharacterType.END, dirty }));
|
|
9644
|
+
}
|
|
9645
|
+
}
|
|
9646
|
+
const HorizontalPositionAlign = {
|
|
9647
|
+
CENTER: "center",
|
|
9648
|
+
INSIDE: "inside",
|
|
9649
|
+
LEFT: "left",
|
|
9650
|
+
OUTSIDE: "outside",
|
|
9651
|
+
RIGHT: "right"
|
|
9652
|
+
};
|
|
9653
|
+
const VerticalPositionAlign = {
|
|
9654
|
+
BOTTOM: "bottom",
|
|
9655
|
+
CENTER: "center",
|
|
9656
|
+
INSIDE: "inside",
|
|
9657
|
+
OUTSIDE: "outside",
|
|
9658
|
+
TOP: "top"
|
|
9659
|
+
};
|
|
9660
|
+
const NumberFormat$1 = {
|
|
9661
|
+
DECIMAL: "decimal",
|
|
9662
|
+
UPPER_ROMAN: "upperRoman",
|
|
9663
|
+
LOWER_ROMAN: "lowerRoman",
|
|
9664
|
+
UPPER_LETTER: "upperLetter",
|
|
9665
|
+
LOWER_LETTER: "lowerLetter",
|
|
9666
|
+
ORDINAL: "ordinal",
|
|
9667
|
+
CARDINAL_TEXT: "cardinalText",
|
|
9668
|
+
ORDINAL_TEXT: "ordinalText",
|
|
9669
|
+
HEX: "hex",
|
|
9670
|
+
CHICAGO: "chicago",
|
|
9671
|
+
IDEOGRAPH_DIGITAL: "ideographDigital",
|
|
9672
|
+
JAPANESE_COUNTING: "japaneseCounting",
|
|
9673
|
+
AIUEO: "aiueo",
|
|
9674
|
+
IROHA: "iroha",
|
|
9675
|
+
DECIMAL_FULL_WIDTH: "decimalFullWidth",
|
|
9676
|
+
DECIMAL_HALF_WIDTH: "decimalHalfWidth",
|
|
9677
|
+
JAPANESE_LEGAL: "japaneseLegal",
|
|
9678
|
+
JAPANESE_DIGITAL_TEN_THOUSAND: "japaneseDigitalTenThousand",
|
|
9679
|
+
DECIMAL_ENCLOSED_CIRCLE: "decimalEnclosedCircle",
|
|
9680
|
+
DECIMAL_FULL_WIDTH_2: "decimalFullWidth2",
|
|
9681
|
+
AIUEO_FULL_WIDTH: "aiueoFullWidth",
|
|
9682
|
+
IROHA_FULL_WIDTH: "irohaFullWidth",
|
|
9683
|
+
DECIMAL_ZERO: "decimalZero",
|
|
9684
|
+
BULLET: "bullet",
|
|
9685
|
+
GANADA: "ganada",
|
|
9686
|
+
CHOSUNG: "chosung",
|
|
9687
|
+
DECIMAL_ENCLOSED_FULL_STOP: "decimalEnclosedFullstop",
|
|
9688
|
+
DECIMAL_ENCLOSED_PAREN: "decimalEnclosedParen",
|
|
9689
|
+
DECIMAL_ENCLOSED_CIRCLE_CHINESE: "decimalEnclosedCircleChinese",
|
|
9690
|
+
IDEOGRAPH_ENCLOSED_CIRCLE: "ideographEnclosedCircle",
|
|
9691
|
+
IDEOGRAPH_TRADITIONAL: "ideographTraditional",
|
|
9692
|
+
IDEOGRAPH_ZODIAC: "ideographZodiac",
|
|
9693
|
+
IDEOGRAPH_ZODIAC_TRADITIONAL: "ideographZodiacTraditional",
|
|
9694
|
+
TAIWANESE_COUNTING: "taiwaneseCounting",
|
|
9695
|
+
IDEOGRAPH_LEGAL_TRADITIONAL: "ideographLegalTraditional",
|
|
9696
|
+
TAIWANESE_COUNTING_THOUSAND: "taiwaneseCountingThousand",
|
|
9697
|
+
TAIWANESE_DIGITAL: "taiwaneseDigital",
|
|
9698
|
+
CHINESE_COUNTING: "chineseCounting",
|
|
9699
|
+
CHINESE_LEGAL_SIMPLIFIED: "chineseLegalSimplified",
|
|
9700
|
+
CHINESE_COUNTING_TEN_THOUSAND: "chineseCountingThousand",
|
|
9701
|
+
KOREAN_DIGITAL: "koreanDigital",
|
|
9702
|
+
KOREAN_COUNTING: "koreanCounting",
|
|
9703
|
+
KOREAN_LEGAL: "koreanLegal",
|
|
9704
|
+
KOREAN_DIGITAL_2: "koreanDigital2",
|
|
9705
|
+
VIETNAMESE_COUNTING: "vietnameseCounting",
|
|
9706
|
+
RUSSIAN_LOWER: "russianLower",
|
|
9707
|
+
RUSSIAN_UPPER: "russianUpper",
|
|
9708
|
+
NONE: "none",
|
|
9709
|
+
NUMBER_IN_DASH: "numberInDash",
|
|
9710
|
+
HEBREW_1: "hebrew1",
|
|
9711
|
+
HEBREW_2: "hebrew2",
|
|
9712
|
+
ARABIC_ALPHA: "arabicAlpha",
|
|
9713
|
+
ARABIC_ABJAD: "arabicAbjad",
|
|
9714
|
+
HINDI_VOWELS: "hindiVowels",
|
|
9715
|
+
HINDI_CONSONANTS: "hindiConsonants",
|
|
9716
|
+
HINDI_NUMBERS: "hindiNumbers",
|
|
9717
|
+
HINDI_COUNTING: "hindiCounting",
|
|
9718
|
+
THAI_LETTERS: "thaiLetters",
|
|
9719
|
+
THAI_NUMBERS: "thaiNumbers",
|
|
9720
|
+
THAI_COUNTING: "thaiCounting",
|
|
9721
|
+
BAHT_TEXT: "bahtText",
|
|
9722
|
+
DOLLAR_TEXT: "dollarText"
|
|
9723
|
+
// <xsd:enumeration value="custom"/>
|
|
9724
|
+
};
|
|
9725
|
+
const SpaceType = {
|
|
9726
|
+
DEFAULT: "default",
|
|
9727
|
+
PRESERVE: "preserve"
|
|
9728
|
+
};
|
|
9550
9729
|
class TextAttributes extends XmlAttributeComponent {
|
|
9551
9730
|
constructor() {
|
|
9552
9731
|
super(...arguments);
|
|
@@ -9596,46 +9775,45 @@ var __publicField = (obj, key, value) => {
|
|
|
9596
9775
|
);
|
|
9597
9776
|
}
|
|
9598
9777
|
}
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9606
|
-
|
|
9607
|
-
|
|
9608
|
-
|
|
9609
|
-
|
|
9610
|
-
|
|
9611
|
-
|
|
9612
|
-
|
|
9613
|
-
|
|
9614
|
-
|
|
9615
|
-
|
|
9616
|
-
|
|
9617
|
-
|
|
9618
|
-
|
|
9619
|
-
|
|
9620
|
-
|
|
9621
|
-
|
|
9622
|
-
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
})(ShadingType || {});
|
|
9778
|
+
const ShadingType = {
|
|
9779
|
+
CLEAR: "clear",
|
|
9780
|
+
DIAGONAL_CROSS: "diagCross",
|
|
9781
|
+
DIAGONAL_STRIPE: "diagStripe",
|
|
9782
|
+
HORIZONTAL_CROSS: "horzCross",
|
|
9783
|
+
HORIZONTAL_STRIPE: "horzStripe",
|
|
9784
|
+
NIL: "nil",
|
|
9785
|
+
PERCENT_5: "pct5",
|
|
9786
|
+
PERCENT_10: "pct10",
|
|
9787
|
+
PERCENT_12: "pct12",
|
|
9788
|
+
PERCENT_15: "pct15",
|
|
9789
|
+
PERCENT_20: "pct20",
|
|
9790
|
+
PERCENT_25: "pct25",
|
|
9791
|
+
PERCENT_30: "pct30",
|
|
9792
|
+
PERCENT_35: "pct35",
|
|
9793
|
+
PERCENT_37: "pct37",
|
|
9794
|
+
PERCENT_40: "pct40",
|
|
9795
|
+
PERCENT_45: "pct45",
|
|
9796
|
+
PERCENT_50: "pct50",
|
|
9797
|
+
PERCENT_55: "pct55",
|
|
9798
|
+
PERCENT_60: "pct60",
|
|
9799
|
+
PERCENT_62: "pct62",
|
|
9800
|
+
PERCENT_65: "pct65",
|
|
9801
|
+
PERCENT_70: "pct70",
|
|
9802
|
+
PERCENT_75: "pct75",
|
|
9803
|
+
PERCENT_80: "pct80",
|
|
9804
|
+
PERCENT_85: "pct85",
|
|
9805
|
+
PERCENT_87: "pct87",
|
|
9806
|
+
PERCENT_90: "pct90",
|
|
9807
|
+
PERCENT_95: "pct95",
|
|
9808
|
+
REVERSE_DIAGONAL_STRIPE: "reverseDiagStripe",
|
|
9809
|
+
SOLID: "solid",
|
|
9810
|
+
THIN_DIAGONAL_CROSS: "thinDiagCross",
|
|
9811
|
+
THIN_DIAGONAL_STRIPE: "thinDiagStripe",
|
|
9812
|
+
THIN_HORIZONTAL_CROSS: "thinHorzCross",
|
|
9813
|
+
THIN_REVERSE_DIAGONAL_STRIPE: "thinReverseDiagStripe",
|
|
9814
|
+
THIN_VERTICAL_STRIPE: "thinVertStripe",
|
|
9815
|
+
VERTICAL_STRIPE: "vertStripe"
|
|
9816
|
+
};
|
|
9639
9817
|
class ChangeAttributes extends XmlAttributeComponent {
|
|
9640
9818
|
constructor() {
|
|
9641
9819
|
super(...arguments);
|
|
@@ -9646,10 +9824,9 @@ var __publicField = (obj, key, value) => {
|
|
|
9646
9824
|
});
|
|
9647
9825
|
}
|
|
9648
9826
|
}
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
})(EmphasisMarkType || {});
|
|
9827
|
+
const EmphasisMarkType = {
|
|
9828
|
+
DOT: "dot"
|
|
9829
|
+
};
|
|
9653
9830
|
class BaseEmphasisMark extends XmlComponent {
|
|
9654
9831
|
constructor(emphasisMarkType) {
|
|
9655
9832
|
super("w:em");
|
|
@@ -9661,16 +9838,13 @@ var __publicField = (obj, key, value) => {
|
|
|
9661
9838
|
}
|
|
9662
9839
|
}
|
|
9663
9840
|
class EmphasisMark extends BaseEmphasisMark {
|
|
9664
|
-
constructor(emphasisMarkType =
|
|
9841
|
+
constructor(emphasisMarkType = EmphasisMarkType.DOT) {
|
|
9665
9842
|
super(emphasisMarkType);
|
|
9666
9843
|
}
|
|
9667
9844
|
}
|
|
9668
9845
|
class DotEmphasisMark extends BaseEmphasisMark {
|
|
9669
9846
|
constructor() {
|
|
9670
|
-
super(
|
|
9671
|
-
"dot"
|
|
9672
|
-
/* DOT */
|
|
9673
|
-
);
|
|
9847
|
+
super(EmphasisMarkType.DOT);
|
|
9674
9848
|
}
|
|
9675
9849
|
}
|
|
9676
9850
|
class CharacterSpacing extends XmlComponent {
|
|
@@ -9782,29 +9956,28 @@ var __publicField = (obj, key, value) => {
|
|
|
9782
9956
|
super("subscript");
|
|
9783
9957
|
}
|
|
9784
9958
|
}
|
|
9785
|
-
|
|
9786
|
-
|
|
9787
|
-
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
9794
|
-
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
})(UnderlineType || {});
|
|
9959
|
+
const UnderlineType = {
|
|
9960
|
+
SINGLE: "single",
|
|
9961
|
+
WORDS: "words",
|
|
9962
|
+
DOUBLE: "double",
|
|
9963
|
+
THICK: "thick",
|
|
9964
|
+
DOTTED: "dotted",
|
|
9965
|
+
DOTTEDHEAVY: "dottedHeavy",
|
|
9966
|
+
DASH: "dash",
|
|
9967
|
+
DASHEDHEAVY: "dashedHeavy",
|
|
9968
|
+
DASHLONG: "dashLong",
|
|
9969
|
+
DASHLONGHEAVY: "dashLongHeavy",
|
|
9970
|
+
DOTDASH: "dotDash",
|
|
9971
|
+
DASHDOTHEAVY: "dashDotHeavy",
|
|
9972
|
+
DOTDOTDASH: "dotDotDash",
|
|
9973
|
+
DASHDOTDOTHEAVY: "dashDotDotHeavy",
|
|
9974
|
+
WAVE: "wave",
|
|
9975
|
+
WAVYHEAVY: "wavyHeavy",
|
|
9976
|
+
WAVYDOUBLE: "wavyDouble",
|
|
9977
|
+
NONE: "none"
|
|
9978
|
+
};
|
|
9806
9979
|
class Underline extends XmlComponent {
|
|
9807
|
-
constructor(underlineType =
|
|
9980
|
+
constructor(underlineType = UnderlineType.SINGLE, color) {
|
|
9808
9981
|
super("w:u");
|
|
9809
9982
|
this.root.push(
|
|
9810
9983
|
new Attributes({
|
|
@@ -9814,16 +9987,15 @@ var __publicField = (obj, key, value) => {
|
|
|
9814
9987
|
);
|
|
9815
9988
|
}
|
|
9816
9989
|
}
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
})(TextEffect || {});
|
|
9990
|
+
const TextEffect = {
|
|
9991
|
+
BLINK_BACKGROUND: "blinkBackground",
|
|
9992
|
+
LIGHTS: "lights",
|
|
9993
|
+
ANTS_BLACK: "antsBlack",
|
|
9994
|
+
ANTS_RED: "antsRed",
|
|
9995
|
+
SHIMMER: "shimmer",
|
|
9996
|
+
SPARKLE: "sparkle",
|
|
9997
|
+
NONE: "none"
|
|
9998
|
+
};
|
|
9827
9999
|
class RunProperties extends IgnoreIfEmptyXmlComponent {
|
|
9828
10000
|
constructor(options2) {
|
|
9829
10001
|
super("w:rPr");
|
|
@@ -9927,7 +10099,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9927
10099
|
if (options2.border) {
|
|
9928
10100
|
this.push(new BorderElement("w:bdr", options2.border));
|
|
9929
10101
|
}
|
|
9930
|
-
if (options2.snapToGrid) {
|
|
10102
|
+
if (options2.snapToGrid !== void 0) {
|
|
9931
10103
|
this.push(new OnOffElement("w:snapToGrid", options2.snapToGrid));
|
|
9932
10104
|
}
|
|
9933
10105
|
if (options2.vanish) {
|
|
@@ -9977,12 +10149,11 @@ var __publicField = (obj, key, value) => {
|
|
|
9977
10149
|
}
|
|
9978
10150
|
}
|
|
9979
10151
|
}
|
|
9980
|
-
|
|
9981
|
-
|
|
9982
|
-
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
})(PageNumber || {});
|
|
10152
|
+
const PageNumber = {
|
|
10153
|
+
CURRENT: "CURRENT",
|
|
10154
|
+
TOTAL_PAGES: "TOTAL_PAGES",
|
|
10155
|
+
TOTAL_PAGES_IN_SECTION: "TOTAL_PAGES_IN_SECTION"
|
|
10156
|
+
};
|
|
9986
10157
|
class Run extends XmlComponent {
|
|
9987
10158
|
constructor(options2) {
|
|
9988
10159
|
super("w:r");
|
|
@@ -9998,19 +10169,19 @@ var __publicField = (obj, key, value) => {
|
|
|
9998
10169
|
for (const child of options2.children) {
|
|
9999
10170
|
if (typeof child === "string") {
|
|
10000
10171
|
switch (child) {
|
|
10001
|
-
case
|
|
10172
|
+
case PageNumber.CURRENT:
|
|
10002
10173
|
this.root.push(new Begin());
|
|
10003
10174
|
this.root.push(new Page());
|
|
10004
10175
|
this.root.push(new Separate());
|
|
10005
10176
|
this.root.push(new End());
|
|
10006
10177
|
break;
|
|
10007
|
-
case
|
|
10178
|
+
case PageNumber.TOTAL_PAGES:
|
|
10008
10179
|
this.root.push(new Begin());
|
|
10009
10180
|
this.root.push(new NumberOfPages());
|
|
10010
10181
|
this.root.push(new Separate());
|
|
10011
10182
|
this.root.push(new End());
|
|
10012
10183
|
break;
|
|
10013
|
-
case
|
|
10184
|
+
case PageNumber.TOTAL_PAGES_IN_SECTION:
|
|
10014
10185
|
this.root.push(new Begin());
|
|
10015
10186
|
this.root.push(new NumberOfPagesSection());
|
|
10016
10187
|
this.root.push(new Separate());
|
|
@@ -10085,28 +10256,26 @@ var __publicField = (obj, key, value) => {
|
|
|
10085
10256
|
const docPropertiesUniqueNumericIdGen = () => uniqueNumericIdCreator();
|
|
10086
10257
|
const bookmarkUniqueNumericIdGen = () => uniqueNumericIdCreator();
|
|
10087
10258
|
const uniqueId = () => nanoid().toLowerCase();
|
|
10088
|
-
|
|
10089
|
-
|
|
10090
|
-
|
|
10091
|
-
|
|
10092
|
-
|
|
10093
|
-
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
|
|
10098
|
-
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10102
|
-
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
return VerticalPositionRelativeFrom2;
|
|
10109
|
-
})(VerticalPositionRelativeFrom || {});
|
|
10259
|
+
const HorizontalPositionRelativeFrom = {
|
|
10260
|
+
CHARACTER: "character",
|
|
10261
|
+
COLUMN: "column",
|
|
10262
|
+
INSIDE_MARGIN: "insideMargin",
|
|
10263
|
+
LEFT_MARGIN: "leftMargin",
|
|
10264
|
+
MARGIN: "margin",
|
|
10265
|
+
OUTSIDE_MARGIN: "outsideMargin",
|
|
10266
|
+
PAGE: "page",
|
|
10267
|
+
RIGHT_MARGIN: "rightMargin"
|
|
10268
|
+
};
|
|
10269
|
+
const VerticalPositionRelativeFrom = {
|
|
10270
|
+
BOTTOM_MARGIN: "bottomMargin",
|
|
10271
|
+
INSIDE_MARGIN: "insideMargin",
|
|
10272
|
+
LINE: "line",
|
|
10273
|
+
MARGIN: "margin",
|
|
10274
|
+
OUTSIDE_MARGIN: "outsideMargin",
|
|
10275
|
+
PAGE: "page",
|
|
10276
|
+
PARAGRAPH: "paragraph",
|
|
10277
|
+
TOP_MARGIN: "topMargin"
|
|
10278
|
+
};
|
|
10110
10279
|
class SimplePosAttributes extends XmlAttributeComponent {
|
|
10111
10280
|
constructor() {
|
|
10112
10281
|
super(...arguments);
|
|
@@ -10490,20 +10659,18 @@ var __publicField = (obj, key, value) => {
|
|
|
10490
10659
|
this.root.push(this.data);
|
|
10491
10660
|
}
|
|
10492
10661
|
}
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
return TextWrappingSide2;
|
|
10506
|
-
})(TextWrappingSide || {});
|
|
10662
|
+
const TextWrappingType = {
|
|
10663
|
+
NONE: 0,
|
|
10664
|
+
SQUARE: 1,
|
|
10665
|
+
TIGHT: 2,
|
|
10666
|
+
TOP_AND_BOTTOM: 3
|
|
10667
|
+
};
|
|
10668
|
+
const TextWrappingSide = {
|
|
10669
|
+
BOTH_SIDES: "bothSides",
|
|
10670
|
+
LEFT: "left",
|
|
10671
|
+
RIGHT: "right",
|
|
10672
|
+
LARGEST: "largest"
|
|
10673
|
+
};
|
|
10507
10674
|
class WrapNone extends XmlComponent {
|
|
10508
10675
|
constructor() {
|
|
10509
10676
|
super("wp:wrapNone");
|
|
@@ -11104,25 +11271,23 @@ var __publicField = (obj, key, value) => {
|
|
|
11104
11271
|
super("w:lastRenderedPageBreak");
|
|
11105
11272
|
}
|
|
11106
11273
|
}
|
|
11107
|
-
|
|
11108
|
-
|
|
11109
|
-
|
|
11110
|
-
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
return PositionalTabLeader2;
|
|
11125
|
-
})(PositionalTabLeader || {});
|
|
11274
|
+
const PositionalTabAlignment = {
|
|
11275
|
+
LEFT: "left",
|
|
11276
|
+
CENTER: "center",
|
|
11277
|
+
RIGHT: "right"
|
|
11278
|
+
};
|
|
11279
|
+
const PositionalTabRelativeTo = {
|
|
11280
|
+
MARGIN: "margin",
|
|
11281
|
+
INDENT: "indent"
|
|
11282
|
+
};
|
|
11283
|
+
const PositionalTabLeader = {
|
|
11284
|
+
NONE: "none",
|
|
11285
|
+
DOT: "dot",
|
|
11286
|
+
HYPHEN: "hyphen",
|
|
11287
|
+
UNDERSCORE: "underscore",
|
|
11288
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11289
|
+
MIDDLE_DOT: "middleDot"
|
|
11290
|
+
};
|
|
11126
11291
|
class PositionalTab extends XmlComponent {
|
|
11127
11292
|
constructor(options2) {
|
|
11128
11293
|
super("w:ptab");
|
|
@@ -11144,6 +11309,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11144
11309
|
);
|
|
11145
11310
|
}
|
|
11146
11311
|
}
|
|
11312
|
+
const BreakType = {
|
|
11313
|
+
COLUMN: "column",
|
|
11314
|
+
PAGE: "page"
|
|
11315
|
+
// textWrapping breaks are the default and already exposed via the "Run" class
|
|
11316
|
+
};
|
|
11147
11317
|
class Break extends XmlComponent {
|
|
11148
11318
|
constructor(type) {
|
|
11149
11319
|
super("w:br");
|
|
@@ -11157,19 +11327,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11157
11327
|
class PageBreak extends Run {
|
|
11158
11328
|
constructor() {
|
|
11159
11329
|
super({});
|
|
11160
|
-
this.root.push(new Break(
|
|
11161
|
-
"page"
|
|
11162
|
-
/* PAGE */
|
|
11163
|
-
));
|
|
11330
|
+
this.root.push(new Break(BreakType.PAGE));
|
|
11164
11331
|
}
|
|
11165
11332
|
}
|
|
11166
11333
|
class ColumnBreak extends Run {
|
|
11167
11334
|
constructor() {
|
|
11168
11335
|
super({});
|
|
11169
|
-
this.root.push(new Break(
|
|
11170
|
-
"column"
|
|
11171
|
-
/* COLUMN */
|
|
11172
|
-
));
|
|
11336
|
+
this.root.push(new Break(BreakType.COLUMN));
|
|
11173
11337
|
}
|
|
11174
11338
|
}
|
|
11175
11339
|
class PageBreakBefore extends XmlComponent {
|
|
@@ -11177,13 +11341,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11177
11341
|
super("w:pageBreakBefore");
|
|
11178
11342
|
}
|
|
11179
11343
|
}
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
}
|
|
11344
|
+
const LineRuleType = {
|
|
11345
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11346
|
+
AT_LEAST: "atLeast",
|
|
11347
|
+
EXACTLY: "exactly",
|
|
11348
|
+
EXACT: "exact",
|
|
11349
|
+
AUTO: "auto"
|
|
11350
|
+
};
|
|
11187
11351
|
class SpacingAttributes extends XmlAttributeComponent {
|
|
11188
11352
|
constructor() {
|
|
11189
11353
|
super(...arguments);
|
|
@@ -11201,16 +11365,15 @@ var __publicField = (obj, key, value) => {
|
|
|
11201
11365
|
this.root.push(new SpacingAttributes(options2));
|
|
11202
11366
|
}
|
|
11203
11367
|
}
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
})(HeadingLevel || {});
|
|
11368
|
+
const HeadingLevel = {
|
|
11369
|
+
HEADING_1: "Heading1",
|
|
11370
|
+
HEADING_2: "Heading2",
|
|
11371
|
+
HEADING_3: "Heading3",
|
|
11372
|
+
HEADING_4: "Heading4",
|
|
11373
|
+
HEADING_5: "Heading5",
|
|
11374
|
+
HEADING_6: "Heading6",
|
|
11375
|
+
TITLE: "Title"
|
|
11376
|
+
};
|
|
11214
11377
|
let Style$1 = class Style extends XmlComponent {
|
|
11215
11378
|
constructor(styleId) {
|
|
11216
11379
|
super("w:pStyle");
|
|
@@ -11229,30 +11392,28 @@ var __publicField = (obj, key, value) => {
|
|
|
11229
11392
|
}
|
|
11230
11393
|
}
|
|
11231
11394
|
}
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11240
|
-
|
|
11241
|
-
|
|
11242
|
-
|
|
11243
|
-
|
|
11244
|
-
|
|
11245
|
-
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
return TabStopPosition2;
|
|
11255
|
-
})(TabStopPosition || {});
|
|
11395
|
+
const TabStopType = {
|
|
11396
|
+
LEFT: "left",
|
|
11397
|
+
RIGHT: "right",
|
|
11398
|
+
CENTER: "center",
|
|
11399
|
+
BAR: "bar",
|
|
11400
|
+
CLEAR: "clear",
|
|
11401
|
+
DECIMAL: "decimal",
|
|
11402
|
+
END: "end",
|
|
11403
|
+
NUM: "num",
|
|
11404
|
+
START: "start"
|
|
11405
|
+
};
|
|
11406
|
+
const LeaderType = {
|
|
11407
|
+
DOT: "dot",
|
|
11408
|
+
HYPHEN: "hyphen",
|
|
11409
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
11410
|
+
MIDDLE_DOT: "middleDot",
|
|
11411
|
+
NONE: "none",
|
|
11412
|
+
UNDERSCORE: "underscore"
|
|
11413
|
+
};
|
|
11414
|
+
const TabStopPosition = {
|
|
11415
|
+
MAX: 9026
|
|
11416
|
+
};
|
|
11256
11417
|
class TabAttributes extends XmlAttributeComponent {
|
|
11257
11418
|
constructor() {
|
|
11258
11419
|
super(...arguments);
|
|
@@ -11320,10 +11481,9 @@ var __publicField = (obj, key, value) => {
|
|
|
11320
11481
|
});
|
|
11321
11482
|
}
|
|
11322
11483
|
}
|
|
11323
|
-
|
|
11324
|
-
|
|
11325
|
-
|
|
11326
|
-
})(TargetModeType || {});
|
|
11484
|
+
const TargetModeType = {
|
|
11485
|
+
EXTERNAL: "External"
|
|
11486
|
+
};
|
|
11327
11487
|
class Relationship extends XmlComponent {
|
|
11328
11488
|
constructor(id, type, target, targetMode) {
|
|
11329
11489
|
super("Relationship");
|
|
@@ -11347,11 +11507,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11347
11507
|
});
|
|
11348
11508
|
}
|
|
11349
11509
|
}
|
|
11350
|
-
|
|
11351
|
-
|
|
11352
|
-
|
|
11353
|
-
|
|
11354
|
-
})(HyperlinkType || {});
|
|
11510
|
+
const HyperlinkType = {
|
|
11511
|
+
INTERNAL: "INTERNAL",
|
|
11512
|
+
EXTERNAL: "EXTERNAL"
|
|
11513
|
+
};
|
|
11355
11514
|
class ConcreteHyperlink extends XmlComponent {
|
|
11356
11515
|
constructor(children, relationshipId, anchor) {
|
|
11357
11516
|
super("w:hyperlink");
|
|
@@ -11460,12 +11619,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11460
11619
|
});
|
|
11461
11620
|
}
|
|
11462
11621
|
}
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
})(VerticalAlign || {});
|
|
11622
|
+
const VerticalAlign = {
|
|
11623
|
+
BOTTOM: "bottom",
|
|
11624
|
+
CENTER: "center",
|
|
11625
|
+
TOP: "top"
|
|
11626
|
+
};
|
|
11469
11627
|
class VerticalAlignAttributes extends XmlAttributeComponent {
|
|
11470
11628
|
constructor() {
|
|
11471
11629
|
super(...arguments);
|
|
@@ -11480,12 +11638,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11480
11638
|
this.root.push(new VerticalAlignAttributes({ verticalAlign: value }));
|
|
11481
11639
|
}
|
|
11482
11640
|
}
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
})(HeaderFooterReferenceType || {});
|
|
11641
|
+
const HeaderFooterReferenceType = {
|
|
11642
|
+
DEFAULT: "default",
|
|
11643
|
+
FIRST: "first",
|
|
11644
|
+
EVEN: "even"
|
|
11645
|
+
};
|
|
11489
11646
|
class FooterReferenceAttributes extends XmlAttributeComponent {
|
|
11490
11647
|
constructor() {
|
|
11491
11648
|
super(...arguments);
|
|
@@ -11495,17 +11652,16 @@ var __publicField = (obj, key, value) => {
|
|
|
11495
11652
|
});
|
|
11496
11653
|
}
|
|
11497
11654
|
}
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
})(HeaderFooterType || {});
|
|
11655
|
+
const HeaderFooterType = {
|
|
11656
|
+
HEADER: "w:headerReference",
|
|
11657
|
+
FOOTER: "w:footerReference"
|
|
11658
|
+
};
|
|
11503
11659
|
class HeaderFooterReference extends XmlComponent {
|
|
11504
11660
|
constructor(type, options2) {
|
|
11505
11661
|
super(type);
|
|
11506
11662
|
this.root.push(
|
|
11507
11663
|
new FooterReferenceAttributes({
|
|
11508
|
-
type: options2.type ||
|
|
11664
|
+
type: options2.type || HeaderFooterReferenceType.DEFAULT,
|
|
11509
11665
|
id: `rId${options2.id}`
|
|
11510
11666
|
})
|
|
11511
11667
|
);
|
|
@@ -11527,13 +11683,12 @@ var __publicField = (obj, key, value) => {
|
|
|
11527
11683
|
}
|
|
11528
11684
|
}
|
|
11529
11685
|
}
|
|
11530
|
-
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
|
|
11536
|
-
})(DocumentGridType || {});
|
|
11686
|
+
const DocumentGridType = {
|
|
11687
|
+
DEFAULT: "default",
|
|
11688
|
+
LINES: "lines",
|
|
11689
|
+
LINES_AND_CHARS: "linesAndChars",
|
|
11690
|
+
SNAP_TO_CHARS: "snapToChars"
|
|
11691
|
+
};
|
|
11537
11692
|
class DocGridAttributes extends XmlAttributeComponent {
|
|
11538
11693
|
constructor() {
|
|
11539
11694
|
super(...arguments);
|
|
@@ -11556,12 +11711,11 @@ var __publicField = (obj, key, value) => {
|
|
|
11556
11711
|
);
|
|
11557
11712
|
}
|
|
11558
11713
|
}
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
|
|
11563
|
-
|
|
11564
|
-
})(LineNumberRestartFormat || {});
|
|
11714
|
+
const LineNumberRestartFormat = {
|
|
11715
|
+
NEW_PAGE: "newPage",
|
|
11716
|
+
NEW_SECTION: "newSection",
|
|
11717
|
+
CONTINUOUS: "continuous"
|
|
11718
|
+
};
|
|
11565
11719
|
class LineNumberType extends XmlComponent {
|
|
11566
11720
|
constructor({ countBy, start, restart, distance }) {
|
|
11567
11721
|
super("w:lnNumType");
|
|
@@ -11570,27 +11724,27 @@ var __publicField = (obj, key, value) => {
|
|
|
11570
11724
|
countBy: { key: "w:countBy", value: countBy === void 0 ? void 0 : decimalNumber(countBy) },
|
|
11571
11725
|
start: { key: "w:start", value: start === void 0 ? void 0 : decimalNumber(start) },
|
|
11572
11726
|
restart: { key: "w:restart", value: restart },
|
|
11573
|
-
distance: {
|
|
11727
|
+
distance: {
|
|
11728
|
+
key: "w:distance",
|
|
11729
|
+
value: distance === void 0 ? void 0 : twipsMeasureValue(distance)
|
|
11730
|
+
}
|
|
11574
11731
|
})
|
|
11575
11732
|
);
|
|
11576
11733
|
}
|
|
11577
11734
|
}
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
PageBorderZOrder2["FRONT"] = "front";
|
|
11592
|
-
return PageBorderZOrder2;
|
|
11593
|
-
})(PageBorderZOrder || {});
|
|
11735
|
+
const PageBorderDisplay = {
|
|
11736
|
+
ALL_PAGES: "allPages",
|
|
11737
|
+
FIRST_PAGE: "firstPage",
|
|
11738
|
+
NOT_FIRST_PAGE: "notFirstPage"
|
|
11739
|
+
};
|
|
11740
|
+
const PageBorderOffsetFrom = {
|
|
11741
|
+
PAGE: "page",
|
|
11742
|
+
TEXT: "text"
|
|
11743
|
+
};
|
|
11744
|
+
const PageBorderZOrder = {
|
|
11745
|
+
BACK: "back",
|
|
11746
|
+
FRONT: "front"
|
|
11747
|
+
};
|
|
11594
11748
|
class PageBordersAttributes extends XmlAttributeComponent {
|
|
11595
11749
|
constructor() {
|
|
11596
11750
|
super(...arguments);
|
|
@@ -11648,14 +11802,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11648
11802
|
);
|
|
11649
11803
|
}
|
|
11650
11804
|
}
|
|
11651
|
-
|
|
11652
|
-
|
|
11653
|
-
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
11658
|
-
})(PageNumberSeparator || {});
|
|
11805
|
+
const PageNumberSeparator = {
|
|
11806
|
+
HYPHEN: "hyphen",
|
|
11807
|
+
PERIOD: "period",
|
|
11808
|
+
COLON: "colon",
|
|
11809
|
+
EM_DASH: "emDash",
|
|
11810
|
+
EN_DASH: "endash"
|
|
11811
|
+
};
|
|
11659
11812
|
class PageNumberTypeAttributes extends XmlAttributeComponent {
|
|
11660
11813
|
constructor() {
|
|
11661
11814
|
super(...arguments);
|
|
@@ -11678,15 +11831,14 @@ var __publicField = (obj, key, value) => {
|
|
|
11678
11831
|
);
|
|
11679
11832
|
}
|
|
11680
11833
|
}
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
})(PageOrientation || {});
|
|
11834
|
+
const PageOrientation = {
|
|
11835
|
+
PORTRAIT: "portrait",
|
|
11836
|
+
LANDSCAPE: "landscape"
|
|
11837
|
+
};
|
|
11686
11838
|
class PageSize extends XmlComponent {
|
|
11687
11839
|
constructor(width, height, orientation) {
|
|
11688
11840
|
super("w:pgSz");
|
|
11689
|
-
const flip = orientation ===
|
|
11841
|
+
const flip = orientation === PageOrientation.LANDSCAPE;
|
|
11690
11842
|
const widthTwips = twipsMeasureValue(width);
|
|
11691
11843
|
const heightTwips = twipsMeasureValue(height);
|
|
11692
11844
|
this.root.push(
|
|
@@ -11698,11 +11850,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11698
11850
|
);
|
|
11699
11851
|
}
|
|
11700
11852
|
}
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
})(PageTextDirectionType || {});
|
|
11853
|
+
const PageTextDirectionType = {
|
|
11854
|
+
LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb",
|
|
11855
|
+
TOP_TO_BOTTOM_RIGHT_TO_LEFT: "tbRl"
|
|
11856
|
+
};
|
|
11706
11857
|
class PageTextDirectionAttributes extends XmlAttributeComponent {
|
|
11707
11858
|
constructor() {
|
|
11708
11859
|
super(...arguments);
|
|
@@ -11719,14 +11870,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11719
11870
|
);
|
|
11720
11871
|
}
|
|
11721
11872
|
}
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
})(SectionType || {});
|
|
11873
|
+
const SectionType = {
|
|
11874
|
+
NEXT_PAGE: "nextPage",
|
|
11875
|
+
NEXT_COLUMN: "nextColumn",
|
|
11876
|
+
CONTINUOUS: "continuous",
|
|
11877
|
+
EVEN_PAGE: "evenPage",
|
|
11878
|
+
ODD_PAGE: "oddPage"
|
|
11879
|
+
};
|
|
11730
11880
|
class SectionTypeAttributes extends XmlAttributeComponent {
|
|
11731
11881
|
constructor() {
|
|
11732
11882
|
super(...arguments);
|
|
@@ -11742,10 +11892,10 @@ var __publicField = (obj, key, value) => {
|
|
|
11742
11892
|
}
|
|
11743
11893
|
}
|
|
11744
11894
|
const sectionMarginDefaults = {
|
|
11745
|
-
TOP:
|
|
11746
|
-
RIGHT:
|
|
11747
|
-
BOTTOM:
|
|
11748
|
-
LEFT:
|
|
11895
|
+
TOP: 1440,
|
|
11896
|
+
RIGHT: 1440,
|
|
11897
|
+
BOTTOM: 1440,
|
|
11898
|
+
LEFT: 1440,
|
|
11749
11899
|
HEADER: 708,
|
|
11750
11900
|
FOOTER: 708,
|
|
11751
11901
|
GUTTER: 0
|
|
@@ -12067,27 +12217,25 @@ var __publicField = (obj, key, value) => {
|
|
|
12067
12217
|
this.root.push(new WordWrapAttributes({ val: 0 }));
|
|
12068
12218
|
}
|
|
12069
12219
|
}
|
|
12070
|
-
|
|
12071
|
-
|
|
12072
|
-
|
|
12073
|
-
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
|
|
12077
|
-
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
return FrameWrap2;
|
|
12090
|
-
})(FrameWrap || {});
|
|
12220
|
+
const DropCapType = {
|
|
12221
|
+
NONE: "none",
|
|
12222
|
+
DROP: "drop",
|
|
12223
|
+
MARGIN: "margin"
|
|
12224
|
+
};
|
|
12225
|
+
const FrameAnchorType = {
|
|
12226
|
+
MARGIN: "margin",
|
|
12227
|
+
PAGE: "page",
|
|
12228
|
+
TEXT: "text"
|
|
12229
|
+
};
|
|
12230
|
+
const FrameWrap = {
|
|
12231
|
+
AROUND: "around",
|
|
12232
|
+
AUTO: "auto",
|
|
12233
|
+
NONE: "none",
|
|
12234
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12235
|
+
NOT_BESIDE: "notBeside",
|
|
12236
|
+
THROUGH: "through",
|
|
12237
|
+
TIGHT: "tight"
|
|
12238
|
+
};
|
|
12091
12239
|
class FramePropertiesAttributes extends XmlAttributeComponent {
|
|
12092
12240
|
constructor() {
|
|
12093
12241
|
super(...arguments);
|
|
@@ -12228,6 +12376,9 @@ var __publicField = (obj, key, value) => {
|
|
|
12228
12376
|
if (options2.autoSpaceEastAsianText !== void 0) {
|
|
12229
12377
|
this.push(new OnOffElement("w:autoSpaceDN", options2.autoSpaceEastAsianText));
|
|
12230
12378
|
}
|
|
12379
|
+
if (options2.run) {
|
|
12380
|
+
this.push(new RunProperties(options2.run));
|
|
12381
|
+
}
|
|
12231
12382
|
}
|
|
12232
12383
|
push(item) {
|
|
12233
12384
|
this.root.push(item);
|
|
@@ -12657,33 +12808,11 @@ var __publicField = (obj, key, value) => {
|
|
|
12657
12808
|
}
|
|
12658
12809
|
}
|
|
12659
12810
|
}
|
|
12660
|
-
|
|
12661
|
-
|
|
12662
|
-
|
|
12663
|
-
|
|
12664
|
-
|
|
12665
|
-
return WidthType2;
|
|
12666
|
-
})(WidthType || {});
|
|
12667
|
-
class TableWidthElement extends XmlComponent {
|
|
12668
|
-
constructor(name, { type = "auto", size }) {
|
|
12669
|
-
super(name);
|
|
12670
|
-
let tableWidthValue = size;
|
|
12671
|
-
if (type === "pct" && typeof size === "number") {
|
|
12672
|
-
tableWidthValue = `${size}%`;
|
|
12673
|
-
}
|
|
12674
|
-
this.root.push(
|
|
12675
|
-
new NextAttributeComponent({
|
|
12676
|
-
type: { key: "w:type", value: type },
|
|
12677
|
-
size: { key: "w:w", value: measurementOrPercentValue(tableWidthValue) }
|
|
12678
|
-
})
|
|
12679
|
-
);
|
|
12680
|
-
}
|
|
12681
|
-
}
|
|
12682
|
-
var TableCellMarginElementType = /* @__PURE__ */ ((TableCellMarginElementType2) => {
|
|
12683
|
-
TableCellMarginElementType2["TABLE"] = "w:tblCellMar";
|
|
12684
|
-
TableCellMarginElementType2["TABLE_CELL"] = "w:tcMar";
|
|
12685
|
-
return TableCellMarginElementType2;
|
|
12686
|
-
})(TableCellMarginElementType || {});
|
|
12811
|
+
const TableCellMarginElementType = {
|
|
12812
|
+
TABLE: "w:tblCellMar",
|
|
12813
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12814
|
+
TABLE_CELL: "w:tcMar"
|
|
12815
|
+
};
|
|
12687
12816
|
class TableCellMargin extends IgnoreIfEmptyXmlComponent {
|
|
12688
12817
|
constructor(type, { marginUnitType = WidthType.DXA, top, left, bottom, right }) {
|
|
12689
12818
|
super(type);
|
|
@@ -12701,6 +12830,31 @@ var __publicField = (obj, key, value) => {
|
|
|
12701
12830
|
}
|
|
12702
12831
|
}
|
|
12703
12832
|
}
|
|
12833
|
+
const WidthType = {
|
|
12834
|
+
/** Auto. */
|
|
12835
|
+
AUTO: "auto",
|
|
12836
|
+
/** Value is in twentieths of a point */
|
|
12837
|
+
DXA: "dxa",
|
|
12838
|
+
/** No (empty) value. */
|
|
12839
|
+
NIL: "nil",
|
|
12840
|
+
/** Value is in percentage. */
|
|
12841
|
+
PERCENTAGE: "pct"
|
|
12842
|
+
};
|
|
12843
|
+
class TableWidthElement extends XmlComponent {
|
|
12844
|
+
constructor(name, { type = WidthType.AUTO, size }) {
|
|
12845
|
+
super(name);
|
|
12846
|
+
let tableWidthValue = size;
|
|
12847
|
+
if (type === WidthType.PERCENTAGE && typeof size === "number") {
|
|
12848
|
+
tableWidthValue = `${size}%`;
|
|
12849
|
+
}
|
|
12850
|
+
this.root.push(
|
|
12851
|
+
new NextAttributeComponent({
|
|
12852
|
+
type: { key: "w:type", value: type },
|
|
12853
|
+
size: { key: "w:w", value: measurementOrPercentValue(tableWidthValue) }
|
|
12854
|
+
})
|
|
12855
|
+
);
|
|
12856
|
+
}
|
|
12857
|
+
}
|
|
12704
12858
|
class TableCellBorders extends IgnoreIfEmptyXmlComponent {
|
|
12705
12859
|
constructor(options2) {
|
|
12706
12860
|
super("w:tcBorders");
|
|
@@ -12740,11 +12894,16 @@ var __publicField = (obj, key, value) => {
|
|
|
12740
12894
|
);
|
|
12741
12895
|
}
|
|
12742
12896
|
}
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12897
|
+
const VerticalMergeType = {
|
|
12898
|
+
/**
|
|
12899
|
+
* Cell that is merged with upper one.
|
|
12900
|
+
*/
|
|
12901
|
+
CONTINUE: "continue",
|
|
12902
|
+
/**
|
|
12903
|
+
* Cell that is starting the vertical merge.
|
|
12904
|
+
*/
|
|
12905
|
+
RESTART: "restart"
|
|
12906
|
+
};
|
|
12748
12907
|
class VerticalMergeAttributes extends XmlAttributeComponent {
|
|
12749
12908
|
constructor() {
|
|
12750
12909
|
super(...arguments);
|
|
@@ -12761,12 +12920,14 @@ var __publicField = (obj, key, value) => {
|
|
|
12761
12920
|
);
|
|
12762
12921
|
}
|
|
12763
12922
|
}
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12923
|
+
const TextDirection = {
|
|
12924
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12925
|
+
BOTTOM_TO_TOP_LEFT_TO_RIGHT: "btLr",
|
|
12926
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12927
|
+
LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb",
|
|
12928
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
12929
|
+
TOP_TO_BOTTOM_RIGHT_TO_LEFT: "tbRl"
|
|
12930
|
+
};
|
|
12770
12931
|
class TDirectionAttributes extends XmlAttributeComponent {
|
|
12771
12932
|
constructor() {
|
|
12772
12933
|
super(...arguments);
|
|
@@ -12883,34 +13044,30 @@ var __publicField = (obj, key, value) => {
|
|
|
12883
13044
|
insideHorizontal: NONE_BORDER,
|
|
12884
13045
|
insideVertical: NONE_BORDER
|
|
12885
13046
|
});
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
12895
|
-
|
|
12896
|
-
|
|
12897
|
-
|
|
12898
|
-
|
|
12899
|
-
|
|
12900
|
-
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
|
|
12904
|
-
|
|
12905
|
-
|
|
12906
|
-
|
|
12907
|
-
|
|
12908
|
-
|
|
12909
|
-
|
|
12910
|
-
OverlapType2["NEVER"] = "never";
|
|
12911
|
-
OverlapType2["OVERLAP"] = "overlap";
|
|
12912
|
-
return OverlapType2;
|
|
12913
|
-
})(OverlapType || {});
|
|
13047
|
+
const TableAnchorType = {
|
|
13048
|
+
MARGIN: "margin",
|
|
13049
|
+
PAGE: "page",
|
|
13050
|
+
TEXT: "text"
|
|
13051
|
+
};
|
|
13052
|
+
const RelativeHorizontalPosition = {
|
|
13053
|
+
CENTER: "center",
|
|
13054
|
+
INSIDE: "inside",
|
|
13055
|
+
LEFT: "left",
|
|
13056
|
+
OUTSIDE: "outside",
|
|
13057
|
+
RIGHT: "right"
|
|
13058
|
+
};
|
|
13059
|
+
const RelativeVerticalPosition = {
|
|
13060
|
+
CENTER: "center",
|
|
13061
|
+
INSIDE: "inside",
|
|
13062
|
+
BOTTOM: "bottom",
|
|
13063
|
+
OUTSIDE: "outside",
|
|
13064
|
+
INLINE: "inline",
|
|
13065
|
+
TOP: "top"
|
|
13066
|
+
};
|
|
13067
|
+
const OverlapType = {
|
|
13068
|
+
NEVER: "never",
|
|
13069
|
+
OVERLAP: "overlap"
|
|
13070
|
+
};
|
|
12914
13071
|
class TableFloatProperties extends XmlComponent {
|
|
12915
13072
|
constructor({
|
|
12916
13073
|
horizontalAnchor,
|
|
@@ -12928,12 +13085,18 @@ var __publicField = (obj, key, value) => {
|
|
|
12928
13085
|
super("w:tblpPr");
|
|
12929
13086
|
this.root.push(
|
|
12930
13087
|
new NextAttributeComponent({
|
|
12931
|
-
leftFromText: {
|
|
13088
|
+
leftFromText: {
|
|
13089
|
+
key: "w:leftFromText",
|
|
13090
|
+
value: leftFromText === void 0 ? void 0 : twipsMeasureValue(leftFromText)
|
|
13091
|
+
},
|
|
12932
13092
|
rightFromText: {
|
|
12933
13093
|
key: "w:rightFromText",
|
|
12934
13094
|
value: rightFromText === void 0 ? void 0 : twipsMeasureValue(rightFromText)
|
|
12935
13095
|
},
|
|
12936
|
-
topFromText: {
|
|
13096
|
+
topFromText: {
|
|
13097
|
+
key: "w:topFromText",
|
|
13098
|
+
value: topFromText === void 0 ? void 0 : twipsMeasureValue(topFromText)
|
|
13099
|
+
},
|
|
12937
13100
|
bottomFromText: {
|
|
12938
13101
|
key: "w:bottomFromText",
|
|
12939
13102
|
value: bottomFromText === void 0 ? void 0 : twipsMeasureValue(bottomFromText)
|
|
@@ -12969,11 +13132,10 @@ var __publicField = (obj, key, value) => {
|
|
|
12969
13132
|
}
|
|
12970
13133
|
}
|
|
12971
13134
|
}
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
|
|
12976
|
-
})(TableLayoutType || {});
|
|
13135
|
+
const TableLayoutType = {
|
|
13136
|
+
AUTOFIT: "autofit",
|
|
13137
|
+
FIXED: "fixed"
|
|
13138
|
+
};
|
|
12977
13139
|
class TableLayoutAttributes extends XmlAttributeComponent {
|
|
12978
13140
|
constructor() {
|
|
12979
13141
|
super(...arguments);
|
|
@@ -13076,12 +13238,14 @@ var __publicField = (obj, key, value) => {
|
|
|
13076
13238
|
});
|
|
13077
13239
|
}
|
|
13078
13240
|
}
|
|
13079
|
-
|
|
13080
|
-
|
|
13081
|
-
|
|
13082
|
-
|
|
13083
|
-
|
|
13084
|
-
|
|
13241
|
+
const HeightRule = {
|
|
13242
|
+
/** Height is determined based on the content, so value is ignored. */
|
|
13243
|
+
AUTO: "auto",
|
|
13244
|
+
/** At least the value specified */
|
|
13245
|
+
ATLEAST: "atLeast",
|
|
13246
|
+
/** Exactly the value specified */
|
|
13247
|
+
EXACT: "exact"
|
|
13248
|
+
};
|
|
13085
13249
|
class TableRowHeightAttributes extends XmlAttributeComponent {
|
|
13086
13250
|
constructor() {
|
|
13087
13251
|
super(...arguments);
|
|
@@ -13495,11 +13659,11 @@ var __publicField = (obj, key, value) => {
|
|
|
13495
13659
|
this.root.push(new FootnoteRef());
|
|
13496
13660
|
}
|
|
13497
13661
|
}
|
|
13498
|
-
|
|
13499
|
-
|
|
13500
|
-
|
|
13501
|
-
|
|
13502
|
-
}
|
|
13662
|
+
const FootnoteType = {
|
|
13663
|
+
SEPERATOR: "separator",
|
|
13664
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
13665
|
+
CONTINUATION_SEPERATOR: "continuationSeparator"
|
|
13666
|
+
};
|
|
13503
13667
|
class Footnote extends XmlComponent {
|
|
13504
13668
|
constructor(options2) {
|
|
13505
13669
|
super("w:footnote");
|
|
@@ -13766,72 +13930,71 @@ var __publicField = (obj, key, value) => {
|
|
|
13766
13930
|
}
|
|
13767
13931
|
}
|
|
13768
13932
|
const WORKAROUND2 = "";
|
|
13769
|
-
|
|
13770
|
-
|
|
13771
|
-
|
|
13772
|
-
|
|
13773
|
-
|
|
13774
|
-
|
|
13775
|
-
|
|
13776
|
-
|
|
13777
|
-
|
|
13778
|
-
|
|
13779
|
-
|
|
13780
|
-
|
|
13781
|
-
|
|
13782
|
-
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
|
|
13787
|
-
|
|
13788
|
-
|
|
13789
|
-
|
|
13790
|
-
|
|
13791
|
-
|
|
13792
|
-
|
|
13793
|
-
|
|
13794
|
-
|
|
13795
|
-
|
|
13796
|
-
|
|
13797
|
-
|
|
13798
|
-
|
|
13799
|
-
|
|
13800
|
-
|
|
13801
|
-
|
|
13802
|
-
|
|
13803
|
-
|
|
13804
|
-
|
|
13805
|
-
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13809
|
-
|
|
13810
|
-
|
|
13811
|
-
|
|
13812
|
-
|
|
13813
|
-
|
|
13814
|
-
|
|
13815
|
-
|
|
13816
|
-
|
|
13817
|
-
|
|
13818
|
-
|
|
13819
|
-
|
|
13820
|
-
|
|
13821
|
-
|
|
13822
|
-
|
|
13823
|
-
|
|
13824
|
-
|
|
13825
|
-
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
|
|
13829
|
-
|
|
13830
|
-
|
|
13831
|
-
|
|
13832
|
-
|
|
13833
|
-
|
|
13834
|
-
})(LevelFormat || {});
|
|
13933
|
+
const LevelFormat = {
|
|
13934
|
+
DECIMAL: "decimal",
|
|
13935
|
+
UPPER_ROMAN: "upperRoman",
|
|
13936
|
+
LOWER_ROMAN: "lowerRoman",
|
|
13937
|
+
UPPER_LETTER: "upperLetter",
|
|
13938
|
+
LOWER_LETTER: "lowerLetter",
|
|
13939
|
+
ORDINAL: "ordinal",
|
|
13940
|
+
CARDINAL_TEXT: "cardinalText",
|
|
13941
|
+
ORDINAL_TEXT: "ordinalText",
|
|
13942
|
+
HEX: "hex",
|
|
13943
|
+
CHICAGO: "chicago",
|
|
13944
|
+
IDEOGRAPH__DIGITAL: "ideographDigital",
|
|
13945
|
+
JAPANESE_COUNTING: "japaneseCounting",
|
|
13946
|
+
AIUEO: "aiueo",
|
|
13947
|
+
IROHA: "iroha",
|
|
13948
|
+
DECIMAL_FULL_WIDTH: "decimalFullWidth",
|
|
13949
|
+
DECIMAL_HALF_WIDTH: "decimalHalfWidth",
|
|
13950
|
+
JAPANESE_LEGAL: "japaneseLegal",
|
|
13951
|
+
JAPANESE_DIGITAL_TEN_THOUSAND: "japaneseDigitalTenThousand",
|
|
13952
|
+
DECIMAL_ENCLOSED_CIRCLE: "decimalEnclosedCircle",
|
|
13953
|
+
DECIMAL_FULL_WIDTH2: "decimalFullWidth2",
|
|
13954
|
+
AIUEO_FULL_WIDTH: "aiueoFullWidth",
|
|
13955
|
+
IROHA_FULL_WIDTH: "irohaFullWidth",
|
|
13956
|
+
DECIMAL_ZERO: "decimalZero",
|
|
13957
|
+
BULLET: "bullet",
|
|
13958
|
+
GANADA: "ganada",
|
|
13959
|
+
CHOSUNG: "chosung",
|
|
13960
|
+
DECIMAL_ENCLOSED_FULLSTOP: "decimalEnclosedFullstop",
|
|
13961
|
+
DECIMAL_ENCLOSED_PARENTHESES: "decimalEnclosedParen",
|
|
13962
|
+
DECIMAL_ENCLOSED_CIRCLE_CHINESE: "decimalEnclosedCircleChinese",
|
|
13963
|
+
IDEOGRAPH_ENCLOSED_CIRCLE: "ideographEnclosedCircle",
|
|
13964
|
+
IDEOGRAPH_TRADITIONAL: "ideographTraditional",
|
|
13965
|
+
IDEOGRAPH_ZODIAC: "ideographZodiac",
|
|
13966
|
+
IDEOGRAPH_ZODIAC_TRADITIONAL: "ideographZodiacTraditional",
|
|
13967
|
+
TAIWANESE_COUNTING: "taiwaneseCounting",
|
|
13968
|
+
IDEOGRAPH_LEGAL_TRADITIONAL: "ideographLegalTraditional",
|
|
13969
|
+
TAIWANESE_COUNTING_THOUSAND: "taiwaneseCountingThousand",
|
|
13970
|
+
TAIWANESE_DIGITAL: "taiwaneseDigital",
|
|
13971
|
+
CHINESE_COUNTING: "chineseCounting",
|
|
13972
|
+
CHINESE_LEGAL_SIMPLIFIED: "chineseLegalSimplified",
|
|
13973
|
+
CHINESE_COUNTING_THOUSAND: "chineseCountingThousand",
|
|
13974
|
+
KOREAN_DIGITAL: "koreanDigital",
|
|
13975
|
+
KOREAN_COUNTING: "koreanCounting",
|
|
13976
|
+
KOREAN_LEGAL: "koreanLegal",
|
|
13977
|
+
KOREAN_DIGITAL2: "koreanDigital2",
|
|
13978
|
+
VIETNAMESE_COUNTING: "vietnameseCounting",
|
|
13979
|
+
RUSSIAN_LOWER: "russianLower",
|
|
13980
|
+
RUSSIAN_UPPER: "russianUpper",
|
|
13981
|
+
NONE: "none",
|
|
13982
|
+
NUMBER_IN_DASH: "numberInDash",
|
|
13983
|
+
HEBREW1: "hebrew1",
|
|
13984
|
+
HEBREW2: "hebrew2",
|
|
13985
|
+
ARABIC_ALPHA: "arabicAlpha",
|
|
13986
|
+
ARABIC_ABJAD: "arabicAbjad",
|
|
13987
|
+
HINDI_VOWELS: "hindiVowels",
|
|
13988
|
+
HINDI_CONSONANTS: "hindiConsonants",
|
|
13989
|
+
HINDI_NUMBERS: "hindiNumbers",
|
|
13990
|
+
HINDI_COUNTING: "hindiCounting",
|
|
13991
|
+
THAI_LETTERS: "thaiLetters",
|
|
13992
|
+
THAI_NUMBERS: "thaiNumbers",
|
|
13993
|
+
THAI_COUNTING: "thaiCounting",
|
|
13994
|
+
BAHT_TEXT: "bahtText",
|
|
13995
|
+
DOLLAR_TEXT: "dollarText",
|
|
13996
|
+
CUSTOM: "custom"
|
|
13997
|
+
};
|
|
13835
13998
|
class LevelAttributes extends XmlAttributeComponent {
|
|
13836
13999
|
constructor() {
|
|
13837
14000
|
super(...arguments);
|
|
@@ -13871,12 +14034,11 @@ var __publicField = (obj, key, value) => {
|
|
|
13871
14034
|
);
|
|
13872
14035
|
}
|
|
13873
14036
|
}
|
|
13874
|
-
|
|
13875
|
-
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
})(LevelSuffix || {});
|
|
14037
|
+
const LevelSuffix = {
|
|
14038
|
+
NOTHING: "nothing",
|
|
14039
|
+
SPACE: "space",
|
|
14040
|
+
TAB: "tab"
|
|
14041
|
+
};
|
|
13880
14042
|
class Suffix extends XmlComponent {
|
|
13881
14043
|
constructor(value) {
|
|
13882
14044
|
super("w:suff");
|
|
@@ -14221,13 +14383,15 @@ var __publicField = (obj, key, value) => {
|
|
|
14221
14383
|
abstractNumId: abstractNumbering.id,
|
|
14222
14384
|
reference,
|
|
14223
14385
|
instance,
|
|
14224
|
-
|
|
14225
|
-
|
|
14226
|
-
|
|
14227
|
-
|
|
14228
|
-
|
|
14229
|
-
|
|
14230
|
-
|
|
14386
|
+
overrideLevels: [
|
|
14387
|
+
firstLevelStartNumber && Number.isInteger(firstLevelStartNumber) ? {
|
|
14388
|
+
num: 0,
|
|
14389
|
+
start: firstLevelStartNumber
|
|
14390
|
+
} : {
|
|
14391
|
+
num: 0,
|
|
14392
|
+
start: 1
|
|
14393
|
+
}
|
|
14394
|
+
]
|
|
14231
14395
|
};
|
|
14232
14396
|
this.concreteNumberingMap.set(fullReference, new ConcreteNumbering(concreteNumberingSettings));
|
|
14233
14397
|
}
|
|
@@ -18778,14 +18942,14 @@ var __publicField = (obj, key, value) => {
|
|
|
18778
18942
|
};
|
|
18779
18943
|
}
|
|
18780
18944
|
}
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
|
|
18784
|
-
|
|
18785
|
-
|
|
18786
|
-
|
|
18787
|
-
}
|
|
18788
|
-
const convertPrettifyType = (prettify) => prettify === true ?
|
|
18945
|
+
const PrettifyType = {
|
|
18946
|
+
NONE: "",
|
|
18947
|
+
WITH_2_BLANKS: " ",
|
|
18948
|
+
WITH_4_BLANKS: " ",
|
|
18949
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
18950
|
+
WITH_TAB: " "
|
|
18951
|
+
};
|
|
18952
|
+
const convertPrettifyType = (prettify) => prettify === true ? PrettifyType.WITH_2_BLANKS : prettify === false ? void 0 : prettify;
|
|
18789
18953
|
class Packer {
|
|
18790
18954
|
static async toString(file, prettify) {
|
|
18791
18955
|
const zip = this.compiler.compile(file, convertPrettifyType(prettify));
|
|
@@ -18857,6 +19021,11 @@ var __publicField = (obj, key, value) => {
|
|
|
18857
19021
|
var _a;
|
|
18858
19022
|
return ((_a = relationships.elements) == null ? void 0 : _a.filter((e) => e.name === id)[0].elements) ?? [];
|
|
18859
19023
|
};
|
|
19024
|
+
const ReplaceMode = {
|
|
19025
|
+
START: 0,
|
|
19026
|
+
MIDDLE: 1,
|
|
19027
|
+
END: 2
|
|
19028
|
+
};
|
|
18860
19029
|
const replaceTokenInParagraphElement = ({
|
|
18861
19030
|
paragraphElement,
|
|
18862
19031
|
renderedParagraph,
|
|
@@ -18865,11 +19034,11 @@ var __publicField = (obj, key, value) => {
|
|
|
18865
19034
|
}) => {
|
|
18866
19035
|
const startIndex = renderedParagraph.text.indexOf(originalText);
|
|
18867
19036
|
const endIndex = startIndex + originalText.length - 1;
|
|
18868
|
-
let replaceMode =
|
|
19037
|
+
let replaceMode = ReplaceMode.START;
|
|
18869
19038
|
for (const run of renderedParagraph.runs) {
|
|
18870
19039
|
for (const { text, index, start, end } of run.parts) {
|
|
18871
19040
|
switch (replaceMode) {
|
|
18872
|
-
case
|
|
19041
|
+
case ReplaceMode.START:
|
|
18873
19042
|
if (startIndex >= start) {
|
|
18874
19043
|
const offsetStartIndex = startIndex - start;
|
|
18875
19044
|
const offsetEndIndex = Math.min(endIndex, end) - start;
|
|
@@ -18879,17 +19048,17 @@ var __publicField = (obj, key, value) => {
|
|
|
18879
19048
|
}
|
|
18880
19049
|
const firstPart = text.replace(partToReplace, replacementText);
|
|
18881
19050
|
patchTextElement(paragraphElement.elements[run.index].elements[index], firstPart);
|
|
18882
|
-
replaceMode =
|
|
19051
|
+
replaceMode = ReplaceMode.MIDDLE;
|
|
18883
19052
|
continue;
|
|
18884
19053
|
}
|
|
18885
19054
|
break;
|
|
18886
|
-
case
|
|
19055
|
+
case ReplaceMode.MIDDLE:
|
|
18887
19056
|
if (endIndex <= end) {
|
|
18888
19057
|
const lastPart = text.substring(endIndex - start + 1);
|
|
18889
19058
|
patchTextElement(paragraphElement.elements[run.index].elements[index], lastPart);
|
|
18890
19059
|
const currentElement2 = paragraphElement.elements[run.index].elements[index];
|
|
18891
19060
|
paragraphElement.elements[run.index].elements[index] = patchSpaceAttribute(currentElement2);
|
|
18892
|
-
replaceMode =
|
|
19061
|
+
replaceMode = ReplaceMode.END;
|
|
18893
19062
|
} else {
|
|
18894
19063
|
patchTextElement(paragraphElement.elements[run.index].elements[index], "");
|
|
18895
19064
|
}
|
|
@@ -18952,7 +19121,7 @@ var __publicField = (obj, key, value) => {
|
|
|
18952
19121
|
};
|
|
18953
19122
|
const formatter = new Formatter();
|
|
18954
19123
|
const SPLIT_TOKEN = "ɵ";
|
|
18955
|
-
const replacer = (json, patch, patchText, renderedParagraphs, context) => {
|
|
19124
|
+
const replacer = (json, patch, patchText, renderedParagraphs, context, keepOriginalStyles = false) => {
|
|
18956
19125
|
for (const renderedParagraph of renderedParagraphs) {
|
|
18957
19126
|
const textJson = patch.children.map((c) => toJson(xml$1(formatter.format(c, context)))).map((c) => c.elements[0]);
|
|
18958
19127
|
switch (patch.type) {
|
|
@@ -18972,8 +19141,24 @@ var __publicField = (obj, key, value) => {
|
|
|
18972
19141
|
replacementText: SPLIT_TOKEN
|
|
18973
19142
|
});
|
|
18974
19143
|
const index = findRunElementIndexWithToken(paragraphElement, SPLIT_TOKEN);
|
|
18975
|
-
const
|
|
18976
|
-
|
|
19144
|
+
const runElementToBeReplaced = paragraphElement.elements[index];
|
|
19145
|
+
const { left, right } = splitRunElement(runElementToBeReplaced, SPLIT_TOKEN);
|
|
19146
|
+
let newRunElements = textJson;
|
|
19147
|
+
let patchedRightElement = right;
|
|
19148
|
+
if (keepOriginalStyles) {
|
|
19149
|
+
const runElementNonTextualElements = runElementToBeReplaced.elements.filter(
|
|
19150
|
+
(e) => e.type === "element" && e.name !== "w:t"
|
|
19151
|
+
);
|
|
19152
|
+
newRunElements = textJson.map((e) => ({
|
|
19153
|
+
...e,
|
|
19154
|
+
elements: [...runElementNonTextualElements, ...e.elements]
|
|
19155
|
+
}));
|
|
19156
|
+
patchedRightElement = {
|
|
19157
|
+
...right,
|
|
19158
|
+
elements: [...runElementNonTextualElements, ...right.elements]
|
|
19159
|
+
};
|
|
19160
|
+
}
|
|
19161
|
+
paragraphElement.elements.splice(index, 1, left, ...newRunElements, patchedRightElement);
|
|
18977
19162
|
break;
|
|
18978
19163
|
}
|
|
18979
19164
|
}
|
|
@@ -19129,11 +19314,10 @@ var __publicField = (obj, key, value) => {
|
|
|
19129
19314
|
type: "element"
|
|
19130
19315
|
});
|
|
19131
19316
|
};
|
|
19132
|
-
|
|
19133
|
-
|
|
19134
|
-
|
|
19135
|
-
|
|
19136
|
-
})(PatchType || {});
|
|
19317
|
+
const PatchType = {
|
|
19318
|
+
DOCUMENT: "file",
|
|
19319
|
+
PARAGRAPH: "paragraph"
|
|
19320
|
+
};
|
|
19137
19321
|
const imageReplacer = new ImageReplacer();
|
|
19138
19322
|
const patchDocument = async (data, options2) => {
|
|
19139
19323
|
const zipContent = await JSZip.loadAsync(data);
|
|
@@ -19197,7 +19381,8 @@ var __publicField = (obj, key, value) => {
|
|
|
19197
19381
|
},
|
|
19198
19382
|
patchText,
|
|
19199
19383
|
renderedParagraphs,
|
|
19200
|
-
context
|
|
19384
|
+
context,
|
|
19385
|
+
options2.keepOriginalStyles
|
|
19201
19386
|
);
|
|
19202
19387
|
}
|
|
19203
19388
|
const mediaDatas = imageReplacer.getMediaData(JSON.stringify(json), context.file.Media);
|