html2canvas-pro 2.5.1 → 2.5.2
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/README.md +11 -1
- package/dist/html2canvas-pro.cjs +1835 -1470
- package/dist/html2canvas-pro.cjs.map +1 -1
- package/dist/html2canvas-pro.esm.js +1835 -1470
- package/dist/html2canvas-pro.esm.js.map +1 -1
- package/dist/html2canvas-pro.js +1839 -1471
- package/dist/html2canvas-pro.js.map +1 -1
- package/dist/html2canvas-pro.min.js +6 -5
- package/dist/types/core/cache-storage.d.ts +6 -2
- package/dist/types/core/constants.d.ts +11 -0
- package/dist/types/core/context.d.ts +9 -1
- package/dist/types/core/features.d.ts +9 -5
- package/dist/types/core/origin-checker.d.ts +7 -4
- package/dist/types/core/validator.d.ts +0 -2
- package/dist/types/css/grouped/background-styles.d.ts +4 -0
- package/dist/types/css/grouped/border-styles.d.ts +4 -0
- package/dist/types/css/grouped/font-styles.d.ts +4 -0
- package/dist/types/css/grouped/layout-styles.d.ts +4 -0
- package/dist/types/css/index.d.ts +4 -0
- package/dist/types/css/property-descriptor.d.ts +11 -3
- package/dist/types/css/property-descriptors/scale.d.ts +9 -0
- package/dist/types/css/property-descriptors/translate.d.ts +10 -0
- package/dist/types/css/syntax/tokenizer.d.ts +8 -0
- package/dist/types/css/types/color-utilities.d.ts +21 -0
- package/dist/types/css/types/functions/color-mix.d.ts +17 -0
- package/dist/types/dom/adopted-styles.d.ts +23 -0
- package/dist/types/dom/document-cloner.d.ts +12 -0
- package/dist/types/dom/dom-normalizer.d.ts +2 -0
- package/dist/types/dom/elements/li-element-container.d.ts +2 -2
- package/dist/types/dom/elements/ol-element-container.d.ts +2 -2
- package/dist/types/dom/elements/select-element-container.d.ts +2 -2
- package/dist/types/dom/elements/textarea-element-container.d.ts +2 -2
- package/dist/types/dom/iframe-mount.d.ts +17 -0
- package/dist/types/dom/node-parser.d.ts +2 -2
- package/dist/types/dom/replaced-elements/canvas-element-container.d.ts +2 -2
- package/dist/types/dom/replaced-elements/iframe-element-container.d.ts +2 -2
- package/dist/types/dom/replaced-elements/image-element-container.d.ts +2 -2
- package/dist/types/dom/replaced-elements/input-element-container.d.ts +2 -2
- package/dist/types/dom/replaced-elements/svg-element-container.d.ts +2 -2
- package/dist/types/dom/slot-cloner.d.ts +10 -0
- package/dist/types/options.d.ts +24 -0
- package/dist/types/render/canvas/border-image-renderer.d.ts +7 -0
- package/dist/types/render/canvas/canvas-renderer.d.ts +2 -3
- package/dist/types/render/canvas/filter-surface.d.ts +37 -11
- package/dist/types/render/canvas/gradient-rasterizer.d.ts +53 -0
- package/dist/types/render/canvas/mask-renderer.d.ts +5 -2
- package/dist/types/render/canvas/text-clip-renderer.d.ts +0 -1
- package/dist/types/render/canvas/text-renderer.d.ts +1 -0
- package/package.json +9 -31
- package/dist/types/render/font-metrics.d.ts +0 -11
- package/dist/types/render/renderer-interface.d.ts +0 -28
package/dist/html2canvas-pro.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* html2canvas-pro 2.5.
|
|
2
|
+
* html2canvas-pro 2.5.2 <https://yorickshan.github.io/html2canvas-pro/>
|
|
3
3
|
* Copyright (c) 2024-present yorickshan and html2canvas-pro contributors
|
|
4
4
|
* Released under MIT License
|
|
5
5
|
*/
|
|
@@ -18,6 +18,9 @@
|
|
|
18
18
|
* Eliminates the need for global static variables.
|
|
19
19
|
*/
|
|
20
20
|
var Html2CanvasConfig = class Html2CanvasConfig {
|
|
21
|
+
window;
|
|
22
|
+
cspNonce;
|
|
23
|
+
cache;
|
|
21
24
|
constructor(options = {}) {
|
|
22
25
|
const resolvedWindow = options.window || (typeof window !== "undefined" ? window : void 0);
|
|
23
26
|
if (!resolvedWindow) throw new Error("Window object is required but not available");
|
|
@@ -58,6 +61,7 @@
|
|
|
58
61
|
* Validates and sanitizes user inputs for security and correctness.
|
|
59
62
|
*/
|
|
60
63
|
var Validator = class {
|
|
64
|
+
config;
|
|
61
65
|
constructor(config = {}) {
|
|
62
66
|
this.config = {
|
|
63
67
|
maxImageTimeout: 3e5,
|
|
@@ -125,8 +129,7 @@
|
|
|
125
129
|
}
|
|
126
130
|
return {
|
|
127
131
|
valid: true,
|
|
128
|
-
sanitized: url
|
|
129
|
-
requiresRuntimeCheck: true
|
|
132
|
+
sanitized: url
|
|
130
133
|
};
|
|
131
134
|
}
|
|
132
135
|
return {
|
|
@@ -431,10 +434,13 @@
|
|
|
431
434
|
* ```
|
|
432
435
|
*/
|
|
433
436
|
var PerformanceMonitor = class {
|
|
437
|
+
context;
|
|
438
|
+
activeMetrics = /* @__PURE__ */ new Map();
|
|
439
|
+
completedMetrics = [];
|
|
440
|
+
enabled;
|
|
441
|
+
getTime;
|
|
434
442
|
constructor(context, enabled = true) {
|
|
435
443
|
this.context = context;
|
|
436
|
-
this.activeMetrics = /* @__PURE__ */ new Map();
|
|
437
|
-
this.completedMetrics = [];
|
|
438
444
|
this.enabled = enabled;
|
|
439
445
|
this.getTime = typeof performance !== "undefined" && typeof performance.now === "function" ? () => performance.now() : () => Date.now();
|
|
440
446
|
}
|
|
@@ -581,6 +587,10 @@
|
|
|
581
587
|
//#endregion
|
|
582
588
|
//#region src/css/layout/bounds.ts
|
|
583
589
|
var Bounds = class Bounds {
|
|
590
|
+
left;
|
|
591
|
+
top;
|
|
592
|
+
width;
|
|
593
|
+
height;
|
|
584
594
|
constructor(left, top, width, height) {
|
|
585
595
|
this.left = left;
|
|
586
596
|
this.top = top;
|
|
@@ -600,9 +610,7 @@
|
|
|
600
610
|
if (!domRect && rects.length > 0) domRect = rects[0];
|
|
601
611
|
return domRect ? new Bounds(domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, domRect.height) : Bounds.EMPTY;
|
|
602
612
|
}
|
|
603
|
-
static
|
|
604
|
-
this.EMPTY = new Bounds(0, 0, 0, 0);
|
|
605
|
-
}
|
|
613
|
+
static EMPTY = new Bounds(0, 0, 0, 0);
|
|
606
614
|
};
|
|
607
615
|
const parseBounds = (context, node) => {
|
|
608
616
|
return Bounds.fromClientRect(context, node.getBoundingClientRect());
|
|
@@ -614,522 +622,6 @@
|
|
|
614
622
|
return new Bounds(0, 0, Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth)), Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight)));
|
|
615
623
|
};
|
|
616
624
|
//#endregion
|
|
617
|
-
//#region node_modules/.pnpm/css-line-break@2.1.0/node_modules/css-line-break/dist/css-line-break.es5.js
|
|
618
|
-
var toCodePoints$1 = function(str) {
|
|
619
|
-
var codePoints = [];
|
|
620
|
-
var i = 0;
|
|
621
|
-
var length = str.length;
|
|
622
|
-
while (i < length) {
|
|
623
|
-
var value = str.charCodeAt(i++);
|
|
624
|
-
if (value >= 55296 && value <= 56319 && i < length) {
|
|
625
|
-
var extra = str.charCodeAt(i++);
|
|
626
|
-
if ((extra & 64512) === 56320) codePoints.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
627
|
-
else {
|
|
628
|
-
codePoints.push(value);
|
|
629
|
-
i--;
|
|
630
|
-
}
|
|
631
|
-
} else codePoints.push(value);
|
|
632
|
-
}
|
|
633
|
-
return codePoints;
|
|
634
|
-
};
|
|
635
|
-
var fromCodePoint$1 = function() {
|
|
636
|
-
var codePoints = [];
|
|
637
|
-
for (var _i = 0; _i < arguments.length; _i++) codePoints[_i] = arguments[_i];
|
|
638
|
-
if (String.fromCodePoint) return String.fromCodePoint.apply(String, codePoints);
|
|
639
|
-
var length = codePoints.length;
|
|
640
|
-
if (!length) return "";
|
|
641
|
-
var codeUnits = [];
|
|
642
|
-
var index = -1;
|
|
643
|
-
var result = "";
|
|
644
|
-
while (++index < length) {
|
|
645
|
-
var codePoint = codePoints[index];
|
|
646
|
-
if (codePoint <= 65535) codeUnits.push(codePoint);
|
|
647
|
-
else {
|
|
648
|
-
codePoint -= 65536;
|
|
649
|
-
codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
|
|
650
|
-
}
|
|
651
|
-
if (index + 1 === length || codeUnits.length > 16384) {
|
|
652
|
-
result += String.fromCharCode.apply(String, codeUnits);
|
|
653
|
-
codeUnits.length = 0;
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
return result;
|
|
657
|
-
};
|
|
658
|
-
var chars$2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
659
|
-
var lookup$2 = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
660
|
-
for (var i$2 = 0; i$2 < chars$2.length; i$2++) lookup$2[chars$2.charCodeAt(i$2)] = i$2;
|
|
661
|
-
var chars$1$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
662
|
-
var lookup$1$1 = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
663
|
-
for (var i$1$1 = 0; i$1$1 < chars$1$1.length; i$1$1++) lookup$1$1[chars$1$1.charCodeAt(i$1$1)] = i$1$1;
|
|
664
|
-
var decode$1 = function(base64) {
|
|
665
|
-
var bufferLength = base64.length * .75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
|
|
666
|
-
if (base64[base64.length - 1] === "=") {
|
|
667
|
-
bufferLength--;
|
|
668
|
-
if (base64[base64.length - 2] === "=") bufferLength--;
|
|
669
|
-
}
|
|
670
|
-
var buffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined" && typeof Uint8Array.prototype.slice !== "undefined" ? new ArrayBuffer(bufferLength) : new Array(bufferLength);
|
|
671
|
-
var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
|
|
672
|
-
for (i = 0; i < len; i += 4) {
|
|
673
|
-
encoded1 = lookup$1$1[base64.charCodeAt(i)];
|
|
674
|
-
encoded2 = lookup$1$1[base64.charCodeAt(i + 1)];
|
|
675
|
-
encoded3 = lookup$1$1[base64.charCodeAt(i + 2)];
|
|
676
|
-
encoded4 = lookup$1$1[base64.charCodeAt(i + 3)];
|
|
677
|
-
bytes[p++] = encoded1 << 2 | encoded2 >> 4;
|
|
678
|
-
bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
|
|
679
|
-
bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
|
|
680
|
-
}
|
|
681
|
-
return buffer;
|
|
682
|
-
};
|
|
683
|
-
var polyUint16Array$1 = function(buffer) {
|
|
684
|
-
var length = buffer.length;
|
|
685
|
-
var bytes = [];
|
|
686
|
-
for (var i = 0; i < length; i += 2) bytes.push(buffer[i + 1] << 8 | buffer[i]);
|
|
687
|
-
return bytes;
|
|
688
|
-
};
|
|
689
|
-
var polyUint32Array$1 = function(buffer) {
|
|
690
|
-
var length = buffer.length;
|
|
691
|
-
var bytes = [];
|
|
692
|
-
for (var i = 0; i < length; i += 4) bytes.push(buffer[i + 3] << 24 | buffer[i + 2] << 16 | buffer[i + 1] << 8 | buffer[i]);
|
|
693
|
-
return bytes;
|
|
694
|
-
};
|
|
695
|
-
/** Shift size for getting the index-2 table offset. */
|
|
696
|
-
var UTRIE2_SHIFT_2$1 = 5;
|
|
697
|
-
/** Shift size for getting the index-1 table offset. */
|
|
698
|
-
var UTRIE2_SHIFT_1$1 = 11;
|
|
699
|
-
/**
|
|
700
|
-
* Shift size for shifting left the index array values.
|
|
701
|
-
* Increases possible data size with 16-bit index values at the cost
|
|
702
|
-
* of compactability.
|
|
703
|
-
* This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
|
|
704
|
-
*/
|
|
705
|
-
var UTRIE2_INDEX_SHIFT$1 = 2;
|
|
706
|
-
/**
|
|
707
|
-
* Difference between the two shift sizes,
|
|
708
|
-
* for getting an index-1 offset from an index-2 offset. 6=11-5
|
|
709
|
-
*/
|
|
710
|
-
var UTRIE2_SHIFT_1_2$1 = UTRIE2_SHIFT_1$1 - UTRIE2_SHIFT_2$1;
|
|
711
|
-
/**
|
|
712
|
-
* The part of the index-2 table for U+D800..U+DBFF stores values for
|
|
713
|
-
* lead surrogate code _units_ not code _points_.
|
|
714
|
-
* Values for lead surrogate code _points_ are indexed with this portion of the table.
|
|
715
|
-
* Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
|
|
716
|
-
*/
|
|
717
|
-
var UTRIE2_LSCP_INDEX_2_OFFSET$1 = 65536 >> UTRIE2_SHIFT_2$1;
|
|
718
|
-
/** Mask for getting the lower bits for the in-data-block offset. */
|
|
719
|
-
var UTRIE2_DATA_MASK$1 = (1 << UTRIE2_SHIFT_2$1) - 1;
|
|
720
|
-
/**
|
|
721
|
-
* The index-1 table, only used for supplementary code points, at offset 2112=0x840.
|
|
722
|
-
* Variable length, for code points up to highStart, where the last single-value range starts.
|
|
723
|
-
* Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
|
|
724
|
-
* (For 0x100000 supplementary code points U+10000..U+10ffff.)
|
|
725
|
-
*
|
|
726
|
-
* The part of the index-2 table for supplementary code points starts
|
|
727
|
-
* after this index-1 table.
|
|
728
|
-
*
|
|
729
|
-
* Both the index-1 table and the following part of the index-2 table
|
|
730
|
-
* are omitted completely if there is only BMP data.
|
|
731
|
-
*/
|
|
732
|
-
var UTRIE2_INDEX_1_OFFSET$1 = UTRIE2_LSCP_INDEX_2_OFFSET$1 + (1024 >> UTRIE2_SHIFT_2$1) + 32;
|
|
733
|
-
/**
|
|
734
|
-
* Number of index-1 entries for the BMP. 32=0x20
|
|
735
|
-
* This part of the index-1 table is omitted from the serialized form.
|
|
736
|
-
*/
|
|
737
|
-
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 = 65536 >> UTRIE2_SHIFT_1$1;
|
|
738
|
-
/** Mask for getting the lower bits for the in-index-2-block offset. */
|
|
739
|
-
var UTRIE2_INDEX_2_MASK$1 = (1 << UTRIE2_SHIFT_1_2$1) - 1;
|
|
740
|
-
var slice16$1 = function(view, start, end) {
|
|
741
|
-
if (view.slice) return view.slice(start, end);
|
|
742
|
-
return new Uint16Array(Array.prototype.slice.call(view, start, end));
|
|
743
|
-
};
|
|
744
|
-
var slice32$1 = function(view, start, end) {
|
|
745
|
-
if (view.slice) return view.slice(start, end);
|
|
746
|
-
return new Uint32Array(Array.prototype.slice.call(view, start, end));
|
|
747
|
-
};
|
|
748
|
-
var createTrieFromBase64$1 = function(base64, _byteLength) {
|
|
749
|
-
var buffer = decode$1(base64);
|
|
750
|
-
var view32 = Array.isArray(buffer) ? polyUint32Array$1(buffer) : new Uint32Array(buffer);
|
|
751
|
-
var view16 = Array.isArray(buffer) ? polyUint16Array$1(buffer) : new Uint16Array(buffer);
|
|
752
|
-
var headerLength = 24;
|
|
753
|
-
var index = slice16$1(view16, headerLength / 2, view32[4] / 2);
|
|
754
|
-
var data = view32[5] === 2 ? slice16$1(view16, (headerLength + view32[4]) / 2) : slice32$1(view32, Math.ceil((headerLength + view32[4]) / 4));
|
|
755
|
-
return new Trie$1(view32[0], view32[1], view32[2], view32[3], index, data);
|
|
756
|
-
};
|
|
757
|
-
var Trie$1 = function() {
|
|
758
|
-
function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
|
|
759
|
-
this.initialValue = initialValue;
|
|
760
|
-
this.errorValue = errorValue;
|
|
761
|
-
this.highStart = highStart;
|
|
762
|
-
this.highValueIndex = highValueIndex;
|
|
763
|
-
this.index = index;
|
|
764
|
-
this.data = data;
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* Get the value for a code point as stored in the Trie.
|
|
768
|
-
*
|
|
769
|
-
* @param codePoint the code point
|
|
770
|
-
* @return the value
|
|
771
|
-
*/
|
|
772
|
-
Trie.prototype.get = function(codePoint) {
|
|
773
|
-
var ix;
|
|
774
|
-
if (codePoint >= 0) {
|
|
775
|
-
if (codePoint < 55296 || codePoint > 56319 && codePoint <= 65535) {
|
|
776
|
-
ix = this.index[codePoint >> UTRIE2_SHIFT_2$1];
|
|
777
|
-
ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
|
|
778
|
-
return this.data[ix];
|
|
779
|
-
}
|
|
780
|
-
if (codePoint <= 65535) {
|
|
781
|
-
ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET$1 + (codePoint - 55296 >> UTRIE2_SHIFT_2$1)];
|
|
782
|
-
ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
|
|
783
|
-
return this.data[ix];
|
|
784
|
-
}
|
|
785
|
-
if (codePoint < this.highStart) {
|
|
786
|
-
ix = UTRIE2_INDEX_1_OFFSET$1 - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 + (codePoint >> UTRIE2_SHIFT_1$1);
|
|
787
|
-
ix = this.index[ix];
|
|
788
|
-
ix += codePoint >> UTRIE2_SHIFT_2$1 & UTRIE2_INDEX_2_MASK$1;
|
|
789
|
-
ix = this.index[ix];
|
|
790
|
-
ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
|
|
791
|
-
return this.data[ix];
|
|
792
|
-
}
|
|
793
|
-
if (codePoint <= 1114111) return this.data[this.highValueIndex];
|
|
794
|
-
}
|
|
795
|
-
return this.errorValue;
|
|
796
|
-
};
|
|
797
|
-
return Trie;
|
|
798
|
-
}();
|
|
799
|
-
var chars$3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
800
|
-
var lookup$3 = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
801
|
-
for (var i$3 = 0; i$3 < chars$3.length; i$3++) lookup$3[chars$3.charCodeAt(i$3)] = i$3;
|
|
802
|
-
var base64$1 = "KwA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xMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHL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GgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHA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BYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADA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QAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4AB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gAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKw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KwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAl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ACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==";
|
|
803
|
-
var LETTER_NUMBER_MODIFIER = 50;
|
|
804
|
-
var BK = 1;
|
|
805
|
-
var CR$1 = 2;
|
|
806
|
-
var LF$1 = 3;
|
|
807
|
-
var CM = 4;
|
|
808
|
-
var NL = 5;
|
|
809
|
-
var WJ = 7;
|
|
810
|
-
var ZW = 8;
|
|
811
|
-
var GL = 9;
|
|
812
|
-
var SP = 10;
|
|
813
|
-
var ZWJ$1 = 11;
|
|
814
|
-
var B2 = 12;
|
|
815
|
-
var BA = 13;
|
|
816
|
-
var BB = 14;
|
|
817
|
-
var HY = 15;
|
|
818
|
-
var CB = 16;
|
|
819
|
-
var CL = 17;
|
|
820
|
-
var CP = 18;
|
|
821
|
-
var EX = 19;
|
|
822
|
-
var IN = 20;
|
|
823
|
-
var NS = 21;
|
|
824
|
-
var OP = 22;
|
|
825
|
-
var QU = 23;
|
|
826
|
-
var IS = 24;
|
|
827
|
-
var NU = 25;
|
|
828
|
-
var PO = 26;
|
|
829
|
-
var PR = 27;
|
|
830
|
-
var SY = 28;
|
|
831
|
-
var AI = 29;
|
|
832
|
-
var AL = 30;
|
|
833
|
-
var CJ = 31;
|
|
834
|
-
var EB = 32;
|
|
835
|
-
var EM = 33;
|
|
836
|
-
var H2 = 34;
|
|
837
|
-
var H3 = 35;
|
|
838
|
-
var HL = 36;
|
|
839
|
-
var ID = 37;
|
|
840
|
-
var JL = 38;
|
|
841
|
-
var JV = 39;
|
|
842
|
-
var JT = 40;
|
|
843
|
-
var RI$1 = 41;
|
|
844
|
-
var SA = 42;
|
|
845
|
-
var XX = 43;
|
|
846
|
-
var ea_OP = [9001, 65288];
|
|
847
|
-
var BREAK_MANDATORY = "!";
|
|
848
|
-
var BREAK_NOT_ALLOWED$1 = "×";
|
|
849
|
-
var BREAK_ALLOWED$1 = "÷";
|
|
850
|
-
var UnicodeTrie$1 = createTrieFromBase64$1(base64$1);
|
|
851
|
-
var ALPHABETICS = [AL, HL];
|
|
852
|
-
var HARD_LINE_BREAKS = [
|
|
853
|
-
BK,
|
|
854
|
-
CR$1,
|
|
855
|
-
LF$1,
|
|
856
|
-
NL
|
|
857
|
-
];
|
|
858
|
-
var SPACE$1 = [SP, ZW];
|
|
859
|
-
var PREFIX_POSTFIX = [PR, PO];
|
|
860
|
-
var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE$1);
|
|
861
|
-
var KOREAN_SYLLABLE_BLOCK = [
|
|
862
|
-
JL,
|
|
863
|
-
JV,
|
|
864
|
-
JT,
|
|
865
|
-
H2,
|
|
866
|
-
H3
|
|
867
|
-
];
|
|
868
|
-
var HYPHEN = [HY, BA];
|
|
869
|
-
var codePointsToCharacterClasses = function(codePoints, lineBreak) {
|
|
870
|
-
if (lineBreak === void 0) lineBreak = "strict";
|
|
871
|
-
var types = [];
|
|
872
|
-
var indices = [];
|
|
873
|
-
var categories = [];
|
|
874
|
-
codePoints.forEach(function(codePoint, index) {
|
|
875
|
-
var classType = UnicodeTrie$1.get(codePoint);
|
|
876
|
-
if (classType > LETTER_NUMBER_MODIFIER) {
|
|
877
|
-
categories.push(true);
|
|
878
|
-
classType -= LETTER_NUMBER_MODIFIER;
|
|
879
|
-
} else categories.push(false);
|
|
880
|
-
if ([
|
|
881
|
-
"normal",
|
|
882
|
-
"auto",
|
|
883
|
-
"loose"
|
|
884
|
-
].indexOf(lineBreak) !== -1) {
|
|
885
|
-
if ([
|
|
886
|
-
8208,
|
|
887
|
-
8211,
|
|
888
|
-
12316,
|
|
889
|
-
12448
|
|
890
|
-
].indexOf(codePoint) !== -1) {
|
|
891
|
-
indices.push(index);
|
|
892
|
-
return types.push(CB);
|
|
893
|
-
}
|
|
894
|
-
}
|
|
895
|
-
if (classType === CM || classType === ZWJ$1) {
|
|
896
|
-
if (index === 0) {
|
|
897
|
-
indices.push(index);
|
|
898
|
-
return types.push(AL);
|
|
899
|
-
}
|
|
900
|
-
var prev = types[index - 1];
|
|
901
|
-
if (LINE_BREAKS.indexOf(prev) === -1) {
|
|
902
|
-
indices.push(indices[index - 1]);
|
|
903
|
-
return types.push(prev);
|
|
904
|
-
}
|
|
905
|
-
indices.push(index);
|
|
906
|
-
return types.push(AL);
|
|
907
|
-
}
|
|
908
|
-
indices.push(index);
|
|
909
|
-
if (classType === CJ) return types.push(lineBreak === "strict" ? NS : ID);
|
|
910
|
-
if (classType === SA) return types.push(AL);
|
|
911
|
-
if (classType === AI) return types.push(AL);
|
|
912
|
-
if (classType === XX) {
|
|
913
|
-
if (codePoint >= 131072 && codePoint <= 196605 || codePoint >= 196608 && codePoint <= 262141) return types.push(ID);
|
|
914
|
-
else return types.push(AL);
|
|
915
|
-
}
|
|
916
|
-
types.push(classType);
|
|
917
|
-
});
|
|
918
|
-
return [
|
|
919
|
-
indices,
|
|
920
|
-
types,
|
|
921
|
-
categories
|
|
922
|
-
];
|
|
923
|
-
};
|
|
924
|
-
var isAdjacentWithSpaceIgnored = function(a, b, currentIndex, classTypes) {
|
|
925
|
-
var current = classTypes[currentIndex];
|
|
926
|
-
if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {
|
|
927
|
-
var i = currentIndex;
|
|
928
|
-
while (i <= classTypes.length) {
|
|
929
|
-
i++;
|
|
930
|
-
var next = classTypes[i];
|
|
931
|
-
if (next === b) return true;
|
|
932
|
-
if (next !== SP) break;
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
if (current === SP) {
|
|
936
|
-
var i = currentIndex;
|
|
937
|
-
while (i > 0) {
|
|
938
|
-
i--;
|
|
939
|
-
var prev = classTypes[i];
|
|
940
|
-
if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {
|
|
941
|
-
var n = currentIndex;
|
|
942
|
-
while (n <= classTypes.length) {
|
|
943
|
-
n++;
|
|
944
|
-
var next = classTypes[n];
|
|
945
|
-
if (next === b) return true;
|
|
946
|
-
if (next !== SP) break;
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
if (prev !== SP) break;
|
|
950
|
-
}
|
|
951
|
-
}
|
|
952
|
-
return false;
|
|
953
|
-
};
|
|
954
|
-
var previousNonSpaceClassType = function(currentIndex, classTypes) {
|
|
955
|
-
var i = currentIndex;
|
|
956
|
-
while (i >= 0) {
|
|
957
|
-
var type = classTypes[i];
|
|
958
|
-
if (type === SP) i--;
|
|
959
|
-
else return type;
|
|
960
|
-
}
|
|
961
|
-
return 0;
|
|
962
|
-
};
|
|
963
|
-
var _lineBreakAtIndex = function(codePoints, classTypes, indicies, index, forbiddenBreaks) {
|
|
964
|
-
if (indicies[index] === 0) return BREAK_NOT_ALLOWED$1;
|
|
965
|
-
var currentIndex = index - 1;
|
|
966
|
-
if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) return BREAK_NOT_ALLOWED$1;
|
|
967
|
-
var beforeIndex = currentIndex - 1;
|
|
968
|
-
var afterIndex = currentIndex + 1;
|
|
969
|
-
var current = classTypes[currentIndex];
|
|
970
|
-
var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;
|
|
971
|
-
var next = classTypes[afterIndex];
|
|
972
|
-
if (current === CR$1 && next === LF$1) return BREAK_NOT_ALLOWED$1;
|
|
973
|
-
if (HARD_LINE_BREAKS.indexOf(current) !== -1) return BREAK_MANDATORY;
|
|
974
|
-
if (HARD_LINE_BREAKS.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
975
|
-
if (SPACE$1.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
976
|
-
if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) return BREAK_ALLOWED$1;
|
|
977
|
-
if (UnicodeTrie$1.get(codePoints[currentIndex]) === ZWJ$1) return BREAK_NOT_ALLOWED$1;
|
|
978
|
-
if ((current === EB || current === EM) && UnicodeTrie$1.get(codePoints[afterIndex]) === ZWJ$1) return BREAK_NOT_ALLOWED$1;
|
|
979
|
-
if (current === WJ || next === WJ) return BREAK_NOT_ALLOWED$1;
|
|
980
|
-
if (current === GL) return BREAK_NOT_ALLOWED$1;
|
|
981
|
-
if ([
|
|
982
|
-
SP,
|
|
983
|
-
BA,
|
|
984
|
-
HY
|
|
985
|
-
].indexOf(current) === -1 && next === GL) return BREAK_NOT_ALLOWED$1;
|
|
986
|
-
if ([
|
|
987
|
-
CL,
|
|
988
|
-
CP,
|
|
989
|
-
EX,
|
|
990
|
-
IS,
|
|
991
|
-
SY
|
|
992
|
-
].indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
993
|
-
if (previousNonSpaceClassType(currentIndex, classTypes) === OP) return BREAK_NOT_ALLOWED$1;
|
|
994
|
-
if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) return BREAK_NOT_ALLOWED$1;
|
|
995
|
-
if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) return BREAK_NOT_ALLOWED$1;
|
|
996
|
-
if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) return BREAK_NOT_ALLOWED$1;
|
|
997
|
-
if (current === SP) return BREAK_ALLOWED$1;
|
|
998
|
-
if (current === QU || next === QU) return BREAK_NOT_ALLOWED$1;
|
|
999
|
-
if (next === CB || current === CB) return BREAK_ALLOWED$1;
|
|
1000
|
-
if ([
|
|
1001
|
-
BA,
|
|
1002
|
-
HY,
|
|
1003
|
-
NS
|
|
1004
|
-
].indexOf(next) !== -1 || current === BB) return BREAK_NOT_ALLOWED$1;
|
|
1005
|
-
if (before === HL && HYPHEN.indexOf(current) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1006
|
-
if (current === SY && next === HL) return BREAK_NOT_ALLOWED$1;
|
|
1007
|
-
if (next === IN) return BREAK_NOT_ALLOWED$1;
|
|
1008
|
-
if (ALPHABETICS.indexOf(next) !== -1 && current === NU || ALPHABETICS.indexOf(current) !== -1 && next === NU) return BREAK_NOT_ALLOWED$1;
|
|
1009
|
-
if (current === PR && [
|
|
1010
|
-
ID,
|
|
1011
|
-
EB,
|
|
1012
|
-
EM
|
|
1013
|
-
].indexOf(next) !== -1 || [
|
|
1014
|
-
ID,
|
|
1015
|
-
EB,
|
|
1016
|
-
EM
|
|
1017
|
-
].indexOf(current) !== -1 && next === PO) return BREAK_NOT_ALLOWED$1;
|
|
1018
|
-
if (ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1 || PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1019
|
-
if ([PR, PO].indexOf(current) !== -1 && (next === NU || [OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU) || [OP, HY].indexOf(current) !== -1 && next === NU || current === NU && [
|
|
1020
|
-
NU,
|
|
1021
|
-
SY,
|
|
1022
|
-
IS
|
|
1023
|
-
].indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1024
|
-
if ([
|
|
1025
|
-
NU,
|
|
1026
|
-
SY,
|
|
1027
|
-
IS,
|
|
1028
|
-
CL,
|
|
1029
|
-
CP
|
|
1030
|
-
].indexOf(next) !== -1) {
|
|
1031
|
-
var prevIndex = currentIndex;
|
|
1032
|
-
while (prevIndex >= 0) {
|
|
1033
|
-
var type = classTypes[prevIndex];
|
|
1034
|
-
if (type === NU) return BREAK_NOT_ALLOWED$1;
|
|
1035
|
-
else if ([SY, IS].indexOf(type) !== -1) prevIndex--;
|
|
1036
|
-
else break;
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
if ([PR, PO].indexOf(next) !== -1) {
|
|
1040
|
-
var prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;
|
|
1041
|
-
while (prevIndex >= 0) {
|
|
1042
|
-
var type = classTypes[prevIndex];
|
|
1043
|
-
if (type === NU) return BREAK_NOT_ALLOWED$1;
|
|
1044
|
-
else if ([SY, IS].indexOf(type) !== -1) prevIndex--;
|
|
1045
|
-
else break;
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
if (JL === current && [
|
|
1049
|
-
JL,
|
|
1050
|
-
JV,
|
|
1051
|
-
H2,
|
|
1052
|
-
H3
|
|
1053
|
-
].indexOf(next) !== -1 || [JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1 || [JT, H3].indexOf(current) !== -1 && next === JT) return BREAK_NOT_ALLOWED$1;
|
|
1054
|
-
if (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1 || KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR) return BREAK_NOT_ALLOWED$1;
|
|
1055
|
-
if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1056
|
-
if (current === IS && ALPHABETICS.indexOf(next) !== -1) return BREAK_NOT_ALLOWED$1;
|
|
1057
|
-
if (ALPHABETICS.concat(NU).indexOf(current) !== -1 && next === OP && ea_OP.indexOf(codePoints[afterIndex]) === -1 || ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP) return BREAK_NOT_ALLOWED$1;
|
|
1058
|
-
if (current === RI$1 && next === RI$1) {
|
|
1059
|
-
var i = indicies[currentIndex];
|
|
1060
|
-
var count = 1;
|
|
1061
|
-
while (i > 0) {
|
|
1062
|
-
i--;
|
|
1063
|
-
if (classTypes[i] === RI$1) count++;
|
|
1064
|
-
else break;
|
|
1065
|
-
}
|
|
1066
|
-
if (count % 2 !== 0) return BREAK_NOT_ALLOWED$1;
|
|
1067
|
-
}
|
|
1068
|
-
if (current === EB && next === EM) return BREAK_NOT_ALLOWED$1;
|
|
1069
|
-
return BREAK_ALLOWED$1;
|
|
1070
|
-
};
|
|
1071
|
-
var cssFormattedClasses = function(codePoints, options) {
|
|
1072
|
-
if (!options) options = {
|
|
1073
|
-
lineBreak: "normal",
|
|
1074
|
-
wordBreak: "normal"
|
|
1075
|
-
};
|
|
1076
|
-
var _a = codePointsToCharacterClasses(codePoints, options.lineBreak), indicies = _a[0], classTypes = _a[1], isLetterNumber = _a[2];
|
|
1077
|
-
if (options.wordBreak === "break-all" || options.wordBreak === "break-word") classTypes = classTypes.map(function(type) {
|
|
1078
|
-
return [
|
|
1079
|
-
NU,
|
|
1080
|
-
AL,
|
|
1081
|
-
SA
|
|
1082
|
-
].indexOf(type) !== -1 ? ID : type;
|
|
1083
|
-
});
|
|
1084
|
-
var forbiddenBreakpoints = options.wordBreak === "keep-all" ? isLetterNumber.map(function(letterNumber, i) {
|
|
1085
|
-
return letterNumber && codePoints[i] >= 19968 && codePoints[i] <= 40959;
|
|
1086
|
-
}) : void 0;
|
|
1087
|
-
return [
|
|
1088
|
-
indicies,
|
|
1089
|
-
classTypes,
|
|
1090
|
-
forbiddenBreakpoints
|
|
1091
|
-
];
|
|
1092
|
-
};
|
|
1093
|
-
var Break = function() {
|
|
1094
|
-
function Break(codePoints, lineBreak, start, end) {
|
|
1095
|
-
this.codePoints = codePoints;
|
|
1096
|
-
this.required = lineBreak === BREAK_MANDATORY;
|
|
1097
|
-
this.start = start;
|
|
1098
|
-
this.end = end;
|
|
1099
|
-
}
|
|
1100
|
-
Break.prototype.slice = function() {
|
|
1101
|
-
return fromCodePoint$1.apply(void 0, this.codePoints.slice(this.start, this.end));
|
|
1102
|
-
};
|
|
1103
|
-
return Break;
|
|
1104
|
-
}();
|
|
1105
|
-
var LineBreaker = function(str, options) {
|
|
1106
|
-
var codePoints = toCodePoints$1(str);
|
|
1107
|
-
var _a = cssFormattedClasses(codePoints, options), indicies = _a[0], classTypes = _a[1], forbiddenBreakpoints = _a[2];
|
|
1108
|
-
var length = codePoints.length;
|
|
1109
|
-
var lastEnd = 0;
|
|
1110
|
-
var nextIndex = 0;
|
|
1111
|
-
return { next: function() {
|
|
1112
|
-
if (nextIndex >= length) return {
|
|
1113
|
-
done: true,
|
|
1114
|
-
value: null
|
|
1115
|
-
};
|
|
1116
|
-
var lineBreak = BREAK_NOT_ALLOWED$1;
|
|
1117
|
-
while (nextIndex < length && (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) === BREAK_NOT_ALLOWED$1);
|
|
1118
|
-
if (lineBreak !== BREAK_NOT_ALLOWED$1 || nextIndex === length) {
|
|
1119
|
-
var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);
|
|
1120
|
-
lastEnd = nextIndex;
|
|
1121
|
-
return {
|
|
1122
|
-
value,
|
|
1123
|
-
done: false
|
|
1124
|
-
};
|
|
1125
|
-
}
|
|
1126
|
-
return {
|
|
1127
|
-
done: true,
|
|
1128
|
-
value: null
|
|
1129
|
-
};
|
|
1130
|
-
} };
|
|
1131
|
-
};
|
|
1132
|
-
//#endregion
|
|
1133
625
|
//#region src/core/util.ts
|
|
1134
626
|
/**
|
|
1135
627
|
* Indexed access where the shape/arity is guaranteed by construction (the CSS
|
|
@@ -1185,7 +677,7 @@
|
|
|
1185
677
|
integers.push(at(codePoints, c));
|
|
1186
678
|
c++;
|
|
1187
679
|
}
|
|
1188
|
-
const int = integers.length ? parseInt(fromCodePoint
|
|
680
|
+
const int = integers.length ? parseInt(String.fromCodePoint(...integers), 10) : 0;
|
|
1189
681
|
if (codePoints[c] === 46) c++;
|
|
1190
682
|
const fraction = [];
|
|
1191
683
|
while (isDigit(codePoints[c] ?? NaN)) {
|
|
@@ -1193,7 +685,7 @@
|
|
|
1193
685
|
c++;
|
|
1194
686
|
}
|
|
1195
687
|
const fracd = fraction.length;
|
|
1196
|
-
const frac = fracd ? parseInt(fromCodePoint
|
|
688
|
+
const frac = fracd ? parseInt(String.fromCodePoint(...fraction), 10) : 0;
|
|
1197
689
|
if (codePoints[c] === 69 || codePoints[c] === 101) c++;
|
|
1198
690
|
let expsign = 1;
|
|
1199
691
|
if (codePoints[c] === 43 || codePoints[c] === 45) {
|
|
@@ -1205,7 +697,7 @@
|
|
|
1205
697
|
exponent.push(at(codePoints, c));
|
|
1206
698
|
c++;
|
|
1207
699
|
}
|
|
1208
|
-
const exp = exponent.length ? parseInt(fromCodePoint
|
|
700
|
+
const exp = exponent.length ? parseInt(String.fromCodePoint(...exponent), 10) : 0;
|
|
1209
701
|
return sign * (int + frac * Math.pow(10, -fracd)) * Math.pow(10, expsign * exp);
|
|
1210
702
|
};
|
|
1211
703
|
//#endregion
|
|
@@ -1234,12 +726,8 @@
|
|
|
1234
726
|
//#endregion
|
|
1235
727
|
//#region src/css/syntax/tokenizer.ts
|
|
1236
728
|
var Tokenizer = class Tokenizer {
|
|
1237
|
-
static
|
|
1238
|
-
|
|
1239
|
-
}
|
|
1240
|
-
static {
|
|
1241
|
-
this.MAX_POOL_SIZE = 40;
|
|
1242
|
-
}
|
|
729
|
+
static _pool = [];
|
|
730
|
+
static MAX_POOL_SIZE = 40;
|
|
1243
731
|
static get() {
|
|
1244
732
|
return Tokenizer._pool.pop() || new Tokenizer();
|
|
1245
733
|
}
|
|
@@ -1249,14 +737,29 @@
|
|
|
1249
737
|
Tokenizer._pool.push(tokenizer);
|
|
1250
738
|
}
|
|
1251
739
|
}
|
|
740
|
+
_value;
|
|
741
|
+
/**
|
|
742
|
+
* Read cursor into `_value`. Consumption advances the cursor instead of
|
|
743
|
+
* shifting the array — `Array.shift()` per code point makes tokenising a
|
|
744
|
+
* long value O(n²) (a 200 KB inline data-URI background alone would cost
|
|
745
|
+
* billions of operations, and background-image values are never parse-
|
|
746
|
+
* cached). `write()` compacts already-consumed prefix bytes.
|
|
747
|
+
*/
|
|
748
|
+
_cursor;
|
|
1252
749
|
constructor() {
|
|
1253
750
|
this._value = [];
|
|
751
|
+
this._cursor = 0;
|
|
1254
752
|
}
|
|
1255
753
|
_reset() {
|
|
1256
754
|
this._value = [];
|
|
755
|
+
this._cursor = 0;
|
|
1257
756
|
}
|
|
1258
757
|
write(chunk) {
|
|
1259
|
-
this.
|
|
758
|
+
if (this._cursor > 0) {
|
|
759
|
+
this._value = this._value.slice(this._cursor);
|
|
760
|
+
this._cursor = 0;
|
|
761
|
+
}
|
|
762
|
+
this._value = this._value.concat([...chunk].map((char) => char.codePointAt(0)));
|
|
1260
763
|
}
|
|
1261
764
|
read() {
|
|
1262
765
|
const tokens = [];
|
|
@@ -1424,19 +927,21 @@
|
|
|
1424
927
|
}
|
|
1425
928
|
return {
|
|
1426
929
|
type: 6,
|
|
1427
|
-
value: fromCodePoint
|
|
930
|
+
value: String.fromCodePoint(codePoint)
|
|
1428
931
|
};
|
|
1429
932
|
}
|
|
1430
933
|
consumeCodePoint() {
|
|
1431
|
-
const value = this._value.
|
|
1432
|
-
|
|
934
|
+
const value = this._value[this._cursor];
|
|
935
|
+
if (value === void 0) return -1;
|
|
936
|
+
this._cursor++;
|
|
937
|
+
return value;
|
|
1433
938
|
}
|
|
1434
939
|
reconsumeCodePoint(codePoint) {
|
|
1435
|
-
this._value.
|
|
940
|
+
if (this._cursor > 0 && this._value[this._cursor - 1] === codePoint) this._cursor--;
|
|
941
|
+
else this._value.splice(this._cursor, 0, codePoint);
|
|
1436
942
|
}
|
|
1437
943
|
peekCodePoint(delta) {
|
|
1438
|
-
|
|
1439
|
-
const codePoint = this._value[delta];
|
|
944
|
+
const codePoint = this._value[this._cursor + delta];
|
|
1440
945
|
return codePoint !== void 0 ? codePoint : -1;
|
|
1441
946
|
}
|
|
1442
947
|
consumeUnicodeRangeToken() {
|
|
@@ -1454,10 +959,10 @@
|
|
|
1454
959
|
}
|
|
1455
960
|
if (questionMarks) return {
|
|
1456
961
|
type: 30,
|
|
1457
|
-
start: parseInt(fromCodePoint
|
|
1458
|
-
end: parseInt(fromCodePoint
|
|
962
|
+
start: parseInt(String.fromCodePoint(...digits.map((digit) => digit === 63 ? 48 : digit)), 16),
|
|
963
|
+
end: parseInt(String.fromCodePoint(...digits.map((digit) => digit === 63 ? 70 : digit)), 16)
|
|
1459
964
|
};
|
|
1460
|
-
const start = parseInt(fromCodePoint
|
|
965
|
+
const start = parseInt(String.fromCodePoint(...digits), 16);
|
|
1461
966
|
if (codePoint === 45 && isHex(this.peekCodePoint(0))) {
|
|
1462
967
|
codePoint = this.consumeCodePoint();
|
|
1463
968
|
const endDigits = [];
|
|
@@ -1468,7 +973,7 @@
|
|
|
1468
973
|
return {
|
|
1469
974
|
type: 30,
|
|
1470
975
|
start,
|
|
1471
|
-
end: parseInt(fromCodePoint
|
|
976
|
+
end: parseInt(String.fromCodePoint(...endDigits), 16)
|
|
1472
977
|
};
|
|
1473
978
|
} else return {
|
|
1474
979
|
type: 30,
|
|
@@ -1520,7 +1025,7 @@
|
|
|
1520
1025
|
const codePoint = this.consumeCodePoint();
|
|
1521
1026
|
if (codePoint === -1 || codePoint === 41) return {
|
|
1522
1027
|
type: 22,
|
|
1523
|
-
value: fromCodePoint
|
|
1028
|
+
value: String.fromCodePoint(...value)
|
|
1524
1029
|
};
|
|
1525
1030
|
else if (isWhiteSpace(codePoint)) {
|
|
1526
1031
|
this.consumeWhiteSpace();
|
|
@@ -1528,7 +1033,7 @@
|
|
|
1528
1033
|
this.consumeCodePoint();
|
|
1529
1034
|
return {
|
|
1530
1035
|
type: 22,
|
|
1531
|
-
value: fromCodePoint
|
|
1036
|
+
value: String.fromCodePoint(...value)
|
|
1532
1037
|
};
|
|
1533
1038
|
}
|
|
1534
1039
|
this.consumeBadUrlRemnants();
|
|
@@ -1558,19 +1063,21 @@
|
|
|
1558
1063
|
consumeStringSlice(count) {
|
|
1559
1064
|
const SLICE_STACK_SIZE = 5e4;
|
|
1560
1065
|
let value = "";
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1066
|
+
const end = this._cursor + count;
|
|
1067
|
+
let from = this._cursor;
|
|
1068
|
+
while (from < end) {
|
|
1069
|
+
const to = Math.min(end, from + SLICE_STACK_SIZE);
|
|
1070
|
+
value += String.fromCodePoint(...this._value.slice(from, to));
|
|
1071
|
+
from = to;
|
|
1072
|
+
}
|
|
1073
|
+
this._cursor = end + 1;
|
|
1567
1074
|
return value;
|
|
1568
1075
|
}
|
|
1569
1076
|
consumeStringToken(endingCodePoint) {
|
|
1570
1077
|
let value = "";
|
|
1571
1078
|
let i = 0;
|
|
1572
1079
|
do {
|
|
1573
|
-
const codePoint = this._value[i];
|
|
1080
|
+
const codePoint = this._value[this._cursor + i];
|
|
1574
1081
|
if (codePoint === -1 || codePoint === void 0 || codePoint === endingCodePoint) {
|
|
1575
1082
|
value += this.consumeStringSlice(i);
|
|
1576
1083
|
return {
|
|
@@ -1579,19 +1086,19 @@
|
|
|
1579
1086
|
};
|
|
1580
1087
|
}
|
|
1581
1088
|
if (codePoint === 10) {
|
|
1582
|
-
this.
|
|
1089
|
+
this._cursor += i;
|
|
1583
1090
|
return BAD_STRING_TOKEN;
|
|
1584
1091
|
}
|
|
1585
1092
|
if (codePoint === 92) {
|
|
1586
|
-
const next = this._value[i + 1];
|
|
1093
|
+
const next = this._value[this._cursor + i + 1];
|
|
1587
1094
|
if (next !== -1 && next !== void 0) {
|
|
1588
1095
|
if (next === 10) {
|
|
1589
1096
|
value += this.consumeStringSlice(i);
|
|
1590
1097
|
i = -1;
|
|
1591
|
-
this.
|
|
1098
|
+
this._cursor++;
|
|
1592
1099
|
} else if (isValidEscape(codePoint, next)) {
|
|
1593
1100
|
value += this.consumeStringSlice(i);
|
|
1594
|
-
value += fromCodePoint
|
|
1101
|
+
value += String.fromCodePoint(this.consumeEscapedCodePoint());
|
|
1595
1102
|
i = -1;
|
|
1596
1103
|
}
|
|
1597
1104
|
}
|
|
@@ -1650,8 +1157,8 @@
|
|
|
1650
1157
|
consumeEscapedCodePoint() {
|
|
1651
1158
|
const codePoint = this.consumeCodePoint();
|
|
1652
1159
|
if (isHex(codePoint)) {
|
|
1653
|
-
let hex = fromCodePoint
|
|
1654
|
-
while (isHex(this.peekCodePoint(0)) && hex.length < 6) hex += fromCodePoint
|
|
1160
|
+
let hex = String.fromCodePoint(codePoint);
|
|
1161
|
+
while (isHex(this.peekCodePoint(0)) && hex.length < 6) hex += String.fromCodePoint(this.consumeCodePoint());
|
|
1655
1162
|
if (isWhiteSpace(this.peekCodePoint(0))) this.consumeCodePoint();
|
|
1656
1163
|
const hexCodePoint = parseInt(hex, 16);
|
|
1657
1164
|
if (hexCodePoint === 0 || isSurrogateCodePoint(hexCodePoint) || hexCodePoint > 1114111) return REPLACEMENT_CHARACTER;
|
|
@@ -1664,8 +1171,8 @@
|
|
|
1664
1171
|
let result = "";
|
|
1665
1172
|
while (true) {
|
|
1666
1173
|
const codePoint = this.consumeCodePoint();
|
|
1667
|
-
if (isNameCodePoint(codePoint)) result += fromCodePoint
|
|
1668
|
-
else if (isValidEscape(codePoint, this.peekCodePoint(0))) result += fromCodePoint
|
|
1174
|
+
if (isNameCodePoint(codePoint)) result += String.fromCodePoint(codePoint);
|
|
1175
|
+
else if (isValidEscape(codePoint, this.peekCodePoint(0))) result += String.fromCodePoint(this.consumeEscapedCodePoint());
|
|
1669
1176
|
else {
|
|
1670
1177
|
this.reconsumeCodePoint(codePoint);
|
|
1671
1178
|
return result;
|
|
@@ -1676,6 +1183,7 @@
|
|
|
1676
1183
|
//#endregion
|
|
1677
1184
|
//#region src/css/syntax/parser.ts
|
|
1678
1185
|
var Parser = class Parser {
|
|
1186
|
+
_tokens;
|
|
1679
1187
|
constructor(tokens) {
|
|
1680
1188
|
this._tokens = tokens;
|
|
1681
1189
|
}
|
|
@@ -2205,13 +1713,17 @@
|
|
|
2205
1713
|
};
|
|
2206
1714
|
const packLab = (_context, args) => {
|
|
2207
1715
|
if (isRelativeTransform(args.filter(nonFunctionArgSeparator))) throw new Error("Relative color not supported for lab()");
|
|
2208
|
-
const [
|
|
1716
|
+
const [extractedL, a, b, alpha] = extractLabComponents(args), l = isPercentageLightness(args) ? extractedL * 100 : extractedL, rgb = srgbLinear2rgb(xyz2rgbLinear(lab2xyz([
|
|
2209
1717
|
l,
|
|
2210
1718
|
a,
|
|
2211
1719
|
b
|
|
2212
1720
|
])));
|
|
2213
1721
|
return pack(clamp(Math.round(rgb[0] * 255), 0, 255), clamp(Math.round(rgb[1] * 255), 0, 255), clamp(Math.round(rgb[2] * 255), 0, 255), alpha);
|
|
2214
1722
|
};
|
|
1723
|
+
const isPercentageLightness = (args) => {
|
|
1724
|
+
const t0 = args.filter(nonFunctionArgSeparator)[0];
|
|
1725
|
+
return t0 !== void 0 && t0.type === 16;
|
|
1726
|
+
};
|
|
2215
1727
|
const packOkLab = (_context, args) => {
|
|
2216
1728
|
if (isRelativeTransform(args.filter(nonFunctionArgSeparator))) throw new Error("Relative color not supported for oklab()");
|
|
2217
1729
|
const [l, a, b, alpha] = extractLabComponents(args), rgb = srgbLinear2rgb(xyz2rgbLinear(oklab2xyz([
|
|
@@ -2240,7 +1752,7 @@
|
|
|
2240
1752
|
return pack(clamp(Math.round(rgb[0] * 255), 0, 255), clamp(Math.round(rgb[1] * 255), 0, 255), clamp(Math.round(rgb[2] * 255), 0, 255), a);
|
|
2241
1753
|
};
|
|
2242
1754
|
const extractHslComponents = (context, args) => {
|
|
2243
|
-
const tokens = args.filter(nonFunctionArgSeparator), hue = tokens[0], saturation = tokens[1], lightness = tokens[2], alpha = tokens[3];
|
|
1755
|
+
const tokens = args.filter(nonFunctionArgSeparator), hue = tokens[0], saturation = tokens[1], lightness = tokens[2], slash = tokens[3], alpha = slash !== void 0 && slash.type === 6 && slash.value === "/" ? tokens[4] : tokens[3];
|
|
2244
1756
|
return [
|
|
2245
1757
|
hue ? (hue.type === 17 ? deg(hue.number) : angle.parse(context, hue)) / (Math.PI * 2) : 0,
|
|
2246
1758
|
saturation !== void 0 && isLengthPercentage(saturation) ? saturation.number / 100 : 0,
|
|
@@ -2255,7 +1767,7 @@
|
|
|
2255
1767
|
s,
|
|
2256
1768
|
l
|
|
2257
1769
|
]);
|
|
2258
|
-
return pack(rgb[0] * 255, rgb[1] * 255, rgb[2] * 255,
|
|
1770
|
+
return pack(rgb[0] * 255, rgb[1] * 255, rgb[2] * 255, a);
|
|
2259
1771
|
};
|
|
2260
1772
|
const extractLchComponents = (args) => {
|
|
2261
1773
|
const tokens = args.filter(nonFunctionArgSeparator), t0 = tokens[0], t1 = tokens[1], t2 = tokens[2], t4 = tokens[4];
|
|
@@ -2330,9 +1842,9 @@
|
|
|
2330
1842
|
};
|
|
2331
1843
|
const hsl2rgb = ([h, s, l]) => {
|
|
2332
1844
|
if (s === 0) return [
|
|
2333
|
-
l
|
|
2334
|
-
l
|
|
2335
|
-
l
|
|
1845
|
+
l,
|
|
1846
|
+
l,
|
|
1847
|
+
l
|
|
2336
1848
|
];
|
|
2337
1849
|
const t2 = l <= .5 ? l * (s + 1) : l + s - l * s, t1 = l * 2 - t2;
|
|
2338
1850
|
return [
|
|
@@ -3082,6 +2594,393 @@
|
|
|
3082
2594
|
]);
|
|
3083
2595
|
};
|
|
3084
2596
|
//#endregion
|
|
2597
|
+
//#region src/css/types/functions/color-mix.ts
|
|
2598
|
+
const HUE_DEG_INDEX = {
|
|
2599
|
+
lch: 2,
|
|
2600
|
+
oklch: 2,
|
|
2601
|
+
hsl: 0
|
|
2602
|
+
};
|
|
2603
|
+
const XYZ_FROM_LMS = [
|
|
2604
|
+
1.2268798758459243,
|
|
2605
|
+
-.5578149944602171,
|
|
2606
|
+
.2813910456659647,
|
|
2607
|
+
-.0405757452148008,
|
|
2608
|
+
1.112286803280317,
|
|
2609
|
+
-.0717110580655164,
|
|
2610
|
+
-.0763729366746601,
|
|
2611
|
+
-.4214933324022432,
|
|
2612
|
+
1.5869240198367816
|
|
2613
|
+
];
|
|
2614
|
+
const LMS_FROM_OKLAB = [
|
|
2615
|
+
1,
|
|
2616
|
+
.3963377773761749,
|
|
2617
|
+
.2158037573099136,
|
|
2618
|
+
1,
|
|
2619
|
+
-.1055613458156586,
|
|
2620
|
+
-.0638541728258133,
|
|
2621
|
+
1,
|
|
2622
|
+
-.0894841775298119,
|
|
2623
|
+
-1.2914855480194092
|
|
2624
|
+
];
|
|
2625
|
+
const matrix3Inverse = (m) => {
|
|
2626
|
+
const a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5], g = m[6], h = m[7], i = m[8];
|
|
2627
|
+
const det = a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g);
|
|
2628
|
+
return [
|
|
2629
|
+
(e * i - f * h) / det,
|
|
2630
|
+
(c * h - b * i) / det,
|
|
2631
|
+
(b * f - c * e) / det,
|
|
2632
|
+
(f * g - d * i) / det,
|
|
2633
|
+
(a * i - c * g) / det,
|
|
2634
|
+
(c * d - a * f) / det,
|
|
2635
|
+
(d * h - e * g) / det,
|
|
2636
|
+
(b * g - a * h) / det,
|
|
2637
|
+
(a * e - b * d) / det
|
|
2638
|
+
];
|
|
2639
|
+
};
|
|
2640
|
+
const XYZ_TO_LMS = matrix3Inverse(XYZ_FROM_LMS);
|
|
2641
|
+
const OKLAB_FROM_LMS = matrix3Inverse(LMS_FROM_OKLAB);
|
|
2642
|
+
const LAB_K = 24389 / 27;
|
|
2643
|
+
const LAB_E = 24 / 116;
|
|
2644
|
+
const LAB_E3 = LAB_E * LAB_E * LAB_E;
|
|
2645
|
+
const LAB_X_SCALE = .3457 / .3585;
|
|
2646
|
+
const LAB_Z_SCALE = .2958 / .3585;
|
|
2647
|
+
const unpackSrgb = (color) => [
|
|
2648
|
+
(255 & color >> 24) / 255,
|
|
2649
|
+
(255 & color >> 16) / 255,
|
|
2650
|
+
(255 & color >> 8) / 255
|
|
2651
|
+
];
|
|
2652
|
+
/** Inverse of color-utilities' lab2xyz: D65 XYZ → CIE Lab (0..100 scale). */
|
|
2653
|
+
const xyzD65ToLab = (xyz) => {
|
|
2654
|
+
const [x50, y50, z50] = d65toD50([
|
|
2655
|
+
xyz[0],
|
|
2656
|
+
xyz[1],
|
|
2657
|
+
xyz[2]
|
|
2658
|
+
]);
|
|
2659
|
+
const xi = x50 / LAB_X_SCALE;
|
|
2660
|
+
const yi = y50;
|
|
2661
|
+
const zi = z50 / LAB_Z_SCALE;
|
|
2662
|
+
const fx = xi > LAB_E3 ? Math.cbrt(xi) : (LAB_K * xi + 16) / 116;
|
|
2663
|
+
const fy = yi > LAB_E3 ? Math.cbrt(yi) : (LAB_K * yi + 16) / 116;
|
|
2664
|
+
const fz = zi > LAB_E3 ? Math.cbrt(zi) : (LAB_K * zi + 16) / 116;
|
|
2665
|
+
return [
|
|
2666
|
+
116 * fy - 16,
|
|
2667
|
+
500 * (fx - fy),
|
|
2668
|
+
200 * (fy - fz)
|
|
2669
|
+
];
|
|
2670
|
+
};
|
|
2671
|
+
/** D65 XYZ → OKLab via the inverted forward matrices. */
|
|
2672
|
+
const xyzD65ToOklab = (xyz) => {
|
|
2673
|
+
const lms = multiplyMatrices(XYZ_TO_LMS, xyz);
|
|
2674
|
+
const lmsCbrt = [
|
|
2675
|
+
Math.cbrt(lms[0]),
|
|
2676
|
+
Math.cbrt(lms[1]),
|
|
2677
|
+
Math.cbrt(lms[2])
|
|
2678
|
+
];
|
|
2679
|
+
return multiplyMatrices(OKLAB_FROM_LMS, lmsCbrt);
|
|
2680
|
+
};
|
|
2681
|
+
/** Lab/Oklab rectangular coordinates → polar LCH (hue in degrees). */
|
|
2682
|
+
const labToLch = (lab) => {
|
|
2683
|
+
const c = Math.hypot(lab[1], lab[2]);
|
|
2684
|
+
const h = Math.atan2(lab[2], lab[1]) * 180 / Math.PI;
|
|
2685
|
+
return [
|
|
2686
|
+
lab[0],
|
|
2687
|
+
c,
|
|
2688
|
+
(h + 360) % 360
|
|
2689
|
+
];
|
|
2690
|
+
};
|
|
2691
|
+
/** Gamma sRGB (0..1) → HSL with hue in turns (0..1), matching hsl2rgb input. */
|
|
2692
|
+
const rgbToHslTurns = (rgb) => {
|
|
2693
|
+
const r = rgb[0], g = rgb[1], b = rgb[2];
|
|
2694
|
+
const max = Math.max(r, g, b);
|
|
2695
|
+
const min = Math.min(r, g, b);
|
|
2696
|
+
const l = (max + min) / 2;
|
|
2697
|
+
if (max === min) return [
|
|
2698
|
+
0,
|
|
2699
|
+
0,
|
|
2700
|
+
l
|
|
2701
|
+
];
|
|
2702
|
+
const d = max - min;
|
|
2703
|
+
const s = l > .5 ? d / (2 - max - min) : d / (max + min);
|
|
2704
|
+
let h;
|
|
2705
|
+
if (max === r) h = ((g - b) / d + (g < b ? 6 : 0)) / 6;
|
|
2706
|
+
else if (max === g) h = ((b - r) / d + 2) / 6;
|
|
2707
|
+
else h = ((r - g) / d + 4) / 6;
|
|
2708
|
+
return [
|
|
2709
|
+
h,
|
|
2710
|
+
s,
|
|
2711
|
+
l
|
|
2712
|
+
];
|
|
2713
|
+
};
|
|
2714
|
+
/** Packed color → coordinates in the given space, alpha kept on a 0..1 scale. */
|
|
2715
|
+
const toCoords = (color, space) => {
|
|
2716
|
+
const a = (255 & color) / 255;
|
|
2717
|
+
const rgb = unpackSrgb(color);
|
|
2718
|
+
const linear = rgb2rgbLinear(rgb);
|
|
2719
|
+
const xyz = rgbLinear2xyz(linear);
|
|
2720
|
+
let coords;
|
|
2721
|
+
switch (space) {
|
|
2722
|
+
case "srgb":
|
|
2723
|
+
coords = rgb;
|
|
2724
|
+
break;
|
|
2725
|
+
case "srgb-linear":
|
|
2726
|
+
coords = linear;
|
|
2727
|
+
break;
|
|
2728
|
+
case "xyz":
|
|
2729
|
+
case "xyz-d65":
|
|
2730
|
+
coords = xyz;
|
|
2731
|
+
break;
|
|
2732
|
+
case "xyz-d50":
|
|
2733
|
+
coords = d65toD50(xyz);
|
|
2734
|
+
break;
|
|
2735
|
+
case "lab":
|
|
2736
|
+
coords = xyzD65ToLab(xyz);
|
|
2737
|
+
break;
|
|
2738
|
+
case "oklab":
|
|
2739
|
+
coords = xyzD65ToOklab(xyz);
|
|
2740
|
+
break;
|
|
2741
|
+
case "lch":
|
|
2742
|
+
coords = labToLch(xyzD65ToLab(xyz));
|
|
2743
|
+
break;
|
|
2744
|
+
case "oklch":
|
|
2745
|
+
coords = labToLch(xyzD65ToOklab(xyz));
|
|
2746
|
+
break;
|
|
2747
|
+
case "hsl": coords = [
|
|
2748
|
+
rgbToHslTurns(rgb)[0] * 360,
|
|
2749
|
+
rgbToHslTurns(rgb)[1],
|
|
2750
|
+
rgbToHslTurns(rgb)[2]
|
|
2751
|
+
];
|
|
2752
|
+
}
|
|
2753
|
+
return [
|
|
2754
|
+
coords[0],
|
|
2755
|
+
coords[1],
|
|
2756
|
+
coords[2],
|
|
2757
|
+
a
|
|
2758
|
+
];
|
|
2759
|
+
};
|
|
2760
|
+
/** Coordinates in the given space → packed color. */
|
|
2761
|
+
const fromCoords = (coords, space) => {
|
|
2762
|
+
const c0 = coords[0], c1 = coords[1], c2 = coords[2], a = coords[3];
|
|
2763
|
+
switch (space) {
|
|
2764
|
+
case "srgb": return packSrgb([
|
|
2765
|
+
c0,
|
|
2766
|
+
c1,
|
|
2767
|
+
c2,
|
|
2768
|
+
a
|
|
2769
|
+
]);
|
|
2770
|
+
case "srgb-linear": return packSrgbLinear([
|
|
2771
|
+
c0,
|
|
2772
|
+
c1,
|
|
2773
|
+
c2,
|
|
2774
|
+
a
|
|
2775
|
+
]);
|
|
2776
|
+
case "xyz":
|
|
2777
|
+
case "xyz-d65": return packXYZ([
|
|
2778
|
+
c0,
|
|
2779
|
+
c1,
|
|
2780
|
+
c2,
|
|
2781
|
+
a
|
|
2782
|
+
]);
|
|
2783
|
+
case "xyz-d50": return packXYZ([...d50toD65([
|
|
2784
|
+
c0,
|
|
2785
|
+
c1,
|
|
2786
|
+
c2
|
|
2787
|
+
]), a]);
|
|
2788
|
+
case "lab": return packViaXyz(lab2xyz([
|
|
2789
|
+
c0,
|
|
2790
|
+
c1,
|
|
2791
|
+
c2
|
|
2792
|
+
]), a);
|
|
2793
|
+
case "oklab": return packViaXyz(oklab2xyz([
|
|
2794
|
+
c0,
|
|
2795
|
+
c1,
|
|
2796
|
+
c2
|
|
2797
|
+
]), a);
|
|
2798
|
+
case "lch": return packViaXyz(lab2xyz(lch2lab([
|
|
2799
|
+
c0,
|
|
2800
|
+
c1,
|
|
2801
|
+
c2
|
|
2802
|
+
])), a);
|
|
2803
|
+
case "oklch": return packViaXyz(oklab2xyz(lch2lab([
|
|
2804
|
+
c0,
|
|
2805
|
+
c1,
|
|
2806
|
+
c2
|
|
2807
|
+
])), a);
|
|
2808
|
+
case "hsl": {
|
|
2809
|
+
const rgb = hsl2rgb([
|
|
2810
|
+
c0 / 360,
|
|
2811
|
+
c1,
|
|
2812
|
+
c2
|
|
2813
|
+
]);
|
|
2814
|
+
return packSrgb([
|
|
2815
|
+
rgb[0],
|
|
2816
|
+
rgb[1],
|
|
2817
|
+
rgb[2],
|
|
2818
|
+
a
|
|
2819
|
+
]);
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
};
|
|
2823
|
+
const packViaXyz = (xyz, a) => {
|
|
2824
|
+
const rgb = srgbLinear2rgb(xyz2rgbLinear(xyz));
|
|
2825
|
+
return packSrgb([
|
|
2826
|
+
rgb[0],
|
|
2827
|
+
rgb[1],
|
|
2828
|
+
rgb[2],
|
|
2829
|
+
a
|
|
2830
|
+
]);
|
|
2831
|
+
};
|
|
2832
|
+
/**
|
|
2833
|
+
* Interpolate a hue angle in degrees per css-color-4 §12.4. `weight1` and
|
|
2834
|
+
* `weight2` are the (normalized) mix weights; the hue travels from h1 towards
|
|
2835
|
+
* h2 by the shared fraction. Exported for unit tests.
|
|
2836
|
+
*/
|
|
2837
|
+
const interpolateHue = (h1, h2, weight1, weight2, method = "shorter") => {
|
|
2838
|
+
const wSum = weight1 + weight2;
|
|
2839
|
+
if (wSum === 0) return h1;
|
|
2840
|
+
let d = ((h2 - h1) % 360 + 360) % 360;
|
|
2841
|
+
switch (method) {
|
|
2842
|
+
case "shorter":
|
|
2843
|
+
if (d > 180) d -= 360;
|
|
2844
|
+
break;
|
|
2845
|
+
case "longer":
|
|
2846
|
+
if (d < 180) d -= 360;
|
|
2847
|
+
break;
|
|
2848
|
+
case "increasing": break;
|
|
2849
|
+
case "decreasing": if (d > 0) d -= 360;
|
|
2850
|
+
}
|
|
2851
|
+
return h1 + d * (weight2 / wSum);
|
|
2852
|
+
};
|
|
2853
|
+
const parseMixComponent = (context, tokens) => {
|
|
2854
|
+
let colorToken;
|
|
2855
|
+
let percentage = null;
|
|
2856
|
+
for (const token of tokens) {
|
|
2857
|
+
if (token.type === 31 || token.type === 4) continue;
|
|
2858
|
+
if (token.type === 16) percentage = token.number;
|
|
2859
|
+
else if (isIdentToken(token) && token.value === "none") {
|
|
2860
|
+
if (percentage === null) percentage = 0;
|
|
2861
|
+
} else if (colorToken === void 0) colorToken = token;
|
|
2862
|
+
else throw new Error(`Unexpected token in color-mix() component`);
|
|
2863
|
+
}
|
|
2864
|
+
if (colorToken === void 0) throw new Error("color-mix() component is missing a color");
|
|
2865
|
+
const token = colorToken;
|
|
2866
|
+
return {
|
|
2867
|
+
color: color$1.parse(context, token),
|
|
2868
|
+
percentage
|
|
2869
|
+
};
|
|
2870
|
+
};
|
|
2871
|
+
const SUPPORTED_SPACES = [
|
|
2872
|
+
"srgb",
|
|
2873
|
+
"srgb-linear",
|
|
2874
|
+
"lab",
|
|
2875
|
+
"oklab",
|
|
2876
|
+
"lch",
|
|
2877
|
+
"oklch",
|
|
2878
|
+
"hsl",
|
|
2879
|
+
"xyz",
|
|
2880
|
+
"xyz-d50",
|
|
2881
|
+
"xyz-d65"
|
|
2882
|
+
];
|
|
2883
|
+
const mixCoords = (c1, c2, w1, w2, space, hueMethod) => {
|
|
2884
|
+
const hueIdx = HUE_DEG_INDEX[space];
|
|
2885
|
+
const p1 = [
|
|
2886
|
+
c1[0] * c1[3],
|
|
2887
|
+
c1[1] * c1[3],
|
|
2888
|
+
c1[2] * c1[3],
|
|
2889
|
+
c1[3]
|
|
2890
|
+
];
|
|
2891
|
+
const p2 = [
|
|
2892
|
+
c2[0] * c2[3],
|
|
2893
|
+
c2[1] * c2[3],
|
|
2894
|
+
c2[2] * c2[3],
|
|
2895
|
+
c2[3]
|
|
2896
|
+
];
|
|
2897
|
+
const alpha = w1 * p1[3] + w2 * p2[3];
|
|
2898
|
+
if (alpha <= 0) return [
|
|
2899
|
+
0,
|
|
2900
|
+
0,
|
|
2901
|
+
0,
|
|
2902
|
+
0
|
|
2903
|
+
];
|
|
2904
|
+
const out = [
|
|
2905
|
+
0,
|
|
2906
|
+
0,
|
|
2907
|
+
0,
|
|
2908
|
+
alpha
|
|
2909
|
+
];
|
|
2910
|
+
for (let i = 0; i < 3; i++) {
|
|
2911
|
+
if (i === hueIdx) continue;
|
|
2912
|
+
out[i] = (w1 * at(p1, i) + w2 * at(p2, i)) / alpha;
|
|
2913
|
+
}
|
|
2914
|
+
if (hueIdx !== void 0) {
|
|
2915
|
+
let h1 = at(c1, hueIdx);
|
|
2916
|
+
let h2 = at(c2, hueIdx);
|
|
2917
|
+
if (c1[1] === 0) h1 = h2;
|
|
2918
|
+
if (c2[1] === 0) h2 = h1;
|
|
2919
|
+
out[hueIdx] = interpolateHue(h1, h2, w1, w2, hueMethod);
|
|
2920
|
+
}
|
|
2921
|
+
return out;
|
|
2922
|
+
};
|
|
2923
|
+
const computeColorMix = (context, args) => {
|
|
2924
|
+
const groups = [[]];
|
|
2925
|
+
for (const token of args) if (token.type === 4) groups.push([]);
|
|
2926
|
+
else groups[groups.length - 1].push(token);
|
|
2927
|
+
const meaningful = groups.map((group) => group.filter((t) => t.type !== 31));
|
|
2928
|
+
if (meaningful.length !== 3) throw new Error("color-mix() requires exactly two color components");
|
|
2929
|
+
const header = meaningful[0];
|
|
2930
|
+
const inKeyword = header ? header[0] : void 0;
|
|
2931
|
+
const hasInKeyword = inKeyword !== void 0 && isIdentToken(inKeyword) && inKeyword.value === "in";
|
|
2932
|
+
if (!header || header.length < 2 || !hasInKeyword) throw new Error("color-mix() requires an interpolation space after `in`");
|
|
2933
|
+
const spaceIdent = header[1];
|
|
2934
|
+
if (!spaceIdent || !isIdentToken(spaceIdent)) throw new Error("color-mix() space must be an identifier");
|
|
2935
|
+
const space = spaceIdent.value;
|
|
2936
|
+
if (SUPPORTED_SPACES.indexOf(space) === -1) throw new Error(`Unsupported color-mix() interpolation space "${space}"`);
|
|
2937
|
+
let hueMethod = "shorter";
|
|
2938
|
+
const rest = header.slice(2);
|
|
2939
|
+
if (rest.length > 0) {
|
|
2940
|
+
const method = rest[0];
|
|
2941
|
+
const hueKeyword = rest[1];
|
|
2942
|
+
if (!method || !hueKeyword || !isIdentToken(method) || !isIdentToken(hueKeyword) || hueKeyword.value !== "hue") throw new Error("Unsupported color-mix() hue method syntax");
|
|
2943
|
+
if ([
|
|
2944
|
+
"shorter",
|
|
2945
|
+
"longer",
|
|
2946
|
+
"increasing",
|
|
2947
|
+
"decreasing"
|
|
2948
|
+
].indexOf(method.value) === -1) throw new Error(`Unsupported color-mix() hue method "${method.value}"`);
|
|
2949
|
+
hueMethod = method.value;
|
|
2950
|
+
}
|
|
2951
|
+
const group1 = meaningful[1];
|
|
2952
|
+
const group2 = meaningful[2];
|
|
2953
|
+
if (!group1 || !group2) throw new Error("color-mix() requires exactly two color components");
|
|
2954
|
+
const component1 = parseMixComponent(context, group1);
|
|
2955
|
+
const component2 = parseMixComponent(context, group2);
|
|
2956
|
+
let p1 = component1.percentage;
|
|
2957
|
+
let p2 = component2.percentage;
|
|
2958
|
+
if (p1 === null && p2 === null) {
|
|
2959
|
+
p1 = 50;
|
|
2960
|
+
p2 = 50;
|
|
2961
|
+
} else if (p1 === null) p1 = 100 - (p2 ?? 0);
|
|
2962
|
+
else if (p2 === null) p2 = 100 - p1;
|
|
2963
|
+
else {
|
|
2964
|
+
const sum = p1 + p2;
|
|
2965
|
+
if (sum > 0) {
|
|
2966
|
+
p1 = p1 / sum * 100;
|
|
2967
|
+
p2 = p2 / sum * 100;
|
|
2968
|
+
}
|
|
2969
|
+
}
|
|
2970
|
+
const weight1 = (p1 ?? 0) / 100;
|
|
2971
|
+
const weight2 = (p2 ?? 0) / 100;
|
|
2972
|
+
const mixed = mixCoords(toCoords(component1.color, space), toCoords(component2.color, space), weight1, weight2, space, hueMethod);
|
|
2973
|
+
return fromCoords(mixed, space);
|
|
2974
|
+
};
|
|
2975
|
+
const colorMix = (context, args) => {
|
|
2976
|
+
try {
|
|
2977
|
+
return computeColorMix(context, args);
|
|
2978
|
+
} catch (e) {
|
|
2979
|
+
context.logger.warn(`Unsupported color-mix() value: ${e instanceof Error ? e.message : e}`);
|
|
2980
|
+
return 0;
|
|
2981
|
+
}
|
|
2982
|
+
};
|
|
2983
|
+
//#endregion
|
|
3085
2984
|
//#region src/css/types/color.ts
|
|
3086
2985
|
const color$1 = {
|
|
3087
2986
|
name: "color",
|
|
@@ -3331,7 +3230,8 @@
|
|
|
3331
3230
|
oklch: packOkLch,
|
|
3332
3231
|
oklab: packOkLab,
|
|
3333
3232
|
lab: packLab,
|
|
3334
|
-
color: _color
|
|
3233
|
+
color: _color,
|
|
3234
|
+
"color-mix": colorMix
|
|
3335
3235
|
};
|
|
3336
3236
|
const parseColor = (context, value) => color$1.parse(context, Parser.create(value).parseComponentValue());
|
|
3337
3237
|
const COLORS = {
|
|
@@ -3614,9 +3514,7 @@
|
|
|
3614
3514
|
//#endregion
|
|
3615
3515
|
//#region src/css/types/functions/counter.ts
|
|
3616
3516
|
var CounterState = class {
|
|
3617
|
-
|
|
3618
|
-
this.counters = {};
|
|
3619
|
-
}
|
|
3517
|
+
counters = {};
|
|
3620
3518
|
getCounterValue(name) {
|
|
3621
3519
|
const counter = this.counters[name];
|
|
3622
3520
|
if (counter && counter.length) return at(counter, counter.length - 1);
|
|
@@ -3943,7 +3841,7 @@
|
|
|
3943
3841
|
};
|
|
3944
3842
|
const createCounterStyleFromRange = (value, codePointRangeStart, codePointRangeEnd, isNumeric, suffix) => {
|
|
3945
3843
|
const codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;
|
|
3946
|
-
return (value < 0 ? "-" : "") + (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, (codePoint) => fromCodePoint
|
|
3844
|
+
return (value < 0 ? "-" : "") + (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, (codePoint) => String.fromCodePoint(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart)) + suffix);
|
|
3947
3845
|
};
|
|
3948
3846
|
const createCounterStyleFromSymbols = (value, symbols, suffix = ". ") => {
|
|
3949
3847
|
const codePointRangeLength = symbols.length;
|
|
@@ -4528,7 +4426,7 @@
|
|
|
4528
4426
|
const COVER = "cover";
|
|
4529
4427
|
const CONTAIN = "contain";
|
|
4530
4428
|
const radialGradient = (context, tokens) => {
|
|
4531
|
-
let shape =
|
|
4429
|
+
let shape = 1;
|
|
4532
4430
|
let size = 3;
|
|
4533
4431
|
const stops = [];
|
|
4534
4432
|
const position = [];
|
|
@@ -4601,7 +4499,7 @@
|
|
|
4601
4499
|
//#endregion
|
|
4602
4500
|
//#region src/css/types/functions/-prefix-radial-gradient.ts
|
|
4603
4501
|
const prefixRadialGradient = (context, tokens) => {
|
|
4604
|
-
let shape =
|
|
4502
|
+
let shape = 1;
|
|
4605
4503
|
let size = 3;
|
|
4606
4504
|
const stops = [];
|
|
4607
4505
|
const position = [];
|
|
@@ -5994,28 +5892,37 @@
|
|
|
5994
5892
|
if (first.type === 20 && first.value === "none") return null;
|
|
5995
5893
|
}
|
|
5996
5894
|
const parts = [];
|
|
5997
|
-
for (const token of tokens)
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
5895
|
+
for (const token of tokens) {
|
|
5896
|
+
if (token.type === 22) {
|
|
5897
|
+
parts.push(`url("${token.value}")`);
|
|
5898
|
+
continue;
|
|
5899
|
+
}
|
|
5900
|
+
if (token.type === 18) {
|
|
5901
|
+
const fn = token;
|
|
5902
|
+
const renderedArgs = renderFilterArgs(fn.values);
|
|
5903
|
+
switch (fn.name) {
|
|
5904
|
+
case "blur":
|
|
5905
|
+
parts.push(`blur(${renderedArgs})`);
|
|
5906
|
+
break;
|
|
5907
|
+
case "brightness":
|
|
5908
|
+
case "contrast":
|
|
5909
|
+
case "invert":
|
|
5910
|
+
case "opacity":
|
|
5911
|
+
case "saturate":
|
|
5912
|
+
case "sepia":
|
|
5913
|
+
parts.push(`${fn.name}(${renderedArgs})`);
|
|
5914
|
+
break;
|
|
5915
|
+
case "grayscale":
|
|
5916
|
+
parts.push(`grayscale(${renderedArgs})`);
|
|
5917
|
+
break;
|
|
5918
|
+
case "hue-rotate":
|
|
5919
|
+
parts.push(`hue-rotate(${renderedArgs})`);
|
|
5920
|
+
break;
|
|
5921
|
+
case "drop-shadow":
|
|
5922
|
+
parts.push(`drop-shadow(${renderedArgs})`);
|
|
5923
|
+
break;
|
|
5924
|
+
default: parts.push(`${fn.name}(${renderedArgs})`);
|
|
5925
|
+
}
|
|
6019
5926
|
}
|
|
6020
5927
|
}
|
|
6021
5928
|
return parts.length > 0 ? parts.join(" ") : null;
|
|
@@ -6584,8 +6491,47 @@
|
|
|
6584
6491
|
};
|
|
6585
6492
|
}
|
|
6586
6493
|
};
|
|
6494
|
+
//#endregion
|
|
6495
|
+
//#region src/css/property-descriptors/translate.ts
|
|
6496
|
+
const translate = {
|
|
6497
|
+
name: "translate",
|
|
6498
|
+
initialValue: "none",
|
|
6499
|
+
prefix: false,
|
|
6500
|
+
type: 1,
|
|
6501
|
+
parse: (_context, tokens) => {
|
|
6502
|
+
const values = [];
|
|
6503
|
+
for (const token of tokens) if (isLengthPercentage(token)) values.push(token);
|
|
6504
|
+
if (values.length === 0) return null;
|
|
6505
|
+
return [at(values, 0), values.length > 1 ? at(values, 1) : ZERO_LENGTH];
|
|
6506
|
+
}
|
|
6507
|
+
};
|
|
6508
|
+
//#endregion
|
|
6509
|
+
//#region src/css/property-descriptors/scale.ts
|
|
6510
|
+
const scale = {
|
|
6511
|
+
name: "scale",
|
|
6512
|
+
initialValue: "none",
|
|
6513
|
+
prefix: false,
|
|
6514
|
+
type: 1,
|
|
6515
|
+
parse: (_context, tokens) => {
|
|
6516
|
+
const numbers = [];
|
|
6517
|
+
for (const token of tokens) if (isNumberToken(token)) numbers.push(token.number);
|
|
6518
|
+
if (numbers.length === 0) return null;
|
|
6519
|
+
return [at(numbers, 0), numbers.length > 1 ? at(numbers, 1) : at(numbers, 0)];
|
|
6520
|
+
}
|
|
6521
|
+
};
|
|
6587
6522
|
/** Z-axis mask offset used during box-shadow rendering. */
|
|
6588
6523
|
const SHADOW_MASK_OFFSET = 1e4;
|
|
6524
|
+
/**
|
|
6525
|
+
* Total time (ms) to wait for the cloned iframe document to become ready
|
|
6526
|
+
* after its load event. A missed deadline resolves with a warning (the
|
|
6527
|
+
* capture continues with a possibly incomplete document).
|
|
6528
|
+
*/
|
|
6529
|
+
const CLONE_READY_TIMEOUT_MS = 3e4;
|
|
6530
|
+
/**
|
|
6531
|
+
* Hard ceiling (ms) for the cloned iframe's load event itself. If the event
|
|
6532
|
+
* never fires, the mount is rejected instead of hanging forever.
|
|
6533
|
+
*/
|
|
6534
|
+
const IFRAME_LOAD_WATCHDOG_MS = 6e4;
|
|
6589
6535
|
//#endregion
|
|
6590
6536
|
//#region src/css/parse.ts
|
|
6591
6537
|
const STANDARD_PROPERTIES = [
|
|
@@ -6899,6 +6845,16 @@
|
|
|
6899
6845
|
rotate,
|
|
6900
6846
|
"rotate"
|
|
6901
6847
|
],
|
|
6848
|
+
[
|
|
6849
|
+
"translate",
|
|
6850
|
+
translate,
|
|
6851
|
+
"translate"
|
|
6852
|
+
],
|
|
6853
|
+
[
|
|
6854
|
+
"scale",
|
|
6855
|
+
scale,
|
|
6856
|
+
"scale"
|
|
6857
|
+
],
|
|
6902
6858
|
[
|
|
6903
6859
|
"visibility",
|
|
6904
6860
|
visibility,
|
|
@@ -7150,10 +7106,15 @@
|
|
|
7150
7106
|
/**
|
|
7151
7107
|
* Read-only grouped accessor for border-related CSS properties.
|
|
7152
7108
|
*
|
|
7109
|
+
* Convenience accessors only — the render pipeline reads the top-level
|
|
7110
|
+
* parsed fields directly. Some underlying properties are parsed but not
|
|
7111
|
+
* rendered; see docs/features.md "Known unsupported CSS features".
|
|
7112
|
+
*
|
|
7153
7113
|
* Provides structured access: `styles.border.topColor` as an alternative
|
|
7154
7114
|
* to the flat `styles.borderTopColor`. Both forms remain valid.
|
|
7155
7115
|
*/
|
|
7156
7116
|
var BorderStyles = class {
|
|
7117
|
+
styles;
|
|
7157
7118
|
constructor(styles) {
|
|
7158
7119
|
this.styles = styles;
|
|
7159
7120
|
}
|
|
@@ -7222,8 +7183,13 @@
|
|
|
7222
7183
|
//#region src/css/grouped/background-styles.ts
|
|
7223
7184
|
/**
|
|
7224
7185
|
* Read-only grouped accessor for background-related CSS properties.
|
|
7186
|
+
*
|
|
7187
|
+
* Convenience accessors only — the render pipeline reads the top-level
|
|
7188
|
+
* parsed fields directly. Some underlying properties are parsed but not
|
|
7189
|
+
* rendered; see docs/features.md "Known unsupported CSS features".
|
|
7225
7190
|
*/
|
|
7226
7191
|
var BackgroundStyles = class {
|
|
7192
|
+
styles;
|
|
7227
7193
|
constructor(styles) {
|
|
7228
7194
|
this.styles = styles;
|
|
7229
7195
|
}
|
|
@@ -7256,8 +7222,13 @@
|
|
|
7256
7222
|
//#region src/css/grouped/font-styles.ts
|
|
7257
7223
|
/**
|
|
7258
7224
|
* Read-only grouped accessor for font/text-related CSS properties.
|
|
7225
|
+
*
|
|
7226
|
+
* Convenience accessors only — the render pipeline reads the top-level
|
|
7227
|
+
* parsed fields directly. Some underlying properties are parsed but not
|
|
7228
|
+
* rendered; see docs/features.md "Known unsupported CSS features".
|
|
7259
7229
|
*/
|
|
7260
7230
|
var FontStyles = class {
|
|
7231
|
+
styles;
|
|
7261
7232
|
constructor(styles) {
|
|
7262
7233
|
this.styles = styles;
|
|
7263
7234
|
}
|
|
@@ -7347,8 +7318,13 @@
|
|
|
7347
7318
|
//#region src/css/grouped/layout-styles.ts
|
|
7348
7319
|
/**
|
|
7349
7320
|
* Read-only grouped accessor for layout/display/positioning CSS properties.
|
|
7321
|
+
*
|
|
7322
|
+
* Convenience accessors only — the render pipeline reads the top-level
|
|
7323
|
+
* parsed fields directly. Some underlying properties are parsed but not
|
|
7324
|
+
* rendered; see docs/features.md "Known unsupported CSS features".
|
|
7350
7325
|
*/
|
|
7351
7326
|
var LayoutStyles = class {
|
|
7327
|
+
styles;
|
|
7352
7328
|
constructor(styles) {
|
|
7353
7329
|
this.styles = styles;
|
|
7354
7330
|
}
|
|
@@ -7470,6 +7446,117 @@
|
|
|
7470
7446
|
//#endregion
|
|
7471
7447
|
//#region src/css/index.ts
|
|
7472
7448
|
var CSSParsedDeclaration = class {
|
|
7449
|
+
animationDuration;
|
|
7450
|
+
backgroundClip;
|
|
7451
|
+
backgroundColor;
|
|
7452
|
+
backgroundImage;
|
|
7453
|
+
backgroundOrigin;
|
|
7454
|
+
backgroundPosition;
|
|
7455
|
+
backgroundRepeat;
|
|
7456
|
+
backgroundSize;
|
|
7457
|
+
borderTopColor;
|
|
7458
|
+
borderRightColor;
|
|
7459
|
+
borderBottomColor;
|
|
7460
|
+
borderLeftColor;
|
|
7461
|
+
borderTopLeftRadius;
|
|
7462
|
+
borderTopRightRadius;
|
|
7463
|
+
borderBottomRightRadius;
|
|
7464
|
+
borderBottomLeftRadius;
|
|
7465
|
+
borderTopStyle;
|
|
7466
|
+
borderRightStyle;
|
|
7467
|
+
borderBottomStyle;
|
|
7468
|
+
borderLeftStyle;
|
|
7469
|
+
borderTopWidth;
|
|
7470
|
+
borderRightWidth;
|
|
7471
|
+
borderBottomWidth;
|
|
7472
|
+
borderLeftWidth;
|
|
7473
|
+
boxShadow;
|
|
7474
|
+
clipPath;
|
|
7475
|
+
color;
|
|
7476
|
+
direction;
|
|
7477
|
+
display;
|
|
7478
|
+
float;
|
|
7479
|
+
fontFamily;
|
|
7480
|
+
fontSize;
|
|
7481
|
+
fontStyle;
|
|
7482
|
+
fontVariant;
|
|
7483
|
+
fontWeight;
|
|
7484
|
+
letterSpacing;
|
|
7485
|
+
lineBreak;
|
|
7486
|
+
lineHeight;
|
|
7487
|
+
listStyleImage;
|
|
7488
|
+
listStylePosition;
|
|
7489
|
+
listStyleType;
|
|
7490
|
+
marginTop;
|
|
7491
|
+
marginRight;
|
|
7492
|
+
marginBottom;
|
|
7493
|
+
marginLeft;
|
|
7494
|
+
opacity;
|
|
7495
|
+
overflowX;
|
|
7496
|
+
overflowY;
|
|
7497
|
+
overflowWrap;
|
|
7498
|
+
paddingTop;
|
|
7499
|
+
paddingRight;
|
|
7500
|
+
paddingBottom;
|
|
7501
|
+
paddingLeft;
|
|
7502
|
+
paintOrder;
|
|
7503
|
+
position;
|
|
7504
|
+
textAlign;
|
|
7505
|
+
textDecorationColor;
|
|
7506
|
+
textDecorationLine;
|
|
7507
|
+
textDecorationStyle;
|
|
7508
|
+
textDecorationThickness;
|
|
7509
|
+
textUnderlineOffset;
|
|
7510
|
+
textShadow;
|
|
7511
|
+
textTransform;
|
|
7512
|
+
textOverflow;
|
|
7513
|
+
transform;
|
|
7514
|
+
transformOrigin;
|
|
7515
|
+
rotate;
|
|
7516
|
+
translate;
|
|
7517
|
+
scale;
|
|
7518
|
+
visibility;
|
|
7519
|
+
webkitTextStrokeColor;
|
|
7520
|
+
webkitTextStrokeWidth;
|
|
7521
|
+
webkitLineClamp;
|
|
7522
|
+
wordBreak;
|
|
7523
|
+
whiteSpace;
|
|
7524
|
+
writingMode;
|
|
7525
|
+
zIndex;
|
|
7526
|
+
objectFit;
|
|
7527
|
+
imageRendering;
|
|
7528
|
+
mixBlendMode;
|
|
7529
|
+
filter;
|
|
7530
|
+
fontVariantLigatures;
|
|
7531
|
+
zoom;
|
|
7532
|
+
objectPosition;
|
|
7533
|
+
backgroundBlendMode;
|
|
7534
|
+
borderImageSource;
|
|
7535
|
+
borderImageSlice;
|
|
7536
|
+
borderImageRepeat;
|
|
7537
|
+
boxDecorationBreak;
|
|
7538
|
+
accentColor;
|
|
7539
|
+
webkitTextFillColor;
|
|
7540
|
+
isolation;
|
|
7541
|
+
outlineColor;
|
|
7542
|
+
outlineStyle;
|
|
7543
|
+
outlineWidth;
|
|
7544
|
+
outlineOffset;
|
|
7545
|
+
backdropFilter;
|
|
7546
|
+
maskImage;
|
|
7547
|
+
maskPosition;
|
|
7548
|
+
maskRepeat;
|
|
7549
|
+
maskSize;
|
|
7550
|
+
textEmphasisStyle;
|
|
7551
|
+
textEmphasisColor;
|
|
7552
|
+
textEmphasisPosition;
|
|
7553
|
+
borderImageWidth;
|
|
7554
|
+
borderImageOutset;
|
|
7555
|
+
webkitBoxReflect;
|
|
7556
|
+
_border;
|
|
7557
|
+
_background;
|
|
7558
|
+
_font;
|
|
7559
|
+
_layout;
|
|
7473
7560
|
get border() {
|
|
7474
7561
|
return this._border ?? (this._border = new BorderStyles(this));
|
|
7475
7562
|
}
|
|
@@ -7499,7 +7586,7 @@
|
|
|
7499
7586
|
return isTransparent(this.backgroundColor);
|
|
7500
7587
|
}
|
|
7501
7588
|
isTransformed() {
|
|
7502
|
-
return this.transform !== null || this.rotate !== null;
|
|
7589
|
+
return this.transform !== null || this.rotate !== null || this.translate !== null || this.scale !== null;
|
|
7503
7590
|
}
|
|
7504
7591
|
isPositioned() {
|
|
7505
7592
|
return this.position !== 0;
|
|
@@ -7534,12 +7621,16 @@
|
|
|
7534
7621
|
};
|
|
7535
7622
|
};
|
|
7536
7623
|
var CSSParsedPseudoDeclaration = class {
|
|
7624
|
+
content;
|
|
7625
|
+
quotes;
|
|
7537
7626
|
constructor(context, declaration) {
|
|
7538
7627
|
this.content = parse(context, content, declaration.content);
|
|
7539
7628
|
this.quotes = parse(context, quotes, declaration.quotes);
|
|
7540
7629
|
}
|
|
7541
7630
|
};
|
|
7542
7631
|
var CSSParsedCounterDeclaration = class {
|
|
7632
|
+
counterIncrement;
|
|
7633
|
+
counterReset;
|
|
7543
7634
|
constructor(context, declaration) {
|
|
7544
7635
|
this.counterIncrement = parse(context, counterIncrement, declaration.counterIncrement);
|
|
7545
7636
|
this.counterReset = parse(context, counterReset, declaration.counterReset);
|
|
@@ -7563,6 +7654,48 @@
|
|
|
7563
7654
|
return elementType === 1 || type === elementType;
|
|
7564
7655
|
};
|
|
7565
7656
|
//#endregion
|
|
7657
|
+
//#region src/dom/adopted-styles.ts
|
|
7658
|
+
/**
|
|
7659
|
+
* Constructable stylesheet cloning (adoptedStyleSheets).
|
|
7660
|
+
*
|
|
7661
|
+
* `adoptedStyleSheets` on a Document or ShadowRoot is the standard way Lit,
|
|
7662
|
+
* React and other frameworks inject component styles, but the sheets are not
|
|
7663
|
+
* part of the node tree — cloneNode never carries them. A shadow root that
|
|
7664
|
+
* relies on adopted sheets (and whose computed styles are not inlined per
|
|
7665
|
+
* element, i.e. copyStyles is false) would otherwise lose those rules in the
|
|
7666
|
+
* clone. The rules are re-materialised as a regular <style> element, which
|
|
7667
|
+
* also cascades last like the spec treats adopted sheets.
|
|
7668
|
+
*/
|
|
7669
|
+
/**
|
|
7670
|
+
* Serialize the CSS rules of the given sheets into one stylesheet string.
|
|
7671
|
+
* Sheets that cannot be read (e.g. detached) are skipped rather than failing
|
|
7672
|
+
* the render.
|
|
7673
|
+
*/
|
|
7674
|
+
const serializeStyleSheetRules = (sheets) => {
|
|
7675
|
+
let css = "";
|
|
7676
|
+
for (const sheet of sheets) try {
|
|
7677
|
+
const rules = sheet.cssRules;
|
|
7678
|
+
for (let i = 0; i < rules.length; i++) {
|
|
7679
|
+
const rule = rules[i];
|
|
7680
|
+
if (rule && typeof rule.cssText === "string") css += rule.cssText;
|
|
7681
|
+
}
|
|
7682
|
+
} catch (e) {}
|
|
7683
|
+
return css;
|
|
7684
|
+
};
|
|
7685
|
+
/**
|
|
7686
|
+
* Build a <style> element carrying the rules of the given adopted sheets, or
|
|
7687
|
+
* null when there is nothing to clone. `styleDocument` must be the document
|
|
7688
|
+
* the clone lives in.
|
|
7689
|
+
*/
|
|
7690
|
+
const createAdoptedStylesElement = (styleDocument, sheets, nonce) => {
|
|
7691
|
+
const css = serializeStyleSheetRules(sheets);
|
|
7692
|
+
if (!css) return null;
|
|
7693
|
+
const style = styleDocument.createElement("style");
|
|
7694
|
+
style.textContent = css;
|
|
7695
|
+
if (nonce) style.nonce = nonce;
|
|
7696
|
+
return style;
|
|
7697
|
+
};
|
|
7698
|
+
//#endregion
|
|
7566
7699
|
//#region src/dom/slot-cloner.ts
|
|
7567
7700
|
/** Exported for reuse in document-cloner.ts */
|
|
7568
7701
|
const IGNORE_ATTRIBUTE = "data-html2canvas-ignore";
|
|
@@ -7571,6 +7704,9 @@
|
|
|
7571
7704
|
* Extracted from DocumentCloner to reduce file size and improve separation of concerns.
|
|
7572
7705
|
*/
|
|
7573
7706
|
var SlotCloner = class {
|
|
7707
|
+
cloneNodeFn;
|
|
7708
|
+
options;
|
|
7709
|
+
context;
|
|
7574
7710
|
constructor(cloneNodeFn, options, context) {
|
|
7575
7711
|
this.cloneNodeFn = cloneNodeFn;
|
|
7576
7712
|
this.options = options;
|
|
@@ -7649,6 +7785,7 @@
|
|
|
7649
7785
|
cloneShadowDOMChildren(shadowRoot, targetShadowRoot, copyStyles) {
|
|
7650
7786
|
for (let child = shadowRoot.firstChild; child; child = child.nextSibling) if (isElementNode(child) && isSlotElement(child)) this.cloneSlotElement(child, targetShadowRoot, copyStyles);
|
|
7651
7787
|
else this.safeAppendClonedChild(targetShadowRoot, child, copyStyles);
|
|
7788
|
+
this.appendAdoptedStyleSheets(shadowRoot, targetShadowRoot, copyStyles);
|
|
7652
7789
|
}
|
|
7653
7790
|
/**
|
|
7654
7791
|
* Clone light DOM children to the target element.
|
|
@@ -7677,6 +7814,23 @@
|
|
|
7677
7814
|
cloneShadowDOMAsLightDOM(shadowRoot, clone, copyStyles) {
|
|
7678
7815
|
for (let child = shadowRoot.firstChild; child; child = child.nextSibling) if (isElementNode(child) && isSlotElement(child)) this.cloneSlotElementAsLightDOM(child, clone, copyStyles);
|
|
7679
7816
|
else this.appendChildNode(clone, child, copyStyles);
|
|
7817
|
+
this.appendAdoptedStyleSheets(shadowRoot, clone, copyStyles);
|
|
7818
|
+
}
|
|
7819
|
+
/**
|
|
7820
|
+
* Re-materialise the shadow root's constructable stylesheets (adoptedStyleSheets)
|
|
7821
|
+
* as a <style> element in the clone — cloneNode never carries them.
|
|
7822
|
+
*
|
|
7823
|
+
* Skipped when computed styles are inlined per element (copyStyles), mirroring
|
|
7824
|
+
* how <style> elements inside shadow roots are dropped in that mode.
|
|
7825
|
+
*/
|
|
7826
|
+
appendAdoptedStyleSheets(shadowRoot, target, copyStyles) {
|
|
7827
|
+
if (copyStyles) return;
|
|
7828
|
+
const sheets = shadowRoot.adoptedStyleSheets;
|
|
7829
|
+
if (!sheets || sheets.length === 0) return;
|
|
7830
|
+
const styleDocument = "host" in target ? target.host.ownerDocument : target.ownerDocument;
|
|
7831
|
+
if (!styleDocument) return;
|
|
7832
|
+
const style = createAdoptedStylesElement(styleDocument, sheets, this.options.cspNonce);
|
|
7833
|
+
if (style) target.appendChild(style);
|
|
7680
7834
|
}
|
|
7681
7835
|
};
|
|
7682
7836
|
//#endregion
|
|
@@ -7751,10 +7905,12 @@
|
|
|
7751
7905
|
* pairing across the whole clone walk, shared with the cloner's counter state.
|
|
7752
7906
|
*/
|
|
7753
7907
|
var PseudoContentResolver = class {
|
|
7908
|
+
context;
|
|
7909
|
+
counters;
|
|
7910
|
+
quoteDepth = 0;
|
|
7754
7911
|
constructor(context, counters) {
|
|
7755
7912
|
this.context = context;
|
|
7756
7913
|
this.counters = counters;
|
|
7757
|
-
this.quoteDepth = 0;
|
|
7758
7914
|
}
|
|
7759
7915
|
resolvePseudoContent(node, clone, style, pseudoElt) {
|
|
7760
7916
|
if (!style) return;
|
|
@@ -7814,7 +7970,44 @@
|
|
|
7814
7970
|
}
|
|
7815
7971
|
};
|
|
7816
7972
|
//#endregion
|
|
7973
|
+
//#region src/core/abort-helper.ts
|
|
7974
|
+
/**
|
|
7975
|
+
* AbortSignal helper utilities.
|
|
7976
|
+
*/
|
|
7977
|
+
/**
|
|
7978
|
+
* Throw a DOMException if the given AbortSignal is already aborted.
|
|
7979
|
+
* Used at checkpoints throughout the rendering pipeline to support
|
|
7980
|
+
* cancellable renders.
|
|
7981
|
+
*
|
|
7982
|
+
* @param signal - The AbortSignal to check. If undefined or not aborted, this is a no-op.
|
|
7983
|
+
* @throws {DOMException} With name 'AbortError' if the signal has been aborted.
|
|
7984
|
+
*/
|
|
7985
|
+
const throwIfAborted = (signal) => {
|
|
7986
|
+
if (signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
7987
|
+
};
|
|
7988
|
+
//#endregion
|
|
7817
7989
|
//#region src/dom/iframe-mount.ts
|
|
7990
|
+
const trustedTypePolicies = /* @__PURE__ */ new WeakMap();
|
|
7991
|
+
/**
|
|
7992
|
+
* Resolve the Trusted Types policy used for writing the clone document.
|
|
7993
|
+
* Returns null when Trusted Types are unavailable or the policy could not be
|
|
7994
|
+
* created — document.write is not a Trusted Types sink, so the plain string
|
|
7995
|
+
* stays functional in both cases.
|
|
7996
|
+
* @internal – exported for testing only.
|
|
7997
|
+
*/
|
|
7998
|
+
const resolveTrustedTypesPolicy = (ownerWindow) => {
|
|
7999
|
+
const factory = ownerWindow && ownerWindow.trustedTypes;
|
|
8000
|
+
if (!factory) return null;
|
|
8001
|
+
if (trustedTypePolicies.has(factory)) return trustedTypePolicies.get(factory) ?? null;
|
|
8002
|
+
let policy = null;
|
|
8003
|
+
try {
|
|
8004
|
+
policy = factory.getPolicy?.("html2canvas-pro") ?? factory.createPolicy("html2canvas-pro", { createHTML: (s) => s });
|
|
8005
|
+
} catch (e) {
|
|
8006
|
+
policy = null;
|
|
8007
|
+
}
|
|
8008
|
+
trustedTypePolicies.set(factory, policy);
|
|
8009
|
+
return policy;
|
|
8010
|
+
};
|
|
7818
8011
|
const createIFrameContainer = (ownerDocument, bounds, customContainer) => {
|
|
7819
8012
|
const cloneIframeContainer = ownerDocument.createElement("iframe");
|
|
7820
8013
|
cloneIframeContainer.className = "html2canvas-container";
|
|
@@ -7847,26 +8040,45 @@
|
|
|
7847
8040
|
const imagesReady = (document) => {
|
|
7848
8041
|
return Promise.all([].slice.call(document.images, 0).map(imageReady));
|
|
7849
8042
|
};
|
|
7850
|
-
const iframeLoader = (iframe) => {
|
|
8043
|
+
const iframeLoader = (iframe, logger, signal) => {
|
|
7851
8044
|
return new Promise((resolve, reject) => {
|
|
7852
8045
|
const cloneWindow = iframe.contentWindow;
|
|
7853
8046
|
if (!cloneWindow) return reject(`No window assigned for iframe`);
|
|
7854
8047
|
const documentClone = cloneWindow.document;
|
|
8048
|
+
let interval;
|
|
8049
|
+
const watchdog = setTimeout(() => {
|
|
8050
|
+
if (interval) clearInterval(interval);
|
|
8051
|
+
reject(/* @__PURE__ */ new Error(`Cloned iframe did not fire its load event within ${IFRAME_LOAD_WATCHDOG_MS}ms`));
|
|
8052
|
+
}, IFRAME_LOAD_WATCHDOG_MS);
|
|
8053
|
+
const onAbort = () => {
|
|
8054
|
+
if (interval) clearInterval(interval);
|
|
8055
|
+
clearTimeout(watchdog);
|
|
8056
|
+
reject(new DOMException("The operation was aborted.", "AbortError"));
|
|
8057
|
+
};
|
|
7855
8058
|
cloneWindow.onload = iframe.onload = () => {
|
|
7856
8059
|
cloneWindow.onload = iframe.onload = null;
|
|
7857
|
-
const
|
|
8060
|
+
const maxAttempts = Math.ceil(CLONE_READY_TIMEOUT_MS / 50);
|
|
7858
8061
|
let attempts = 0;
|
|
7859
|
-
|
|
8062
|
+
interval = setInterval(() => {
|
|
7860
8063
|
attempts++;
|
|
7861
|
-
if (
|
|
8064
|
+
if (signal?.aborted) onAbort();
|
|
8065
|
+
else if (documentClone.body.childNodes.length > 0 && documentClone.readyState === "complete") {
|
|
7862
8066
|
clearInterval(interval);
|
|
8067
|
+
interval = void 0;
|
|
8068
|
+
clearTimeout(watchdog);
|
|
7863
8069
|
resolve(iframe);
|
|
7864
|
-
} else if (attempts >=
|
|
8070
|
+
} else if (attempts >= maxAttempts) {
|
|
7865
8071
|
clearInterval(interval);
|
|
8072
|
+
interval = void 0;
|
|
8073
|
+
logger?.warn(`Cloned iframe did not become ready within ${CLONE_READY_TIMEOUT_MS / 1e3} seconds; continuing with a possibly incomplete document`);
|
|
7866
8074
|
resolve(iframe);
|
|
7867
8075
|
}
|
|
7868
8076
|
}, 50);
|
|
7869
8077
|
};
|
|
8078
|
+
if (signal) {
|
|
8079
|
+
if (signal.aborted) onAbort();
|
|
8080
|
+
else signal.addEventListener("abort", onAbort, { once: true });
|
|
8081
|
+
}
|
|
7870
8082
|
});
|
|
7871
8083
|
};
|
|
7872
8084
|
/**
|
|
@@ -7911,14 +8123,19 @@
|
|
|
7911
8123
|
const scrollY = ownerDocument.defaultView.pageYOffset;
|
|
7912
8124
|
const cloneWindow = iframe.contentWindow;
|
|
7913
8125
|
const documentClone = cloneWindow.document;
|
|
7914
|
-
const iframeLoad = iframeLoader(iframe).then(async () => {
|
|
8126
|
+
const iframeLoad = iframeLoader(iframe, context.logger, mount.signal).then(async () => {
|
|
7915
8127
|
mount.scrolledElements.forEach(restoreNodeScroll);
|
|
7916
8128
|
if (cloneWindow) cloneWindow.scrollTo(windowSize.left, windowSize.top);
|
|
7917
8129
|
const onclone = mount.onclone;
|
|
7918
8130
|
const referenceElement = mount.clonedReferenceElement;
|
|
7919
8131
|
if (typeof referenceElement === "undefined") throw new Error(`Error finding the ${mount.referenceElementName} in the cloned document`);
|
|
8132
|
+
throwIfAborted(mount.signal);
|
|
7920
8133
|
if (documentClone.fonts && documentClone.fonts.ready) await documentClone.fonts.ready;
|
|
7921
|
-
|
|
8134
|
+
throwIfAborted(mount.signal);
|
|
8135
|
+
if (/(AppleWebKit)/g.test(navigator.userAgent)) {
|
|
8136
|
+
await imagesReady(documentClone);
|
|
8137
|
+
throwIfAborted(mount.signal);
|
|
8138
|
+
}
|
|
7922
8139
|
if (typeof onclone === "function") await Promise.resolve().then(() => onclone(documentClone, referenceElement));
|
|
7923
8140
|
cloneWindow.scrollTo(windowSize.left, windowSize.top);
|
|
7924
8141
|
if (/AppleWebKit/g.test(navigator.userAgent) && (cloneWindow.scrollY !== windowSize.top || cloneWindow.scrollX !== windowSize.left)) {
|
|
@@ -7934,12 +8151,9 @@
|
|
|
7934
8151
|
*/
|
|
7935
8152
|
const baseUri = ownerDocument.baseURI;
|
|
7936
8153
|
documentClone.open();
|
|
7937
|
-
const rawHTML = serializeDoctype(
|
|
8154
|
+
const rawHTML = serializeDoctype(ownerDocument.doctype) + "<html></html>";
|
|
7938
8155
|
try {
|
|
7939
|
-
const
|
|
7940
|
-
const trustedTypesFactory = ownerWindow && ownerWindow.trustedTypes;
|
|
7941
|
-
let policy = trustedTypesFactory?.getPolicy?.("html2canvas-pro");
|
|
7942
|
-
if (!policy && trustedTypesFactory) policy = trustedTypesFactory.createPolicy("html2canvas-pro", { createHTML: (s) => s });
|
|
8156
|
+
const policy = resolveTrustedTypesPolicy(ownerDocument.defaultView);
|
|
7943
8157
|
const html = policy ? policy.createHTML(rawHTML) : rawHTML;
|
|
7944
8158
|
documentClone.write(html);
|
|
7945
8159
|
} catch (_e) {
|
|
@@ -7986,6 +8200,15 @@
|
|
|
7986
8200
|
return null;
|
|
7987
8201
|
};
|
|
7988
8202
|
var DocumentCloner = class {
|
|
8203
|
+
context;
|
|
8204
|
+
options;
|
|
8205
|
+
scrolledElements;
|
|
8206
|
+
referenceElement;
|
|
8207
|
+
clonedReferenceElement;
|
|
8208
|
+
documentElement;
|
|
8209
|
+
counters;
|
|
8210
|
+
pseudoContents;
|
|
8211
|
+
slotCloner;
|
|
7989
8212
|
constructor(context, element, options) {
|
|
7990
8213
|
this.context = context;
|
|
7991
8214
|
this.options = options;
|
|
@@ -7995,7 +8218,8 @@
|
|
|
7995
8218
|
this.pseudoContents = new PseudoContentResolver(context, this.counters);
|
|
7996
8219
|
this.slotCloner = new SlotCloner((node, copyStyles) => this.cloneNode(node, copyStyles), {
|
|
7997
8220
|
ignoreElements: options.ignoreElements,
|
|
7998
|
-
copyStyles: options.copyStyles ?? true
|
|
8221
|
+
copyStyles: options.copyStyles ?? true,
|
|
8222
|
+
cspNonce: options.cspNonce
|
|
7999
8223
|
}, context);
|
|
8000
8224
|
if (!element.ownerDocument) throw new Error("Cloned element does not have an owner document");
|
|
8001
8225
|
if (!this.options.iframeContainer) {
|
|
@@ -8003,15 +8227,35 @@
|
|
|
8003
8227
|
if (shadowRoot) this.options.iframeContainer = shadowRoot;
|
|
8004
8228
|
}
|
|
8005
8229
|
this.documentElement = this.cloneNode(element.ownerDocument.documentElement, false);
|
|
8230
|
+
this.appendDocumentAdoptedStyles(element.ownerDocument);
|
|
8006
8231
|
}
|
|
8007
|
-
|
|
8008
|
-
|
|
8232
|
+
/**
|
|
8233
|
+
* Re-materialise the source document's constructable stylesheets
|
|
8234
|
+
* (document.adoptedStyleSheets) as a <style> at the end of the clone's
|
|
8235
|
+
* <head>: cloneNode never carries them, and they cascade after all author
|
|
8236
|
+
* sheets, which appending last approximates.
|
|
8237
|
+
*
|
|
8238
|
+
* Skipped when computed styles are inlined per element (copyStyles), like
|
|
8239
|
+
* the other stylesheet-cloning paths.
|
|
8240
|
+
*/
|
|
8241
|
+
appendDocumentAdoptedStyles(ownerDocument) {
|
|
8242
|
+
if (this.options.copyStyles) return;
|
|
8243
|
+
const sheets = ownerDocument.adoptedStyleSheets;
|
|
8244
|
+
if (!sheets || sheets.length === 0) return;
|
|
8245
|
+
const head = this.documentElement.getElementsByTagName("head").item(0);
|
|
8246
|
+
if (!head) return;
|
|
8247
|
+
const style = createAdoptedStylesElement(this.documentElement.ownerDocument ?? ownerDocument, sheets, this.options.cspNonce);
|
|
8248
|
+
if (style) head.appendChild(style);
|
|
8249
|
+
}
|
|
8250
|
+
toIFrame(ownerDocument, windowSize) {
|
|
8251
|
+
return mountCloneInIFrame(this.context, ownerDocument, windowSize, {
|
|
8009
8252
|
documentElement: this.documentElement,
|
|
8010
8253
|
clonedReferenceElement: this.clonedReferenceElement,
|
|
8011
8254
|
referenceElementName: this.referenceElement.nodeName,
|
|
8012
8255
|
scrolledElements: this.scrolledElements,
|
|
8013
8256
|
onclone: this.options.onclone,
|
|
8014
|
-
container: this.options.iframeContainer
|
|
8257
|
+
container: this.options.iframeContainer,
|
|
8258
|
+
signal: this.options.signal
|
|
8015
8259
|
});
|
|
8016
8260
|
}
|
|
8017
8261
|
createElementClone(node) {
|
|
@@ -8129,7 +8373,7 @@
|
|
|
8129
8373
|
this.slotCloner.cloneChildNodes(node, clone, copyStyles);
|
|
8130
8374
|
}
|
|
8131
8375
|
cloneNode(node, copyStyles) {
|
|
8132
|
-
if (isTextNode(node)) return document.createTextNode(node.data);
|
|
8376
|
+
if (isTextNode(node)) return (node.ownerDocument ?? document).createTextNode(node.data);
|
|
8133
8377
|
if (!node.ownerDocument) return node.cloneNode(false);
|
|
8134
8378
|
const window = node.ownerDocument.defaultView;
|
|
8135
8379
|
if (window && isElementNode(node) && (isHTMLElementNode(node) || isSVGElementNode(node))) {
|
|
@@ -8215,7 +8459,7 @@
|
|
|
8215
8459
|
*/
|
|
8216
8460
|
static normalizeElement(element, styles) {
|
|
8217
8461
|
const originalStyles = {};
|
|
8218
|
-
if (!isHTMLElementNode(element)) return originalStyles;
|
|
8462
|
+
if (!isHTMLElementNode(element) && !isSVGElementNode(element)) return originalStyles;
|
|
8219
8463
|
if (styles.animationDuration.some((duration) => duration > 0)) {
|
|
8220
8464
|
originalStyles.animationDuration = element.style.animationDuration;
|
|
8221
8465
|
element.style.animationDuration = "0s";
|
|
@@ -8224,13 +8468,25 @@
|
|
|
8224
8468
|
originalStyles.transform = element.style.transform;
|
|
8225
8469
|
element.style.transform = "translate(0, 0)";
|
|
8226
8470
|
}
|
|
8471
|
+
let needsContainingBlockFallback = false;
|
|
8227
8472
|
if (styles.rotate !== null) {
|
|
8228
8473
|
originalStyles.rotate = element.style.rotate;
|
|
8229
8474
|
element.style.rotate = "0deg";
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8475
|
+
needsContainingBlockFallback = true;
|
|
8476
|
+
}
|
|
8477
|
+
if (styles.translate !== null) {
|
|
8478
|
+
originalStyles.translate = element.style.translate;
|
|
8479
|
+
element.style.translate = "0px";
|
|
8480
|
+
needsContainingBlockFallback = true;
|
|
8481
|
+
}
|
|
8482
|
+
if (styles.scale !== null) {
|
|
8483
|
+
originalStyles.scale = element.style.scale;
|
|
8484
|
+
element.style.scale = "1";
|
|
8485
|
+
needsContainingBlockFallback = true;
|
|
8486
|
+
}
|
|
8487
|
+
if (needsContainingBlockFallback && originalStyles.transform === void 0) {
|
|
8488
|
+
originalStyles.transform = element.style.transform;
|
|
8489
|
+
element.style.transform = "translate(0, 0)";
|
|
8234
8490
|
}
|
|
8235
8491
|
return originalStyles;
|
|
8236
8492
|
}
|
|
@@ -8241,26 +8497,39 @@
|
|
|
8241
8497
|
* @param originalStyles - Original styles to restore
|
|
8242
8498
|
*/
|
|
8243
8499
|
static restoreElement(element, originalStyles) {
|
|
8244
|
-
if (!isHTMLElementNode(element)) return;
|
|
8500
|
+
if (!isHTMLElementNode(element) && !isSVGElementNode(element)) return;
|
|
8245
8501
|
if (originalStyles.animationDuration !== void 0) element.style.animationDuration = originalStyles.animationDuration;
|
|
8246
8502
|
if (originalStyles.transform !== void 0) element.style.transform = originalStyles.transform;
|
|
8247
8503
|
if (originalStyles.rotate !== void 0) element.style.rotate = originalStyles.rotate;
|
|
8504
|
+
if (originalStyles.translate !== void 0) element.style.translate = originalStyles.translate;
|
|
8505
|
+
if (originalStyles.scale !== void 0) element.style.scale = originalStyles.scale;
|
|
8248
8506
|
}
|
|
8249
8507
|
};
|
|
8250
8508
|
//#endregion
|
|
8251
8509
|
//#region src/dom/element-container.ts
|
|
8252
8510
|
var ElementContainer = class {
|
|
8511
|
+
context;
|
|
8512
|
+
styles;
|
|
8513
|
+
textNodes = [];
|
|
8514
|
+
elements = [];
|
|
8515
|
+
bounds;
|
|
8516
|
+
/**
|
|
8517
|
+
* Bounds of the <legend> child of a <fieldset>, when present. Browsers break
|
|
8518
|
+
* the fieldset's top border where the legend sits; the renderer uses these
|
|
8519
|
+
* bounds to leave a matching gap (issue #227).
|
|
8520
|
+
*/
|
|
8521
|
+
legendBounds;
|
|
8522
|
+
createsStackingContext = false;
|
|
8523
|
+
createsRealStackingContext = false;
|
|
8524
|
+
isListOwner = false;
|
|
8525
|
+
debugRender = false;
|
|
8526
|
+
originalStyles;
|
|
8527
|
+
originalElement;
|
|
8253
8528
|
constructor(context, element, options = {}) {
|
|
8254
8529
|
this.context = context;
|
|
8255
|
-
this.textNodes = [];
|
|
8256
|
-
this.elements = [];
|
|
8257
|
-
this.createsStackingContext = false;
|
|
8258
|
-
this.createsRealStackingContext = false;
|
|
8259
|
-
this.isListOwner = false;
|
|
8260
|
-
this.debugRender = false;
|
|
8261
8530
|
if (isDebugging(element, 3)) debugger;
|
|
8262
8531
|
this.styles = new CSSParsedDeclaration(context, context.config.window.getComputedStyle(element, null));
|
|
8263
|
-
if (options.normalizeDom !== false && isHTMLElementNode(element)) {
|
|
8532
|
+
if (options.normalizeDom !== false && (isHTMLElementNode(element) || isSVGElementNode(element))) {
|
|
8264
8533
|
this.originalStyles = DOMNormalizer.normalizeElement(element, this.styles);
|
|
8265
8534
|
this.originalElement = element;
|
|
8266
8535
|
}
|
|
@@ -8297,278 +8566,16 @@
|
|
|
8297
8566
|
}
|
|
8298
8567
|
};
|
|
8299
8568
|
//#endregion
|
|
8300
|
-
//#region node_modules/.pnpm/text-segmentation@1.0.3/node_modules/text-segmentation/dist/text-segmentation.es5.js
|
|
8301
|
-
var base64 = "AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAC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U1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZ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uACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAA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"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
8303
|
-
var lookup$1 = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
8304
|
-
for (var i$1 = 0; i$1 < chars$1.length; i$1++) lookup$1[chars$1.charCodeAt(i$1)] = i$1;
|
|
8305
|
-
var decode = function(base64) {
|
|
8306
|
-
var bufferLength = base64.length * .75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;
|
|
8307
|
-
if (base64[base64.length - 1] === "=") {
|
|
8308
|
-
bufferLength--;
|
|
8309
|
-
if (base64[base64.length - 2] === "=") bufferLength--;
|
|
8310
|
-
}
|
|
8311
|
-
var buffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined" && typeof Uint8Array.prototype.slice !== "undefined" ? new ArrayBuffer(bufferLength) : new Array(bufferLength);
|
|
8312
|
-
var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
|
|
8313
|
-
for (i = 0; i < len; i += 4) {
|
|
8314
|
-
encoded1 = lookup$1[base64.charCodeAt(i)];
|
|
8315
|
-
encoded2 = lookup$1[base64.charCodeAt(i + 1)];
|
|
8316
|
-
encoded3 = lookup$1[base64.charCodeAt(i + 2)];
|
|
8317
|
-
encoded4 = lookup$1[base64.charCodeAt(i + 3)];
|
|
8318
|
-
bytes[p++] = encoded1 << 2 | encoded2 >> 4;
|
|
8319
|
-
bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
|
|
8320
|
-
bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
|
|
8321
|
-
}
|
|
8322
|
-
return buffer;
|
|
8323
|
-
};
|
|
8324
|
-
var polyUint16Array = function(buffer) {
|
|
8325
|
-
var length = buffer.length;
|
|
8326
|
-
var bytes = [];
|
|
8327
|
-
for (var i = 0; i < length; i += 2) bytes.push(buffer[i + 1] << 8 | buffer[i]);
|
|
8328
|
-
return bytes;
|
|
8329
|
-
};
|
|
8330
|
-
var polyUint32Array = function(buffer) {
|
|
8331
|
-
var length = buffer.length;
|
|
8332
|
-
var bytes = [];
|
|
8333
|
-
for (var i = 0; i < length; i += 4) bytes.push(buffer[i + 3] << 24 | buffer[i + 2] << 16 | buffer[i + 1] << 8 | buffer[i]);
|
|
8334
|
-
return bytes;
|
|
8335
|
-
};
|
|
8336
|
-
/** Shift size for getting the index-2 table offset. */
|
|
8337
|
-
var UTRIE2_SHIFT_2 = 5;
|
|
8338
|
-
/** Shift size for getting the index-1 table offset. */
|
|
8339
|
-
var UTRIE2_SHIFT_1 = 11;
|
|
8340
|
-
/**
|
|
8341
|
-
* Shift size for shifting left the index array values.
|
|
8342
|
-
* Increases possible data size with 16-bit index values at the cost
|
|
8343
|
-
* of compactability.
|
|
8344
|
-
* This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
|
|
8345
|
-
*/
|
|
8346
|
-
var UTRIE2_INDEX_SHIFT = 2;
|
|
8347
|
-
/**
|
|
8348
|
-
* Difference between the two shift sizes,
|
|
8349
|
-
* for getting an index-1 offset from an index-2 offset. 6=11-5
|
|
8350
|
-
*/
|
|
8351
|
-
var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
|
|
8352
|
-
/**
|
|
8353
|
-
* The part of the index-2 table for U+D800..U+DBFF stores values for
|
|
8354
|
-
* lead surrogate code _units_ not code _points_.
|
|
8355
|
-
* Values for lead surrogate code _points_ are indexed with this portion of the table.
|
|
8356
|
-
* Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
|
|
8357
|
-
*/
|
|
8358
|
-
var UTRIE2_LSCP_INDEX_2_OFFSET = 65536 >> UTRIE2_SHIFT_2;
|
|
8359
|
-
/** Mask for getting the lower bits for the in-data-block offset. */
|
|
8360
|
-
var UTRIE2_DATA_MASK = (1 << UTRIE2_SHIFT_2) - 1;
|
|
8361
|
-
/**
|
|
8362
|
-
* The index-1 table, only used for supplementary code points, at offset 2112=0x840.
|
|
8363
|
-
* Variable length, for code points up to highStart, where the last single-value range starts.
|
|
8364
|
-
* Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
|
|
8365
|
-
* (For 0x100000 supplementary code points U+10000..U+10ffff.)
|
|
8366
|
-
*
|
|
8367
|
-
* The part of the index-2 table for supplementary code points starts
|
|
8368
|
-
* after this index-1 table.
|
|
8369
|
-
*
|
|
8370
|
-
* Both the index-1 table and the following part of the index-2 table
|
|
8371
|
-
* are omitted completely if there is only BMP data.
|
|
8372
|
-
*/
|
|
8373
|
-
var UTRIE2_INDEX_1_OFFSET = UTRIE2_LSCP_INDEX_2_OFFSET + (1024 >> UTRIE2_SHIFT_2) + 32;
|
|
8374
|
-
/**
|
|
8375
|
-
* Number of index-1 entries for the BMP. 32=0x20
|
|
8376
|
-
* This part of the index-1 table is omitted from the serialized form.
|
|
8377
|
-
*/
|
|
8378
|
-
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 65536 >> UTRIE2_SHIFT_1;
|
|
8379
|
-
/** Mask for getting the lower bits for the in-index-2-block offset. */
|
|
8380
|
-
var UTRIE2_INDEX_2_MASK = (1 << UTRIE2_SHIFT_1_2) - 1;
|
|
8381
|
-
var slice16 = function(view, start, end) {
|
|
8382
|
-
if (view.slice) return view.slice(start, end);
|
|
8383
|
-
return new Uint16Array(Array.prototype.slice.call(view, start, end));
|
|
8384
|
-
};
|
|
8385
|
-
var slice32 = function(view, start, end) {
|
|
8386
|
-
if (view.slice) return view.slice(start, end);
|
|
8387
|
-
return new Uint32Array(Array.prototype.slice.call(view, start, end));
|
|
8388
|
-
};
|
|
8389
|
-
var createTrieFromBase64 = function(base64, _byteLength) {
|
|
8390
|
-
var buffer = decode(base64);
|
|
8391
|
-
var view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);
|
|
8392
|
-
var view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);
|
|
8393
|
-
var headerLength = 24;
|
|
8394
|
-
var index = slice16(view16, headerLength / 2, view32[4] / 2);
|
|
8395
|
-
var data = view32[5] === 2 ? slice16(view16, (headerLength + view32[4]) / 2) : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));
|
|
8396
|
-
return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
|
|
8397
|
-
};
|
|
8398
|
-
var Trie = function() {
|
|
8399
|
-
function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
|
|
8400
|
-
this.initialValue = initialValue;
|
|
8401
|
-
this.errorValue = errorValue;
|
|
8402
|
-
this.highStart = highStart;
|
|
8403
|
-
this.highValueIndex = highValueIndex;
|
|
8404
|
-
this.index = index;
|
|
8405
|
-
this.data = data;
|
|
8406
|
-
}
|
|
8407
|
-
/**
|
|
8408
|
-
* Get the value for a code point as stored in the Trie.
|
|
8409
|
-
*
|
|
8410
|
-
* @param codePoint the code point
|
|
8411
|
-
* @return the value
|
|
8412
|
-
*/
|
|
8413
|
-
Trie.prototype.get = function(codePoint) {
|
|
8414
|
-
var ix;
|
|
8415
|
-
if (codePoint >= 0) {
|
|
8416
|
-
if (codePoint < 55296 || codePoint > 56319 && codePoint <= 65535) {
|
|
8417
|
-
ix = this.index[codePoint >> UTRIE2_SHIFT_2];
|
|
8418
|
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
|
8419
|
-
return this.data[ix];
|
|
8420
|
-
}
|
|
8421
|
-
if (codePoint <= 65535) {
|
|
8422
|
-
ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + (codePoint - 55296 >> UTRIE2_SHIFT_2)];
|
|
8423
|
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
|
8424
|
-
return this.data[ix];
|
|
8425
|
-
}
|
|
8426
|
-
if (codePoint < this.highStart) {
|
|
8427
|
-
ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
|
|
8428
|
-
ix = this.index[ix];
|
|
8429
|
-
ix += codePoint >> UTRIE2_SHIFT_2 & UTRIE2_INDEX_2_MASK;
|
|
8430
|
-
ix = this.index[ix];
|
|
8431
|
-
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
|
8432
|
-
return this.data[ix];
|
|
8433
|
-
}
|
|
8434
|
-
if (codePoint <= 1114111) return this.data[this.highValueIndex];
|
|
8435
|
-
}
|
|
8436
|
-
return this.errorValue;
|
|
8437
|
-
};
|
|
8438
|
-
return Trie;
|
|
8439
|
-
}();
|
|
8440
|
-
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
8441
|
-
var lookup = typeof Uint8Array === "undefined" ? [] : /* @__PURE__ */ new Uint8Array(256);
|
|
8442
|
-
for (var i = 0; i < chars.length; i++) lookup[chars.charCodeAt(i)] = i;
|
|
8443
|
-
var Prepend = 1;
|
|
8444
|
-
var CR = 2;
|
|
8445
|
-
var LF = 3;
|
|
8446
|
-
var Control = 4;
|
|
8447
|
-
var Extend = 5;
|
|
8448
|
-
var SpacingMark = 7;
|
|
8449
|
-
var L = 8;
|
|
8450
|
-
var V = 9;
|
|
8451
|
-
var T = 10;
|
|
8452
|
-
var LV = 11;
|
|
8453
|
-
var LVT = 12;
|
|
8454
|
-
var ZWJ = 13;
|
|
8455
|
-
var Extended_Pictographic = 14;
|
|
8456
|
-
var RI = 15;
|
|
8457
|
-
var toCodePoints = function(str) {
|
|
8458
|
-
var codePoints = [];
|
|
8459
|
-
var i = 0;
|
|
8460
|
-
var length = str.length;
|
|
8461
|
-
while (i < length) {
|
|
8462
|
-
var value = str.charCodeAt(i++);
|
|
8463
|
-
if (value >= 55296 && value <= 56319 && i < length) {
|
|
8464
|
-
var extra = str.charCodeAt(i++);
|
|
8465
|
-
if ((extra & 64512) === 56320) codePoints.push(((value & 1023) << 10) + (extra & 1023) + 65536);
|
|
8466
|
-
else {
|
|
8467
|
-
codePoints.push(value);
|
|
8468
|
-
i--;
|
|
8469
|
-
}
|
|
8470
|
-
} else codePoints.push(value);
|
|
8471
|
-
}
|
|
8472
|
-
return codePoints;
|
|
8473
|
-
};
|
|
8474
|
-
var fromCodePoint = function() {
|
|
8475
|
-
var codePoints = [];
|
|
8476
|
-
for (var _i = 0; _i < arguments.length; _i++) codePoints[_i] = arguments[_i];
|
|
8477
|
-
if (String.fromCodePoint) return String.fromCodePoint.apply(String, codePoints);
|
|
8478
|
-
var length = codePoints.length;
|
|
8479
|
-
if (!length) return "";
|
|
8480
|
-
var codeUnits = [];
|
|
8481
|
-
var index = -1;
|
|
8482
|
-
var result = "";
|
|
8483
|
-
while (++index < length) {
|
|
8484
|
-
var codePoint = codePoints[index];
|
|
8485
|
-
if (codePoint <= 65535) codeUnits.push(codePoint);
|
|
8486
|
-
else {
|
|
8487
|
-
codePoint -= 65536;
|
|
8488
|
-
codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
|
|
8489
|
-
}
|
|
8490
|
-
if (index + 1 === length || codeUnits.length > 16384) {
|
|
8491
|
-
result += String.fromCharCode.apply(String, codeUnits);
|
|
8492
|
-
codeUnits.length = 0;
|
|
8493
|
-
}
|
|
8494
|
-
}
|
|
8495
|
-
return result;
|
|
8496
|
-
};
|
|
8497
|
-
var UnicodeTrie = createTrieFromBase64(base64);
|
|
8498
|
-
var BREAK_NOT_ALLOWED = "×";
|
|
8499
|
-
var BREAK_ALLOWED = "÷";
|
|
8500
|
-
var codePointToClass = function(codePoint) {
|
|
8501
|
-
return UnicodeTrie.get(codePoint);
|
|
8502
|
-
};
|
|
8503
|
-
var _graphemeBreakAtIndex = function(_codePoints, classTypes, index) {
|
|
8504
|
-
var prevIndex = index - 2;
|
|
8505
|
-
var prev = classTypes[prevIndex];
|
|
8506
|
-
var current = classTypes[index - 1];
|
|
8507
|
-
var next = classTypes[index];
|
|
8508
|
-
if (current === CR && next === LF) return BREAK_NOT_ALLOWED;
|
|
8509
|
-
if (current === CR || current === LF || current === Control) return BREAK_ALLOWED;
|
|
8510
|
-
if (next === CR || next === LF || next === Control) return BREAK_ALLOWED;
|
|
8511
|
-
if (current === L && [
|
|
8512
|
-
L,
|
|
8513
|
-
V,
|
|
8514
|
-
LV,
|
|
8515
|
-
LVT
|
|
8516
|
-
].indexOf(next) !== -1) return BREAK_NOT_ALLOWED;
|
|
8517
|
-
if ((current === LV || current === V) && (next === V || next === T)) return BREAK_NOT_ALLOWED;
|
|
8518
|
-
if ((current === LVT || current === T) && next === T) return BREAK_NOT_ALLOWED;
|
|
8519
|
-
if (next === ZWJ || next === Extend) return BREAK_NOT_ALLOWED;
|
|
8520
|
-
if (next === SpacingMark) return BREAK_NOT_ALLOWED;
|
|
8521
|
-
if (current === Prepend) return BREAK_NOT_ALLOWED;
|
|
8522
|
-
if (current === ZWJ && next === Extended_Pictographic) {
|
|
8523
|
-
while (prev === Extend) prev = classTypes[--prevIndex];
|
|
8524
|
-
if (prev === Extended_Pictographic) return BREAK_NOT_ALLOWED;
|
|
8525
|
-
}
|
|
8526
|
-
if (current === RI && next === RI) {
|
|
8527
|
-
var countRI = 0;
|
|
8528
|
-
while (prev === RI) {
|
|
8529
|
-
countRI++;
|
|
8530
|
-
prev = classTypes[--prevIndex];
|
|
8531
|
-
}
|
|
8532
|
-
if (countRI % 2 === 0) return BREAK_NOT_ALLOWED;
|
|
8533
|
-
}
|
|
8534
|
-
return BREAK_ALLOWED;
|
|
8535
|
-
};
|
|
8536
|
-
var GraphemeBreaker = function(str) {
|
|
8537
|
-
var codePoints = toCodePoints(str);
|
|
8538
|
-
var length = codePoints.length;
|
|
8539
|
-
var index = 0;
|
|
8540
|
-
var lastEnd = 0;
|
|
8541
|
-
var classTypes = codePoints.map(codePointToClass);
|
|
8542
|
-
return { next: function() {
|
|
8543
|
-
if (index >= length) return {
|
|
8544
|
-
done: true,
|
|
8545
|
-
value: null
|
|
8546
|
-
};
|
|
8547
|
-
var graphemeBreak = BREAK_NOT_ALLOWED;
|
|
8548
|
-
while (index < length && (graphemeBreak = _graphemeBreakAtIndex(codePoints, classTypes, ++index)) === BREAK_NOT_ALLOWED);
|
|
8549
|
-
if (graphemeBreak !== BREAK_NOT_ALLOWED || index === length) {
|
|
8550
|
-
var value = fromCodePoint.apply(null, codePoints.slice(lastEnd, index));
|
|
8551
|
-
lastEnd = index;
|
|
8552
|
-
return {
|
|
8553
|
-
value,
|
|
8554
|
-
done: false
|
|
8555
|
-
};
|
|
8556
|
-
}
|
|
8557
|
-
return {
|
|
8558
|
-
done: true,
|
|
8559
|
-
value: null
|
|
8560
|
-
};
|
|
8561
|
-
} };
|
|
8562
|
-
};
|
|
8563
|
-
var splitGraphemes = function(str) {
|
|
8564
|
-
var breaker = GraphemeBreaker(str);
|
|
8565
|
-
var graphemes = [];
|
|
8566
|
-
var bk;
|
|
8567
|
-
while (!(bk = breaker.next()).done) if (bk.value) graphemes.push(bk.value.slice());
|
|
8568
|
-
return graphemes;
|
|
8569
|
-
};
|
|
8570
|
-
//#endregion
|
|
8571
8569
|
//#region src/core/features.ts
|
|
8570
|
+
/**
|
|
8571
|
+
* Runtime feature detection.
|
|
8572
|
+
*
|
|
8573
|
+
* Only checks that still gate real behaviour are kept: range-bounds
|
|
8574
|
+
* measurement (iOS 13 quirk), SVG drawing and CORS image support.
|
|
8575
|
+
* Dead probes (IE-era CORS XHR / XHR response-type checks) were removed —
|
|
8576
|
+
* every supported browser exposes `crossOrigin`, `responseType` and
|
|
8577
|
+
* `withCredentials`; Intl.Segmenter is used unconditionally.
|
|
8578
|
+
*/
|
|
8572
8579
|
const testRangeBounds = (document) => {
|
|
8573
8580
|
const TEST_HEIGHT = 123;
|
|
8574
8581
|
if (document.createRange) {
|
|
@@ -8587,35 +8594,7 @@
|
|
|
8587
8594
|
}
|
|
8588
8595
|
return false;
|
|
8589
8596
|
};
|
|
8590
|
-
const testIOSLineBreak = (document) => {
|
|
8591
|
-
const testElement = document.createElement("boundtest");
|
|
8592
|
-
testElement.style.width = "50px";
|
|
8593
|
-
testElement.style.display = "block";
|
|
8594
|
-
testElement.style.fontSize = "12px";
|
|
8595
|
-
testElement.style.letterSpacing = "0px";
|
|
8596
|
-
testElement.style.wordSpacing = "0px";
|
|
8597
|
-
document.body.appendChild(testElement);
|
|
8598
|
-
const range = document.createRange();
|
|
8599
|
-
testElement.innerHTML = typeof "".repeat === "function" ? "👨".repeat(10) : "";
|
|
8600
|
-
const node = testElement.firstChild;
|
|
8601
|
-
const textList = toCodePoints$1(node.data).map((i) => fromCodePoint$1(i));
|
|
8602
|
-
let offset = 0;
|
|
8603
|
-
let prev = {};
|
|
8604
|
-
const supports = textList.every((text, i) => {
|
|
8605
|
-
range.setStart(node, offset);
|
|
8606
|
-
range.setEnd(node, offset + text.length);
|
|
8607
|
-
const rect = range.getBoundingClientRect();
|
|
8608
|
-
offset += text.length;
|
|
8609
|
-
const boundAhead = rect.x > prev.x || rect.y > prev.y;
|
|
8610
|
-
prev = rect;
|
|
8611
|
-
if (i === 0) return true;
|
|
8612
|
-
return boundAhead;
|
|
8613
|
-
});
|
|
8614
|
-
document.body.removeChild(testElement);
|
|
8615
|
-
return supports;
|
|
8616
|
-
};
|
|
8617
8597
|
const testCORS = () => typeof new Image().crossOrigin !== "undefined";
|
|
8618
|
-
const testResponseType = () => typeof new XMLHttpRequest().responseType === "string";
|
|
8619
8598
|
const testSVG = (document) => {
|
|
8620
8599
|
const img = new Image();
|
|
8621
8600
|
const canvas = document.createElement("canvas");
|
|
@@ -8630,36 +8609,6 @@
|
|
|
8630
8609
|
}
|
|
8631
8610
|
return true;
|
|
8632
8611
|
};
|
|
8633
|
-
const isGreenPixel = (data) => data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
|
|
8634
|
-
const testForeignObject = (document) => {
|
|
8635
|
-
const canvas = document.createElement("canvas");
|
|
8636
|
-
const size = 100;
|
|
8637
|
-
canvas.width = size;
|
|
8638
|
-
canvas.height = size;
|
|
8639
|
-
const ctx = canvas.getContext("2d");
|
|
8640
|
-
if (!ctx) return Promise.reject(/* @__PURE__ */ new Error("Failed to get 2D rendering context"));
|
|
8641
|
-
ctx.fillStyle = "rgb(0, 255, 0)";
|
|
8642
|
-
ctx.fillRect(0, 0, size, size);
|
|
8643
|
-
const img = new Image();
|
|
8644
|
-
const greenImageSrc = canvas.toDataURL();
|
|
8645
|
-
img.src = greenImageSrc;
|
|
8646
|
-
const svg = createForeignObjectSVG(size, size, 0, 0, img);
|
|
8647
|
-
ctx.fillStyle = "red";
|
|
8648
|
-
ctx.fillRect(0, 0, size, size);
|
|
8649
|
-
return loadSerializedSVG(svg).then((img) => {
|
|
8650
|
-
ctx.drawImage(img, 0, 0);
|
|
8651
|
-
const data = ctx.getImageData(0, 0, size, size).data;
|
|
8652
|
-
ctx.fillStyle = "red";
|
|
8653
|
-
ctx.fillRect(0, 0, size, size);
|
|
8654
|
-
const node = document.createElement("div");
|
|
8655
|
-
node.style.backgroundImage = `url(${greenImageSrc})`;
|
|
8656
|
-
node.style.height = `${size}px`;
|
|
8657
|
-
return isGreenPixel(data) ? loadSerializedSVG(createForeignObjectSVG(size, size, 0, 0, node)) : Promise.reject(/* @__PURE__ */ new Error("ForeignObject rendering not supported"));
|
|
8658
|
-
}).then((img) => {
|
|
8659
|
-
ctx.drawImage(img, 0, 0);
|
|
8660
|
-
return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
|
|
8661
|
-
}).catch(() => false);
|
|
8662
|
-
};
|
|
8663
8612
|
const createForeignObjectSVG = (width, height, x, y, node) => {
|
|
8664
8613
|
const xmlns = "http://www.w3.org/2000/svg";
|
|
8665
8614
|
const svg = document.createElementNS(xmlns, "svg");
|
|
@@ -8690,52 +8639,24 @@
|
|
|
8690
8639
|
Object.defineProperty(FEATURES, "SUPPORT_RANGE_BOUNDS", { value });
|
|
8691
8640
|
return value;
|
|
8692
8641
|
},
|
|
8693
|
-
get SUPPORT_WORD_BREAKING() {
|
|
8694
|
-
"use strict";
|
|
8695
|
-
const value = FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document);
|
|
8696
|
-
Object.defineProperty(FEATURES, "SUPPORT_WORD_BREAKING", { value });
|
|
8697
|
-
return value;
|
|
8698
|
-
},
|
|
8699
8642
|
get SUPPORT_SVG_DRAWING() {
|
|
8700
8643
|
"use strict";
|
|
8701
8644
|
const value = testSVG(document);
|
|
8702
8645
|
Object.defineProperty(FEATURES, "SUPPORT_SVG_DRAWING", { value });
|
|
8703
8646
|
return value;
|
|
8704
8647
|
},
|
|
8705
|
-
get SUPPORT_FOREIGNOBJECT_DRAWING() {
|
|
8706
|
-
"use strict";
|
|
8707
|
-
const value = typeof Array.from === "function" && typeof window.fetch === "function" ? testForeignObject(document) : Promise.resolve(false);
|
|
8708
|
-
Object.defineProperty(FEATURES, "SUPPORT_FOREIGNOBJECT_DRAWING", { value });
|
|
8709
|
-
return value;
|
|
8710
|
-
},
|
|
8711
8648
|
get SUPPORT_CORS_IMAGES() {
|
|
8712
8649
|
"use strict";
|
|
8713
8650
|
const value = testCORS();
|
|
8714
8651
|
Object.defineProperty(FEATURES, "SUPPORT_CORS_IMAGES", { value });
|
|
8715
8652
|
return value;
|
|
8716
|
-
},
|
|
8717
|
-
get SUPPORT_RESPONSE_TYPE() {
|
|
8718
|
-
"use strict";
|
|
8719
|
-
const value = testResponseType();
|
|
8720
|
-
Object.defineProperty(FEATURES, "SUPPORT_RESPONSE_TYPE", { value });
|
|
8721
|
-
return value;
|
|
8722
|
-
},
|
|
8723
|
-
get SUPPORT_CORS_XHR() {
|
|
8724
|
-
"use strict";
|
|
8725
|
-
const value = "withCredentials" in new XMLHttpRequest();
|
|
8726
|
-
Object.defineProperty(FEATURES, "SUPPORT_CORS_XHR", { value });
|
|
8727
|
-
return value;
|
|
8728
|
-
},
|
|
8729
|
-
get SUPPORT_NATIVE_TEXT_SEGMENTATION() {
|
|
8730
|
-
"use strict";
|
|
8731
|
-
const value = !!(typeof Intl !== "undefined" && Intl.Segmenter);
|
|
8732
|
-
Object.defineProperty(FEATURES, "SUPPORT_NATIVE_TEXT_SEGMENTATION", { value });
|
|
8733
|
-
return value;
|
|
8734
8653
|
}
|
|
8735
8654
|
};
|
|
8736
8655
|
//#endregion
|
|
8737
8656
|
//#region src/css/layout/text.ts
|
|
8738
8657
|
var TextBounds = class {
|
|
8658
|
+
text;
|
|
8659
|
+
bounds;
|
|
8739
8660
|
constructor(text, bounds) {
|
|
8740
8661
|
this.text = text;
|
|
8741
8662
|
this.bounds = bounds;
|
|
@@ -8794,58 +8715,24 @@
|
|
|
8794
8715
|
const getSegmenter = (granularity) => {
|
|
8795
8716
|
let segmenter = segmenterCache.get(granularity);
|
|
8796
8717
|
if (!segmenter) {
|
|
8797
|
-
|
|
8798
|
-
segmenter = new Segmenter(void 0, { granularity });
|
|
8718
|
+
segmenter = new Intl.Segmenter(void 0, { granularity });
|
|
8799
8719
|
segmenterCache.set(granularity, segmenter);
|
|
8800
8720
|
}
|
|
8801
8721
|
return segmenter;
|
|
8802
8722
|
};
|
|
8803
|
-
const segmentGraphemes = (value) =>
|
|
8804
|
-
|
|
8805
|
-
return
|
|
8806
|
-
};
|
|
8807
|
-
const segmentWords = (value, styles) => {
|
|
8808
|
-
if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) return Array.from(getSegmenter("word").segment(value)).map((s) => s.segment);
|
|
8809
|
-
return breakWords(value, styles);
|
|
8723
|
+
const segmentGraphemes = (value) => Array.from(getSegmenter("grapheme").segment(value), (s) => s.segment);
|
|
8724
|
+
const segmentWords = (value) => {
|
|
8725
|
+
return Array.from(getSegmenter("word").segment(value), (s) => s.segment);
|
|
8810
8726
|
};
|
|
8811
8727
|
const breakText = (value, styles) => {
|
|
8812
8728
|
if (isVerticalWritingMode(styles.writingMode)) return segmentGraphemes(value);
|
|
8813
|
-
return styles.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value
|
|
8814
|
-
};
|
|
8815
|
-
const wordSeparators = [
|
|
8816
|
-
32,
|
|
8817
|
-
160,
|
|
8818
|
-
4961,
|
|
8819
|
-
65792,
|
|
8820
|
-
65793,
|
|
8821
|
-
4153,
|
|
8822
|
-
4241
|
|
8823
|
-
];
|
|
8824
|
-
const breakWords = (str, styles) => {
|
|
8825
|
-
const breaker = LineBreaker(str, {
|
|
8826
|
-
lineBreak: styles.lineBreak,
|
|
8827
|
-
wordBreak: styles.overflowWrap === "break-word" ? "break-word" : styles.wordBreak
|
|
8828
|
-
});
|
|
8829
|
-
const words = [];
|
|
8830
|
-
let bk;
|
|
8831
|
-
while (!(bk = breaker.next()).done) if (bk.value) {
|
|
8832
|
-
const codePoints = toCodePoints$1(bk.value.slice());
|
|
8833
|
-
let word = "";
|
|
8834
|
-
codePoints.forEach((codePoint) => {
|
|
8835
|
-
if (wordSeparators.indexOf(codePoint) === -1) word += fromCodePoint$1(codePoint);
|
|
8836
|
-
else {
|
|
8837
|
-
if (word.length) words.push(word);
|
|
8838
|
-
words.push(fromCodePoint$1(codePoint));
|
|
8839
|
-
word = "";
|
|
8840
|
-
}
|
|
8841
|
-
});
|
|
8842
|
-
if (word.length) words.push(word);
|
|
8843
|
-
}
|
|
8844
|
-
return words;
|
|
8729
|
+
return styles.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value);
|
|
8845
8730
|
};
|
|
8846
8731
|
//#endregion
|
|
8847
8732
|
//#region src/dom/text-container.ts
|
|
8848
8733
|
var TextContainer = class {
|
|
8734
|
+
text;
|
|
8735
|
+
textBounds;
|
|
8849
8736
|
constructor(context, node, styles) {
|
|
8850
8737
|
this.text = transform(node.data, styles.textTransform);
|
|
8851
8738
|
if (this.text.length !== node.data.length) node.data = this.text;
|
|
@@ -8868,8 +8755,11 @@
|
|
|
8868
8755
|
//#endregion
|
|
8869
8756
|
//#region src/dom/replaced-elements/image-element-container.ts
|
|
8870
8757
|
var ImageElementContainer = class extends ElementContainer {
|
|
8871
|
-
|
|
8872
|
-
|
|
8758
|
+
src;
|
|
8759
|
+
intrinsicWidth;
|
|
8760
|
+
intrinsicHeight;
|
|
8761
|
+
constructor(context, img, options = {}) {
|
|
8762
|
+
super(context, img, options);
|
|
8873
8763
|
this.src = img.currentSrc || img.src;
|
|
8874
8764
|
this.intrinsicWidth = img.naturalWidth;
|
|
8875
8765
|
this.intrinsicHeight = img.naturalHeight;
|
|
@@ -8879,8 +8769,11 @@
|
|
|
8879
8769
|
//#endregion
|
|
8880
8770
|
//#region src/dom/replaced-elements/canvas-element-container.ts
|
|
8881
8771
|
var CanvasElementContainer = class extends ElementContainer {
|
|
8882
|
-
|
|
8883
|
-
|
|
8772
|
+
canvas;
|
|
8773
|
+
intrinsicWidth;
|
|
8774
|
+
intrinsicHeight;
|
|
8775
|
+
constructor(context, canvas, options = {}) {
|
|
8776
|
+
super(context, canvas, options);
|
|
8884
8777
|
this.canvas = canvas;
|
|
8885
8778
|
this.intrinsicWidth = canvas.width;
|
|
8886
8779
|
this.intrinsicHeight = canvas.height;
|
|
@@ -8922,8 +8815,11 @@
|
|
|
8922
8815
|
return serialized;
|
|
8923
8816
|
};
|
|
8924
8817
|
var SVGElementContainer = class extends ElementContainer {
|
|
8925
|
-
|
|
8926
|
-
|
|
8818
|
+
svg;
|
|
8819
|
+
intrinsicWidth;
|
|
8820
|
+
intrinsicHeight;
|
|
8821
|
+
constructor(context, img, options = {}) {
|
|
8822
|
+
super(context, img, options);
|
|
8927
8823
|
const s = new XMLSerializer();
|
|
8928
8824
|
const bounds = parseBounds(context, img);
|
|
8929
8825
|
img.setAttribute("width", `${bounds.width}px`);
|
|
@@ -8937,16 +8833,19 @@
|
|
|
8937
8833
|
//#endregion
|
|
8938
8834
|
//#region src/dom/elements/li-element-container.ts
|
|
8939
8835
|
var LIElementContainer = class extends ElementContainer {
|
|
8940
|
-
|
|
8941
|
-
|
|
8836
|
+
value;
|
|
8837
|
+
constructor(context, element, options = {}) {
|
|
8838
|
+
super(context, element, options);
|
|
8942
8839
|
this.value = element.value;
|
|
8943
8840
|
}
|
|
8944
8841
|
};
|
|
8945
8842
|
//#endregion
|
|
8946
8843
|
//#region src/dom/elements/ol-element-container.ts
|
|
8947
8844
|
var OLElementContainer = class extends ElementContainer {
|
|
8948
|
-
|
|
8949
|
-
|
|
8845
|
+
start;
|
|
8846
|
+
reversed;
|
|
8847
|
+
constructor(context, element, options = {}) {
|
|
8848
|
+
super(context, element, options);
|
|
8950
8849
|
this.start = element.start;
|
|
8951
8850
|
this.reversed = typeof element.reversed === "boolean" && element.reversed === true;
|
|
8952
8851
|
}
|
|
@@ -8980,8 +8879,12 @@
|
|
|
8980
8879
|
const RADIO = "radio";
|
|
8981
8880
|
const PLACEHOLDER_COLOR = 1970632191;
|
|
8982
8881
|
var InputElementContainer = class extends ElementContainer {
|
|
8983
|
-
|
|
8984
|
-
|
|
8882
|
+
type;
|
|
8883
|
+
checked;
|
|
8884
|
+
value;
|
|
8885
|
+
isPlaceholder;
|
|
8886
|
+
constructor(context, input, options = {}) {
|
|
8887
|
+
super(context, input, options);
|
|
8985
8888
|
this.type = input.type.toLowerCase();
|
|
8986
8889
|
this.checked = input.checked;
|
|
8987
8890
|
this.value = getInputValue(input);
|
|
@@ -9006,8 +8909,9 @@
|
|
|
9006
8909
|
//#endregion
|
|
9007
8910
|
//#region src/dom/elements/select-element-container.ts
|
|
9008
8911
|
var SelectElementContainer = class extends ElementContainer {
|
|
9009
|
-
|
|
9010
|
-
|
|
8912
|
+
value;
|
|
8913
|
+
constructor(context, element, options = {}) {
|
|
8914
|
+
super(context, element, options);
|
|
9011
8915
|
const option = element.options[element.selectedIndex || 0];
|
|
9012
8916
|
this.value = option ? option.text || "" : "";
|
|
9013
8917
|
}
|
|
@@ -9015,29 +8919,42 @@
|
|
|
9015
8919
|
//#endregion
|
|
9016
8920
|
//#region src/dom/elements/textarea-element-container.ts
|
|
9017
8921
|
var TextareaElementContainer = class extends ElementContainer {
|
|
9018
|
-
|
|
9019
|
-
|
|
8922
|
+
value;
|
|
8923
|
+
constructor(context, element, options = {}) {
|
|
8924
|
+
super(context, element, options);
|
|
9020
8925
|
this.value = element.value;
|
|
9021
8926
|
}
|
|
9022
8927
|
};
|
|
9023
8928
|
//#endregion
|
|
9024
8929
|
//#region src/dom/replaced-elements/iframe-element-container.ts
|
|
9025
8930
|
var IFrameElementContainer = class extends ElementContainer {
|
|
9026
|
-
|
|
9027
|
-
|
|
8931
|
+
src;
|
|
8932
|
+
width;
|
|
8933
|
+
height;
|
|
8934
|
+
tree;
|
|
8935
|
+
backgroundColor;
|
|
8936
|
+
parseTreeFn;
|
|
8937
|
+
constructor(context, iframe, parseTreeFn, options = {}) {
|
|
8938
|
+
super(context, iframe, options);
|
|
9028
8939
|
this.src = iframe.src;
|
|
9029
8940
|
this.width = parseInt(iframe.width, 10) || 0;
|
|
9030
8941
|
this.height = parseInt(iframe.height, 10) || 0;
|
|
9031
8942
|
this.backgroundColor = this.styles.backgroundColor;
|
|
9032
8943
|
this.parseTreeFn = parseTreeFn;
|
|
9033
8944
|
try {
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
8945
|
+
const contentWindow = iframe.contentWindow;
|
|
8946
|
+
const contentDocument = contentWindow?.document;
|
|
8947
|
+
if (contentWindow && contentDocument && contentDocument.documentElement && this.parseTreeFn) {
|
|
8948
|
+
this.tree = this.parseTreeFn(context, contentDocument.documentElement);
|
|
8949
|
+
const documentBackgroundColor = parseColor(context, contentWindow.getComputedStyle(contentDocument.documentElement).backgroundColor);
|
|
8950
|
+
const bodyBackgroundColor = contentDocument.body ? parseColor(context, contentWindow.getComputedStyle(contentDocument.body).backgroundColor) : 0;
|
|
9038
8951
|
this.backgroundColor = isTransparent(documentBackgroundColor) ? isTransparent(bodyBackgroundColor) ? this.styles.backgroundColor : bodyBackgroundColor : documentBackgroundColor;
|
|
9039
8952
|
}
|
|
9040
|
-
} catch (e) {
|
|
8953
|
+
} catch (e) {
|
|
8954
|
+
const error = e instanceof Error ? e : new Error(String(e));
|
|
8955
|
+
this.context.logger.warn(`Unable to render iframe content${this.src ? ` from ${this.src}` : ""}: ${error.message}`);
|
|
8956
|
+
this.context.onError?.(error);
|
|
8957
|
+
}
|
|
9041
8958
|
}
|
|
9042
8959
|
};
|
|
9043
8960
|
//#endregion
|
|
@@ -9047,10 +8964,10 @@
|
|
|
9047
8964
|
"UL",
|
|
9048
8965
|
"MENU"
|
|
9049
8966
|
];
|
|
9050
|
-
const parseNodeTree = (context, node, parent, root, zoomScale = 1) => {
|
|
8967
|
+
const parseNodeTree = (context, node, parent, root, zoomScale = 1, options = {}) => {
|
|
9051
8968
|
for (let childNode = node.firstChild, nextNode; childNode; childNode = nextNode) {
|
|
9052
8969
|
nextNode = childNode.nextSibling;
|
|
9053
|
-
parseChildNode(context, childNode, parent, root, zoomScale);
|
|
8970
|
+
parseChildNode(context, childNode, parent, root, zoomScale, options);
|
|
9054
8971
|
}
|
|
9055
8972
|
};
|
|
9056
8973
|
/**
|
|
@@ -9061,7 +8978,7 @@
|
|
|
9061
8978
|
* this, slotted shadow-DOM content such as web component labels was silently
|
|
9062
8979
|
* dropped because `parseNodeTree` only iterates `node.firstChild` (issue #226).
|
|
9063
8980
|
*/
|
|
9064
|
-
const parseChildNode = (context, childNode, parent, root, zoomScale = 1) => {
|
|
8981
|
+
const parseChildNode = (context, childNode, parent, root, zoomScale = 1, options = {}) => {
|
|
9065
8982
|
if (isTextNode(childNode) && childNode.data.length > 0) {
|
|
9066
8983
|
const textContainer = new TextContainer(context, childNode, parent.styles);
|
|
9067
8984
|
if (zoomScale !== 1) {
|
|
@@ -9071,9 +8988,9 @@
|
|
|
9071
8988
|
}
|
|
9072
8989
|
parent.textNodes.push(textContainer);
|
|
9073
8990
|
} else if (isElementNode(childNode)) {
|
|
9074
|
-
if (isSlotElement(childNode) && childNode.assignedNodes) childNode.assignedNodes().forEach((assignedNode) => parseChildNode(context, assignedNode, parent, root, zoomScale));
|
|
8991
|
+
if (isSlotElement(childNode) && childNode.assignedNodes) childNode.assignedNodes().forEach((assignedNode) => parseChildNode(context, assignedNode, parent, root, zoomScale, options));
|
|
9075
8992
|
else {
|
|
9076
|
-
const container = createContainer(context, childNode);
|
|
8993
|
+
const container = createContainer(context, childNode, options);
|
|
9077
8994
|
const ownZoom = container.styles.zoom || 1;
|
|
9078
8995
|
if (ownZoom !== 1) container.bounds = new Bounds(container.bounds.left, container.bounds.top, container.bounds.width / ownZoom, container.bounds.height / ownZoom);
|
|
9079
8996
|
if (container.styles.isVisible()) {
|
|
@@ -9082,28 +8999,28 @@
|
|
|
9082
8999
|
if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) container.isListOwner = true;
|
|
9083
9000
|
parent.elements.push(container);
|
|
9084
9001
|
const childZoom = zoomScale * (container.styles.zoom || 1);
|
|
9085
|
-
if (childNode.shadowRoot) parseNodeTree(context, childNode.shadowRoot, container, root, childZoom);
|
|
9086
|
-
else if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) parseNodeTree(context, childNode, container, root, childZoom);
|
|
9002
|
+
if (childNode.shadowRoot) parseNodeTree(context, childNode.shadowRoot, container, root, childZoom, options);
|
|
9003
|
+
else if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) parseNodeTree(context, childNode, container, root, childZoom, options);
|
|
9087
9004
|
}
|
|
9088
9005
|
}
|
|
9089
9006
|
}
|
|
9090
9007
|
};
|
|
9091
|
-
const createContainer = (context, element) => {
|
|
9092
|
-
if (isImageElement(element)) return new ImageElementContainer(context, element);
|
|
9093
|
-
if (isCanvasElement(element)) return new CanvasElementContainer(context, element);
|
|
9094
|
-
if (isSVGElement(element)) return new SVGElementContainer(context, element);
|
|
9095
|
-
if (isLIElement(element)) return new LIElementContainer(context, element);
|
|
9096
|
-
if (isOLElement(element)) return new OLElementContainer(context, element);
|
|
9097
|
-
if (isInputElement(element)) return new InputElementContainer(context, element);
|
|
9098
|
-
if (isSelectElement(element)) return new SelectElementContainer(context, element);
|
|
9099
|
-
if (isTextareaElement(element)) return new TextareaElementContainer(context, element);
|
|
9100
|
-
if (isIFrameElement(element)) return new IFrameElementContainer(context, element, parseTree);
|
|
9101
|
-
return new ElementContainer(context, element);
|
|
9008
|
+
const createContainer = (context, element, options = {}) => {
|
|
9009
|
+
if (isImageElement(element)) return new ImageElementContainer(context, element, options);
|
|
9010
|
+
if (isCanvasElement(element)) return new CanvasElementContainer(context, element, options);
|
|
9011
|
+
if (isSVGElement(element)) return new SVGElementContainer(context, element, options);
|
|
9012
|
+
if (isLIElement(element)) return new LIElementContainer(context, element, options);
|
|
9013
|
+
if (isOLElement(element)) return new OLElementContainer(context, element, options);
|
|
9014
|
+
if (isInputElement(element)) return new InputElementContainer(context, element, options);
|
|
9015
|
+
if (isSelectElement(element)) return new SelectElementContainer(context, element, options);
|
|
9016
|
+
if (isTextareaElement(element)) return new TextareaElementContainer(context, element, options);
|
|
9017
|
+
if (isIFrameElement(element)) return new IFrameElementContainer(context, element, (ctx, node) => parseTree(ctx, node, options), options);
|
|
9018
|
+
return new ElementContainer(context, element, options);
|
|
9102
9019
|
};
|
|
9103
|
-
const parseTree = (context, element) => {
|
|
9104
|
-
const container = createContainer(context, element);
|
|
9020
|
+
const parseTree = (context, element, options = {}) => {
|
|
9021
|
+
const container = createContainer(context, element, options);
|
|
9105
9022
|
container.createsRealStackingContext = true;
|
|
9106
|
-
parseNodeTree(context, element, container, container);
|
|
9023
|
+
parseNodeTree(context, element, container, container, 1, options);
|
|
9107
9024
|
return container;
|
|
9108
9025
|
};
|
|
9109
9026
|
const createsRealStackingContext = (node, container, root) => {
|
|
@@ -9134,6 +9051,9 @@
|
|
|
9134
9051
|
//#endregion
|
|
9135
9052
|
//#region src/render/vector.ts
|
|
9136
9053
|
var Vector = class Vector {
|
|
9054
|
+
type;
|
|
9055
|
+
x;
|
|
9056
|
+
y;
|
|
9137
9057
|
constructor(x, y) {
|
|
9138
9058
|
this.type = 0;
|
|
9139
9059
|
this.x = x;
|
|
@@ -9149,6 +9069,11 @@
|
|
|
9149
9069
|
return new Vector(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);
|
|
9150
9070
|
};
|
|
9151
9071
|
var BezierCurve = class BezierCurve {
|
|
9072
|
+
type;
|
|
9073
|
+
start;
|
|
9074
|
+
startControl;
|
|
9075
|
+
endControl;
|
|
9076
|
+
end;
|
|
9152
9077
|
constructor(start, startControl, endControl, end) {
|
|
9153
9078
|
this.type = 1;
|
|
9154
9079
|
this.start = start;
|
|
@@ -9176,6 +9101,30 @@
|
|
|
9176
9101
|
//#endregion
|
|
9177
9102
|
//#region src/render/bound-curves.ts
|
|
9178
9103
|
var BoundCurves = class {
|
|
9104
|
+
topLeftBorderDoubleOuterBox;
|
|
9105
|
+
topRightBorderDoubleOuterBox;
|
|
9106
|
+
bottomRightBorderDoubleOuterBox;
|
|
9107
|
+
bottomLeftBorderDoubleOuterBox;
|
|
9108
|
+
topLeftBorderDoubleInnerBox;
|
|
9109
|
+
topRightBorderDoubleInnerBox;
|
|
9110
|
+
bottomRightBorderDoubleInnerBox;
|
|
9111
|
+
bottomLeftBorderDoubleInnerBox;
|
|
9112
|
+
topLeftBorderStroke;
|
|
9113
|
+
topRightBorderStroke;
|
|
9114
|
+
bottomRightBorderStroke;
|
|
9115
|
+
bottomLeftBorderStroke;
|
|
9116
|
+
topLeftBorderBox;
|
|
9117
|
+
topRightBorderBox;
|
|
9118
|
+
bottomRightBorderBox;
|
|
9119
|
+
bottomLeftBorderBox;
|
|
9120
|
+
topLeftPaddingBox;
|
|
9121
|
+
topRightPaddingBox;
|
|
9122
|
+
bottomRightPaddingBox;
|
|
9123
|
+
bottomLeftPaddingBox;
|
|
9124
|
+
topLeftContentBox;
|
|
9125
|
+
topRightContentBox;
|
|
9126
|
+
bottomRightContentBox;
|
|
9127
|
+
bottomLeftContentBox;
|
|
9179
9128
|
constructor(element) {
|
|
9180
9129
|
const styles = element.styles;
|
|
9181
9130
|
const bounds = element.bounds;
|
|
@@ -9212,15 +9161,15 @@
|
|
|
9212
9161
|
const paddingBottom = getAbsoluteValue(styles.paddingBottom, element.bounds.width);
|
|
9213
9162
|
const paddingLeft = getAbsoluteValue(styles.paddingLeft, element.bounds.width);
|
|
9214
9163
|
this.topLeftBorderDoubleOuterBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3, tlh - borderLeftWidth / 3, tlv - borderTopWidth / 3, 0) : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + borderTopWidth / 3);
|
|
9215
|
-
this.topRightBorderDoubleOuterBox =
|
|
9164
|
+
this.topRightBorderDoubleOuterBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 3, trh - borderRightWidth / 3, trv - borderTopWidth / 3, 1) : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + borderTopWidth / 3);
|
|
9216
9165
|
this.bottomRightBorderDoubleOuterBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 3, brv - borderBottomWidth / 3, 2) : new Vector(bounds.left + bounds.width - borderRightWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);
|
|
9217
9166
|
this.bottomLeftBorderDoubleOuterBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 3, bounds.top + leftHeight, blh - borderLeftWidth / 3, blv - borderBottomWidth / 3, 3) : new Vector(bounds.left + borderLeftWidth / 3, bounds.top + bounds.height - borderBottomWidth / 3);
|
|
9218
9167
|
this.topLeftBorderDoubleInnerBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth * 2 / 3, bounds.top + borderTopWidth * 2 / 3, tlh - borderLeftWidth * 2 / 3, tlv - borderTopWidth * 2 / 3, 0) : new Vector(bounds.left + borderLeftWidth * 2 / 3, bounds.top + borderTopWidth * 2 / 3);
|
|
9219
|
-
this.topRightBorderDoubleInnerBox =
|
|
9168
|
+
this.topRightBorderDoubleInnerBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth * 2 / 3, trh - borderRightWidth * 2 / 3, trv - borderTopWidth * 2 / 3, 1) : new Vector(bounds.left + bounds.width - borderRightWidth * 2 / 3, bounds.top + borderTopWidth * 2 / 3);
|
|
9220
9169
|
this.bottomRightBorderDoubleInnerBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth * 2 / 3, brv - borderBottomWidth * 2 / 3, 2) : new Vector(bounds.left + bounds.width - borderRightWidth * 2 / 3, bounds.top + bounds.height - borderBottomWidth * 2 / 3);
|
|
9221
9170
|
this.bottomLeftBorderDoubleInnerBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth * 2 / 3, bounds.top + leftHeight, blh - borderLeftWidth * 2 / 3, blv - borderBottomWidth * 2 / 3, 3) : new Vector(bounds.left + borderLeftWidth * 2 / 3, bounds.top + bounds.height - borderBottomWidth * 2 / 3);
|
|
9222
9171
|
this.topLeftBorderStroke = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2, tlh - borderLeftWidth / 2, tlv - borderTopWidth / 2, 0) : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + borderTopWidth / 2);
|
|
9223
|
-
this.topRightBorderStroke =
|
|
9172
|
+
this.topRightBorderStroke = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth / 2, trh - borderRightWidth / 2, trv - borderTopWidth / 2, 1) : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + borderTopWidth / 2);
|
|
9224
9173
|
this.bottomRightBorderStroke = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth / 2, brv - borderBottomWidth / 2, 2) : new Vector(bounds.left + bounds.width - borderRightWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);
|
|
9225
9174
|
this.bottomLeftBorderStroke = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth / 2, bounds.top + leftHeight, blh - borderLeftWidth / 2, blv - borderBottomWidth / 2, 3) : new Vector(bounds.left + borderLeftWidth / 2, bounds.top + bounds.height - borderBottomWidth / 2);
|
|
9226
9175
|
this.topLeftBorderBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, 0) : new Vector(bounds.left, bounds.top);
|
|
@@ -9277,26 +9226,32 @@
|
|
|
9277
9226
|
//#endregion
|
|
9278
9227
|
//#region src/render/effects.ts
|
|
9279
9228
|
var TransformEffect = class {
|
|
9229
|
+
offsetX;
|
|
9230
|
+
offsetY;
|
|
9231
|
+
matrix;
|
|
9232
|
+
type = 0;
|
|
9233
|
+
target = 6;
|
|
9280
9234
|
constructor(offsetX, offsetY, matrix) {
|
|
9281
9235
|
this.offsetX = offsetX;
|
|
9282
9236
|
this.offsetY = offsetY;
|
|
9283
9237
|
this.matrix = matrix;
|
|
9284
|
-
this.type = 0;
|
|
9285
|
-
this.target = 6;
|
|
9286
9238
|
}
|
|
9287
9239
|
};
|
|
9288
9240
|
var ClipEffect = class {
|
|
9241
|
+
path;
|
|
9242
|
+
target;
|
|
9243
|
+
type = 1;
|
|
9289
9244
|
constructor(path, target) {
|
|
9290
9245
|
this.path = path;
|
|
9291
9246
|
this.target = target;
|
|
9292
|
-
this.type = 1;
|
|
9293
9247
|
}
|
|
9294
9248
|
};
|
|
9295
9249
|
var OpacityEffect = class {
|
|
9250
|
+
opacity;
|
|
9251
|
+
type = 2;
|
|
9252
|
+
target = 6;
|
|
9296
9253
|
constructor(opacity) {
|
|
9297
9254
|
this.opacity = opacity;
|
|
9298
|
-
this.type = 2;
|
|
9299
|
-
this.target = 6;
|
|
9300
9255
|
}
|
|
9301
9256
|
};
|
|
9302
9257
|
/**
|
|
@@ -9306,10 +9261,11 @@
|
|
|
9306
9261
|
* the path is constructed (arc, ellipse, lineTo, Path2D, etc.).
|
|
9307
9262
|
*/
|
|
9308
9263
|
var ClipPathEffect = class {
|
|
9264
|
+
applyClip;
|
|
9265
|
+
type = 3;
|
|
9266
|
+
target = 6;
|
|
9309
9267
|
constructor(applyClip) {
|
|
9310
9268
|
this.applyClip = applyClip;
|
|
9311
|
-
this.type = 3;
|
|
9312
|
-
this.target = 6;
|
|
9313
9269
|
}
|
|
9314
9270
|
};
|
|
9315
9271
|
/**
|
|
@@ -9336,17 +9292,23 @@
|
|
|
9336
9292
|
[MIX_BLEND_MODE$1.LUMINOSITY]: "luminosity"
|
|
9337
9293
|
};
|
|
9338
9294
|
var BlendEffect = class {
|
|
9295
|
+
mixBlendMode;
|
|
9296
|
+
type = 4;
|
|
9297
|
+
target = 6;
|
|
9298
|
+
compositeOperation;
|
|
9339
9299
|
constructor(mixBlendMode) {
|
|
9340
9300
|
this.mixBlendMode = mixBlendMode;
|
|
9341
|
-
this.type = 4;
|
|
9342
|
-
this.target = 6;
|
|
9343
9301
|
this.compositeOperation = MIX_BLEND_MODE_TO_COMPOSITE[mixBlendMode];
|
|
9344
9302
|
}
|
|
9345
9303
|
};
|
|
9346
9304
|
var FilterEffect = class FilterEffect {
|
|
9305
|
+
type = 5;
|
|
9306
|
+
target = 6;
|
|
9307
|
+
/** CSS filter string with drop-shadow() stripped (safe for ctx.filter). */
|
|
9308
|
+
safeFilterString;
|
|
9309
|
+
/** Shadow params for drop-shadow(), if present and successfully parsed. */
|
|
9310
|
+
shadow;
|
|
9347
9311
|
constructor(filterString) {
|
|
9348
|
-
this.type = 5;
|
|
9349
|
-
this.target = 6;
|
|
9350
9312
|
const parsed = FilterEffect.parseDropShadow(filterString);
|
|
9351
9313
|
this.shadow = parsed.shadow;
|
|
9352
9314
|
this.safeFilterString = parsed.safeFilterString;
|
|
@@ -9472,6 +9434,14 @@
|
|
|
9472
9434
|
//#endregion
|
|
9473
9435
|
//#region src/render/stacking-context.ts
|
|
9474
9436
|
var StackingContext = class {
|
|
9437
|
+
element;
|
|
9438
|
+
negativeZIndex;
|
|
9439
|
+
zeroOrAutoZIndexOrTransformedOrOpacity;
|
|
9440
|
+
positiveZIndex;
|
|
9441
|
+
nonPositionedFloats;
|
|
9442
|
+
nonPositionedInlineLevel;
|
|
9443
|
+
inlineLevel;
|
|
9444
|
+
nonInlineLevel;
|
|
9475
9445
|
constructor(container) {
|
|
9476
9446
|
this.element = container;
|
|
9477
9447
|
this.inlineLevel = [];
|
|
@@ -9484,13 +9454,34 @@
|
|
|
9484
9454
|
}
|
|
9485
9455
|
};
|
|
9486
9456
|
var ElementPaint = class {
|
|
9457
|
+
container;
|
|
9458
|
+
parent;
|
|
9459
|
+
effects = [];
|
|
9460
|
+
curves;
|
|
9461
|
+
listValue;
|
|
9462
|
+
/** Memoised getEffects results for the plain (surfaceRoot-less) render path. */
|
|
9463
|
+
plainEffectsCache = null;
|
|
9487
9464
|
constructor(container, parent) {
|
|
9488
9465
|
this.container = container;
|
|
9489
9466
|
this.parent = parent;
|
|
9490
|
-
this.effects = [];
|
|
9491
|
-
this.plainEffectsCache = null;
|
|
9492
9467
|
this.curves = new BoundCurves(this.container);
|
|
9493
9468
|
if (this.container.styles.opacity < 1) this.effects.push(new OpacityEffect(this.container.styles.opacity));
|
|
9469
|
+
if (this.container.styles.translate !== null) {
|
|
9470
|
+
const origin = this.container.styles.transformOrigin;
|
|
9471
|
+
const offsetX = this.container.bounds.left + getAbsoluteValue(origin[0], this.container.bounds.width);
|
|
9472
|
+
const offsetY = this.container.bounds.top + getAbsoluteValue(origin[1], this.container.bounds.height);
|
|
9473
|
+
const [tx, ty] = this.container.styles.translate;
|
|
9474
|
+
const dx = getAbsoluteValue(tx, this.container.bounds.width);
|
|
9475
|
+
const dy = getAbsoluteValue(ty, this.container.bounds.height);
|
|
9476
|
+
this.effects.push(new TransformEffect(offsetX, offsetY, [
|
|
9477
|
+
1,
|
|
9478
|
+
0,
|
|
9479
|
+
0,
|
|
9480
|
+
1,
|
|
9481
|
+
dx,
|
|
9482
|
+
dy
|
|
9483
|
+
]));
|
|
9484
|
+
}
|
|
9494
9485
|
if (this.container.styles.rotate !== null) {
|
|
9495
9486
|
const origin = this.container.styles.transformOrigin;
|
|
9496
9487
|
const offsetX = this.container.bounds.left + getAbsoluteValue(origin[0], this.container.bounds.width);
|
|
@@ -9508,6 +9499,20 @@
|
|
|
9508
9499
|
];
|
|
9509
9500
|
this.effects.push(new TransformEffect(offsetX, offsetY, rotateMatrix));
|
|
9510
9501
|
}
|
|
9502
|
+
if (this.container.styles.scale !== null) {
|
|
9503
|
+
const origin = this.container.styles.transformOrigin;
|
|
9504
|
+
const offsetX = this.container.bounds.left + getAbsoluteValue(origin[0], this.container.bounds.width);
|
|
9505
|
+
const offsetY = this.container.bounds.top + getAbsoluteValue(origin[1], this.container.bounds.height);
|
|
9506
|
+
const [sx, sy] = this.container.styles.scale;
|
|
9507
|
+
this.effects.push(new TransformEffect(offsetX, offsetY, [
|
|
9508
|
+
sx,
|
|
9509
|
+
0,
|
|
9510
|
+
0,
|
|
9511
|
+
sy,
|
|
9512
|
+
0,
|
|
9513
|
+
0
|
|
9514
|
+
]));
|
|
9515
|
+
}
|
|
9511
9516
|
if (this.container.styles.transform !== null) {
|
|
9512
9517
|
const origin = this.container.styles.transformOrigin;
|
|
9513
9518
|
const offsetX = this.container.bounds.left + getAbsoluteValue(origin[0], this.container.bounds.width);
|
|
@@ -9703,8 +9708,8 @@
|
|
|
9703
9708
|
if (order < 0) {
|
|
9704
9709
|
let index = 0;
|
|
9705
9710
|
parentStack.negativeZIndex.some((current, i) => {
|
|
9706
|
-
if (order
|
|
9707
|
-
index = i;
|
|
9711
|
+
if (order >= current.element.container.styles.zIndex.order) {
|
|
9712
|
+
index = i + 1;
|
|
9708
9713
|
return false;
|
|
9709
9714
|
} else if (index > 0) return true;
|
|
9710
9715
|
return false;
|
|
@@ -9751,6 +9756,86 @@
|
|
|
9751
9756
|
return root;
|
|
9752
9757
|
};
|
|
9753
9758
|
//#endregion
|
|
9759
|
+
//#region src/render/canvas/gradient-rasterizer.ts
|
|
9760
|
+
const clampStop = (stop) => Math.min(1, Math.max(0, stop));
|
|
9761
|
+
/**
|
|
9762
|
+
* Stack the one-cycle stop list periodically across [0, 1]. Returns null for
|
|
9763
|
+
* a degenerate period (all stops clamped to one point) — CSS renders the
|
|
9764
|
+
* last colour across the whole area in that case, and callers should paint
|
|
9765
|
+
* the last colour instead of stacking.
|
|
9766
|
+
*/
|
|
9767
|
+
const stackRepeatingStops = (processed) => {
|
|
9768
|
+
const first = at(processed, 0);
|
|
9769
|
+
const last = at(processed, processed.length - 1);
|
|
9770
|
+
if (last.stop - first.stop < 1e-6) return null;
|
|
9771
|
+
const period = Math.max(last.stop - first.stop, .01);
|
|
9772
|
+
const stops = [];
|
|
9773
|
+
const cycles = Math.ceil(1 / period);
|
|
9774
|
+
for (let k = 0; k < cycles; k++) for (const s of processed) {
|
|
9775
|
+
const stop = k * period + (s.stop - first.stop);
|
|
9776
|
+
if (stop > 1) break;
|
|
9777
|
+
stops.push({
|
|
9778
|
+
stop,
|
|
9779
|
+
color: asString(s.color)
|
|
9780
|
+
});
|
|
9781
|
+
}
|
|
9782
|
+
const lastPushed = stops[stops.length - 1];
|
|
9783
|
+
if (!lastPushed || lastPushed.stop < 1) stops.push({
|
|
9784
|
+
stop: 1,
|
|
9785
|
+
color: asString(last.color)
|
|
9786
|
+
});
|
|
9787
|
+
return stops;
|
|
9788
|
+
};
|
|
9789
|
+
/** Map parsed stops to string-colour stops clamped into the canvas [0, 1] range. */
|
|
9790
|
+
const toCanvasStops = (processed) => processed.map((s) => ({
|
|
9791
|
+
stop: clampStop(s.stop),
|
|
9792
|
+
color: asString(s.color)
|
|
9793
|
+
}));
|
|
9794
|
+
/**
|
|
9795
|
+
* Rasterise a radial gradient's ending-shape ellipse to an offscreen canvas.
|
|
9796
|
+
*
|
|
9797
|
+
* The ellipse is a circle of radius rx scaled vertically by ry / rx around
|
|
9798
|
+
* the canvas centre, so the offscreen canvas is the ellipse's full 2rx × 2ry
|
|
9799
|
+
* bounding box and callers draw it at (centre - rx, centre - ry). Handles the
|
|
9800
|
+
* repeating variant by stacking stops across the [0, 1] gradient range.
|
|
9801
|
+
*/
|
|
9802
|
+
const rasterizeRadialGradient = (ownerDocument, rx, ry, stops, repeating = false) => {
|
|
9803
|
+
const processed = processColorStops(stops, rx);
|
|
9804
|
+
const last = at(processed, processed.length - 1);
|
|
9805
|
+
const lastColor = asString(last.color);
|
|
9806
|
+
const canvas = ownerDocument.createElement("canvas");
|
|
9807
|
+
canvas.width = Math.max(1, Math.ceil(rx * 2));
|
|
9808
|
+
canvas.height = Math.max(1, Math.ceil(ry * 2));
|
|
9809
|
+
const ctx = canvas.getContext("2d");
|
|
9810
|
+
if (!ctx) return null;
|
|
9811
|
+
let colorStops;
|
|
9812
|
+
if (repeating) {
|
|
9813
|
+
const stacked = stackRepeatingStops(processed);
|
|
9814
|
+
if (!stacked) {
|
|
9815
|
+
ctx.fillStyle = lastColor;
|
|
9816
|
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
|
9817
|
+
return {
|
|
9818
|
+
canvas,
|
|
9819
|
+
lastColor,
|
|
9820
|
+
rx,
|
|
9821
|
+
ry
|
|
9822
|
+
};
|
|
9823
|
+
}
|
|
9824
|
+
colorStops = stacked;
|
|
9825
|
+
} else colorStops = toCanvasStops(processed);
|
|
9826
|
+
const gradient = ctx.createRadialGradient(rx, rx, 0, rx, rx, rx);
|
|
9827
|
+
colorStops.forEach((s) => gradient.addColorStop(clampStop(s.stop), s.color));
|
|
9828
|
+
ctx.fillStyle = gradient;
|
|
9829
|
+
if (rx !== ry) ctx.scale(1, ry / rx);
|
|
9830
|
+
ctx.fillRect(0, 0, rx * 2, rx * 2);
|
|
9831
|
+
return {
|
|
9832
|
+
canvas,
|
|
9833
|
+
lastColor,
|
|
9834
|
+
rx,
|
|
9835
|
+
ry
|
|
9836
|
+
};
|
|
9837
|
+
};
|
|
9838
|
+
//#endregion
|
|
9754
9839
|
//#region src/render/box-sizing.ts
|
|
9755
9840
|
const paddingBox = (element) => {
|
|
9756
9841
|
const bounds = element.bounds;
|
|
@@ -9869,67 +9954,184 @@
|
|
|
9869
9954
|
}
|
|
9870
9955
|
};
|
|
9871
9956
|
//#endregion
|
|
9872
|
-
//#region src/core/abort-helper.ts
|
|
9873
|
-
/**
|
|
9874
|
-
* AbortSignal helper utilities.
|
|
9875
|
-
*/
|
|
9876
|
-
/**
|
|
9877
|
-
* Throw a DOMException if the given AbortSignal is already aborted.
|
|
9878
|
-
* Used at checkpoints throughout the rendering pipeline to support
|
|
9879
|
-
* cancellable renders.
|
|
9880
|
-
*
|
|
9881
|
-
* @param signal - The AbortSignal to check. If undefined or not aborted, this is a no-op.
|
|
9882
|
-
* @throws {DOMException} With name 'AbortError' if the signal has been aborted.
|
|
9883
|
-
*/
|
|
9884
|
-
const throwIfAborted = (signal) => {
|
|
9885
|
-
if (signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
9886
|
-
};
|
|
9887
|
-
//#endregion
|
|
9888
9957
|
//#region src/render/canvas/filter-surface.ts
|
|
9889
9958
|
var FilterSurfaceError = class extends Error {};
|
|
9890
9959
|
const releaseSurface = (canvas) => {
|
|
9891
9960
|
canvas.width = canvas.height = 0;
|
|
9892
9961
|
};
|
|
9893
|
-
const
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
|
|
9897
|
-
|
|
9962
|
+
const UNITLESS_NAMES = [
|
|
9963
|
+
"brightness",
|
|
9964
|
+
"contrast",
|
|
9965
|
+
"grayscale",
|
|
9966
|
+
"hue-rotate",
|
|
9967
|
+
"invert",
|
|
9968
|
+
"opacity",
|
|
9969
|
+
"saturate",
|
|
9970
|
+
"sepia"
|
|
9971
|
+
];
|
|
9972
|
+
const PARSED_FILTER_CACHE_MAX = 256;
|
|
9973
|
+
const parsedFilterCache = /* @__PURE__ */ new Map();
|
|
9974
|
+
const EMPTY_FILTER = { functions: [] };
|
|
9975
|
+
function parseFilterChain(value) {
|
|
9976
|
+
if (!value || value === "none") return EMPTY_FILTER;
|
|
9977
|
+
const cached = parsedFilterCache.get(value);
|
|
9898
9978
|
if (cached !== void 0) {
|
|
9899
|
-
|
|
9900
|
-
|
|
9979
|
+
parsedFilterCache.delete(value);
|
|
9980
|
+
parsedFilterCache.set(value, cached);
|
|
9901
9981
|
return cached;
|
|
9902
9982
|
}
|
|
9903
|
-
const parsed =
|
|
9904
|
-
if (
|
|
9905
|
-
const oldest =
|
|
9906
|
-
if (oldest !== void 0)
|
|
9983
|
+
const parsed = computeFilterChain(value);
|
|
9984
|
+
if (parsedFilterCache.size >= PARSED_FILTER_CACHE_MAX) {
|
|
9985
|
+
const oldest = parsedFilterCache.keys().next().value;
|
|
9986
|
+
if (oldest !== void 0) parsedFilterCache.delete(oldest);
|
|
9907
9987
|
}
|
|
9908
|
-
|
|
9988
|
+
parsedFilterCache.set(value, parsed);
|
|
9909
9989
|
return parsed;
|
|
9910
9990
|
}
|
|
9911
|
-
|
|
9912
|
-
const
|
|
9913
|
-
|
|
9914
|
-
|
|
9915
|
-
|
|
9916
|
-
|
|
9917
|
-
|
|
9991
|
+
const computeFilterChain = (value) => {
|
|
9992
|
+
const functions = [];
|
|
9993
|
+
let index = 0;
|
|
9994
|
+
while (index < value.length) {
|
|
9995
|
+
const char = value[index];
|
|
9996
|
+
if (char === " " || char === "\n" || char === " ") {
|
|
9997
|
+
index++;
|
|
9998
|
+
continue;
|
|
9999
|
+
}
|
|
10000
|
+
const open = value.indexOf("(", index);
|
|
10001
|
+
if (open === -1) return null;
|
|
10002
|
+
const name = value.slice(index, open).trim();
|
|
10003
|
+
if (!/^[a-zA-Z-]+$/.test(name)) return null;
|
|
10004
|
+
const bodyEnd = matchingParenthesis(value, open);
|
|
10005
|
+
if (bodyEnd === -1) return null;
|
|
10006
|
+
const fn = parseFilterFunction(name, value.slice(open + 1, bodyEnd).trim());
|
|
10007
|
+
if (!fn) return null;
|
|
10008
|
+
functions.push(fn);
|
|
10009
|
+
index = bodyEnd + 1;
|
|
10010
|
+
}
|
|
10011
|
+
return { functions };
|
|
10012
|
+
};
|
|
10013
|
+
/** Index of the ')' matching the '(' at `open`, or -1. */
|
|
10014
|
+
const matchingParenthesis = (value, open) => {
|
|
10015
|
+
let depth = 1;
|
|
10016
|
+
for (let i = open + 1; i < value.length; i++) {
|
|
10017
|
+
const char = value[i];
|
|
10018
|
+
if (char === "(") depth++;
|
|
10019
|
+
else if (char === ")") {
|
|
10020
|
+
depth--;
|
|
10021
|
+
if (depth === 0) return i;
|
|
10022
|
+
}
|
|
10023
|
+
}
|
|
10024
|
+
return -1;
|
|
10025
|
+
};
|
|
10026
|
+
const PX_LENGTH_RE = /^-?\d+(?:\.\d+)?px$/;
|
|
10027
|
+
const parseFilterFunction = (name, body) => {
|
|
10028
|
+
if (name === "blur") {
|
|
10029
|
+
if (body === "0") return {
|
|
10030
|
+
kind: "blur",
|
|
10031
|
+
value: 0
|
|
10032
|
+
};
|
|
10033
|
+
if (!PX_LENGTH_RE.test(body)) return null;
|
|
10034
|
+
const value = Number.parseFloat(body);
|
|
10035
|
+
return value < 0 ? null : {
|
|
10036
|
+
kind: "blur",
|
|
10037
|
+
value
|
|
10038
|
+
};
|
|
10039
|
+
}
|
|
10040
|
+
if (name === "drop-shadow") return parseDropShadowBody(body);
|
|
10041
|
+
if (UNITLESS_NAMES.indexOf(name) !== -1) {
|
|
10042
|
+
const unitless = name;
|
|
10043
|
+
if (unitless === "hue-rotate") {
|
|
10044
|
+
const degrees = parseAngleDegrees(body);
|
|
10045
|
+
return degrees === null ? null : {
|
|
10046
|
+
kind: "unitless",
|
|
10047
|
+
name: unitless,
|
|
10048
|
+
value: degrees
|
|
10049
|
+
};
|
|
10050
|
+
}
|
|
10051
|
+
const trimmed = body.trim();
|
|
10052
|
+
const percentage = trimmed.endsWith("%");
|
|
10053
|
+
const numeric = percentage ? trimmed.slice(0, -1) : trimmed;
|
|
10054
|
+
if (!/^-?\d+(?:\.\d+)?$/.test(numeric)) return null;
|
|
10055
|
+
return {
|
|
10056
|
+
kind: "unitless",
|
|
10057
|
+
name: unitless,
|
|
10058
|
+
value: Number.parseFloat(numeric) * (percentage ? 1 / 100 : 1)
|
|
10059
|
+
};
|
|
10060
|
+
}
|
|
10061
|
+
return null;
|
|
10062
|
+
};
|
|
10063
|
+
/** Split on whitespace outside parentheses so rgba(...) colours stay one token. */
|
|
10064
|
+
const splitTopLevel = (body) => {
|
|
10065
|
+
const parts = [];
|
|
10066
|
+
let depth = 0;
|
|
10067
|
+
let current = "";
|
|
10068
|
+
for (const char of body) {
|
|
10069
|
+
if (char === "(") depth++;
|
|
10070
|
+
else if (char === ")") depth--;
|
|
10071
|
+
if (char === " " && depth === 0) {
|
|
10072
|
+
if (current) parts.push(current);
|
|
10073
|
+
current = "";
|
|
10074
|
+
continue;
|
|
10075
|
+
}
|
|
10076
|
+
current += char;
|
|
10077
|
+
}
|
|
10078
|
+
if (current) parts.push(current);
|
|
10079
|
+
return parts;
|
|
10080
|
+
};
|
|
10081
|
+
const parseDropShadowBody = (body) => {
|
|
10082
|
+
const parts = splitTopLevel(body);
|
|
10083
|
+
const lengths = parts.filter((part) => PX_LENGTH_RE.test(part)).map((part) => Number.parseFloat(part));
|
|
10084
|
+
if (lengths.length < 2 || lengths.length > 3) return null;
|
|
10085
|
+
const colors = parts.filter((part) => !PX_LENGTH_RE.test(part));
|
|
10086
|
+
if (parts.length - colors.length !== lengths.length) return null;
|
|
9918
10087
|
return {
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
|
|
9922
|
-
|
|
9923
|
-
|
|
9924
|
-
color: effect.shadow.color
|
|
9925
|
-
} : void 0
|
|
10088
|
+
kind: "drop-shadow",
|
|
10089
|
+
x: lengths[0],
|
|
10090
|
+
y: lengths[1],
|
|
10091
|
+
blur: lengths[2] ?? 0,
|
|
10092
|
+
color: colors.join(" ") || "rgba(0, 0, 0, 0)"
|
|
9926
10093
|
};
|
|
9927
|
-
}
|
|
10094
|
+
};
|
|
10095
|
+
const parseAngleDegrees = (body) => {
|
|
10096
|
+
const trimmed = body.trim();
|
|
10097
|
+
if (trimmed === "0") return 0;
|
|
10098
|
+
const numeric = Number.parseFloat(trimmed);
|
|
10099
|
+
if (Number.isNaN(numeric)) return null;
|
|
10100
|
+
if (trimmed.endsWith("deg")) return numeric;
|
|
10101
|
+
if (trimmed.endsWith("grad")) return numeric * .9;
|
|
10102
|
+
if (trimmed.endsWith("rad")) return numeric * 180 / Math.PI;
|
|
10103
|
+
if (trimmed.endsWith("turn")) return numeric * 360;
|
|
10104
|
+
return null;
|
|
10105
|
+
};
|
|
10106
|
+
/**
|
|
10107
|
+
* Render the chain as a canvas ctx.filter string, scaling all device-space
|
|
10108
|
+
* lengths (blur radii, shadow offsets) by the capture scale. Unitless
|
|
10109
|
+
* functions and hue angles are scale-invariant.
|
|
10110
|
+
*/
|
|
10111
|
+
const nativeFilterString = (filter, scale) => filter.functions.map((fn) => {
|
|
10112
|
+
switch (fn.kind) {
|
|
10113
|
+
case "blur": return `blur(${fn.value * scale}px)`;
|
|
10114
|
+
case "drop-shadow": return `drop-shadow(${fn.x * scale}px ${fn.y * scale}px ${fn.blur * scale}px ${fn.color})`;
|
|
10115
|
+
case "unitless": return fn.name === "hue-rotate" ? `hue-rotate(${fn.value}deg)` : `${fn.name}(${fn.value})`;
|
|
10116
|
+
}
|
|
10117
|
+
}).join(" ");
|
|
10118
|
+
/**
|
|
10119
|
+
* Outset (in CSS pixels) a surface must grow so blur/shadow spillover is not
|
|
10120
|
+
* cropped. Unitless functions never spread beyond the bounds. Consecutive
|
|
10121
|
+
* blurs compound, so their radii sum.
|
|
10122
|
+
*/
|
|
9928
10123
|
function filterOutset(filter) {
|
|
9929
|
-
|
|
10124
|
+
let blurSum = 0;
|
|
10125
|
+
let maxShadowOffset = 0;
|
|
10126
|
+
for (const fn of filter.functions) if (fn.kind === "blur") blurSum += fn.value;
|
|
10127
|
+
else if (fn.kind === "drop-shadow") {
|
|
10128
|
+
blurSum += fn.blur;
|
|
10129
|
+
maxShadowOffset = Math.max(maxShadowOffset, Math.abs(fn.x), Math.abs(fn.y));
|
|
10130
|
+
}
|
|
10131
|
+
return Math.ceil(3 * blurSum + maxShadowOffset);
|
|
9930
10132
|
}
|
|
9931
10133
|
function canvasLike(source) {
|
|
9932
|
-
const canvas = document.createElement("canvas");
|
|
10134
|
+
const canvas = (source.ownerDocument ?? document).createElement("canvas");
|
|
9933
10135
|
canvas.width = source.width;
|
|
9934
10136
|
canvas.height = source.height;
|
|
9935
10137
|
return canvas;
|
|
@@ -9977,7 +10179,7 @@
|
|
|
9977
10179
|
canvasFilterSupport.set(owner, supported);
|
|
9978
10180
|
return supported;
|
|
9979
10181
|
}
|
|
9980
|
-
function tryNativeFilterSurface(source,
|
|
10182
|
+
function tryNativeFilterSurface(source, filter, opacity, scale, signal) {
|
|
9981
10183
|
let filtered;
|
|
9982
10184
|
let output;
|
|
9983
10185
|
let complete = false;
|
|
@@ -9986,11 +10188,8 @@
|
|
|
9986
10188
|
filtered = canvasLike(source);
|
|
9987
10189
|
const context = filtered.getContext("2d");
|
|
9988
10190
|
if (!context || !("filter" in context)) return null;
|
|
9989
|
-
|
|
9990
|
-
if (
|
|
9991
|
-
if (shadow) functions.push(`drop-shadow(${shadow.x * scale}px ${shadow.y * scale}px ${shadow.blur * scale}px ${shadow.color})`);
|
|
9992
|
-
context.filter = functions.join(" ");
|
|
9993
|
-
if (context.filter === "none") return null;
|
|
10191
|
+
context.filter = nativeFilterString(filter, scale);
|
|
10192
|
+
if (context.filter === "none" || context.filter === "") return null;
|
|
9994
10193
|
context.drawImage(source, 0, 0);
|
|
9995
10194
|
throwIfAborted(signal);
|
|
9996
10195
|
output = canvasLike(source);
|
|
@@ -10009,17 +10208,43 @@
|
|
|
10009
10208
|
if (output && !complete) releaseSurface(output);
|
|
10010
10209
|
}
|
|
10011
10210
|
}
|
|
10211
|
+
/**
|
|
10212
|
+
* The SVG fallback predates the ordered-chain parser and only expresses the
|
|
10213
|
+
* blur + single drop-shadow subset (at most one of each, blur before the
|
|
10214
|
+
* shadow). Chains outside that subset reject with FilterSurfaceError so the
|
|
10215
|
+
* caller keeps its legacy renderer instead of rendering a wrong filter.
|
|
10216
|
+
*/
|
|
10217
|
+
const isSvgExpressible = (filter) => {
|
|
10218
|
+
let blurs = 0;
|
|
10219
|
+
let shadows = 0;
|
|
10220
|
+
for (const fn of filter.functions) if (fn.kind === "blur") blurs++;
|
|
10221
|
+
else if (fn.kind === "drop-shadow") shadows++;
|
|
10222
|
+
else return false;
|
|
10223
|
+
if (blurs > 1 || shadows > 1) return false;
|
|
10224
|
+
if (blurs > 0 && shadows > 0) return filter.functions.findIndex((fn) => fn.kind === "blur") < filter.functions.findIndex((fn) => fn.kind === "drop-shadow");
|
|
10225
|
+
return true;
|
|
10226
|
+
};
|
|
10012
10227
|
async function renderFilterSurface(source, filter, opacity, scale, signal) {
|
|
10013
10228
|
throwIfAborted(signal);
|
|
10014
|
-
if (
|
|
10229
|
+
if (filter.functions.length > 0 && supportsNativeFilters(source.ownerDocument ?? document)) {
|
|
10015
10230
|
const output = tryNativeFilterSurface(source, filter, opacity, scale, signal);
|
|
10016
10231
|
if (output) return output;
|
|
10017
10232
|
}
|
|
10233
|
+
if (!isSvgExpressible(filter)) throw new FilterSurfaceError("Filter chain requires native canvas filters");
|
|
10018
10234
|
return renderSvgFilterSurface(source, filter, opacity, scale, signal);
|
|
10019
10235
|
}
|
|
10020
|
-
async function renderSvgFilterSurface(source,
|
|
10236
|
+
async function renderSvgFilterSurface(source, filter, opacity, scale, signal) {
|
|
10021
10237
|
throwIfAborted(signal);
|
|
10022
|
-
|
|
10238
|
+
const blur = filter.functions.find((fn) => fn.kind === "blur");
|
|
10239
|
+
const shadow = filter.functions.find((fn) => fn.kind === "drop-shadow");
|
|
10240
|
+
const blurValue = blur && blur.kind === "blur" ? blur.value : 0;
|
|
10241
|
+
const shadowValue = shadow && shadow.kind === "drop-shadow" ? {
|
|
10242
|
+
x: shadow.x,
|
|
10243
|
+
y: shadow.y,
|
|
10244
|
+
blur: shadow.blur,
|
|
10245
|
+
color: shadow.color
|
|
10246
|
+
} : void 0;
|
|
10247
|
+
if (!blurValue && !shadowValue) {
|
|
10023
10248
|
const output = canvasLike(source);
|
|
10024
10249
|
const context = output.getContext("2d");
|
|
10025
10250
|
if (!context) {
|
|
@@ -10036,8 +10261,9 @@
|
|
|
10036
10261
|
}
|
|
10037
10262
|
}
|
|
10038
10263
|
const namespace = "http://www.w3.org/2000/svg";
|
|
10264
|
+
const svgDocument = source.ownerDocument ?? document;
|
|
10039
10265
|
const element = (tag, attributes = {}) => {
|
|
10040
|
-
const node =
|
|
10266
|
+
const node = svgDocument.createElementNS(namespace, tag);
|
|
10041
10267
|
Object.entries(attributes).forEach(([key, value]) => node.setAttribute(key, String(value)));
|
|
10042
10268
|
return node;
|
|
10043
10269
|
};
|
|
@@ -10047,7 +10273,7 @@
|
|
|
10047
10273
|
viewBox: `0 0 ${source.width} ${source.height}`
|
|
10048
10274
|
});
|
|
10049
10275
|
const defs = element("defs");
|
|
10050
|
-
const
|
|
10276
|
+
const filterElement = element("filter", {
|
|
10051
10277
|
id: "composited-filter",
|
|
10052
10278
|
filterUnits: "userSpaceOnUse",
|
|
10053
10279
|
x: 0,
|
|
@@ -10056,31 +10282,31 @@
|
|
|
10056
10282
|
height: source.height,
|
|
10057
10283
|
"color-interpolation-filters": "sRGB"
|
|
10058
10284
|
});
|
|
10059
|
-
if (
|
|
10060
|
-
stdDeviation:
|
|
10285
|
+
if (blurValue) filterElement.appendChild(element("feGaussianBlur", {
|
|
10286
|
+
stdDeviation: blurValue * scale,
|
|
10061
10287
|
result: "blurred-source"
|
|
10062
10288
|
}));
|
|
10063
|
-
if (
|
|
10064
|
-
|
|
10065
|
-
in:
|
|
10066
|
-
stdDeviation:
|
|
10289
|
+
if (shadowValue) {
|
|
10290
|
+
filterElement.appendChild(element("feGaussianBlur", {
|
|
10291
|
+
in: blurValue ? "blurred-source" : "SourceAlpha",
|
|
10292
|
+
stdDeviation: shadowValue.blur * scale
|
|
10067
10293
|
}));
|
|
10068
|
-
|
|
10069
|
-
dx:
|
|
10070
|
-
dy:
|
|
10294
|
+
filterElement.appendChild(element("feOffset", {
|
|
10295
|
+
dx: shadowValue.x * scale,
|
|
10296
|
+
dy: shadowValue.y * scale,
|
|
10071
10297
|
result: "offset-shadow"
|
|
10072
10298
|
}));
|
|
10073
|
-
|
|
10074
|
-
|
|
10299
|
+
filterElement.appendChild(element("feFlood", { "flood-color": shadowValue.color }));
|
|
10300
|
+
filterElement.appendChild(element("feComposite", {
|
|
10075
10301
|
in2: "offset-shadow",
|
|
10076
10302
|
operator: "in"
|
|
10077
10303
|
}));
|
|
10078
10304
|
const merge = element("feMerge");
|
|
10079
10305
|
merge.appendChild(element("feMergeNode"));
|
|
10080
|
-
merge.appendChild(element("feMergeNode", { in:
|
|
10081
|
-
|
|
10306
|
+
merge.appendChild(element("feMergeNode", { in: blurValue ? "blurred-source" : "SourceGraphic" }));
|
|
10307
|
+
filterElement.appendChild(merge);
|
|
10082
10308
|
}
|
|
10083
|
-
defs.appendChild(
|
|
10309
|
+
defs.appendChild(filterElement);
|
|
10084
10310
|
svg.appendChild(defs);
|
|
10085
10311
|
let sourceUrl;
|
|
10086
10312
|
try {
|
|
@@ -10095,7 +10321,8 @@
|
|
|
10095
10321
|
href: sourceUrl,
|
|
10096
10322
|
filter: "url(#composited-filter)"
|
|
10097
10323
|
}));
|
|
10098
|
-
const
|
|
10324
|
+
const imageWindow = svgDocument.defaultView;
|
|
10325
|
+
const image = imageWindow?.Image ? new imageWindow.Image() : new Image();
|
|
10099
10326
|
let output;
|
|
10100
10327
|
try {
|
|
10101
10328
|
image.src = `data:image/svg+xml,${encodeURIComponent(new XMLSerializer().serializeToString(svg))}`;
|
|
@@ -10136,7 +10363,7 @@
|
|
|
10136
10363
|
for (const shadow of styles.textShadow) bounds = union(bounds, expand(ink.add(shadow.offsetX.number, shadow.offsetY.number, 0, 0), 3 * shadow.blur.number));
|
|
10137
10364
|
}
|
|
10138
10365
|
for (const child of container.elements) if (child.styles.isVisible()) bounds = union(bounds, surfaceBounds(child));
|
|
10139
|
-
const filter =
|
|
10366
|
+
const filter = parseFilterChain(styles.filter);
|
|
10140
10367
|
return expand(bounds, filter ? filterOutset(filter) : 0);
|
|
10141
10368
|
}
|
|
10142
10369
|
function cropSurface(bounds, viewport, margin, scale) {
|
|
@@ -10150,11 +10377,12 @@
|
|
|
10150
10377
|
//#endregion
|
|
10151
10378
|
//#region src/render/canvas/text/text-decoration-renderer.ts
|
|
10152
10379
|
var TextDecorationRenderer = class {
|
|
10380
|
+
ctx;
|
|
10153
10381
|
constructor(ctx) {
|
|
10154
10382
|
this.ctx = ctx;
|
|
10155
10383
|
}
|
|
10156
10384
|
render(bounds, styles) {
|
|
10157
|
-
this.ctx.fillStyle = asString(styles.textDecorationColor
|
|
10385
|
+
this.ctx.fillStyle = asString(styles.textDecorationColor ?? styles.color);
|
|
10158
10386
|
let thickness = 1;
|
|
10159
10387
|
if (typeof styles.textDecorationThickness === "number") thickness = styles.textDecorationThickness;
|
|
10160
10388
|
else if (styles.textDecorationThickness === "from-font") thickness = Math.max(1, Math.floor(styles.fontSize.number * .05));
|
|
@@ -10273,7 +10501,6 @@
|
|
|
10273
10501
|
};
|
|
10274
10502
|
//#endregion
|
|
10275
10503
|
//#region src/render/canvas/text-renderer.ts
|
|
10276
|
-
const iOSBrokenFonts = ["-apple-system", "system-ui"];
|
|
10277
10504
|
const TEXT_OVERFLOW_EPSILON = 1;
|
|
10278
10505
|
/**
|
|
10279
10506
|
* Detect CJK (Chinese, Japanese, Korean) characters in a string.
|
|
@@ -10292,29 +10519,19 @@
|
|
|
10292
10519
|
const CJK_CHAR_REGEX = /[\u2E80-\u2FFF\u3000-\u30FF\u3400-\u4DBF\u4E00-\u9FFF\uAC00-\uD7AF\uF900-\uFAFF\uFF01-\uFFEF]/;
|
|
10293
10520
|
const hasCJKCharacters = (text) => CJK_CHAR_REGEX.test(text);
|
|
10294
10521
|
/**
|
|
10295
|
-
*
|
|
10296
|
-
*
|
|
10522
|
+
* Chromium-based engines render stroked text with visibly sharper joins when
|
|
10523
|
+
* `miter` is requested, closely matching their own -webkit-text-stroke
|
|
10524
|
+
* output; other engines need `round` joins to avoid glyph spikes. No CSS or
|
|
10525
|
+
* platform API expresses this behavioural difference, so engine detection is
|
|
10526
|
+
* the only reliable signal: `navigator.userAgentData` is Chromium-only, with
|
|
10527
|
+
* the legacy `window.chrome` marker as a fallback for older webviews.
|
|
10297
10528
|
*/
|
|
10298
|
-
const
|
|
10299
|
-
if (typeof navigator === "undefined") return
|
|
10300
|
-
|
|
10301
|
-
|
|
10302
|
-
const isIPadOS = /Macintosh/.test(userAgent) && navigator.maxTouchPoints && navigator.maxTouchPoints > 1;
|
|
10303
|
-
if (!isIOS && !isIPadOS) return null;
|
|
10304
|
-
for (const pattern of [/(?:iPhone|CPU(?:\siPhone)?)\sOS\s(\d+)[\._](\d+)/, /Version\/(\d+)\.(\d+)/]) {
|
|
10305
|
-
const match = userAgent.match(pattern);
|
|
10306
|
-
if (match && match[1]) return parseInt(match[1], 10);
|
|
10307
|
-
}
|
|
10308
|
-
return null;
|
|
10309
|
-
};
|
|
10310
|
-
const fixIOSSystemFonts = (fontFamilies) => {
|
|
10311
|
-
const iosVersion = getIOSVersion();
|
|
10312
|
-
if (iosVersion !== null && iosVersion >= 15 && iosVersion < 17) return fontFamilies.map((fontFamily) => iOSBrokenFonts.indexOf(fontFamily) !== -1 ? `-apple-system, "Helvetica Neue", Arial, sans-serif` : fontFamily);
|
|
10313
|
-
return fontFamilies;
|
|
10314
|
-
};
|
|
10315
|
-
const getTextStrokeLineJoin = () => {
|
|
10316
|
-
return (typeof window !== "undefined" ? window : void 0)?.chrome ? "miter" : "round";
|
|
10529
|
+
const isChromiumEngine = () => {
|
|
10530
|
+
if (typeof navigator === "undefined") return false;
|
|
10531
|
+
if (navigator.userAgentData !== void 0) return true;
|
|
10532
|
+
return (typeof window !== "undefined" ? window : void 0)?.chrome !== void 0;
|
|
10317
10533
|
};
|
|
10534
|
+
const getTextStrokeLineJoin = () => isChromiumEngine() ? "miter" : "round";
|
|
10318
10535
|
/**
|
|
10319
10536
|
* Text Renderer
|
|
10320
10537
|
*
|
|
@@ -10322,9 +10539,23 @@
|
|
|
10322
10539
|
* Extracted from CanvasRenderer to improve code organization and maintainability.
|
|
10323
10540
|
*/
|
|
10324
10541
|
var TextRenderer = class {
|
|
10542
|
+
ctx;
|
|
10543
|
+
options;
|
|
10544
|
+
decorationRenderer;
|
|
10545
|
+
/**
|
|
10546
|
+
* Baseline ascent per font string. Consecutive text nodes overwhelmingly
|
|
10547
|
+
* share a font, and each measureBaseline call issues a canvas measureText,
|
|
10548
|
+
* so repeated fonts are memoised (bounded; cleared if the working set
|
|
10549
|
+
* exceeds the cap).
|
|
10550
|
+
*/
|
|
10551
|
+
baselineCache = /* @__PURE__ */ new Map();
|
|
10552
|
+
/**
|
|
10553
|
+
* Per-render glyph width cache. Keyed by glyph + font string,
|
|
10554
|
+
* avoids redundant `measureText` calls when letter-spacing is non-zero.
|
|
10555
|
+
* Cleared at the start of each renderTextNode call.
|
|
10556
|
+
*/
|
|
10557
|
+
glyphWidthCache = null;
|
|
10325
10558
|
constructor(deps) {
|
|
10326
|
-
this.baselineCache = /* @__PURE__ */ new Map();
|
|
10327
|
-
this.glyphWidthCache = null;
|
|
10328
10559
|
this.ctx = deps.ctx;
|
|
10329
10560
|
this.options = deps.options;
|
|
10330
10561
|
this.decorationRenderer = new TextDecorationRenderer(deps.ctx);
|
|
@@ -10517,7 +10748,7 @@
|
|
|
10517
10748
|
*/
|
|
10518
10749
|
createFontStyle(styles) {
|
|
10519
10750
|
const fontVariant = styles.fontVariant.filter((variant) => variant === "normal" || variant === "small-caps").join("");
|
|
10520
|
-
const fontFamily =
|
|
10751
|
+
const fontFamily = styles.fontFamily.join(", ");
|
|
10521
10752
|
const fontSize = isDimensionToken(styles.fontSize) ? `${styles.fontSize.number}${styles.fontSize.unit}` : `${styles.fontSize.number}px`;
|
|
10522
10753
|
return [
|
|
10523
10754
|
[
|
|
@@ -10546,7 +10777,7 @@
|
|
|
10546
10777
|
* only the first N-1 complete lines followed by an ellipsis on the Nth line.
|
|
10547
10778
|
*/
|
|
10548
10779
|
renderLineClampedText(text, styles, paintOrder, baseline, containerBounds) {
|
|
10549
|
-
const lineHeight = styles.fontSize.number
|
|
10780
|
+
const lineHeight = computeLineHeight(styles.lineHeight, styles.fontSize.number);
|
|
10550
10781
|
const lines = [];
|
|
10551
10782
|
let currentLine = [];
|
|
10552
10783
|
let currentLineTop = at(text.textBounds, 0).bounds.top;
|
|
@@ -10579,7 +10810,7 @@
|
|
|
10579
10810
|
* Returns true if ellipsis was applied (caller should skip normal rendering).
|
|
10580
10811
|
*/
|
|
10581
10812
|
renderEllipsisText(text, styles, paintOrder, baseline, containerBounds) {
|
|
10582
|
-
const lineHeight = styles.fontSize.number
|
|
10813
|
+
const lineHeight = computeLineHeight(styles.lineHeight, styles.fontSize.number);
|
|
10583
10814
|
const firstTop = at(text.textBounds, 0).bounds.top;
|
|
10584
10815
|
if (!text.textBounds.every((tb) => Math.abs(tb.bounds.top - firstTop) < lineHeight * .5)) return false;
|
|
10585
10816
|
let fullText = text.textBounds.map((tb) => tb.text).join("").replace(/\s+/g, " ").trim();
|
|
@@ -10728,6 +10959,8 @@
|
|
|
10728
10959
|
* ```
|
|
10729
10960
|
*/
|
|
10730
10961
|
var LRUMap = class {
|
|
10962
|
+
maxSize;
|
|
10963
|
+
_map;
|
|
10731
10964
|
constructor(maxSize) {
|
|
10732
10965
|
this.maxSize = maxSize;
|
|
10733
10966
|
this._map = /* @__PURE__ */ new Map();
|
|
@@ -10776,8 +11009,17 @@
|
|
|
10776
11009
|
* Extracted from CanvasRenderer to improve code organization and maintainability.
|
|
10777
11010
|
*/
|
|
10778
11011
|
var BackgroundRenderer = class {
|
|
11012
|
+
ctx;
|
|
11013
|
+
context;
|
|
11014
|
+
canvas;
|
|
11015
|
+
/**
|
|
11016
|
+
* Instance-level LRU cache for background-image patterns.
|
|
11017
|
+
* CanvasPatterns are tied to the rendering context and must not be
|
|
11018
|
+
* shared across different render passes. This cache lives for the
|
|
11019
|
+
* duration of one html2canvas() call.
|
|
11020
|
+
*/
|
|
11021
|
+
patternCache = new LRUMap(50);
|
|
10779
11022
|
constructor(deps) {
|
|
10780
|
-
this.patternCache = new LRUMap(50);
|
|
10781
11023
|
this.ctx = deps.ctx;
|
|
10782
11024
|
this.context = deps.context;
|
|
10783
11025
|
this.canvas = deps.canvas;
|
|
@@ -10824,7 +11066,6 @@
|
|
|
10824
11066
|
image = await this.context.cache.match(url);
|
|
10825
11067
|
} catch (e) {
|
|
10826
11068
|
this.context.logger.error(`Error loading background-image ${url}`);
|
|
10827
|
-
this.context.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
10828
11069
|
}
|
|
10829
11070
|
if (image) {
|
|
10830
11071
|
const imageWidth = isNaN(image.width) || image.width === 0 ? 1 : image.width;
|
|
@@ -10863,34 +11104,13 @@
|
|
|
10863
11104
|
const gy0 = y + ly0;
|
|
10864
11105
|
const gy1 = y + ly1;
|
|
10865
11106
|
const processedStops = processColorStops(backgroundImage.stops, lineLength || 1);
|
|
10866
|
-
const
|
|
10867
|
-
const firstStop = at(processedStops, 0);
|
|
10868
|
-
const period = Math.max(lastStop.stop - firstStop.stop, .01);
|
|
10869
|
-
if (lastStop.stop - firstStop.stop < 1e-6) {
|
|
10870
|
-
const gradient = this.ctx.createLinearGradient(gx0, gy0, gx1, gy1);
|
|
10871
|
-
gradient.addColorStop(0, asString(lastStop.color));
|
|
10872
|
-
gradient.addColorStop(1, asString(lastStop.color));
|
|
10873
|
-
this.path(path);
|
|
10874
|
-
this.ctx.fillStyle = gradient;
|
|
10875
|
-
this.ctx.fill();
|
|
10876
|
-
return;
|
|
10877
|
-
}
|
|
10878
|
-
const stops = [];
|
|
10879
|
-
const cycles = Math.ceil(1 / period);
|
|
10880
|
-
for (let k = 0; k < cycles; k++) for (const s of processedStops) {
|
|
10881
|
-
const stop = k * period + (s.stop - firstStop.stop);
|
|
10882
|
-
if (stop > 1) break;
|
|
10883
|
-
stops.push({
|
|
10884
|
-
stop,
|
|
10885
|
-
color: asString(s.color)
|
|
10886
|
-
});
|
|
10887
|
-
}
|
|
10888
|
-
stops.push({
|
|
10889
|
-
stop: 1,
|
|
10890
|
-
color: asString(lastStop.color)
|
|
10891
|
-
});
|
|
11107
|
+
const stacked = stackRepeatingStops(processedStops);
|
|
10892
11108
|
const gradient = this.ctx.createLinearGradient(gx0, gy0, gx1, gy1);
|
|
10893
|
-
|
|
11109
|
+
if (!stacked) {
|
|
11110
|
+
const lastColor = asString(at(processedStops, processedStops.length - 1).color);
|
|
11111
|
+
gradient.addColorStop(0, lastColor);
|
|
11112
|
+
gradient.addColorStop(1, lastColor);
|
|
11113
|
+
} else stacked.forEach((s) => gradient.addColorStop(Math.min(1, Math.max(0, s.stop)), s.color));
|
|
10894
11114
|
this.path(path);
|
|
10895
11115
|
this.ctx.fillStyle = gradient;
|
|
10896
11116
|
this.ctx.fill();
|
|
@@ -10943,37 +11163,25 @@
|
|
|
10943
11163
|
}
|
|
10944
11164
|
if (rx > 0 && ry > 0) {
|
|
10945
11165
|
const cacheKey = `rg|${Math.round(x)}x${Math.round(y)}|${Math.round(rx)}x${Math.round(ry)}|${JSON.stringify(backgroundImage.stops)}`;
|
|
10946
|
-
const
|
|
10947
|
-
const
|
|
11166
|
+
const processed = processColorStops(backgroundImage.stops, rx);
|
|
11167
|
+
const lastColor = asString(at(processed, processed.length - 1).color);
|
|
10948
11168
|
let pattern = this.patternCache.get(cacheKey);
|
|
10949
11169
|
if (!pattern) {
|
|
10950
|
-
const
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10955
|
-
const gradient = offCtx.createRadialGradient(rx, rx, 0, rx, rx, rx);
|
|
10956
|
-
stops.forEach((s) => gradient.addColorStop(s.stop, asString(s.color)));
|
|
10957
|
-
offCtx.fillStyle = gradient;
|
|
10958
|
-
if (rx !== ry) offCtx.scale(1, ry / rx);
|
|
10959
|
-
offCtx.fillRect(0, 0, rx * 2, rx * 2);
|
|
10960
|
-
pattern = this.ctx.createPattern(offscreen, "no-repeat");
|
|
10961
|
-
this.patternCache.set(cacheKey, pattern);
|
|
10962
|
-
}
|
|
10963
|
-
}
|
|
10964
|
-
if (pattern) {
|
|
10965
|
-
this.path(path);
|
|
10966
|
-
this.ctx.save();
|
|
10967
|
-
this.ctx.clip();
|
|
10968
|
-
if (lastStop) {
|
|
10969
|
-
this.ctx.fillStyle = asString(lastStop.color);
|
|
10970
|
-
this.ctx.fill();
|
|
10971
|
-
}
|
|
10972
|
-
this.ctx.translate(left + x - rx, top + y - ry);
|
|
10973
|
-
this.ctx.fillStyle = pattern;
|
|
10974
|
-
this.ctx.fillRect(0, 0, rx * 2, ry * 2);
|
|
10975
|
-
this.ctx.restore();
|
|
11170
|
+
const ownerDocument = this.canvas.ownerDocument ?? document;
|
|
11171
|
+
const rasterized = rasterizeRadialGradient(ownerDocument, rx, ry, backgroundImage.stops, false);
|
|
11172
|
+
if (!rasterized) return;
|
|
11173
|
+
pattern = this.ctx.createPattern(rasterized.canvas, "no-repeat");
|
|
11174
|
+
this.patternCache.set(cacheKey, pattern);
|
|
10976
11175
|
}
|
|
11176
|
+
this.path(path);
|
|
11177
|
+
this.ctx.save();
|
|
11178
|
+
this.ctx.clip();
|
|
11179
|
+
this.ctx.fillStyle = lastColor;
|
|
11180
|
+
this.ctx.fill();
|
|
11181
|
+
this.ctx.translate(left + x - rx, top + y - ry);
|
|
11182
|
+
this.ctx.fillStyle = pattern;
|
|
11183
|
+
this.ctx.fillRect(0, 0, rx * 2, ry * 2);
|
|
11184
|
+
this.ctx.restore();
|
|
10977
11185
|
}
|
|
10978
11186
|
}
|
|
10979
11187
|
/**
|
|
@@ -11000,40 +11208,14 @@
|
|
|
11000
11208
|
ry = Math.max(ry, .01);
|
|
11001
11209
|
}
|
|
11002
11210
|
if (!(rx > 0 && ry > 0)) return;
|
|
11003
|
-
const
|
|
11004
|
-
const firstStop = at(processed, 0);
|
|
11005
|
-
const lastStop = at(processed, processed.length - 1);
|
|
11006
|
-
const period = Math.max(lastStop.stop - firstStop.stop, .01);
|
|
11007
|
-
const stops = [];
|
|
11008
|
-
const rings = Math.ceil(1 / period);
|
|
11009
|
-
for (let k = 0; k < rings; k++) for (const s of processed) {
|
|
11010
|
-
const stop = k * period + (s.stop - firstStop.stop);
|
|
11011
|
-
if (stop > 1) break;
|
|
11012
|
-
stops.push({
|
|
11013
|
-
stop,
|
|
11014
|
-
color: asString(s.color)
|
|
11015
|
-
});
|
|
11016
|
-
}
|
|
11017
|
-
stops.push({
|
|
11018
|
-
stop: 1,
|
|
11019
|
-
color: asString(lastStop.color)
|
|
11020
|
-
});
|
|
11021
|
-
const cacheKey = `rrg|${Math.round(x)}x${Math.round(y)}|${Math.round(rx)}x${Math.round(ry)}|${stops.length}|${JSON.stringify(backgroundImage.stops)}`;
|
|
11211
|
+
const cacheKey = `rrg|${Math.round(x)}x${Math.round(y)}|${Math.round(rx)}x${Math.round(ry)}|${JSON.stringify(backgroundImage.stops)}`;
|
|
11022
11212
|
let pattern = this.patternCache.get(cacheKey);
|
|
11023
11213
|
if (!pattern) {
|
|
11024
|
-
const
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
|
|
11029
|
-
const gradient = offCtx.createRadialGradient(rx, rx, 0, rx, rx, rx);
|
|
11030
|
-
stops.forEach((s) => gradient.addColorStop(s.stop, s.color));
|
|
11031
|
-
offCtx.fillStyle = gradient;
|
|
11032
|
-
if (rx !== ry) offCtx.scale(1, ry / rx);
|
|
11033
|
-
offCtx.fillRect(0, 0, rx * 2, ry * 2);
|
|
11034
|
-
pattern = this.ctx.createPattern(offscreen, "no-repeat");
|
|
11035
|
-
this.patternCache.set(cacheKey, pattern);
|
|
11036
|
-
}
|
|
11214
|
+
const ownerDocument = this.canvas.ownerDocument ?? document;
|
|
11215
|
+
const rasterized = rasterizeRadialGradient(ownerDocument, rx, ry, backgroundImage.stops, true);
|
|
11216
|
+
if (!rasterized) return;
|
|
11217
|
+
pattern = this.ctx.createPattern(rasterized.canvas, "no-repeat");
|
|
11218
|
+
this.patternCache.set(cacheKey, pattern);
|
|
11037
11219
|
}
|
|
11038
11220
|
if (pattern) {
|
|
11039
11221
|
this.path(path);
|
|
@@ -11245,6 +11427,8 @@
|
|
|
11245
11427
|
* Extracted from CanvasRenderer to improve code organization and maintainability.
|
|
11246
11428
|
*/
|
|
11247
11429
|
var BorderRenderer = class {
|
|
11430
|
+
ctx;
|
|
11431
|
+
pathCallbacks;
|
|
11248
11432
|
constructor(deps, pathCallbacks) {
|
|
11249
11433
|
this.ctx = deps.ctx;
|
|
11250
11434
|
this.pathCallbacks = pathCallbacks;
|
|
@@ -11421,6 +11605,7 @@
|
|
|
11421
11605
|
};
|
|
11422
11606
|
};
|
|
11423
11607
|
var BorderImageRenderer = class {
|
|
11608
|
+
ctx;
|
|
11424
11609
|
constructor(ctx) {
|
|
11425
11610
|
this.ctx = ctx;
|
|
11426
11611
|
}
|
|
@@ -11458,7 +11643,8 @@
|
|
|
11458
11643
|
dy: top,
|
|
11459
11644
|
dw: width - dL - dR,
|
|
11460
11645
|
dh: dT,
|
|
11461
|
-
repeat: repeat.horizontal
|
|
11646
|
+
repeat: repeat.horizontal,
|
|
11647
|
+
horizontal: true
|
|
11462
11648
|
},
|
|
11463
11649
|
{
|
|
11464
11650
|
sx: imgW - sR,
|
|
@@ -11469,7 +11655,8 @@
|
|
|
11469
11655
|
dy: top + dT,
|
|
11470
11656
|
dw: dR,
|
|
11471
11657
|
dh: height - dT - dB,
|
|
11472
|
-
repeat: repeat.vertical
|
|
11658
|
+
repeat: repeat.vertical,
|
|
11659
|
+
horizontal: false
|
|
11473
11660
|
},
|
|
11474
11661
|
{
|
|
11475
11662
|
sx: sL,
|
|
@@ -11480,7 +11667,8 @@
|
|
|
11480
11667
|
dy: top + height - dB,
|
|
11481
11668
|
dw: width - dL - dR,
|
|
11482
11669
|
dh: dB,
|
|
11483
|
-
repeat: repeat.horizontal
|
|
11670
|
+
repeat: repeat.horizontal,
|
|
11671
|
+
horizontal: true
|
|
11484
11672
|
},
|
|
11485
11673
|
{
|
|
11486
11674
|
sx: 0,
|
|
@@ -11491,33 +11679,33 @@
|
|
|
11491
11679
|
dy: top + dT,
|
|
11492
11680
|
dw: dL,
|
|
11493
11681
|
dh: height - dT - dB,
|
|
11494
|
-
repeat: repeat.vertical
|
|
11682
|
+
repeat: repeat.vertical,
|
|
11683
|
+
horizontal: false
|
|
11495
11684
|
}
|
|
11496
11685
|
];
|
|
11497
11686
|
for (const edge of edges) {
|
|
11498
11687
|
if (edge.sw <= 0 || edge.sh <= 0 || edge.dw <= 0 || edge.dh <= 0) continue;
|
|
11499
|
-
const isHorizontal = edge.dw >= edge.dh;
|
|
11500
11688
|
if (edge.repeat === 0) this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx, edge.dy, edge.dw, edge.dh);
|
|
11501
|
-
else if (edge.repeat === 1 || edge.repeat === 2) this.drawRepeatedEdge(image, edge,
|
|
11502
|
-
}
|
|
11503
|
-
if (slice.fill) {
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
}
|
|
11689
|
+
else if (edge.repeat === 1 || edge.repeat === 2) this.drawRepeatedEdge(image, edge, edge.horizontal, edge.repeat === 2);
|
|
11690
|
+
}
|
|
11691
|
+
if (slice.fill) this.drawCenterRegion(image, {
|
|
11692
|
+
sx: sL,
|
|
11693
|
+
sy: sT,
|
|
11694
|
+
sw: imgW - sL - sR,
|
|
11695
|
+
sh: imgH - sT - sB
|
|
11696
|
+
}, {
|
|
11697
|
+
dx: left + dL,
|
|
11698
|
+
dy: top + dT,
|
|
11699
|
+
dw: width - dL - dR,
|
|
11700
|
+
dh: height - dT - dB
|
|
11701
|
+
}, repeat);
|
|
11514
11702
|
}
|
|
11515
11703
|
drawRegion(image, sx, sy, sw, sh, dx, dy, dw, dh) {
|
|
11516
11704
|
if (sw > 0 && sh > 0 && dw > 0 && dh > 0) this.ctx.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh);
|
|
11517
11705
|
}
|
|
11518
|
-
drawRepeatedEdge(image, edge,
|
|
11519
|
-
const srcLength =
|
|
11520
|
-
const tgLength =
|
|
11706
|
+
drawRepeatedEdge(image, edge, horizontal, round) {
|
|
11707
|
+
const srcLength = horizontal ? edge.sw : edge.sh;
|
|
11708
|
+
const tgLength = horizontal ? edge.dw : edge.dh;
|
|
11521
11709
|
if (srcLength <= 0 || tgLength <= 0) return;
|
|
11522
11710
|
let tileSize;
|
|
11523
11711
|
let tileCount;
|
|
@@ -11534,14 +11722,45 @@
|
|
|
11534
11722
|
this.ctx.clip();
|
|
11535
11723
|
for (let i = 0; i < tileCount; i++) {
|
|
11536
11724
|
const offset = i * tileSize;
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
if (clampedSize <= 0) break;
|
|
11540
|
-
if (isHorizontal) this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx + offset, edge.dy, clampedSize, edge.dh);
|
|
11541
|
-
else this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx, edge.dy + offset, edge.dw, clampedSize);
|
|
11725
|
+
if (horizontal) this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx + offset, edge.dy, tileSize, edge.dh);
|
|
11726
|
+
else this.ctx.drawImage(image, edge.sx, edge.sy, edge.sw, edge.sh, edge.dx, edge.dy + offset, edge.dw, tileSize);
|
|
11542
11727
|
}
|
|
11543
11728
|
this.ctx.restore();
|
|
11544
11729
|
}
|
|
11730
|
+
/**
|
|
11731
|
+
* Draw the center region of the border image, tiling each axis per its
|
|
11732
|
+
* border-image-repeat keyword (stretch spans the whole axis, repeat
|
|
11733
|
+
* tiles at source size with the overflow cropped, round scales the tile
|
|
11734
|
+
* to divide the axis evenly).
|
|
11735
|
+
*/
|
|
11736
|
+
drawCenterRegion(image, src, dst, repeat) {
|
|
11737
|
+
if (src.sw <= 0 || src.sh <= 0 || dst.dw <= 0 || dst.dh <= 0) return;
|
|
11738
|
+
const axis = (mode, srcLen, dstLen) => {
|
|
11739
|
+
if (mode === 0) return {
|
|
11740
|
+
size: dstLen,
|
|
11741
|
+
count: 1
|
|
11742
|
+
};
|
|
11743
|
+
if (mode === 2) {
|
|
11744
|
+
const count = Math.max(1, Math.round(dstLen / srcLen));
|
|
11745
|
+
return {
|
|
11746
|
+
size: dstLen / count,
|
|
11747
|
+
count
|
|
11748
|
+
};
|
|
11749
|
+
}
|
|
11750
|
+
return {
|
|
11751
|
+
size: srcLen,
|
|
11752
|
+
count: Math.max(1, Math.ceil(dstLen / srcLen))
|
|
11753
|
+
};
|
|
11754
|
+
};
|
|
11755
|
+
const columns = axis(repeat.horizontal, src.sw, dst.dw);
|
|
11756
|
+
const rows = axis(repeat.vertical, src.sh, dst.dh);
|
|
11757
|
+
this.ctx.save();
|
|
11758
|
+
this.ctx.beginPath();
|
|
11759
|
+
this.ctx.rect(dst.dx, dst.dy, dst.dw, dst.dh);
|
|
11760
|
+
this.ctx.clip();
|
|
11761
|
+
for (let row = 0; row < rows.count; row++) for (let column = 0; column < columns.count; column++) this.ctx.drawImage(image, src.sx, src.sy, src.sw, src.sh, dst.dx + column * columns.size, dst.dy + row * rows.size, columns.size, rows.size);
|
|
11762
|
+
this.ctx.restore();
|
|
11763
|
+
}
|
|
11545
11764
|
};
|
|
11546
11765
|
//#endregion
|
|
11547
11766
|
//#region src/render/canvas/effects-renderer.ts
|
|
@@ -11595,10 +11814,17 @@
|
|
|
11595
11814
|
* `restore()` **once** when that effect is popped.
|
|
11596
11815
|
*/
|
|
11597
11816
|
var EffectsRenderer = class {
|
|
11817
|
+
ctx;
|
|
11818
|
+
pathCallback;
|
|
11819
|
+
scale;
|
|
11820
|
+
activeEffects = [];
|
|
11821
|
+
/** Whether a canvas state save was performed for the current batch. */
|
|
11822
|
+
didSave = false;
|
|
11823
|
+
/** Index (0-based, from start of activeEffects array) of the last
|
|
11824
|
+
* heavyweight effect in the batch — the one whose pop triggers
|
|
11825
|
+
* restore(). Set to -1 when no save was performed. */
|
|
11826
|
+
saveAtDepth = -1;
|
|
11598
11827
|
constructor(deps, pathCallback) {
|
|
11599
|
-
this.activeEffects = [];
|
|
11600
|
-
this.didSave = false;
|
|
11601
|
-
this.saveAtDepth = -1;
|
|
11602
11828
|
this.ctx = deps.ctx;
|
|
11603
11829
|
this.pathCallback = pathCallback;
|
|
11604
11830
|
this.scale = deps.scale ?? 1;
|
|
@@ -11699,8 +11925,11 @@
|
|
|
11699
11925
|
* always fills the whole area — a mask surface is about alpha coverage, not
|
|
11700
11926
|
* about what is visible underneath.
|
|
11701
11927
|
*
|
|
11702
|
-
*
|
|
11703
|
-
*
|
|
11928
|
+
* Gradient layers share the rasterisation primitives of the background
|
|
11929
|
+
* renderer (gradient-rasterizer.ts): repeating gradients stack their stop
|
|
11930
|
+
* cycles, and the area beyond a radial gradient's ending shape keeps the
|
|
11931
|
+
* last stop's colour. Limitations (v1): mask-mode is alpha-only; layers
|
|
11932
|
+
* composite with source-over (≈ the spec-default `add`).
|
|
11704
11933
|
*/
|
|
11705
11934
|
/**
|
|
11706
11935
|
* CSS layer lists cycle: a single mask-size applies to every mask-image
|
|
@@ -11766,17 +11995,12 @@
|
|
|
11766
11995
|
let [rx, ry] = calculateRadius(layer, cx, cy, width, height);
|
|
11767
11996
|
rx = Math.max(rx, .01);
|
|
11768
11997
|
ry = Math.max(ry, .01);
|
|
11769
|
-
const
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
processColorStops(layer.stops, rx * 2).forEach((s) => gradient.addColorStop(Math.min(1, Math.max(0, s.stop)), asString(s.color)));
|
|
11776
|
-
offCtx.fillStyle = gradient;
|
|
11777
|
-
if (rx !== ry) offCtx.scale(1, ry / rx);
|
|
11778
|
-
offCtx.fillRect(0, 0, rx * 2, ry * 2);
|
|
11779
|
-
ctx.drawImage(offscreen, area.left + cx - rx, area.top + cy - ry, rx * 2, ry * 2);
|
|
11998
|
+
const ownerDocument = ctx.canvas.ownerDocument ?? document;
|
|
11999
|
+
const rasterized = rasterizeRadialGradient(ownerDocument, rx, ry, layer.stops, isRepeatingRadialGradient(layer));
|
|
12000
|
+
if (!rasterized) return;
|
|
12001
|
+
ctx.fillStyle = rasterized.lastColor;
|
|
12002
|
+
ctx.fillRect(area.left, area.top, area.width, area.height);
|
|
12003
|
+
ctx.drawImage(rasterized.canvas, area.left + cx - rx, area.top + cy - ry, rx * 2, ry * 2);
|
|
11780
12004
|
};
|
|
11781
12005
|
/** Draw one gradient layer filling the whole mask area. */
|
|
11782
12006
|
const paintGradientLayer = (ctx, layer, area) => {
|
|
@@ -11790,12 +12014,31 @@
|
|
|
11790
12014
|
if (layer.type === 1 || layer.type === 3) {
|
|
11791
12015
|
const linear = layer;
|
|
11792
12016
|
const [lineLength, lx0, lx1, ly0, ly1] = calculateGradientDirection(linear.angle || 0, width, height);
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
12017
|
+
const processed = processColorStops(linear.stops, lineLength || 1);
|
|
12018
|
+
if (layer.type === 3) {
|
|
12019
|
+
const stacked = stackRepeatingStops(processed);
|
|
12020
|
+
if (!stacked) {
|
|
12021
|
+
ctx.fillStyle = asString(at(processed, processed.length - 1).color);
|
|
12022
|
+
ctx.fillRect(area.left, area.top, width, height);
|
|
12023
|
+
return;
|
|
12024
|
+
}
|
|
12025
|
+
gradient = ctx.createLinearGradient(area.left + lx0, area.top + ly0, area.left + lx1, area.top + ly1);
|
|
12026
|
+
stacked.forEach((s) => gradient.addColorStop(Math.min(1, Math.max(0, s.stop)), s.color));
|
|
12027
|
+
} else {
|
|
12028
|
+
gradient = ctx.createLinearGradient(area.left + lx0, area.top + ly0, area.left + lx1, area.top + ly1);
|
|
12029
|
+
toCanvasStops(processed).forEach((s) => gradient.addColorStop(s.stop, s.color));
|
|
12030
|
+
}
|
|
12031
|
+
} else if (layer.type === 5 || layer.type === 6) {
|
|
11796
12032
|
const conic = layer;
|
|
12033
|
+
const processed = processColorStops(conic.stops, 1);
|
|
12034
|
+
const repeating = layer.type === 6;
|
|
12035
|
+
if (repeating && !stackRepeatingStops(processed)) {
|
|
12036
|
+
ctx.fillStyle = asString(at(processed, processed.length - 1).color);
|
|
12037
|
+
ctx.fillRect(area.left, area.top, width, height);
|
|
12038
|
+
return;
|
|
12039
|
+
}
|
|
11797
12040
|
gradient = ctx.createConicGradient(conic.angle - Math.PI / 2, area.left + width / 2, area.top + height / 2);
|
|
11798
|
-
|
|
12041
|
+
((repeating ? stackRepeatingStops(processed) : null) ?? toCanvasStops(processed)).forEach((s) => gradient.addColorStop(Math.min(1, Math.max(0, s.stop)), s.color));
|
|
11799
12042
|
}
|
|
11800
12043
|
if (gradient) {
|
|
11801
12044
|
ctx.fillStyle = gradient;
|
|
@@ -11862,7 +12105,11 @@
|
|
|
11862
12105
|
dh = sh;
|
|
11863
12106
|
}
|
|
11864
12107
|
} else if (objectFit === 16) {
|
|
11865
|
-
|
|
12108
|
+
const containW = imgRatio > boxRatio ? dw : dh * imgRatio;
|
|
12109
|
+
const containH = imgRatio > boxRatio ? dw / imgRatio : dh;
|
|
12110
|
+
const noneW = Math.min(sw, dw);
|
|
12111
|
+
const noneH = Math.min(sh, dh);
|
|
12112
|
+
if (containW * containH < noneW * noneH) {
|
|
11866
12113
|
if (imgRatio > boxRatio) {
|
|
11867
12114
|
dh = dw / imgRatio;
|
|
11868
12115
|
dy += (box.height - dh) * posY;
|
|
@@ -11913,14 +12160,12 @@
|
|
|
11913
12160
|
ctx.imageSmoothingEnabled = prevSmoothing;
|
|
11914
12161
|
} catch (e) {
|
|
11915
12162
|
context.logger.error(`Error loading image ${container.src}`);
|
|
11916
|
-
context.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
11917
12163
|
}
|
|
11918
12164
|
if (container instanceof CanvasElementContainer) renderReplacedElementFn(container, curves, container.canvas);
|
|
11919
12165
|
if (container instanceof SVGElementContainer) try {
|
|
11920
12166
|
renderReplacedElementFn(container, curves, await context.cache.match(container.svg));
|
|
11921
12167
|
} catch (e) {
|
|
11922
12168
|
context.logger.error(`Error loading svg ${container.svg.substring(0, 255)}`);
|
|
11923
|
-
context.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
11924
12169
|
}
|
|
11925
12170
|
if (container instanceof IFrameElementContainer && container.tree) {
|
|
11926
12171
|
const canvas = await iframeRendererFactory(context, {
|
|
@@ -12068,7 +12313,6 @@
|
|
|
12068
12313
|
ctx.drawImage(image, container.bounds.left - (markerWidth + 10), markerCenterY - markerHeight / 2, markerWidth, markerHeight);
|
|
12069
12314
|
} catch (e) {
|
|
12070
12315
|
context.logger.error(`Error loading list-style-image ${url}`);
|
|
12071
|
-
context.onError?.(e instanceof Error ? e : new Error(String(e)));
|
|
12072
12316
|
}
|
|
12073
12317
|
}
|
|
12074
12318
|
} else if (paint.listValue && container.styles.listStyleType !== -1) {
|
|
@@ -12255,7 +12499,10 @@
|
|
|
12255
12499
|
else createCanvasPath(sourceCtx, path);
|
|
12256
12500
|
sourceCtx.fillStyle = asString(shadow.color);
|
|
12257
12501
|
sourceCtx.fill(shadow.inset ? "evenodd" : "nonzero");
|
|
12258
|
-
filtered = await renderFilterSurface(source, {
|
|
12502
|
+
filtered = await renderFilterSurface(source, { functions: [{
|
|
12503
|
+
kind: "blur",
|
|
12504
|
+
value: blur
|
|
12505
|
+
}] }, 1, space.scale, options.signal);
|
|
12259
12506
|
ctx.save();
|
|
12260
12507
|
try {
|
|
12261
12508
|
if (shadow.inset) {
|
|
@@ -12341,6 +12588,10 @@
|
|
|
12341
12588
|
//#endregion
|
|
12342
12589
|
//#region src/render/canvas/text-clip-renderer.ts
|
|
12343
12590
|
var TextClipRenderer = class {
|
|
12591
|
+
ctx;
|
|
12592
|
+
context;
|
|
12593
|
+
scale;
|
|
12594
|
+
createFontStyle;
|
|
12344
12595
|
constructor(deps) {
|
|
12345
12596
|
this.ctx = deps.ctx;
|
|
12346
12597
|
this.context = deps.context;
|
|
@@ -12360,59 +12611,69 @@
|
|
|
12360
12611
|
const deviceHeight = Math.ceil(bounds.height * scale);
|
|
12361
12612
|
const offscreen = this.createLayer(ownerDocument, deviceWidth, deviceHeight);
|
|
12362
12613
|
if (!offscreen) return;
|
|
12363
|
-
|
|
12364
|
-
|
|
12365
|
-
|
|
12366
|
-
|
|
12367
|
-
|
|
12368
|
-
|
|
12369
|
-
|
|
12370
|
-
|
|
12371
|
-
|
|
12372
|
-
|
|
12373
|
-
|
|
12374
|
-
|
|
12375
|
-
|
|
12376
|
-
|
|
12377
|
-
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
bounds,
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
|
|
12394
|
-
|
|
12395
|
-
|
|
12396
|
-
|
|
12397
|
-
|
|
12398
|
-
mask
|
|
12399
|
-
mask
|
|
12400
|
-
|
|
12401
|
-
|
|
12402
|
-
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
|
|
12415
|
-
|
|
12614
|
+
let mask = null;
|
|
12615
|
+
let composite = null;
|
|
12616
|
+
let shadowCanvases = null;
|
|
12617
|
+
try {
|
|
12618
|
+
offscreen.ctx.scale(scale, scale);
|
|
12619
|
+
const [fontString] = this.createFontStyle(styles);
|
|
12620
|
+
offscreen.ctx.font = fontString ?? "";
|
|
12621
|
+
offscreen.ctx.textBaseline = "alphabetic";
|
|
12622
|
+
offscreen.ctx.textAlign = "left";
|
|
12623
|
+
offscreen.ctx.direction = styles.direction === 1 ? "rtl" : "ltr";
|
|
12624
|
+
const baseline = measureBaseline(offscreen.ctx, styles.fontSize.number);
|
|
12625
|
+
const bgRenderer = new BackgroundRenderer({
|
|
12626
|
+
ctx: offscreen.ctx,
|
|
12627
|
+
context: this.context,
|
|
12628
|
+
canvas: offscreen.canvas,
|
|
12629
|
+
options: {
|
|
12630
|
+
width,
|
|
12631
|
+
height,
|
|
12632
|
+
scale: 1
|
|
12633
|
+
}
|
|
12634
|
+
});
|
|
12635
|
+
if (!isTransparent(styles.backgroundColor)) {
|
|
12636
|
+
offscreen.ctx.fillStyle = asString(styles.backgroundColor);
|
|
12637
|
+
offscreen.ctx.fillRect(0, 0, width, height);
|
|
12638
|
+
}
|
|
12639
|
+
offscreen.ctx.save();
|
|
12640
|
+
offscreen.ctx.translate(-bounds.left, -bounds.top);
|
|
12641
|
+
await bgRenderer.renderBackgroundImage(container);
|
|
12642
|
+
offscreen.ctx.restore();
|
|
12643
|
+
const drawOptions = {
|
|
12644
|
+
bounds,
|
|
12645
|
+
baseline,
|
|
12646
|
+
letterSpacing: styles.letterSpacing,
|
|
12647
|
+
writingMode: styles.writingMode
|
|
12648
|
+
};
|
|
12649
|
+
mask = this.createGlyphLayer(ownerDocument, deviceWidth, deviceHeight, offscreen.ctx);
|
|
12650
|
+
if (!mask) return;
|
|
12651
|
+
const hasStroke = !!styles.webkitTextStrokeWidth;
|
|
12652
|
+
if (hasStroke) {
|
|
12653
|
+
mask.ctx.strokeStyle = asString(styles.webkitTextStrokeColor);
|
|
12654
|
+
mask.ctx.lineWidth = styles.webkitTextStrokeWidth;
|
|
12655
|
+
mask.ctx.lineJoin = getTextStrokeLineJoin();
|
|
12656
|
+
}
|
|
12657
|
+
for (const textNode of container.textNodes) for (const textBound of textNode.textBounds) this.drawGlyphs(mask, textBound, drawOptions, (ctx, text, x, y) => {
|
|
12658
|
+
ctx.fillText(text, x, y);
|
|
12659
|
+
if (hasStroke) ctx.strokeText(text, x, y);
|
|
12660
|
+
});
|
|
12661
|
+
offscreen.ctx.globalCompositeOperation = "destination-in";
|
|
12662
|
+
offscreen.ctx.drawImage(mask.canvas, 0, 0, width, height);
|
|
12663
|
+
shadowCanvases = this.renderShadowSilhouettes(paint, ownerDocument, deviceWidth, deviceHeight, offscreen.ctx, styles, drawOptions);
|
|
12664
|
+
if (shadowCanvases) {
|
|
12665
|
+
composite = this.createLayer(ownerDocument, deviceWidth, deviceHeight);
|
|
12666
|
+
if (!composite) return;
|
|
12667
|
+
for (const shadowCanvas of shadowCanvases) composite.ctx.drawImage(shadowCanvas, 0, 0);
|
|
12668
|
+
composite.ctx.drawImage(offscreen.canvas, 0, 0);
|
|
12669
|
+
this.ctx.drawImage(composite.canvas, bounds.left, bounds.top, bounds.width, bounds.height);
|
|
12670
|
+
} else this.ctx.drawImage(offscreen.canvas, bounds.left, bounds.top, bounds.width, bounds.height);
|
|
12671
|
+
} finally {
|
|
12672
|
+
releaseSurface(offscreen.canvas);
|
|
12673
|
+
if (mask) releaseSurface(mask.canvas);
|
|
12674
|
+
if (composite) releaseSurface(composite.canvas);
|
|
12675
|
+
if (shadowCanvases) shadowCanvases.forEach(releaseSurface);
|
|
12676
|
+
}
|
|
12416
12677
|
}
|
|
12417
12678
|
createLayer(ownerDocument, width, height) {
|
|
12418
12679
|
const canvas = ownerDocument.createElement("canvas");
|
|
@@ -12484,20 +12745,29 @@
|
|
|
12484
12745
|
}
|
|
12485
12746
|
return canvases.length ? canvases : null;
|
|
12486
12747
|
}
|
|
12487
|
-
getTextStrokeLineJoin() {
|
|
12488
|
-
return (typeof window !== "undefined" ? window : void 0)?.chrome ? "miter" : "round";
|
|
12489
|
-
}
|
|
12490
12748
|
};
|
|
12491
12749
|
//#endregion
|
|
12492
12750
|
//#region src/render/canvas/canvas-renderer.ts
|
|
12493
12751
|
var CanvasRenderer = class CanvasRenderer {
|
|
12752
|
+
surfaceRoot;
|
|
12753
|
+
surfaceBudget;
|
|
12754
|
+
canvas;
|
|
12755
|
+
ctx;
|
|
12756
|
+
context;
|
|
12757
|
+
options;
|
|
12758
|
+
backgroundRenderer;
|
|
12759
|
+
borderRenderer;
|
|
12760
|
+
borderImageRenderer;
|
|
12761
|
+
effectsRenderer;
|
|
12762
|
+
textRenderer;
|
|
12763
|
+
textClipRenderer;
|
|
12764
|
+
legacySubtree = false;
|
|
12494
12765
|
constructor(context, options, surfaceRoot, surfaceBudget = { pixels: 0 }) {
|
|
12495
12766
|
this.surfaceRoot = surfaceRoot;
|
|
12496
12767
|
this.surfaceBudget = surfaceBudget;
|
|
12497
|
-
this.legacySubtree = false;
|
|
12498
12768
|
this.context = context;
|
|
12499
12769
|
this.options = options;
|
|
12500
|
-
this.canvas = options.canvas ? options.canvas :
|
|
12770
|
+
this.canvas = options.canvas ? options.canvas : context.resourceDocument.createElement("canvas");
|
|
12501
12771
|
const ctx = this.canvas.getContext("2d");
|
|
12502
12772
|
if (!ctx) {
|
|
12503
12773
|
if (!options.canvas) releaseSurface(this.canvas);
|
|
@@ -12550,11 +12820,12 @@
|
|
|
12550
12820
|
async renderStack(stack) {
|
|
12551
12821
|
const styles = stack.element.container.styles;
|
|
12552
12822
|
if (styles.isVisible()) {
|
|
12553
|
-
const filter =
|
|
12823
|
+
const filter = parseFilterChain(styles.filter);
|
|
12824
|
+
const hasFilter = filter !== null && filter.functions.length > 0;
|
|
12554
12825
|
const hasMask = styles.maskImage.length > 0;
|
|
12555
12826
|
const reflect = styles.webkitBoxReflect;
|
|
12556
12827
|
const hasBlend = styles.mixBlendMode !== MIX_BLEND_MODE$1.NORMAL;
|
|
12557
|
-
if (stack.element !== this.surfaceRoot && !this.legacySubtree && (hasMask || reflect || hasBlend || filter && (
|
|
12828
|
+
if (stack.element !== this.surfaceRoot && !this.legacySubtree && (hasMask || reflect || hasBlend || filter !== null && (hasFilter || styles.opacity < 1)) && this.canComposite(stack.element)) {
|
|
12558
12829
|
if (!await this.renderCompositedStack(stack, filter, hasMask, reflect, hasBlend)) {
|
|
12559
12830
|
this.legacySubtree = true;
|
|
12560
12831
|
try {
|
|
@@ -12571,7 +12842,7 @@
|
|
|
12571
12842
|
canComposite(paint) {
|
|
12572
12843
|
const supported = (container) => {
|
|
12573
12844
|
const styles = container.styles;
|
|
12574
|
-
return !styles.isTransformed() && styles.zoom === 1 && styles.clipPath.type === 0 && !contains(styles.display, 2048) &&
|
|
12845
|
+
return !styles.isTransformed() && styles.zoom === 1 && styles.clipPath.type === 0 && !contains(styles.display, 2048) && parseFilterChain(styles.filter) !== null;
|
|
12575
12846
|
};
|
|
12576
12847
|
const subtree = (container) => supported(container) && container.elements.every(subtree);
|
|
12577
12848
|
let ancestor = paint.parent;
|
|
@@ -12639,7 +12910,7 @@
|
|
|
12639
12910
|
async applyMask(surface, styles, bounds) {
|
|
12640
12911
|
const ctx = surface.getContext("2d");
|
|
12641
12912
|
if (!ctx) return;
|
|
12642
|
-
const maskCanvas =
|
|
12913
|
+
const maskCanvas = this.context.resourceDocument.createElement("canvas");
|
|
12643
12914
|
maskCanvas.width = surface.width;
|
|
12644
12915
|
maskCanvas.height = surface.height;
|
|
12645
12916
|
const maskCtx = maskCanvas.getContext("2d");
|
|
@@ -12681,7 +12952,7 @@
|
|
|
12681
12952
|
let refCanvas;
|
|
12682
12953
|
let maskCanvas;
|
|
12683
12954
|
try {
|
|
12684
|
-
refCanvas =
|
|
12955
|
+
refCanvas = this.context.resourceDocument.createElement("canvas");
|
|
12685
12956
|
refCanvas.width = w;
|
|
12686
12957
|
refCanvas.height = h;
|
|
12687
12958
|
const ctx = refCanvas.getContext("2d");
|
|
@@ -12703,7 +12974,7 @@
|
|
|
12703
12974
|
ctx.restore();
|
|
12704
12975
|
}
|
|
12705
12976
|
if (reflect.mask) {
|
|
12706
|
-
maskCanvas =
|
|
12977
|
+
maskCanvas = this.context.resourceDocument.createElement("canvas");
|
|
12707
12978
|
maskCanvas.width = w;
|
|
12708
12979
|
maskCanvas.height = h;
|
|
12709
12980
|
const mctx = maskCanvas.getContext("2d");
|
|
@@ -12827,18 +13098,6 @@
|
|
|
12827
13098
|
await this.renderStack(child);
|
|
12828
13099
|
}
|
|
12829
13100
|
}
|
|
12830
|
-
mask(paths) {
|
|
12831
|
-
this.ctx.beginPath();
|
|
12832
|
-
const x = this.options.x;
|
|
12833
|
-
const y = this.options.y;
|
|
12834
|
-
this.ctx.moveTo(x, y);
|
|
12835
|
-
this.ctx.lineTo(x + this.options.width, y);
|
|
12836
|
-
this.ctx.lineTo(x + this.options.width, y + this.options.height);
|
|
12837
|
-
this.ctx.lineTo(x, y + this.options.height);
|
|
12838
|
-
this.ctx.lineTo(x, y);
|
|
12839
|
-
this.formatPath(paths.slice(0).reverse());
|
|
12840
|
-
this.ctx.closePath();
|
|
12841
|
-
}
|
|
12842
13101
|
path(paths) {
|
|
12843
13102
|
createCanvasPath(this.ctx, paths);
|
|
12844
13103
|
}
|
|
@@ -12860,7 +13119,7 @@
|
|
|
12860
13119
|
let source;
|
|
12861
13120
|
let filtered;
|
|
12862
13121
|
try {
|
|
12863
|
-
source =
|
|
13122
|
+
source = this.context.resourceDocument.createElement("canvas");
|
|
12864
13123
|
source.width = width;
|
|
12865
13124
|
source.height = height;
|
|
12866
13125
|
const ctx = source.getContext("2d");
|
|
@@ -12870,7 +13129,10 @@
|
|
|
12870
13129
|
createCanvasPath(ctx, transformPath(calculateBorderBoxPath(paint.curves), -spread, -spread, 2 * spread, 2 * spread));
|
|
12871
13130
|
ctx.fillStyle = asString(shadow.color);
|
|
12872
13131
|
ctx.fill();
|
|
12873
|
-
filtered = await renderFilterSurface(source, {
|
|
13132
|
+
filtered = await renderFilterSurface(source, { functions: [{
|
|
13133
|
+
kind: "blur",
|
|
13134
|
+
value: blur
|
|
13135
|
+
}] }, 1, scale, this.options.signal);
|
|
12874
13136
|
this.ctx.save();
|
|
12875
13137
|
try {
|
|
12876
13138
|
this.ctx.beginPath();
|
|
@@ -13046,9 +13308,19 @@
|
|
|
13046
13308
|
if (source.type === 1 || source.type === 3) {
|
|
13047
13309
|
const gradientImage = source;
|
|
13048
13310
|
const [lineLength, x0, y0, x1, y1] = calculateGradientDirection(gradientImage.angle, width, height);
|
|
13311
|
+
const processed = processColorStops(gradientImage.stops, lineLength || width);
|
|
13312
|
+
const repeating = source.type === 3;
|
|
13313
|
+
const stacked = repeating ? stackRepeatingStops(processed) : null;
|
|
13049
13314
|
const gradient = ctx.createLinearGradient(x0, y0, x1, y1);
|
|
13050
|
-
|
|
13051
|
-
gradient.addColorStop(Math.min(1, Math.max(0, colorStop.stop)),
|
|
13315
|
+
if (stacked) stacked.forEach((colorStop) => {
|
|
13316
|
+
gradient.addColorStop(Math.min(1, Math.max(0, colorStop.stop)), colorStop.color);
|
|
13317
|
+
});
|
|
13318
|
+
else if (repeating) {
|
|
13319
|
+
const lastColor = asString(at(processed, processed.length - 1).color);
|
|
13320
|
+
gradient.addColorStop(0, lastColor);
|
|
13321
|
+
gradient.addColorStop(1, lastColor);
|
|
13322
|
+
} else toCanvasStops(processed).forEach((colorStop) => {
|
|
13323
|
+
gradient.addColorStop(colorStop.stop, colorStop.color);
|
|
13052
13324
|
});
|
|
13053
13325
|
ctx.fillStyle = gradient;
|
|
13054
13326
|
ctx.fillRect(0, 0, width, height);
|
|
@@ -13056,21 +13328,17 @@
|
|
|
13056
13328
|
}
|
|
13057
13329
|
if (source.type === 2 || source.type === 4) {
|
|
13058
13330
|
const gradientImage = source;
|
|
13059
|
-
const
|
|
13060
|
-
const
|
|
13331
|
+
const position = gradientImage.position.length === 0 ? [FIFTY_PERCENT] : gradientImage.position;
|
|
13332
|
+
const cx = getAbsoluteValue(at(position, 0), width);
|
|
13333
|
+
const cy = getAbsoluteValue(at(position, position.length - 1), height);
|
|
13061
13334
|
const [rx, ry] = calculateRadius(gradientImage, cx, cy, width, height);
|
|
13062
13335
|
if (rx <= 0 || ry <= 0) return null;
|
|
13063
|
-
ctx.
|
|
13064
|
-
|
|
13065
|
-
|
|
13066
|
-
ctx.
|
|
13067
|
-
const gradient = ctx.createRadialGradient(cx, cy, 0, cx, cy, rx);
|
|
13068
|
-
processColorStops(gradientImage.stops, rx).forEach((colorStop) => {
|
|
13069
|
-
gradient.addColorStop(Math.min(1, Math.max(0, colorStop.stop)), asString(colorStop.color));
|
|
13070
|
-
});
|
|
13071
|
-
ctx.fillStyle = gradient;
|
|
13336
|
+
const ownerDocument = this.ctx.canvas.ownerDocument ?? document;
|
|
13337
|
+
const rasterized = rasterizeRadialGradient(ownerDocument, rx, ry, gradientImage.stops, source.type === 4);
|
|
13338
|
+
if (!rasterized) return null;
|
|
13339
|
+
ctx.fillStyle = rasterized.lastColor;
|
|
13072
13340
|
ctx.fillRect(0, 0, width, height);
|
|
13073
|
-
ctx.
|
|
13341
|
+
ctx.drawImage(rasterized.canvas, cx - rx, cy - ry, rx * 2, ry * 2);
|
|
13074
13342
|
return canvas;
|
|
13075
13343
|
}
|
|
13076
13344
|
if (source.type === 5 || source.type === 6) {
|
|
@@ -13115,12 +13383,12 @@
|
|
|
13115
13383
|
}
|
|
13116
13384
|
/**
|
|
13117
13385
|
* Filter the already-painted content beneath the element's border box and
|
|
13118
|
-
* paint the result back, approximating CSS backdrop-filter for the
|
|
13119
|
-
*
|
|
13386
|
+
* paint the result back, approximating CSS backdrop-filter for the chain
|
|
13387
|
+
* subset the filter surface backends support.
|
|
13120
13388
|
*/
|
|
13121
13389
|
async renderBackdropFilter(paint) {
|
|
13122
|
-
const filter =
|
|
13123
|
-
if (!filter ||
|
|
13390
|
+
const filter = parseFilterChain(paint.container.styles.backdropFilter);
|
|
13391
|
+
if (!filter || filter.functions.length === 0) return;
|
|
13124
13392
|
const bounds = paint.container.bounds;
|
|
13125
13393
|
if (bounds.width <= 0 || bounds.height <= 0) return;
|
|
13126
13394
|
const scale = this.options.scale;
|
|
@@ -13132,7 +13400,7 @@
|
|
|
13132
13400
|
let source;
|
|
13133
13401
|
let filtered;
|
|
13134
13402
|
try {
|
|
13135
|
-
source =
|
|
13403
|
+
source = this.context.resourceDocument.createElement("canvas");
|
|
13136
13404
|
source.width = width;
|
|
13137
13405
|
source.height = height;
|
|
13138
13406
|
const srcCtx = source.getContext("2d");
|
|
@@ -13140,7 +13408,15 @@
|
|
|
13140
13408
|
const sx = Math.round((bounds.left - this.options.x) * scale);
|
|
13141
13409
|
const sy = Math.round((bounds.top - this.options.y) * scale);
|
|
13142
13410
|
srcCtx.drawImage(this.canvas, sx, sy, width, height, 0, 0, width, height);
|
|
13143
|
-
|
|
13411
|
+
try {
|
|
13412
|
+
filtered = await renderFilterSurface(source, filter, 1, scale, this.options.signal);
|
|
13413
|
+
} catch (error) {
|
|
13414
|
+
if (error instanceof FilterSurfaceError) {
|
|
13415
|
+
this.context.logger.info(`${error.message}; rendering without the backdrop effect`);
|
|
13416
|
+
return;
|
|
13417
|
+
}
|
|
13418
|
+
throw error;
|
|
13419
|
+
}
|
|
13144
13420
|
if (this.options.signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
13145
13421
|
this.ctx.save();
|
|
13146
13422
|
try {
|
|
@@ -13187,10 +13463,14 @@
|
|
|
13187
13463
|
//#endregion
|
|
13188
13464
|
//#region src/render/canvas/foreignobject-renderer.ts
|
|
13189
13465
|
var ForeignObjectRenderer = class {
|
|
13466
|
+
canvas;
|
|
13467
|
+
ctx;
|
|
13468
|
+
options;
|
|
13469
|
+
context;
|
|
13190
13470
|
constructor(context, options) {
|
|
13191
13471
|
this.context = context;
|
|
13192
13472
|
this.options = options;
|
|
13193
|
-
this.canvas = options.canvas ? options.canvas :
|
|
13473
|
+
this.canvas = options.canvas ? options.canvas : context.resourceDocument.createElement("canvas");
|
|
13194
13474
|
const ctx = this.canvas.getContext("2d");
|
|
13195
13475
|
if (!ctx) throw new Error("Failed to get 2D rendering context from canvas");
|
|
13196
13476
|
this.ctx = ctx;
|
|
@@ -13204,19 +13484,49 @@
|
|
|
13204
13484
|
}
|
|
13205
13485
|
async render(element) {
|
|
13206
13486
|
if (this.options.signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
13207
|
-
const
|
|
13208
|
-
const
|
|
13487
|
+
const restoreRootOffsets = stripRootOffsets(element);
|
|
13488
|
+
const svg = createForeignObjectSVG(this.options.width, this.options.height, 0, 0, element);
|
|
13489
|
+
const imagePromise = loadSerializedSVG(svg);
|
|
13490
|
+
restoreRootOffsets();
|
|
13491
|
+
const img = await imagePromise;
|
|
13492
|
+
if (this.options.signal?.aborted) throw new DOMException("The operation was aborted.", "AbortError");
|
|
13209
13493
|
if (this.options.backgroundColor) {
|
|
13210
13494
|
this.ctx.fillStyle = asString(this.options.backgroundColor);
|
|
13211
|
-
this.ctx.fillRect(
|
|
13495
|
+
this.ctx.fillRect(this.options.x, this.options.y, this.options.width, this.options.height);
|
|
13212
13496
|
}
|
|
13213
|
-
this.ctx.drawImage(img,
|
|
13497
|
+
this.ctx.drawImage(img, this.options.x, this.options.y, this.options.width, this.options.height);
|
|
13214
13498
|
return this.canvas;
|
|
13215
13499
|
}
|
|
13216
13500
|
};
|
|
13501
|
+
/**
|
|
13502
|
+
* Temporarily neutralize the root element's layout offsets for SVG
|
|
13503
|
+
* serialization. `top/right/bottom/left` reset to `auto` (inset values of
|
|
13504
|
+
* positioned elements are baked into the capture rect); margins to `0`.
|
|
13505
|
+
*/
|
|
13506
|
+
const ROOT_OFFSET_PROPERTIES = [
|
|
13507
|
+
"marginTop",
|
|
13508
|
+
"marginRight",
|
|
13509
|
+
"marginBottom",
|
|
13510
|
+
"marginLeft",
|
|
13511
|
+
"top",
|
|
13512
|
+
"right",
|
|
13513
|
+
"bottom",
|
|
13514
|
+
"left"
|
|
13515
|
+
];
|
|
13516
|
+
const stripRootOffsets = (element) => {
|
|
13517
|
+
const style = element.style;
|
|
13518
|
+
const previous = ROOT_OFFSET_PROPERTIES.map((property) => [property, style[property]]);
|
|
13519
|
+
for (const property of ROOT_OFFSET_PROPERTIES) style[property] = property.startsWith("margin") ? "0px" : "auto";
|
|
13520
|
+
return () => {
|
|
13521
|
+
for (const [property, value] of previous) style[property] = value;
|
|
13522
|
+
};
|
|
13523
|
+
};
|
|
13217
13524
|
//#endregion
|
|
13218
13525
|
//#region src/core/logger.ts
|
|
13219
13526
|
var Logger = class {
|
|
13527
|
+
id;
|
|
13528
|
+
enabled;
|
|
13529
|
+
start;
|
|
13220
13530
|
constructor({ id, enabled }) {
|
|
13221
13531
|
this.id = id;
|
|
13222
13532
|
this.enabled = enabled;
|
|
@@ -13252,17 +13562,33 @@
|
|
|
13252
13562
|
//#endregion
|
|
13253
13563
|
//#region src/core/cache-storage.ts
|
|
13254
13564
|
var Cache = class {
|
|
13565
|
+
context;
|
|
13566
|
+
_options;
|
|
13567
|
+
_cache = /* @__PURE__ */ new Map();
|
|
13568
|
+
maxSize;
|
|
13569
|
+
_pendingOperations = /* @__PURE__ */ new Map();
|
|
13570
|
+
/** When true, addImage() collects URLs without starting loads. */
|
|
13571
|
+
_deferMode = false;
|
|
13572
|
+
/** URLs collected during defer mode, pending batch preload. */
|
|
13573
|
+
_collectedUrls = /* @__PURE__ */ new Set();
|
|
13574
|
+
/**
|
|
13575
|
+
* Eviction is suspended between startDefer() and the end of preloadAll():
|
|
13576
|
+
* the render pipeline loads every image it is going to paint inside that
|
|
13577
|
+
* window, and match() never reloads, so an LRU eviction there would
|
|
13578
|
+
* silently drop images from the output on pages with more unique images
|
|
13579
|
+
* than maxSize.
|
|
13580
|
+
*
|
|
13581
|
+
* A counter (not a flag) keeps nested/overlapping defer windows — e.g.
|
|
13582
|
+
* two renders sharing one cache via `config.cache` — suspended until the
|
|
13583
|
+
* last one finishes preloading.
|
|
13584
|
+
*/
|
|
13585
|
+
_evictionSuspendCount = 0;
|
|
13255
13586
|
get _evictionEnabled() {
|
|
13256
13587
|
return this._evictionSuspendCount === 0;
|
|
13257
13588
|
}
|
|
13258
13589
|
constructor(context, _options) {
|
|
13259
13590
|
this.context = context;
|
|
13260
13591
|
this._options = _options;
|
|
13261
|
-
this._cache = /* @__PURE__ */ new Map();
|
|
13262
|
-
this._pendingOperations = /* @__PURE__ */ new Map();
|
|
13263
|
-
this._deferMode = false;
|
|
13264
|
-
this._collectedUrls = /* @__PURE__ */ new Set();
|
|
13265
|
-
this._evictionSuspendCount = 0;
|
|
13266
13592
|
this.maxSize = _options.maxCacheSize ?? 100;
|
|
13267
13593
|
if (this.maxSize < 1) throw new Error("Cache maxSize must be at least 1");
|
|
13268
13594
|
if (this.maxSize > 1e4) this.context.logger.warn(`Cache maxSize ${this.maxSize} is very large and may cause memory issues. Consider using a smaller value (recommended: 100-1000).`);
|
|
@@ -13280,14 +13606,18 @@
|
|
|
13280
13606
|
* an optional concurrency cap to avoid overwhelming the browser's network
|
|
13281
13607
|
* stack (default: 10 concurrent loads).
|
|
13282
13608
|
* After this call returns, all images are either loaded (cache hit) or
|
|
13283
|
-
* failed (logged). Subsequent cache.match()
|
|
13609
|
+
* failed (logged and reported via onError). Subsequent cache.match()
|
|
13610
|
+
* calls return immediately.
|
|
13284
13611
|
*
|
|
13285
13612
|
* @param concurrency - Max concurrent image loads (1–100, default 10).
|
|
13286
13613
|
* @param onProgress - Invoked once before loading and after each settled
|
|
13287
13614
|
* batch with (settledCount, totalCount), enabling coarse progress UI.
|
|
13288
13615
|
* Not invoked when there is nothing to load.
|
|
13616
|
+
* @param signal - Checked before each batch; aborting rejects the whole
|
|
13617
|
+
* preload with an AbortError instead of waiting for the remaining
|
|
13618
|
+
* batches to finish.
|
|
13289
13619
|
*/
|
|
13290
|
-
async preloadAll(concurrency = 10, onProgress) {
|
|
13620
|
+
async preloadAll(concurrency = 10, onProgress, signal) {
|
|
13291
13621
|
this._deferMode = false;
|
|
13292
13622
|
const urls = Array.from(this._collectedUrls);
|
|
13293
13623
|
this._collectedUrls.clear();
|
|
@@ -13296,11 +13626,19 @@
|
|
|
13296
13626
|
const limit = Math.max(1, Math.min(concurrency, 100));
|
|
13297
13627
|
this.context.logger.debug(`Preloading ${urls.length} image(s) with concurrency ${limit}`);
|
|
13298
13628
|
let settled = 0;
|
|
13629
|
+
const abortPromise = signal ? new Promise((_, reject) => {
|
|
13630
|
+
const onAbort = () => reject(new DOMException("The operation was aborted.", "AbortError"));
|
|
13631
|
+
if (signal.aborted) onAbort();
|
|
13632
|
+
else signal.addEventListener("abort", onAbort, { once: true });
|
|
13633
|
+
}) : null;
|
|
13634
|
+
abortPromise?.catch(() => void 0);
|
|
13299
13635
|
onProgress?.(0, urls.length);
|
|
13300
13636
|
for (let i = 0; i < urls.length; i += limit) {
|
|
13637
|
+
throwIfAborted(signal);
|
|
13301
13638
|
const batch = urls.slice(i, i + limit);
|
|
13302
|
-
|
|
13303
|
-
|
|
13639
|
+
batch.map((url) => this._addImageWithPending(url));
|
|
13640
|
+
const batchSettled = Promise.allSettled(batch.map((url) => this._cache.get(url)?.value ?? Promise.resolve()));
|
|
13641
|
+
await (abortPromise ? Promise.race([batchSettled, abortPromise]) : batchSettled);
|
|
13304
13642
|
settled += batch.length;
|
|
13305
13643
|
onProgress?.(settled, urls.length);
|
|
13306
13644
|
}
|
|
@@ -13343,7 +13681,10 @@
|
|
|
13343
13681
|
const timeoutMs = this._options.imageTimeout ?? 15e3;
|
|
13344
13682
|
const imageWithTimeout = this.withTimeout(this.loadImage(src), timeoutMs, `Timed out (${timeoutMs}ms) loading image`);
|
|
13345
13683
|
imageWithTimeout.catch((error) => {
|
|
13346
|
-
|
|
13684
|
+
const reason = error instanceof Error ? error.message : String(error);
|
|
13685
|
+
const message = `Failed to load image ${src.substring(0, 256)}: ${reason}`;
|
|
13686
|
+
this.context.logger.error(message);
|
|
13687
|
+
this.context.onError?.(new Error(message));
|
|
13347
13688
|
});
|
|
13348
13689
|
this.set(src, imageWithTimeout);
|
|
13349
13690
|
}
|
|
@@ -13405,18 +13746,22 @@
|
|
|
13405
13746
|
const isSameOrigin = typeof this._options.customIsSameOrigin === "function" ? await this._options.customIsSameOrigin(key, defaultIsSameOrigin) : defaultIsSameOrigin(key);
|
|
13406
13747
|
const canAttemptCors = !isSameOrigin && this._options.allowTaint === false && !isInlineImage(key) && !isBlobImage(key) && typeof this._options.proxy !== "string";
|
|
13407
13748
|
const useCORS = !isInlineImage(key) && (this._options.useCORS === true || canAttemptCors) && FEATURES.SUPPORT_CORS_IMAGES && !isSameOrigin;
|
|
13408
|
-
const useProxy = !isInlineImage(key) && !isSameOrigin && !isBlobImage(key) && typeof this._options.proxy === "string" &&
|
|
13749
|
+
const useProxy = !isInlineImage(key) && !isSameOrigin && !isBlobImage(key) && typeof this._options.proxy === "string" && !useCORS;
|
|
13409
13750
|
if (!isSameOrigin && this._options.allowTaint === false && !isInlineImage(key) && !isBlobImage(key) && !useProxy && !useCORS) return;
|
|
13410
13751
|
let src = key;
|
|
13411
13752
|
if (useProxy) src = await this.proxy(src);
|
|
13412
13753
|
this.context.logger.debug(`Added image ${key.substring(0, 256)}`);
|
|
13754
|
+
const imageConstructor = this.context.config.window.Image ?? Image;
|
|
13413
13755
|
return await new Promise((resolve, reject) => {
|
|
13414
|
-
const img = new
|
|
13756
|
+
const img = new imageConstructor();
|
|
13415
13757
|
img.onload = () => resolve(img);
|
|
13416
13758
|
img.onerror = reject;
|
|
13417
13759
|
if (isInlineBase64Image(src) || useCORS) img.crossOrigin = "anonymous";
|
|
13418
13760
|
img.src = src;
|
|
13419
|
-
if (img.complete === true)
|
|
13761
|
+
if (img.complete === true) {
|
|
13762
|
+
if (typeof img.decode === "function") img.decode().then(() => resolve(img), () => reject(/* @__PURE__ */ new Error(`Failed to decode image ${src.substring(0, 256)}`)));
|
|
13763
|
+
else setTimeout(() => resolve(img), 500);
|
|
13764
|
+
}
|
|
13420
13765
|
});
|
|
13421
13766
|
}
|
|
13422
13767
|
has(key) {
|
|
@@ -13430,23 +13775,19 @@
|
|
|
13430
13775
|
if (!proxy) throw new Error("No proxy defined");
|
|
13431
13776
|
const key = src.substring(0, 256);
|
|
13432
13777
|
return new Promise((resolve, reject) => {
|
|
13433
|
-
const responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? "blob" : "text";
|
|
13434
13778
|
const xhr = new XMLHttpRequest();
|
|
13435
13779
|
xhr.onload = () => {
|
|
13436
13780
|
if (xhr.status === 200) {
|
|
13437
|
-
|
|
13438
|
-
|
|
13439
|
-
|
|
13440
|
-
|
|
13441
|
-
reader.addEventListener("error", (e) => reject(e), false);
|
|
13442
|
-
reader.readAsDataURL(xhr.response);
|
|
13443
|
-
}
|
|
13781
|
+
const reader = new FileReader();
|
|
13782
|
+
reader.addEventListener("load", () => resolve(reader.result), false);
|
|
13783
|
+
reader.addEventListener("error", (e) => reject(e), false);
|
|
13784
|
+
reader.readAsDataURL(xhr.response);
|
|
13444
13785
|
} else reject(`Failed to proxy resource ${key} with status code ${xhr.status}`);
|
|
13445
13786
|
};
|
|
13446
13787
|
xhr.onerror = reject;
|
|
13447
13788
|
const queryString = proxy.indexOf("?") > -1 ? "&" : "?";
|
|
13448
|
-
xhr.open("GET", `${proxy}${queryString}url=${encodeURIComponent(src)}&responseType
|
|
13449
|
-
|
|
13789
|
+
xhr.open("GET", `${proxy}${queryString}url=${encodeURIComponent(src)}&responseType=blob`);
|
|
13790
|
+
xhr.responseType = "blob";
|
|
13450
13791
|
if (this._options.imageTimeout) {
|
|
13451
13792
|
const timeout = this._options.imageTimeout;
|
|
13452
13793
|
xhr.timeout = timeout;
|
|
@@ -13470,27 +13811,34 @@
|
|
|
13470
13811
|
* Origin Checker
|
|
13471
13812
|
*
|
|
13472
13813
|
* Provides origin checking functionality without global static state.
|
|
13473
|
-
* Each instance maintains its own
|
|
13814
|
+
* Each instance maintains its own base URI and origin reference.
|
|
13474
13815
|
*
|
|
13475
13816
|
* Replaces the static methods in CacheStorage with instance-based approach.
|
|
13476
13817
|
*/
|
|
13477
13818
|
var OriginChecker = class {
|
|
13819
|
+
baseUri;
|
|
13820
|
+
origin;
|
|
13478
13821
|
constructor(window) {
|
|
13479
13822
|
if (!window || !window.document) throw new Error("Valid window object required for OriginChecker");
|
|
13480
13823
|
if (!window.location || !window.location.href) throw new Error("Window object must have valid location");
|
|
13481
|
-
this.
|
|
13824
|
+
this.baseUri = window.location.href;
|
|
13482
13825
|
this.origin = this.getOrigin(window.location.href);
|
|
13483
13826
|
}
|
|
13484
13827
|
/**
|
|
13485
13828
|
* Get the origin (protocol + hostname + port) of a URL
|
|
13486
13829
|
*
|
|
13487
|
-
* @param url - URL to parse
|
|
13488
|
-
*
|
|
13830
|
+
* @param url - URL to parse; relative URLs resolve against the context
|
|
13831
|
+
* window's location, as the anchor element used to
|
|
13832
|
+
* @returns Origin string (e.g. "https://example.com:8080"), or an empty
|
|
13833
|
+
* string for unparseable URLs — which never matches and is
|
|
13834
|
+
* therefore treated as cross-origin
|
|
13489
13835
|
*/
|
|
13490
13836
|
getOrigin(url) {
|
|
13491
|
-
|
|
13492
|
-
|
|
13493
|
-
|
|
13837
|
+
try {
|
|
13838
|
+
return new URL(url, this.baseUri).origin;
|
|
13839
|
+
} catch (e) {
|
|
13840
|
+
return "";
|
|
13841
|
+
}
|
|
13494
13842
|
}
|
|
13495
13843
|
/**
|
|
13496
13844
|
* Check if a URL is from the same origin as the context
|
|
@@ -13513,11 +13861,15 @@
|
|
|
13513
13861
|
//#endregion
|
|
13514
13862
|
//#region src/core/context.ts
|
|
13515
13863
|
var Context = class Context {
|
|
13516
|
-
static
|
|
13517
|
-
|
|
13518
|
-
|
|
13864
|
+
static instanceCount = 1;
|
|
13865
|
+
instanceName = `#${Context.instanceCount++}`;
|
|
13866
|
+
logger;
|
|
13867
|
+
cache;
|
|
13868
|
+
originChecker;
|
|
13869
|
+
config;
|
|
13870
|
+
onError;
|
|
13871
|
+
_windowBounds;
|
|
13519
13872
|
constructor(options, windowBounds, config) {
|
|
13520
|
-
this.instanceName = `#${Context.instanceCount++}`;
|
|
13521
13873
|
this.config = config;
|
|
13522
13874
|
this.logger = new Logger({
|
|
13523
13875
|
id: this.instanceName,
|
|
@@ -13533,6 +13885,18 @@
|
|
|
13533
13885
|
return this._windowBounds;
|
|
13534
13886
|
}
|
|
13535
13887
|
/**
|
|
13888
|
+
* Document used to allocate offscreen resources (offscreen canvases,
|
|
13889
|
+
* images, measurement elements). Prefers the configured window's document
|
|
13890
|
+
* so resources live in the captured realm; falls back to the global
|
|
13891
|
+
* document, which keeps mock environments without a window document
|
|
13892
|
+
* working.
|
|
13893
|
+
*/
|
|
13894
|
+
get resourceDocument() {
|
|
13895
|
+
const windowDocument = this.config.window.document;
|
|
13896
|
+
if (windowDocument) return windowDocument;
|
|
13897
|
+
return typeof document !== "undefined" ? document : void 0;
|
|
13898
|
+
}
|
|
13899
|
+
/**
|
|
13536
13900
|
* Compensate window bounds for a page scroll that the browser performed
|
|
13537
13901
|
* underneath us. Used by the document cloner: WebKit's scroll anchoring can
|
|
13538
13902
|
* scroll the cloned iframe after `onclone`, and the offset must be applied
|
|
@@ -13604,7 +13968,8 @@
|
|
|
13604
13968
|
iframeContainer: opts.iframeContainer,
|
|
13605
13969
|
inlineImages: foreignObjectRendering,
|
|
13606
13970
|
copyStyles: foreignObjectRendering,
|
|
13607
|
-
cspNonce: opts.cspNonce ?? config.cspNonce
|
|
13971
|
+
cspNonce: opts.cspNonce ?? config.cspNonce,
|
|
13972
|
+
signal: opts.signal
|
|
13608
13973
|
});
|
|
13609
13974
|
/** Assemble canvas rendering options. */
|
|
13610
13975
|
const assembleRenderOptions = (opts, backgroundColor, left, top, width, height, devicePixelRatio) => ({
|
|
@@ -13710,13 +14075,13 @@
|
|
|
13710
14075
|
perfMonitor.start("parse");
|
|
13711
14076
|
throwIfAborted(signal);
|
|
13712
14077
|
context.cache.startDefer();
|
|
13713
|
-
root = parseTree(context, clonedElement);
|
|
14078
|
+
root = parseTree(context, clonedElement, { normalizeDom: opts.normalizeDom });
|
|
13714
14079
|
perfMonitor.end("parse");
|
|
13715
14080
|
emitProgress(opts.onProgress, context, "parse", 50);
|
|
13716
14081
|
perfMonitor.start("preload");
|
|
13717
14082
|
await context.cache.preloadAll(10, (loaded, total) => {
|
|
13718
14083
|
emitProgress(opts.onProgress, context, "preload", 50 + Math.round(loaded / total * 10));
|
|
13719
|
-
});
|
|
14084
|
+
}, signal);
|
|
13720
14085
|
perfMonitor.end("preload");
|
|
13721
14086
|
emitProgress(opts.onProgress, context, "layout", 60);
|
|
13722
14087
|
if (backgroundColor === root.styles.backgroundColor) root.styles.backgroundColor = 0;
|
|
@@ -13787,6 +14152,9 @@
|
|
|
13787
14152
|
exports.default = html2canvas;
|
|
13788
14153
|
exports.html2canvas = html2canvas;
|
|
13789
14154
|
});
|
|
13790
|
-
if (typeof window !== "undefined" && window.html2canvas && window.html2canvas.default)
|
|
14155
|
+
if (typeof window !== "undefined" && window.html2canvas && window.html2canvas.default) {
|
|
14156
|
+
window.html2canvasExports = window.html2canvas;
|
|
14157
|
+
window.html2canvas = window.html2canvas.default;
|
|
14158
|
+
}
|
|
13791
14159
|
|
|
13792
14160
|
//# sourceMappingURL=html2canvas-pro.js.map
|