diff --git a/api.md b/api.md
index 6dbbf971..5c28292f 100755
--- a/api.md
+++ b/api.md
@@ -975,7 +975,8 @@ console.log(root.getTargetAtPoint(10, 10)); // { target: span, path: [0, 0], zPa
#### draw
* **类型** `Function`
* **参数**
- * isFirst `Boolean` 是否第一次,在append到真实DOM上的时候默认true
+ * isFirst `Boolean`
+ 是否第一次,在append到真实DOM上的时候默认true。
* * **说明**
强制刷新这个画布实例。
@@ -993,9 +994,12 @@ console.log(root.getTargetAtPoint(10, 10)); // { target: span, path: [0, 0], zPa
#### resize
* **参数**
- * w `Number` 宽
- * h `Number` 高
- * cb `Function` 回调
+ * w `Number`
+ 宽。
+ * h `Number`
+ 高。
+ * cb `Function`
+ 回调。
* **说明**
重新调整画布尺寸大小。
@@ -1206,6 +1210,26 @@ karas.render(
* **说明**
修改图片的url。
+### 静态方法
+
+#### toWebglCache
+* **类型** `Function`
+* **参数**
+ * gl `WebGLContext`
+ webgl的上下文。
+ * root `Root`
+ 根节点。
+ * src `String`
+ 图片url。
+ * x `Number`
+ x位置。
+ * y `Number`
+ y位置。
+ * cb `Function`
+ 成功回调。
+* **说明**
+将一张图片转为webgl的缓存纹理以供渲染。
+
## Component
* **类型** `class`
diff --git a/index.d.ts b/index.d.ts
index 08a296d3..b477c4f2 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -242,6 +242,9 @@ declare namespace karas {
getTargetAtPoint(x: number, y: number, includeIgnore: boolean): Node | Component | null
+ freeze(): void
+
+ unFreeze(): void
get dom(): HTMLElement
get uuid(): number
diff --git a/index.es.js b/index.es.js
index 2b6794f3..a0a96f58 100644
--- a/index.es.js
+++ b/index.es.js
@@ -37585,6 +37585,7 @@ var Root = /*#__PURE__*/function (_Dom) {
_this.__task = [];
_this.__ref = {};
+ _this.__freeze = false;
_this.__animateController = new Controller();
Event.mix(_assertThisInitialized(_this));
_this.__uuid = uuid++;
@@ -37890,9 +37891,10 @@ var Root = /*#__PURE__*/function (_Dom) {
if (isFirst) {
this.__reLayout();
- }
+ } // freeze()冻住不渲染,但第一次不能生效
+
- if (this.props.noRender) {
+ if (this.props.noRender || !isFirst && this.__freeze) {
return;
}
@@ -38441,6 +38443,16 @@ var Root = /*#__PURE__*/function (_Dom) {
ctx.clearColor(0, 0, 0, 0);
ctx.clear(ctx.COLOR_BUFFER_BIT);
}
+ }, {
+ key: "freeze",
+ value: function freeze() {
+ this.__freeze = true;
+ }
+ }, {
+ key: "unFreeze",
+ value: function unFreeze() {
+ this.__freeze = false;
+ }
}, {
key: "dom",
get: function get() {
@@ -44770,7 +44782,7 @@ var refresh = {
webgl: webgl
};
-var version = "0.84.7";
+var version = "0.85.0";
Geom.register('$line', Line);
Geom.register('$polyline', Polyline);
diff --git a/index.es.js.map b/index.es.js.map
index 667b19f1..8fc83287 100644
--- a/index.es.js.map
+++ b/index.es.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.es.js","sources":["src/node/Node.js","src/refresh/mode.js","src/style/unit.js","src/math/matrix.js","src/util/util.js","src/util/debug.js","src/util/inject.js","src/util/inflate.js","src/util/opentype.js","src/style/font.js","src/style/reset.js","src/style/reg.js","src/math/vector.js","src/util/enums.js","src/math/geom.js","src/math/gradient.js","src/util/painter.js","src/style/border.js","src/style/gradient.js","src/style/abbr.js","src/animate/key.js","src/refresh/change.js","src/math/blur.js","src/style/css.js","src/style/transform.js","src/node/TextBox.js","src/node/Ellipsis.js","src/refresh/level.js","src/node/Text.js","src/util/Event.js","src/node/Component.js","src/node/inline.js","src/style/image.js","src/style/bg.js","src/animate/frame.js","src/animate/easing.js","src/animate/Controller.js","src/animate/Animation.js","src/style/bs.js","src/style/mbm.js","src/node/Xom.js","src/node/LineBox.js","src/node/LineBoxManager.js","src/node/tag.js","src/node/geom/Geom.js","src/refresh/reflow.js","src/node/builder.js","src/node/Dom.js","src/refresh/Cache.js","src/refresh/Page.js","src/gl/webgl.js","src/refresh/CanvasPage.js","src/refresh/CanvasCache.js","src/gl/ImgWebglCache.js","src/node/Img.js","src/node/Defs.js","src/util/diff.js","src/refresh/offscreen.js","src/math/equation.js","src/math/isec.js","src/gl/oit.js","src/gl/TexturePage.js","src/gl/TextureCache.js","src/refresh/ImgCanvasCache.js","src/refresh/struct.js","src/gl/ca.js","src/node/Root.js","src/math/bezier.js","src/node/geom/Line.js","src/math/bo/Point.js","src/math/bo/Segment.js","src/math/bo/intersect.js","src/math/bo/Polygon.js","src/math/bo/chain.js","src/math/bo/index.js","src/node/geom/Polyline.js","src/node/geom/Polygon.js","src/node/geom/Sector.js","src/node/geom/Rect.js","src/node/geom/Circle.js","src/node/geom/Ellipse.js","src/parser/parse.js","src/parser/abbr.js","src/parser/apply.js","src/parser/index.js","src/style/index.js","src/animate/index.js","src/math/tar.js","src/math/index.js","src/refresh/index.js","src/index.js"],"sourcesContent":["class Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__width = 0;\n this.__height = 0;\n this.__baseline = 0;\n this.__verticalBaseline = 0;\n this.__prev = null;\n this.__next = null;\n this.__parent = null;\n this.__domParent = null;\n this.__root = null;\n this.__host = null;\n this.__hostRoot = null;\n this.__virtualDom = null;\n this.__bbox = null;\n this.__filterBbox = null;\n this.__isDestroyed = true;\n }\n\n __structure(lv, j) {\n return this.__struct = {\n node: this,\n childIndex: j,\n lv,\n };\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n __destroy() {\n this.__isDestroyed = true;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n // canvas/svg根节点\n get root() {\n return this.__root;\n }\n\n // component根节点\n get host() {\n return this.__host;\n }\n\n // 考虑高阶组件在内的component根节点\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get baseline() {\n return this.__baseline;\n }\n\n get verticalBaseline() {\n return this.__verticalBaseline;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n get isReplaced() {\n return false;\n }\n}\n\nexport default Node;\n","export default {\n CANVAS: 0,\n SVG: 1,\n WEBGL: 2,\n};\n","const AUTO = 0;\nconst PX = 1;\nconst PERCENT = 2;\nconst NUMBER = 3;\nconst INHERIT = 4;\nconst DEG = 5;\nconst STRING = 6;\nconst RGBA = 7;\nconst REM = 8;\nconst EM = 9;\nconst VW = 10;\nconst VH = 11;\nconst VMAX = 12;\nconst VMIN = 13;\nconst GRADIENT = 14;\n\nlet o = {\n AUTO,\n PX,\n PERCENT,\n NUMBER,\n INHERIT,\n DEG,\n STRING,\n RGBA,\n REM,\n EM,\n VW,\n VH,\n VMAX,\n VMIN,\n GRADIENT, // 特殊格式,color/fill/stroke用给ctx传值\n /**\n * 通用的格式化计算数值单位的方法,百分比/像素/REM/VW/auto和纯数字\n * @param v value\n * @returns 格式化好的[number, unit]\n */\n calUnit(v) {\n let n = parseFloat(v) || 0;\n if(/%$/.test(v)) {\n return {\n v: n,\n u: PERCENT,\n };\n }\n else if(/px$/i.test(v)) {\n return {\n v: n,\n u: PX,\n };\n }\n else if(/deg$/i.test(v)) {\n return {\n v: n,\n u: DEG,\n };\n }\n else if(/rem$/i.test(v)) {\n return {\n v: n,\n u: REM,\n };\n }\n else if(/vw$/i.test(v)) {\n return {\n v: n,\n u: VW,\n };\n }\n else if(/vh$/i.test(v)) {\n return {\n v: n,\n u: VH,\n };\n }\n else if(/em$/i.test(v)) {\n return {\n v: n,\n u: EM,\n };\n }\n else if(/vw$/i.test(v)) {\n return {\n v: n,\n u: VW,\n };\n }\n else if(/vh$/i.test(v)) {\n return {\n v: n,\n u: VH,\n };\n }\n else if(/vmax$/i.test(v)) {\n return {\n v: n,\n u: VMAX,\n };\n }\n else if(/vmin$/i.test(v)) {\n return {\n v: n,\n u: VMIN,\n };\n }\n return {\n v: n,\n u: NUMBER,\n };\n },\n};\n\nexport default o;\n","// 生成4*4单位矩阵\nfunction identity() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// 矩阵a*b,固定两个matrix都是长度16\nfunction multiply(a, b) {\n if(!a && !b) {\n return identity();\n }\n if(isE(a)) {\n return b;\n }\n if(isE(b)) {\n return a;\n }\n let c = [];\n for(let i = 0; i < 4; i++) {\n let a0 = a[i] || 0;\n let a1 = a[i + 4] || 0;\n let a2 = a[i + 8] || 0;\n let a3 = a[i + 12] || 0;\n c[i] = a0 * b[0] + a1 * b[1] + a2 * b[2] + a3 * b[3];\n c[i + 4] = a0 * b[4] + a1 * b[5] + a2 * b[6] + a3 * b[7];\n c[i + 8] = a0 * b[8] + a1 * b[9] + a2 * b[10] + a3 * b[11];\n c[i + 12] = a0 * b[12] + a1 * b[13] + a2 * b[14] + a3 * b[15];\n }\n return c;\n}\n\n// 特殊优化,b为tfo,因此既只有12/13/14有值\nfunction multiplyTfo(m, x, y) {\n if(!x && !y) {\n return m;\n }\n m[12] += m[0] * x + m[4] * y;\n m[13] += m[1] * x + m[5] * y;\n m[14] += m[2] * x + m[6] * y;\n m[15] += m[3] * x + m[7] * y;\n return m;\n}\n\nfunction tfoMultiply(x, y, m) {\n if(!x && !y) {\n return m;\n }\n let d = m[3], h = m[7], l = m[11], p = m[15];\n m[0] += d * x;\n m[1] += d * y;\n m[4] += h * x;\n m[5] += h * y;\n m[8] += l * x;\n m[9] += l * y;\n m[12] += p * x;\n m[13] += p * y;\n return m;\n}\n\n// 几种特殊的transform变换优化\nfunction multiplyTranslateX(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[0] * v;\n m[13] += m[1] * v;\n m[14] += m[2] * v;\n m[15] += m[3] * v;\n return m;\n}\n\nfunction multiplyTranslateY(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[4] * v;\n m[13] += m[5] * v;\n m[14] += m[6] * v;\n m[15] += m[7] * v;\n return m;\n}\n\nfunction multiplyTranslateZ(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[8] * v;\n m[13] += m[9] * v;\n m[14] += m[10] * v;\n m[15] += m[11] * v;\n return m;\n}\n\nfunction multiplyRotateX(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let e = m[4], f = m[5], g = m[6], h = m[7], i = m[8], k = m[10], l = m[11];\n m[4] = e * cos + i * sin;\n m[5] = f * cos + g * sin;\n m[6] = g * cos + k * sin;\n m[7] = h * cos + l * sin;\n m[8] = e * -sin + i * cos;\n m[9] = f * -sin + g * cos;\n m[10] = g * -sin + k * cos;\n m[11] = h * -sin + l * cos;\n return m;\n}\n\nfunction multiplyRotateY(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let a = m[0], b = m[1], c = m[2], d = m[3], i = m[8], j = m[9], k = m[10], l = m[11];\n m[0] = a * cos + i * -sin;\n m[1] = b * cos + j * -sin;\n m[2] = c * cos + k * -sin;\n m[3] = d * cos + l * -sin;\n m[8] = a * sin + i * cos;\n m[9] = b * sin + j * cos;\n m[10] = c * sin + k * cos;\n m[11] = d * sin + l * cos;\n return m;\n}\n\nfunction multiplyRotateZ(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5], g = m[6], h = m[7];\n m[0] = a * cos + e * sin;\n m[1] = b * cos + f * sin;\n m[2] = c * cos + g * sin;\n m[3] = d * cos + h * sin;\n m[4] = a * -sin + e * cos;\n m[5] = b * -sin + f * cos;\n m[6] = c * -sin + g * cos;\n m[7] = d * -sin + h * cos;\n return m;\n}\n\nfunction multiplySkewX(m, v) {\n if(!v) {\n return m;\n }\n let tan = Math.tan(v);\n m[4] += m[0] * tan;\n m[5] += m[1] * tan;\n m[6] += m[2] * tan;\n m[7] += m[3] * tan;\n return m;\n}\n\nfunction multiplySkewY(m, v) {\n if(!v) {\n return m;\n }\n let tan = Math.tan(v);\n m[0] += m[4] * tan;\n m[1] += m[5] * tan;\n m[2] += m[6] * tan;\n m[3] += m[7] * tan;\n return m;\n}\n\nfunction multiplyScaleX(m, v) {\n if(v === 1) {\n return m;\n }\n m[0] *= v;\n m[1] *= v;\n m[2] *= v;\n m[3] *= v;\n return m;\n}\n\nfunction multiplyScaleY(m, v) {\n if(v === 1) {\n return m;\n }\n m[4] *= v;\n m[5] *= v;\n m[6] *= v;\n m[7] *= v;\n return m;\n}\n\nfunction multiplyScaleZ(m, v) {\n if(v === 1) {\n return m;\n }\n m[8] *= v;\n m[9] *= v;\n m[10] *= v;\n m[11] *= v;\n return m;\n}\n\nfunction multiplyPerspective(m, v) {\n if(!v || v <= 0) {\n return m;\n }\n v = Math.max(v, 1);\n v = -1 / v;\n m[8] += m[12] * v;\n m[9] += m[13] * v;\n m[10] += m[14] * v;\n m[11] += m[15] * v;\n return m;\n}\n\nfunction calPoint(point, m) {\n if(m && !isE(m)) {\n let { x, y, z, w } = point;\n z = z || 0;\n if(w === undefined || w === null) {\n w = 1;\n }\n let a1 = m[0], b1 = m[1], c1 = m[2], d1 = m[3];\n let a2 = m[4], b2 = m[5], c2 = m[6], d2 = m[7];\n let a3 = m[8], b3 = m[9], c3 = m[10], d3 = m[11];\n let a4 = m[12], b4 = m[13], c4 = m[14], d4 = m[15];\n let o = {\n x: ((a1 === 1) ? x : (x * a1)) + (a2 ? (y * a2) : 0) + ((w === 1) ? a4 : a4 * w),\n y: ((b1 === 1) ? x : (x * b1)) + (b2 ? (y * b2) : 0) + ((w === 1) ? b4 : b4 * w),\n z: 0,\n w,\n };\n if(d1 || d2 || d3) {\n o.w = x * d1 + y * d2 + z * d3 + d4 * w;\n }\n else if(d4 !== 1) {\n o.w *= d4;\n }\n if(z) {\n o.x += z * a3;\n o.y += z * b3;\n o.z = x * c1 + y * c2 + c4 + z * c3;\n }\n else if(c1 || c2 || c4) {\n o.z = x * c1 + y * c2 + c4;\n }\n return o;\n }\n return point;\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5];\n if(a === 1 && b === 0 && c === 0 && d === 1 && e === 0 && f === 0) {\n return m;\n }\n let divisor = a * d - b * c;\n if(divisor === 0) {\n return m;\n }\n return [d / divisor, -b / divisor, -c / divisor, a / divisor,\n (c * f - d * e) / divisor, (b * e - a * f) / divisor];\n}\n\n// 16位或者6位单位矩阵判断,空也认为是\nfunction isE(m) {\n if(!m || !m.length) {\n return true;\n }\n if(m.length === 16) {\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 0\n && m[4] === 0 && m[5] === 1 && m[6] === 0 && m[7] === 0\n && m[8] === 0 && m[9] === 0 && m[10] === 1 && m[11] === 0\n && m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1;\n }\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0;\n}\n\n/**\n * 求任意4*4矩阵的逆矩阵,行列式为 0 则返回单位矩阵兜底\n * 格式:matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)\n * 参见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d()\n * 对应:\n * [\n * a1,a2,a3,a4,\n * b1,b2,b3,b4,\n * c1,c2,c3,c4,\n * d1,d2,d3,d4,\n * ]\n *\n * 根据公式 A* = |A|A^-1 来计算\n * A* 表示矩阵 A 的伴随矩阵,A^-1 表示矩阵 A 的逆矩阵,|A| 表示行列式的值\n *\n * @returns {number[]}\n */\n\nfunction inverse4(s) {\n let inv = [];\n\n inv[0] = s[5] * s[10] * s[15] - s[5] * s[11] * s[14] - s[9] * s[6] * s[15]\n + s[9] * s[7] * s[14] + s[13] * s[6] * s[11] - s[13] * s[7] * s[10];\n inv[4] = -s[4] * s[10] * s[15] + s[4] * s[11] * s[14] + s[8] * s[6] * s[15]\n - s[8] * s[7] * s[14] - s[12] * s[6] * s[11] + s[12] * s[7] * s[10];\n inv[8] = s[4] * s[9] * s[15] - s[4] * s[11] * s[13] - s[8] * s[5] * s[15]\n + s[8] * s[7] * s[13] + s[12] * s[5] * s[11] - s[12] * s[7] * s[9];\n inv[12] = -s[4] * s[9] * s[14] + s[4] * s[10] * s[13] + s[8] * s[5] * s[14]\n - s[8] * s[6] * s[13] - s[12] * s[5] * s[10] + s[12] * s[6] * s[9];\n\n inv[1] = -s[1] * s[10] * s[15] + s[1] * s[11] * s[14] + s[9] * s[2] * s[15]\n - s[9] * s[3] * s[14] - s[13] * s[2] * s[11] + s[13] * s[3] * s[10];\n inv[5] = s[0] * s[10] * s[15] - s[0] * s[11] * s[14] - s[8] * s[2] * s[15]\n + s[8] * s[3] * s[14] + s[12] * s[2] * s[11] - s[12] * s[3] * s[10];\n inv[9] = -s[0] * s[9] * s[15] + s[0] * s[11] * s[13] + s[8] * s[1] * s[15]\n - s[8] * s[3] * s[13] - s[12] * s[1] * s[11] + s[12] * s[3] * s[9];\n inv[13] = s[0] * s[9] * s[14] - s[0] * s[10] * s[13] - s[8] * s[1] * s[14]\n + s[8] * s[2] * s[13] + s[12] * s[1] * s[10] - s[12] * s[2] * s[9];\n\n inv[2] = s[1] * s[6] * s[15] - s[1] * s[7] * s[14] - s[5] * s[2] * s[15]\n + s[5] * s[3] * s[14] + s[13] * s[2] * s[7] - s[13] * s[3] * s[6];\n inv[6] = -s[0] * s[6] * s[15] + s[0] * s[7] * s[14] + s[4] * s[2] * s[15]\n - s[4] * s[3] * s[14] - s[12] * s[2] * s[7] + s[12] * s[3] * s[6];\n inv[10] = s[0] * s[5] * s[15] - s[0] * s[7] * s[13] - s[4] * s[1] * s[15]\n + s[4] * s[3] * s[13] + s[12] * s[1] * s[7] - s[12] * s[3] * s[5];\n inv[14] = -s[0] * s[5] * s[14] + s[0] * s[6] * s[13] + s[4] * s[1] * s[14]\n - s[4] * s[2] * s[13] - s[12] * s[1] * s[6] + s[12] * s[2] * s[5];\n\n inv[3] = -s[1] * s[6] * s[11] + s[1] * s[7] * s[10] + s[5] * s[2] * s[11]\n - s[5] * s[3] * s[10] - s[9] * s[2] * s[7] + s[9] * s[3] * s[6];\n inv[7] = s[0] * s[6] * s[11] - s[0] * s[7] * s[10] - s[4] * s[2] * s[11]\n + s[4] * s[3] * s[10] + s[8] * s[2] * s[7] - s[8] * s[3] * s[6];\n inv[11] = -s[0] * s[5] * s[11] + s[0] * s[7] * s[9] + s[4] * s[1] * s[11]\n - s[4] * s[3] * s[9] - s[8] * s[1] * s[7] + s[8] * s[3] * s[5];\n inv[15] = s[0] * s[5] * s[10] - s[0] * s[6] * s[9] - s[4] * s[1] * s[10]\n + s[4] * s[2] * s[9] + s[8] * s[1] * s[6] - s[8] * s[2] * s[5];\n\n let det = s[0] * inv[0] + s[1] * inv[4] + s[2] * inv[8] + s[3] * inv[12];\n if (det === 0) {\n return identity();\n }\n\n det = 1 / det;\n let d = [];\n for (let i = 0; i < 16; i++) {\n d[i] = inv[i] * det;\n }\n return d;\n}\n\n// 将4*4的16长度矩阵转成css/canvas的6位标准使用,忽略transform3d\nfunction m2m6(m) {\n return [\n m[0],\n m[1],\n m[4],\n m[5],\n m[12],\n m[13],\n ];\n}\n\nfunction point2d(point) {\n let w = point[3];\n if(w && w !== 1) {\n point = point.slice(0, 2);\n point[0] /= w;\n point[1] /= w;\n }\n return point;\n}\n\nfunction calRectPoint(xa, ya, xb, yb, matrix) {\n let { x: x1, y: y1, z: z1, w: w1 } = calPoint({ x: xa, y: ya, z: 0, w: 1 }, matrix);\n let { x: x3, y: y3, z: z3, w: w3 } = calPoint({ x: xb, y: yb, z: 0, w: 1 }, matrix);\n let x2, y2, z2, w2, x4, y4, z4, w4;\n // 无旋转的时候可以少算2个点\n if(w1 === 1 && w3 === 1\n && (!matrix || !matrix.length\n || !matrix[1] && !matrix[2] && !matrix[4] && !matrix[6] && !matrix[7] && !matrix[8])) {\n x2 = x3;\n y2 = y1;\n z2 = z3;\n x4 = x1;\n y4 = y3;\n z2 = z4 = z1;\n w2 = w4 = 1;\n }\n else {\n let t = calPoint({ x: xb, y: ya, z: 0, w: 1 }, matrix);\n x2 = t.x; y2 = t.y; z2 = t.z; w2 = t.w;\n t = calPoint({ x: xa, y: yb, z: 0, w: 1 }, matrix);\n x4 = t.x; y4 = t.y; z4 = t.z; w4 = t.w;\n }\n return { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 };\n}\n\nexport default {\n identity,\n multiply,\n multiplyTfo,\n tfoMultiply,\n multiplyTranslateX,\n multiplyTranslateY,\n multiplyTranslateZ,\n multiplyRotateX,\n multiplyRotateY,\n multiplyRotateZ,\n multiplySkewX,\n multiplySkewY,\n multiplyScaleX,\n multiplyScaleY,\n multiplyScaleZ,\n multiplyPerspective,\n calPoint,\n calRectPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","import mx from '../math/matrix';\n\nlet toString = {}.toString;\nfunction isType(type) {\n return function(obj) {\n return toString.call(obj) === '[object ' + type + ']';\n }\n}\n\nlet isObject = isType('Object');\nlet isString = isType('String');\nlet isFunction = isType('Function');\nlet isNumber = isType('Number');\nlet isBoolean = isType('Boolean');\nlet isDate = isType('Date');\n\nlet hasOwn = {}.hasOwnProperty;\nlet fnToString = hasOwn.toString;\nlet ObjectFunctionString = fnToString.call(Object);\n\nfunction isNil(v) {\n return v === undefined || v === null;\n}\n\nfunction joinSourceArray(arr) {\n let res = '';\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n res += joinSourceArray(item);\n }\n else {\n res += stringify(item);\n }\n }\n return res;\n}\n\nfunction stringify(s) {\n if(isNil(s)) {\n return '';\n }\n return s.toString();\n}\n\nfunction encodeHtml(s, prop) {\n if(prop) {\n return s.replace(/\"/g, '"');\n }\n return s.replace(/&/g, '&').replace(/';\n vd.defs.forEach(item => {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += '';\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n s += '';\n return s;\n}\n\n// 普通元素\nfunction joinVd(vd) {\n if(vd.type === 'item' || vd.type === 'img') {\n let s = '';\n (vd.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n if(vd.tagName === 'text') {\n return '' + vd.content + '';\n }\n return '<' + vd.tagName + s + '/>';\n }\n else if(vd.type === 'text') {\n let s = '';\n // text有许多lineBox\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n return '' + s + '';\n }\n else if(vd.type === 'dom' || vd.type === 'geom') {\n let s = '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += '';\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n s += '';\n let { opacity, transform, visibility, mask, overflow, filter, mixBlendMode } = vd;\n return '' + s + '';\n }\n}\n\nfunction joinDef(def) {\n let s = '<' + def.tagName + ' id=\"' + def.uuid + '\"';\n if(def.tagName === 'mask' || def.tagName === 'clipPath') {\n // s += ' maskUnits=\"userSpaceOnUse\"';\n }\n else if(def.tagName === 'filter') {\n // s += ' filterUnits=\"userSpaceOnUse\"';\n }\n else {\n s += ' gradientUnits=\"userSpaceOnUse\"';\n }\n (def.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n (def.children || []).forEach(item => {\n s += joinItem(item);\n });\n s += '' + def.tagName + '>';\n return s;\n}\n\nfunction joinItem(item) {\n let s = '<' + item.tagName;\n (item.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>' + item.tagName + '>';\n return s;\n}\n\nfunction rgba2int(color) {\n if(Array.isArray(color)) {\n return color;\n }\n let res = [];\n if(!color || color === 'transparent') {\n res = [0, 0, 0, 0];\n }\n else if(color.charAt(0) === '#') {\n color = color.slice(1);\n if(color.length === 3) {\n res.push(parseInt(color.charAt(0) + color.charAt(0), 16));\n res.push(parseInt(color.charAt(1) + color.charAt(1), 16));\n res.push(parseInt(color.charAt(2) + color.charAt(2), 16));\n res[3] = 1;\n }\n else if(color.length === 6) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4), 16));\n res[3] = 1;\n }\n else if(color.length === 8) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4, 6), 16));\n res.push(parseInt(color.slice(6), 16) / 255);\n }\n else {\n res[0] = res[1] = res[2] = 0;\n res[3] = 1;\n }\n }\n else {\n let c = color.match(/rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)/i);\n if(c) {\n res = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])];\n if(!isNil(c[4])) {\n res[3] = parseFloat(c[4]);\n }\n else {\n res[3] = 1;\n }\n }\n else {\n res = [0, 0, 0, 0];\n }\n }\n return res;\n}\n\nfunction int2rgba(color) {\n if(Array.isArray(color)) {\n if(color.length === 3 || color.length === 4) {\n color[0] = Math.floor(Math.max(color[0], 0));\n color[1] = Math.floor(Math.max(color[1], 0));\n color[2] = Math.floor(Math.max(color[2], 0));\n if(color.length === 4) {\n color[3] = Math.max(color[3], 0);\n return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + color[3] + ')';\n }\n return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',1)';\n }\n // if(color.length === 4) {\n // color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));\n // return 'rgba(' + joinArr(color, ',') + ')';\n // }\n // else if(color.length === 3) {\n // color = color.map(c => Math.floor(c));\n // return 'rgba(' + joinArr(color, ',') + ',1)';\n // }\n }\n return color || 'rgba(0,0,0,0)';\n}\n\nfunction int2invert(color) {\n if(Array.isArray(color)) {\n color = color.slice(0);\n color[0] = 255 - color[0];\n color[1] = 255 - color[1];\n color[2] = 255 - color[2];\n if(color.length === 4) {\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return 'rgba(0,0,0,0)';\n}\n\nfunction arr2hash(arr) {\n let hash = {};\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n hash[item[0]] = item[1];\n }\n else {\n for(let list = Object.keys(item), j = list.length - 1; j >= 0; j--) {\n let k = list[j];\n hash[k] = item[k];\n }\n }\n }\n return hash;\n}\n\nfunction hash2arr(hash) {\n if(Array.isArray(hash)) {\n return hash;\n }\n let arr = [];\n for(let list = Object.keys(hash), i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n arr.push([k, hash[k]]);\n }\n return arr;\n}\n\nfunction clone(obj) {\n if(isNil(obj) || typeof obj !== 'object') {\n return obj;\n }\n if(util.isDate(obj)) {\n return new Date(obj);\n }\n if(!isPlainObject(obj) && !Array.isArray(obj)) {\n return obj;\n }\n let n = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(i => {\n n[i] = clone(obj[i]);\n });\n return n;\n}\n\n/**\n * 简化的arr对比,arr中只有arr和其它类型,其它类型对比值或引用,arr递归\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equalArr(a, b) {\n if(!a || !b) {\n return a === b;\n }\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i];\n let bi = b[i];\n let isArrayA = Array.isArray(ai);\n let isArrayB = Array.isArray(bi);\n if(isArrayA && isArrayB) {\n if(!equalArr(ai, bi)) {\n return false;\n }\n }\n else if(isArrayA || isArrayB) {\n return false;\n }\n else if(ai !== bi) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * 深度对比对象\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equal(a, b) {\n if(a === b) {\n return true;\n }\n if(isObject(a) && isObject(b)) {\n let hash = {};\n for(let i = 0, arr = Object.keys(a), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!b.hasOwnProperty(k) || !equal(a[k], b[k])) {\n return false;\n }\n hash[k] = true;\n }\n // a没有b有则false\n for(let i = 0, arr = Object.keys(b), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!hash.hasOwnProperty(k)) {\n return false;\n }\n }\n }\n else if(isDate(a) && isDate(b)) {\n return a.getTime() === b.getTime();\n }\n else if(Array.isArray(a) && Array.isArray(b)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equal(a[i], b[i])) {\n return false;\n }\n }\n }\n else {\n return a === b;\n }\n return true;\n}\n\nfunction extend(target, source, keys) {\n if(source === null || typeof source !== 'object') {\n return target;\n }\n if(!keys) {\n keys = Object.keys(source);\n }\n let i = 0;\n let len = keys.length;\n while(i < len) {\n let k = keys[i];\n target[k] = source[k];\n i++;\n }\n return target;\n}\n\nfunction joinArr(arr, split) {\n let s = arr.length ? arr[0] : '';\n for(let i = 1, len = arr.length; i < len; i++) {\n s += split + arr[i];\n }\n return s;\n}\n\nfunction transformBbox(bbox, matrix, dx = 0, dy = 0) {\n if(!mx.isE(matrix)) {\n let [x1, y1, x2, y2] = bbox;\n // 可能因filter的原因扩展范围\n if(dx) {\n x1 -= dx;\n x2 += dx;\n }\n if(dy) {\n y1 -= dy;\n y2 += dy;\n }\n let list = [x2, y1, x1, y2, x2, y2];\n let w;\n let t = mx.calPoint({ x: x1, y: y1, z: 0, w: 1 }, matrix);\n x1 = t.x; y1 = t.y; w = t.w;\n if(w && w !== 1) {\n x1 /= w;\n y1 /= w;\n }\n let xa = x1, ya = y1, xb = x1, yb = y1;\n for(let i = 0; i < 6; i += 2) {\n let x = list[i], y = list[i + 1];\n let t = mx.calPoint({ x, y, z: 0, w: 1 }, matrix);\n x = t.x; y = t.y; w = t.w;\n if(w && w !== 1) {\n x /= w;\n y /= w;\n }\n xa = Math.min(xa, x);\n xb = Math.max(xb, x);\n ya = Math.min(ya, y);\n yb = Math.max(yb, y);\n }\n return [xa, ya, xb, yb];\n }\n else {\n bbox = bbox.slice(0);\n if(dx || dy) {\n bbox = bbox.slice(0);\n bbox[0] -= dx;\n bbox[1] -= dy;\n bbox[2] += dx;\n bbox[3] += dy;\n }\n }\n return bbox;\n}\n\nfunction isPlainObject(obj) {\n if(!obj || toString.call(obj) !== '[object Object]') {\n return false;\n }\n let proto = Object.getPrototypeOf(obj);\n if(!proto) {\n return true;\n }\n let Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;\n}\n\nfunction assignMatrix(t, v) {\n if(t && v) {\n t[0] = v[0];\n t[1] = v[1];\n t[2] = v[2];\n t[3] = v[3];\n t[4] = v[4];\n t[5] = v[5];\n t[6] = v[6];\n t[7] = v[7];\n t[8] = v[8];\n t[9] = v[9];\n t[10] = v[10];\n t[11] = v[11];\n t[12] = v[12];\n t[13] = v[13];\n t[14] = v[14];\n t[15] = v[15];\n }\n return t;\n}\n\nfunction prefixHex(s) {\n if(s.length === 1) {\n return '0' + s;\n }\n return s;\n}\n\nfunction replaceRgba2Hex(s) {\n return (s || '').replace(/rgba?\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+)\\s*)?\\)/ig, function($0, $1, $2, $3, $4) {\n let res = '#'\n + prefixHex(parseInt($1).toString(16))\n + prefixHex(parseInt($2).toString(16))\n + prefixHex(parseInt($3).toString(16));\n if($4) {\n res += prefixHex(Math.floor(parseFloat($4) * 255).toString(16));\n }\n return res;\n });\n}\n\nlet util = {\n isObject,\n isString,\n isFunction,\n isNumber,\n isBoolean,\n isDate,\n isNil,\n isPrimitive(v) {\n return util.isNil(v) || util.isBoolean(v) || util.isString(v) || util.isNumber(v);\n },\n // css中常用undefined/null表示auto本身\n isAuto(v) {\n return isNil(v) || v === 'auto';\n },\n isPlainObject,\n stringify,\n joinSourceArray(arr) {\n return joinSourceArray(arr);\n },\n encodeHtml,\n joinVirtualDom,\n joinVd,\n joinDef,\n rgba2int,\n int2rgba,\n int2invert,\n arr2hash,\n hash2arr,\n clone,\n equalArr,\n equal,\n extend,\n joinArr,\n transformBbox,\n assignMatrix,\n prefixHex,\n replaceRgba2Hex,\n};\n\nexport default util;\n","export default {\n flag: false,\n};\n","import util from './util';\nimport debug from './debug';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && OffscreenCanvas.prototype.getContext;\n\nfunction offscreenCanvas(key, width, height, message) {\n let o;\n if(!key) {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else if(!CANVAS[key]) {\n o = CANVAS[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = CANVAS[key];\n }\n o.width = width;\n o.height = height;\n if(debug.flag) {\n o.style.width = width + 'px';\n o.style.height = height + 'px';\n if(key) {\n o.setAttribute('key', key);\n }\n if(message) {\n o.setAttribute('message', message);\n }\n document.body.appendChild(o);\n }\n let ctx = o.getContext('2d');\n return {\n canvas: o,\n ctx,\n enabled: true,\n available: true,\n release() {\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, width, height);\n this.available = false;\n if(debug.flag && o) {\n document.body.removeChild(o);\n }\n o = null;\n },\n };\n}\n\nconst IMG = {};\nconst INIT = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst FONT = {};\nconst COMPONENT = {};\nlet div;\n\nconst SUPPORT_FONT = {};\nlet defaultFontFamilyData;\n\nfunction createDiv() {\n div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n div.style.whiteSpace = 'nowrap';\n document.body.appendChild(div);\n}\n\nlet inject = {\n measureTextSync(str, ff, fs, fw, isUpright) {\n if(!div) {\n createDiv();\n }\n div.style.fontFamily = ff;\n div.style.fontSize = fs + 'px';\n div.style.fontWeight = fw;\n if(isUpright) {\n div.style.writingMode = 'vertical-lr';\n }\n else {\n div.style.writingMode = 'horizontal-tb';\n }\n div.innerHTML = str.replace(/' + str.charAt(i).replace('<', '<').replace(/[ \\n]/, ' ') + '';\n }\n div.innerHTML = s;\n let max = 0;\n let cns = div.childNodes;\n for(let i = 0, len = cns.length; i < len; i++) {\n let node = cns[i];\n // clientWidth只返回ceil整数,精度必须用getComputedStyle\n max = Math.max(max, parseFloat(window.getComputedStyle(node, null).width));\n }\n return max;\n },\n IMG,\n INIT,\n LOADED,\n LOADING,\n measureImg(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb && cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.measureImg(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb && cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Measure img invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let img = new Image();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n img.onerror = function(e) {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n if(url.substr(0, 5) !== 'data:') {\n let host = /^(?:\\w+:)?\\/\\/([^/:]+)/.exec(url);\n if(host) {\n if(typeof location === 'undefined' || location.hostname !== host[1]) {\n img.crossOrigin = 'anonymous';\n }\n }\n }\n img.src = url;\n if(debug.flag && typeof document !== 'undefined') {\n document.body.appendChild(img);\n }\n }\n },\n warn(s) {\n console.warn(s);\n },\n error(s) {\n console.error(s);\n },\n requestAnimationFrame(cb) {\n if(!cb) {\n return;\n }\n let res;\n if(typeof requestAnimationFrame !== 'undefined') {\n inject.requestAnimationFrame = requestAnimationFrame.bind(null);\n res = requestAnimationFrame(cb);\n }\n else {\n res = setTimeout(cb, SPF);\n inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, SPF);\n };\n }\n return res;\n },\n cancelAnimationFrame(id) {\n let res;\n if(typeof cancelAnimationFrame !== 'undefined') {\n inject.cancelAnimationFrame = cancelAnimationFrame.bind(null);\n res = cancelAnimationFrame(id);\n }\n else {\n res = clearTimeout(id);\n inject.cancelAnimationFrame = function(id) {\n return clearTimeout(id);\n };\n }\n return res;\n },\n now() {\n if(typeof performance !== 'undefined') {\n inject.now = function() {\n return Math.floor(performance.now());\n };\n return Math.floor(performance.now());\n }\n inject.now = Date.now.bind(Date);\n return Date.now();\n },\n hasOffscreenCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getOffscreenCanvas(width, height, key, message) {\n return offscreenCanvas(key, width, height, message);\n },\n isDom(o) {\n if(o) {\n if(util.isString(o)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.Element && (o instanceof window.Element)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (o instanceof window.OffscreenCanvas)) {\n return true;\n }\n // worker\n if(typeof self !== 'undefined' && self.OffscreenCanvas && (o instanceof self.OffscreenCanvas)) {\n return true;\n }\n if(util.isFunction(o.getElementsByTagName)) {\n return true;\n }\n }\n return false;\n },\n isWebGLTexture(o) {\n if(o && typeof WebGLTexture !== 'undefined') {\n return o instanceof WebGLTexture;\n }\n },\n defaultFontFamily: 'arial',\n getFontCanvas() {\n return inject.getOffscreenCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__', null);\n },\n checkSupportFontFamily(ff) {\n ff = ff.toLowerCase();\n // 强制arial兜底\n if(ff === this.defaultFontFamily) {\n return true;\n }\n if(SUPPORT_FONT.hasOwnProperty(ff)) {\n return SUPPORT_FONT[ff];\n }\n let canvas = inject.getFontCanvas();\n let context = canvas.ctx;\n context.textAlign = 'center';\n context.fillStyle = '#000';\n context.textBaseline = 'middle';\n if(!defaultFontFamilyData) {\n context.clearRect(0, 0, 16, 16);\n context.font = '16px ' + this.defaultFontFamily;\n context.fillText('a', 8, 8);\n defaultFontFamilyData = context.getImageData(0, 0, 16, 16).data;\n }\n context.clearRect(0, 0, 16, 16);\n if(/\\s/.test(ff)) {\n ff = '\"' + ff.replace(/\"/g, '\\\\\"') + '\"';\n }\n context.font = '16px ' + ff + ',' + this.defaultFontFamily;\n context.fillText('a', 8, 8);\n let data = context.getImageData(0, 0, 16, 16).data;\n for(let i = 0, len = data.length; i < len; i++) {\n if(defaultFontFamilyData[i] !== data[i]) {\n return SUPPORT_FONT[ff] = true;\n }\n }\n return SUPPORT_FONT[ff] = false;\n },\n FONT,\n loadFont(fontFamily, url, cb) {\n if(util.isFunction(url)) {\n cb = url;\n url = fontFamily;\n }\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadFont(item.fontFamily, item.url, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load font invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n if(!fontFamily) {\n fontFamily = url;\n }\n let cache = FONT[url] = FONT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n if(url instanceof ArrayBuffer) {\n success(url);\n }\n else {\n let request = new XMLHttpRequest();\n request.open('get', url, true);\n request.responseType = 'arraybuffer';\n request.onload = function() {\n if(request.response) {\n success(request.response);\n }\n else {\n error();\n }\n };\n request.onerror = error;\n request.send();\n }\n function success(ab) {\n let f = new FontFace(fontFamily, ab);\n f.load().then(function() {\n if(typeof document !== 'undefined') {\n document.fonts.add(f);\n }\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache, ab));\n }).catch(error);\n }\n function error() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n }\n }\n },\n loadComponent(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadComponent(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load component invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = COMPONENT[url] = COMPONENT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n script.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n document.head.appendChild(script);\n }\n },\n};\n\nexport default inject;\n","let TINF_OK = 0;\nlet TINF_DATA_ERROR = -3;\n\nfunction Tree() {\n this.table = new Uint16Array(16); /* table of code length counts */\n this.trans = new Uint16Array(288); /* code -> symbol translation table */\n}\n\nfunction Data(source, dest) {\n this.source = source;\n this.sourceIndex = 0;\n this.tag = 0;\n this.bitcount = 0;\n\n this.dest = dest;\n this.destLen = 0;\n\n this.ltree = new Tree(); /* dynamic length/symbol tree */\n this.dtree = new Tree(); /* dynamic distance tree */\n}\n\n/* --------------------------------------------------- *\n * -- uninitialized global data (static structures) -- *\n * --------------------------------------------------- */\n\nlet sltree = new Tree();\nlet sdtree = new Tree();\n\n/* extra bits and base tables for length codes */\nlet length_bits = new Uint8Array(30);\nlet length_base = new Uint16Array(30);\n\n/* extra bits and base tables for distance codes */\nlet dist_bits = new Uint8Array(30);\nlet dist_base = new Uint16Array(30);\n\n/* special ordering of code length codes */\nlet clcidx = new Uint8Array([\n 16, 17, 18, 0, 8, 7, 9, 6,\n 10, 5, 11, 4, 12, 3, 13, 2,\n 14, 1, 15\n]);\n\n/* used by tinf_decode_trees, avoids allocations every call */\nlet code_tree = new Tree();\nlet lengths = new Uint8Array(288 + 32);\n\n/* ----------------------- *\n * -- utility functions -- *\n * ----------------------- */\n\n/* build extra bits and base tables */\nfunction tinf_build_bits_base(bits, base, delta, first) {\n let i, sum;\n\n /* build bits table */\n for (i = 0; i < delta; ++i) bits[i] = 0;\n for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;\n\n /* build base table */\n for (sum = first, i = 0; i < 30; ++i) {\n base[i] = sum;\n sum += 1 << bits[i];\n }\n}\n\n/* build the fixed huffman trees */\nfunction tinf_build_fixed_trees(lt, dt) {\n let i;\n\n /* build fixed length tree */\n for (i = 0; i < 7; ++i) lt.table[i] = 0;\n\n lt.table[7] = 24;\n lt.table[8] = 152;\n lt.table[9] = 112;\n\n for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i;\n for (i = 0; i < 144; ++i) lt.trans[24 + i] = i;\n for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i;\n for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i;\n\n /* build fixed distance tree */\n for (i = 0; i < 5; ++i) dt.table[i] = 0;\n\n dt.table[5] = 32;\n\n for (i = 0; i < 32; ++i) dt.trans[i] = i;\n}\n\n/* given an array of code lengths, build a tree */\nlet offs = new Uint16Array(16);\n\nfunction tinf_build_tree(t, lengths, off, num) {\n let i, sum;\n\n /* clear code length count table */\n for (i = 0; i < 16; ++i) t.table[i] = 0;\n\n /* scan symbol lengths, and sum code length counts */\n for (i = 0; i < num; ++i) t.table[lengths[off + i]]++;\n\n t.table[0] = 0;\n\n /* compute offset table for distribution sort */\n for (sum = 0, i = 0; i < 16; ++i) {\n offs[i] = sum;\n sum += t.table[i];\n }\n\n /* create code->symbol translation table (symbols sorted by code) */\n for (i = 0; i < num; ++i) {\n if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i;\n }\n}\n\n/* ---------------------- *\n * -- decode functions -- *\n * ---------------------- */\n\n/* get one bit from source stream */\nfunction tinf_getbit(d) {\n /* check if tag is empty */\n if (!d.bitcount--) {\n /* load next tag */\n d.tag = d.source[d.sourceIndex++];\n d.bitcount = 7;\n }\n\n /* shift bit out of tag */\n let bit = d.tag & 1;\n d.tag >>>= 1;\n\n return bit;\n}\n\n/* read a num bit value from a stream and add base */\nfunction tinf_read_bits(d, num, base) {\n if (!num)\n return base;\n\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n let val = d.tag & (0xffff >>> (16 - num));\n d.tag >>>= num;\n d.bitcount -= num;\n return val + base;\n}\n\n/* given a data stream and a tree, decode a symbol */\nfunction tinf_decode_symbol(d, t) {\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n let sum = 0, cur = 0, len = 0;\n let tag = d.tag;\n\n /* get more bits while code value is above sum */\n do {\n cur = 2 * cur + (tag & 1);\n tag >>>= 1;\n ++len;\n\n sum += t.table[len];\n cur -= t.table[len];\n } while (cur >= 0);\n\n d.tag = tag;\n d.bitcount -= len;\n\n return t.trans[sum + cur];\n}\n\n/* given a data stream, decode dynamic trees from it */\nfunction tinf_decode_trees(d, lt, dt) {\n let hlit, hdist, hclen;\n let i, num, length;\n\n /* get 5 bits HLIT (257-286) */\n hlit = tinf_read_bits(d, 5, 257);\n\n /* get 5 bits HDIST (1-32) */\n hdist = tinf_read_bits(d, 5, 1);\n\n /* get 4 bits HCLEN (4-19) */\n hclen = tinf_read_bits(d, 4, 4);\n\n for (i = 0; i < 19; ++i) lengths[i] = 0;\n\n /* read code lengths for code length alphabet */\n for (i = 0; i < hclen; ++i) {\n /* get 3 bits code length (0-7) */\n let clen = tinf_read_bits(d, 3, 0);\n lengths[clcidx[i]] = clen;\n }\n\n /* build code length tree */\n tinf_build_tree(code_tree, lengths, 0, 19);\n\n /* decode code lengths for the dynamic trees */\n for (num = 0; num < hlit + hdist;) {\n let sym = tinf_decode_symbol(d, code_tree);\n\n switch (sym) {\n case 16:\n /* copy previous code length 3-6 times (read 2 bits) */\n let prev = lengths[num - 1];\n for (length = tinf_read_bits(d, 2, 3); length; --length) {\n lengths[num++] = prev;\n }\n break;\n case 17:\n /* repeat code length 0 for 3-10 times (read 3 bits) */\n for (length = tinf_read_bits(d, 3, 3); length; --length) {\n lengths[num++] = 0;\n }\n break;\n case 18:\n /* repeat code length 0 for 11-138 times (read 7 bits) */\n for (length = tinf_read_bits(d, 7, 11); length; --length) {\n lengths[num++] = 0;\n }\n break;\n default:\n /* values 0-15 represent the actual code lengths */\n lengths[num++] = sym;\n break;\n }\n }\n\n /* build dynamic trees */\n tinf_build_tree(lt, lengths, 0, hlit);\n tinf_build_tree(dt, lengths, hlit, hdist);\n}\n\n/* ----------------------------- *\n * -- block inflate functions -- *\n * ----------------------------- */\n\n/* given a stream and two trees, inflate a block of data */\nfunction tinf_inflate_block_data(d, lt, dt) {\n while (1) {\n let sym = tinf_decode_symbol(d, lt);\n\n /* check for end of block */\n if (sym === 256) {\n return TINF_OK;\n }\n\n if (sym < 256) {\n d.dest[d.destLen++] = sym;\n } else {\n let length, dist, offs;\n let i;\n\n sym -= 257;\n\n /* possibly get more bits from length code */\n length = tinf_read_bits(d, length_bits[sym], length_base[sym]);\n\n dist = tinf_decode_symbol(d, dt);\n\n /* possibly get more bits from distance code */\n offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);\n\n /* copy match */\n for (i = offs; i < offs + length; ++i) {\n d.dest[d.destLen++] = d.dest[i];\n }\n }\n }\n}\n\n/* inflate an uncompressed block of data */\nfunction tinf_inflate_uncompressed_block(d) {\n let length, invlength;\n let i;\n\n /* unread from bitbuffer */\n while (d.bitcount > 8) {\n d.sourceIndex--;\n d.bitcount -= 8;\n }\n\n /* get length */\n length = d.source[d.sourceIndex + 1];\n length = 256 * length + d.source[d.sourceIndex];\n\n /* get one's complement of length */\n invlength = d.source[d.sourceIndex + 3];\n invlength = 256 * invlength + d.source[d.sourceIndex + 2];\n\n /* check length */\n if (length !== (~invlength & 0x0000ffff))\n return TINF_DATA_ERROR;\n\n d.sourceIndex += 4;\n\n /* copy block */\n for (i = length; i; --i)\n d.dest[d.destLen++] = d.source[d.sourceIndex++];\n\n /* make sure we start next block on a byte boundary */\n d.bitcount = 0;\n\n return TINF_OK;\n}\n\n/* inflate stream from source to dest */\nfunction tinf_uncompress(source, dest) {\n let d = new Data(source, dest);\n let bfinal, btype, res;\n\n do {\n /* read final block flag */\n bfinal = tinf_getbit(d);\n\n /* read block type (2 bits) */\n btype = tinf_read_bits(d, 2, 0);\n\n /* decompress block */\n switch (btype) {\n case 0:\n /* decompress uncompressed block */\n res = tinf_inflate_uncompressed_block(d);\n break;\n case 1:\n /* decompress block with fixed huffman trees */\n res = tinf_inflate_block_data(d, sltree, sdtree);\n break;\n case 2:\n /* decompress block with dynamic huffman trees */\n tinf_decode_trees(d, d.ltree, d.dtree);\n res = tinf_inflate_block_data(d, d.ltree, d.dtree);\n break;\n default:\n res = TINF_DATA_ERROR;\n }\n\n if (res !== TINF_OK)\n throw new Error('Data error');\n\n } while (!bfinal);\n\n if (d.destLen < d.dest.length) {\n if (typeof d.dest.slice === 'function')\n return d.dest.slice(0, d.destLen);\n else\n return d.dest.subarray(0, d.destLen);\n }\n\n return d.dest;\n}\n\n/* -------------------- *\n * -- initialization -- *\n * -------------------- */\n\n/* build fixed huffman trees */\ntinf_build_fixed_trees(sltree, sdtree);\n\n/* build extra bits and base tables */\ntinf_build_bits_base(length_bits, length_base, 4, 3);\ntinf_build_bits_base(dist_bits, dist_base, 2, 1);\n\n/* fix a special case */\nlength_bits[28] = 0;\nlength_base[28] = 258;\n\nexport default tinf_uncompress;\n","import inject from './inject';\nimport inflate from './inflate';\n\nfunction getTag(dataView, offset) {\n let tag = '';\n for (let i = offset; i < offset + 4; i++) {\n tag += String.fromCharCode(dataView.getInt8(i));\n }\n return tag;\n}\n\nfunction getUShort(dataView, offset) {\n return dataView.getUint16(offset, false);\n}\n\nfunction getULong(dataView, offset) {\n return dataView.getUint32(offset, false);\n}\n\nfunction getFixed(dataView, offset) {\n let decimal = dataView.getInt16(offset, false);\n let fraction = dataView.getUint16(offset + 2, false);\n return decimal + fraction / 65535;\n}\n\nfunction parseOpenTypeTableEntries(data, numTables) {\n let tableEntries = [];\n let p = 12;\n for (let i = 0; i < numTables; i += 1) {\n let tag = getTag(data, p);\n let checksum = getULong(data, p + 4);\n let offset = getULong(data, p + 8);\n let length = getULong(data, p + 12);\n tableEntries.push({ tag: tag, checksum: checksum,\n offset: offset, length: length, compression: false });\n p += 16;\n }\n return tableEntries;\n}\n\nfunction parseWOFFTableEntries(data, numTables) {\n let tableEntries = [];\n let p = 44; // offset to the first table directory entry.\n for (let i = 0; i < numTables; i += 1) {\n let tag = getTag(data, p);\n let offset = getULong(data, p + 4);\n let compLength = getULong(data, p + 8);\n let origLength = getULong(data, p + 12);\n let compression;\n if (compLength < origLength) {\n compression = 'WOFF';\n }\n else {\n compression = false;\n }\n tableEntries.push({ tag: tag, offset: offset, compression: compression,\n compressedLength: compLength, length: origLength });\n p += 20;\n }\n return tableEntries;\n}\n\nfunction uncompressTable(data, tableEntry) {\n if (tableEntry.compression === 'WOFF') {\n let inBuffer = new Uint8Array(data.buffer, tableEntry.offset + 2, tableEntry.compressedLength - 2);\n let outBuffer = new Uint8Array(tableEntry.length);\n inflate(inBuffer, outBuffer);\n if(outBuffer.byteLength !== tableEntry.length) {\n inject.error('Decompression error: ' + tableEntry.tag + ' decompressed length doesn\\'t match recorded length');\n }\n let view = new DataView(outBuffer.buffer, 0);\n return { data: view, offset: 0 };\n }\n else {\n return { data: data, offset: tableEntry.offset };\n }\n}\n\nclass Parser {\n constructor(data, offset) {\n this.data = data;\n this.offset = offset;\n this.relativeOffset = 0;\n }\n\n parseUShort() {\n let v = this.data.getUint16(this.offset + this.relativeOffset);\n this.relativeOffset += 2;\n return v;\n }\n\n parseULong() {\n let v = getULong(this.data, this.offset + this.relativeOffset);\n this.relativeOffset += 4;\n return v;\n }\n\n parseShort() {\n let v = this.data.getInt16(this.offset + this.relativeOffset);\n this.relativeOffset += 2;\n return v;\n }\n\n parseFixed() {\n let v = getFixed(this.data, this.offset + this.relativeOffset);\n this.relativeOffset += 4;\n return v;\n }\n\n parseVersion(minorBase) {\n let major = getUShort(this.data, this.offset + this.relativeOffset);\n let minor = getUShort(this.data, this.offset + this.relativeOffset + 2);\n this.relativeOffset += 4;\n if(minorBase === undefined) {\n minorBase = 0x1000;\n }\n return major + minor / minorBase / 10;\n };\n}\n\nexport default {\n parse(arrayBuffer) {\n let data = new DataView(arrayBuffer, 0);\n let signature = getTag(data, 0);\n let numTables, tableEntries;\n if(signature === String.fromCharCode(0, 1, 0, 0) || signature === 'true' || signature === 'typ1') {\n numTables = getUShort(data, 4);\n tableEntries = parseOpenTypeTableEntries(data, numTables);\n }\n else if(signature === 'OTTO') {\n numTables = getUShort(data, 4);\n tableEntries = parseOpenTypeTableEntries(data, numTables);\n }\n else if(signature === 'wOFF') {\n let flavor = getTag(data, 4);\n if(flavor !== String.fromCharCode(0, 1, 0, 0) && flavor !== 'OTTO') {\n inject.error('Unsupported OpenType flavor ' + signature);\n return;\n }\n numTables = getUShort(data, 12);\n tableEntries = parseWOFFTableEntries(data, numTables);\n }\n else {\n inject.error('Unsupported OpenType signature ' + signature);\n }\n let emSquare = 2048, ascent, descent, lineGap = 0;\n for(let i = 0; i < numTables; i++) {\n let tableEntry = tableEntries[i];\n if(tableEntry.tag === 'head') {\n let table = uncompressTable(data, tableEntry);\n let p = new Parser(table.data, table.offset);\n p.parseVersion();\n p.parseFixed();\n p.parseULong();\n p.parseULong();\n p.parseUShort();\n emSquare = p.parseUShort();\n }\n else if(tableEntry.tag === 'hhea') {\n let table = uncompressTable(data, tableEntry);\n let p = new Parser(table.data, table.offset);\n p.parseVersion();\n ascent = Math.abs(p.parseShort());\n descent = Math.abs(p.parseShort());\n lineGap = Math.abs(p.parseShort() || 0);\n }\n }\n return {\n emSquare,\n ascent,\n descent,\n lineGap,\n };\n },\n};\n","import util from '../util/util';\nimport inject from '../util/inject';\nimport opentype from '../util/opentype';\n\nconst { isString } = util;\n\nconst CALLBACK = {};\n\nlet o = {\n info: {\n arial: {\n lhr: 1.14990234375, // 默认line-height ratio,(67+1854+434)/2048\n // car: 1.1171875, // content-area ratio,(1854+434)/2048\n blr: 0.9052734375, // base-line ratio,1854/2048\n // mdr: 0.64599609375, // middle ratio,(1854-1062/2)/2048\n lgr: 0.03271484375, // line-gap ratio,67/2048,默认0\n },\n helvetica: {\n lhr: 1.14990234375, // (8+1900+447)/2048\n blr: 0.927734375, // 1900/2048\n lgr: 0.00390625, // 8/2048\n },\n verdana: {\n lhr: 1.21533203125, // (0+2059+430)/2048\n blr: 1.00537109375, // 2059/2048\n },\n tahoma: {\n lhr: 1.20703125, // (0+2049+423)/2048\n blr: 1.00048828125, // 2049/2048\n },\n georgia: {\n lhr: 1.13623046875, // (0+1878+449)/2048\n blr: 0.9169921875, // 1878/2048\n },\n 'courier new': {\n lhr: 1.1328125, // (0+1705+615)/2048\n blr: 0.83251953125, // 1705/2048\n },\n 'pingfang sc': {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06, // 1060/1000\n },\n simsun: {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06,\n },\n },\n support(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].checked;\n },\n register(name, url, data) { // url和data同时需要,也可以先data后url,不能先url后data\n name = name.toLowerCase();\n if(!isString(url) && !(url instanceof ArrayBuffer)) {\n data = url;\n url = null;\n }\n let info = this.info;\n let fontInfo = info[name] = info[name] || {};\n if(url && !fontInfo.url) { // 不能覆盖\n fontInfo.url = url;\n inject.loadFont(name, url, function(res, ab) {\n fontInfo.success = res.success;\n if(res.success) {\n // 手动指定更高优先级,不解析\n if(!fontInfo.lhr && ab) {\n let r = opentype.parse(ab);\n setData(r);\n }\n // 回调\n let list = CALLBACK[name] || [];\n while(list.length) {\n let node = list.pop();\n node.__emitFontRegister(name);\n }\n }\n });\n }\n // 防止先没url只注册,再调用只传url的情况\n if(!data || fontInfo.lhr) {\n return;\n }\n setData(data);\n function setData(data) {\n let { emSquare = 2048, ascent, descent, lineGap = 0 } = data;\n if(!ascent || !descent) {\n return;\n }\n Object.assign(fontInfo, {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\n });\n }\n },\n hasRegister(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].hasOwnProperty('lhr');\n },\n hasLoaded(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].success;\n },\n onRegister(fontFamily, node) {\n let list = CALLBACK[fontFamily] = CALLBACK[fontFamily] || [];\n list.push(node);\n },\n offRegister(fontFamily, node) {\n let list = CALLBACK[fontFamily] = CALLBACK[fontFamily] || [];\n let i = list.indexOf(node);\n if(i > -1) {\n list.splice(i, 1);\n }\n }\n};\n\no.info['宋体'] = o.info.simsun;\no.info['pingfang'] = o.info['pingfang sc'];\n\nexport default o;\n","import inject from '../util/inject';\n\nconst DOM = {\n position: 'static',\n display: 'block',\n boxSizing: 'contentBox',\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n color: 'inherit',\n fontStyle: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n backgroundImage: null,\n backgroundColor: 'transparent',\n backgroundSize: 'auto',\n backgroundRepeat: 'repeat',\n backgroundPositionX: 0,\n backgroundPositionY: 0,\n backgroundClip: 'borderBox',\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderTopColor: 'transparent',\n borderRightColor: 'transparent',\n borderBottomColor: 'transparent',\n borderLeftColor: 'transparent',\n borderTopStyle: 'none',\n borderRightStyle: 'none',\n borderBottomStyle: 'none',\n borderLeftStyle: 'none',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n width: 'auto',\n height: 'auto',\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: 'auto',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n order: 0,\n justifyContent: 'flexStart',\n alignItems: 'stretch',\n alignSelf: 'auto',\n alignContent: 'stretch',\n textAlign: 'inherit',\n letterSpacing: 'inherit',\n transformOrigin: 'center',\n visibility: 'inherit',\n opacity: 1,\n zIndex: 0,\n transform: null,\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n skewX: 0,\n skewY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate3d: '0, 0, 0, 0',\n perspective: 0,\n perspectiveOrigin: 'center',\n transformStyle: 'flat',\n backfaceVisibility: 'visible',\n filter: null,\n boxShadow: null,\n pointerEvents: 'inherit',\n overflow: 'visible',\n mixBlendMode: 'normal',\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n lineClamp: 0,\n textStrokeWidth: 'inherit',\n textStrokeColor: 'inherit',\n textStrokeOver: 'inherit',\n writingMode: 'inherit',\n fontSizeShrink: 0,\n};\n\nconst GEOM = {\n fill: 'transparent',\n stroke: '#000',\n strokeWidth: 1,\n strokeDasharray: '',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: 4,\n fillRule: 'nonzero',\n};\n\nconst DOM_ENTRY_SET = [];\nconst DOM_KEY_SET = [];\nObject.keys(DOM).forEach(k => {\n DOM_KEY_SET.push(k);\n let v = DOM[k];\n DOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nconst GEOM_ENTRY_SET = [];\nconst GEOM_KEY_SET = [];\nObject.keys(GEOM).forEach(k => {\n GEOM_KEY_SET.push(k);\n let v = GEOM[k];\n GEOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nconst INHERIT = {\n get fontFamily() {\n return inject.defaultFontFamily;\n },\n fontSize: 16,\n fontWeight: 400,\n fontStyle: 'normal',\n color: '#000',\n textAlign: 'left',\n visibility: 'visible',\n pointerEvents: 'auto',\n textStrokeColor: '#000',\n textStrokeWidth: 0,\n textStrokeOver: 'none',\n writingMode: 'horizontalTb',\n};\n\nconst INHERIT_KEY_SET = [];\nObject.keys(INHERIT).forEach(k => {\n INHERIT_KEY_SET.push(k);\n});\n\n// 默认值放第一个\nconst VALID_STRING_VALUE = {\n position: ['static', 'relative', 'absolute'],\n display: ['block', 'inlineBlock', 'inline', 'flex', 'none'],\n flexDirection: ['row', 'column', 'rowReverse', 'columnReverse'],\n flexWrap: ['wrap', 'wrapReverse', 'nowrap'],\n justifyContent: ['flexStart', 'center', 'flexEnd', 'spaceBetween', 'spaceAround', 'spaceEvenly'],\n alignItems: ['stretch', 'flexStart', 'center', 'flexEnd', 'baseline'],\n alignSelf: ['auto', 'stretch', 'flexStart', 'center', 'flexEnd', 'baseline'],\n overflow: ['visible', 'hidden'],\n mixBlendMode: ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten',\n 'colorDodge', 'colorBurn', 'hardLight', 'softLight', 'difference', 'exclusion',\n 'hue', 'saturation', 'color', 'luminosity'],\n borderTopStyle: ['solid', 'dashed', 'dotted'],\n borderRightStyle: ['solid', 'dashed', 'dotted'],\n borderBottomStyle: ['solid', 'dashed', 'dotted'],\n borderLeftStyle: ['solid', 'dashed', 'dotted'],\n backgroundClip: ['borderBox', 'paddingBox', 'contentBox'],\n textOverflow: ['clip', 'ellipsis'],\n alignContent: ['stretch', 'flexStart', 'center', 'flexEnd', 'spaceBetween', 'spaceAround'],\n transformStyle: ['flat', 'preserve3d'],\n backfaceVisibility: ['visible', 'hidden'],\n boxSizing: ['contentBox', 'borderBox'],\n}\n\nexport default {\n DOM,\n GEOM,\n isValid(i) {\n return DOM.hasOwnProperty(i) || GEOM.hasOwnProperty(i);\n },\n DOM_KEY_SET,\n GEOM_KEY_SET,\n DOM_ENTRY_SET,\n GEOM_ENTRY_SET,\n INHERIT,\n INHERIT_KEY_SET,\n VALID_STRING_VALUE,\n};\n","export default {\n position: /(([-+]?[\\d.]+[pxremvwhina%]*)|(left|top|right|bottom|center)){1,2}/ig,\n gradient: /\\b(\\w+)-?gradient\\((.+)\\)/i,\n img: /(?:\\burl\\((['\"]?)(.*?)\\1\\))|(?:\\b((data:)))/i,\n};\n","// 向量点乘积\nfunction dotProduct(x1, y1, x2, y2) {\n return x1 * x2 + y1 * y2;\n}\n\nfunction dotProduct3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return x1 * x2 + y1 * y2 + z1 * z2;\n}\n\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nfunction crossProduct3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return {\n x: y1 * z2 - y2 * z1,\n y: z1 * x2 - z2 * x1,\n z: x1 * y2 - x2 * y1,\n };\n}\n\n// 归一化\nfunction unitize(x, y) {\n let n = length(x, y);\n return {\n x: x / n,\n y: y / n,\n };\n}\n\nfunction unitize3(x, y, z) {\n if(y === undefined && z === undefined) {\n y = x.y;\n z = x.z;\n x = x.x;\n }\n let n = length3(x, y, z);\n return {\n x: x / n,\n y: y / n,\n z: z / n,\n };\n}\n\n// 是否平行\nfunction isParallel(x1, y1, x2, y2) {\n if(isZero(x1, y1, x2, y2)) {\n return true;\n }\n let ag = angle(x1, y1, x2, y2);\n if(Math.abs(ag) < 1e-9) {\n return true;\n }\n if(Math.PI - Math.abs(ag) < 1e-9) {\n return true;\n }\n return false;\n}\n\nfunction isParallel3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n if(isZero3(x1, y1, z1, x2, y2, z2)) {\n return true;\n }\n let ag = angle3(x1, y1, z1, x2, y2, z2);\n if(Math.abs(ag) < 1e-9) {\n return true;\n }\n if(Math.PI - Math.abs(ag) < 1e-9) {\n return true;\n }\n return false;\n}\n\n// 是否是零,考虑误差\nfunction isZero(x1, y1, x2, y2) {\n return Math.abs(x1) < 1e-9 && Math.abs(y1) < 1e-9\n && Math.abs(x2) < 1e-9 && Math.abs(y2) < 1e-9;\n}\n\nfunction isZero3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return Math.abs(x1) < 1e-9 && Math.abs(y1) < 1e-9 && Math.abs(z1) < 1e-9\n && Math.abs(x2) < 1e-9 && Math.abs(y2) < 1e-9 && Math.abs(z2) < 1e-9;\n}\n\n// 向量夹角\nfunction angle(x1, y1, x2, y2) {\n let cos = dotProduct(x1, y1, x2, y2) / (length(x1, y1) * length(x2, y2));\n if(cos < -1) {\n cos = -1;\n }\n else if(cos > 1) {\n cos = 1;\n }\n return Math.acos(cos);\n}\n\nfunction angle3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n let cos = dotProduct3(x1, y1, z1, x2, y2, z2) / (length3(x1, y1, z1) * length3(x2, y2, z2));\n if(cos < -1) {\n cos = -1;\n }\n else if(cos > 1) {\n cos = 1;\n }\n return Math.acos(cos);\n}\n\n// 向量长度\nfunction length(x, y) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n}\n\nfunction length3(x, y, z) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2));\n}\n\n// 获取任意一个垂直于目标的向量\nfunction getPerpendicularVector3(x, y, z) {\n let i, j, k, a, b;\n if(Math.abs(y) > Math.abs(x)) {\n if(Math.abs(z) > Math.abs(y)) {\n i = 2;\n j = 1;\n k = 0;\n a = z;\n b = -y;\n }\n else if(Math.abs(z) > Math.abs(x)) {\n i = 1;\n j = 2;\n k = 0;\n a = y;\n b = -z;\n }\n else {\n i = 1;\n j = 0;\n k = 2;\n a = y;\n b = -x;\n }\n }\n else if(Math.abs(z) > Math.abs(x)) {\n i = 2;\n j = 0;\n k = 1;\n a = z;\n b = -x;\n }\n else if(Math.abs(z) > Math.abs(y)) {\n i = 0;\n j = 2;\n k = 1;\n a = x;\n b = -z;\n }\n else {\n i = 0;\n j = 1;\n k = 2;\n a = x;\n b = -y;\n }\n let arr = [0, 0, 0];\n arr[i] = b;\n arr[j] = a;\n arr[k] = 0;\n return unitize3(arr[0], arr[1], arr[2]);\n}\n\nexport default {\n dotProduct,\n dotProduct3,\n crossProduct,\n crossProduct3,\n unitize,\n unitize3,\n isParallel,\n isParallel3,\n isZero,\n isZero3,\n angle,\n angle3,\n length,\n length3,\n getPerpendicularVector3,\n};\n","const STYLE_KEY = {\n POSITION: 0,\n DISPLAY: 1,\n TOP: 2,\n RIGHT: 3,\n BOTTOM: 4,\n LEFT: 5,\n MARGIN_TOP: 6,\n MARGIN_RIGHT: 7,\n MARGIN_BOTTOM: 8,\n MARGIN_LEFT: 9,\n PADDING_TOP: 10,\n PADDING_RIGHT: 11,\n PADDING_BOTTOM: 12,\n PADDING_LEFT: 13,\n FONT_SIZE: 14,\n FONT_FAMILY: 15,\n COLOR: 16,\n FONT_STYLE: 17,\n FONT_WEIGHT: 18,\n LINE_HEIGHT: 19,\n BACKGROUND_IMAGE: 20,\n BACKGROUND_COLOR: 21,\n BACKGROUND_SIZE: 22,\n BACKGROUND_REPEAT: 23,\n BACKGROUND_POSITION_X: 24,\n BACKGROUND_POSITION_Y: 25,\n BORDER_TOP_WIDTH: 26,\n BORDER_RIGHT_WIDTH: 27,\n BORDER_BOTTOM_WIDTH: 28,\n BORDER_LEFT_WIDTH: 29,\n BORDER_TOP_COLOR: 30,\n BORDER_RIGHT_COLOR: 31,\n BORDER_BOTTOM_COLOR: 32,\n BORDER_LEFT_COLOR: 33,\n BORDER_TOP_STYLE: 34,\n BORDER_RIGHT_STYLE: 35,\n BORDER_BOTTOM_STYLE: 36,\n BORDER_LEFT_STYLE: 37,\n BORDER_TOP_LEFT_RADIUS: 38,\n BORDER_TOP_RIGHT_RADIUS: 39,\n BORDER_BOTTOM_RIGHT_RADIUS: 40,\n BORDER_BOTTOM_LEFT_RADIUS: 41,\n WIDTH: 42,\n HEIGHT: 43,\n FLEX_GROW: 44,\n FLEX_SHRINK: 45,\n FLEX_BASIS: 46,\n FLEX_DIRECTION: 47,\n JUSTIFY_CONTENT: 48,\n ALIGN_ITEMS: 49,\n ALIGN_SELF: 50,\n TEXT_ALIGN: 51,\n TRANSFORM_ORIGIN: 52,\n VISIBILITY: 53,\n OPACITY: 54,\n Z_INDEX: 55,\n TRANSFORM: 56,\n TRANSLATE_X: 57,\n TRANSLATE_Y: 58,\n TRANSLATE_Z: 59,\n SCALE_X: 60,\n SCALE_Y: 61,\n SCALE_Z: 62,\n SKEW_X: 63,\n SKEW_Y: 64,\n ROTATE_X: 65,\n ROTATE_Y: 66,\n ROTATE_Z: 67,\n ROTATE_3D: 68,\n PERSPECTIVE: 69,\n PERSPECTIVE_ORIGIN: 70,\n FILTER: 71,\n BOX_SHADOW: 72,\n POINTER_EVENTS: 73,\n OVERFLOW: 74,\n MIX_BLEND_MODE: 75,\n BACKGROUND_CLIP: 76,\n WHITE_SPACE: 77,\n TEXT_OVERFLOW: 78,\n LETTER_SPACING: 79,\n LINE_CLAMP: 80,\n ORDER: 81,\n FLEX_WRAP: 82,\n ALIGN_CONTENT: 83,\n TEXT_STROKE_WIDTH: 84,\n TEXT_STROKE_COLOR: 85,\n TEXT_STROKE_OVER: 86,\n WRITING_MODE: 87,\n TRANSFORM_STYLE: 88,\n BACKFACE_VISIBILITY: 89,\n BOX_SIZING: 90,\n FONT_SIZE_SHRINK: 91,\n // GEOM\n FILL: 92,\n STROKE: 93,\n STROKE_WIDTH: 94,\n STROKE_DASHARRAY: 95,\n STROKE_DASHARRAY_STR: 96,\n STROKE_LINECAP: 97,\n STROKE_LINEJOIN: 98,\n STROKE_MITERLIMIT: 99,\n FILL_RULE: 100,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 101,\n BORDER_TOP: 102,\n BORDER_RIGHT: 103,\n BORDER_BOTTOM: 104,\n BORDER_LEFT: 105,\n TRANSLATE_PATH: 106,\n};\n\nconst STYLE2LOWER_MAP = {};\nfunction style2Lower(s) {\n let res = STYLE2LOWER_MAP[s];\n if(!res) {\n res = STYLE2LOWER_MAP[s] = s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n }\n return res;\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n let res = STYLE2UPPER_MAP[s];\n if(!res) {\n res = STYLE2UPPER_MAP[s] = s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n }\n return res;\n}\n\nconst STYLE_R_KEY = {};\nconst STYLE_RV_KEY = {};\nconst STYLE_V_KEY = {};\nObject.keys(STYLE_KEY).forEach(k => {\n let k2 = STYLE_KEY[k];\n STYLE_R_KEY[k2] = k;\n let l = style2Lower(k);\n STYLE_RV_KEY[k2] = l;\n STYLE_V_KEY[l] = k2;\n});\n\nexport default {\n STYLE_KEY, // 大写常量为k,数字为值\n STYLE_R_KEY, // 数字为k,大写常量为值\n STYLE_RV_KEY, // 数字为k,小写为值\n STYLE_V_KEY, // 小写为k,数字为值\n style2Lower,\n style2Upper,\n ELLIPSIS: '…',\n};\n","import mx from './matrix';\nimport vector from './vector';\nimport enums from '../util/enums';\n\nconst H = 4 * (Math.sqrt(2) - 1) / 3;\nconst { crossProduct } = vector;\nconst { calPoint, isE } = mx;\nconst { STYLE_KEY: {\n WIDTH,\n HEIGHT,\n TRANSFORM_ORIGIN,\n} } = enums;\n\n/**\n * 圆弧拟合公式,根据角度求得3阶贝塞尔控制点比例长度,一般<=90,超过拆分\n * @param deg\n * @returns {number}\n */\nfunction h(deg) {\n deg *= 0.5;\n return 4 * ((1 - Math.cos(deg)) / Math.sin(deg)) / 3;\n}\n\n/**\n * 判断点是否在多边形内\n * @param x 点坐标\n * @param y\n * @param vertexes 多边形顶点坐标\n * @returns {boolean}\n */\nfunction pointInConvexPolygon(x, y, vertexes) {\n // 先取最大最小值得一个外围矩形,在外边可快速判断false\n let { x: xmax, y: ymax } = vertexes[0];\n let { x: xmin, y: ymin } = vertexes[0];\n let len = vertexes.length;\n for(let i = 1; i < len; i++) {\n let { x, y } = vertexes[i];\n xmax = Math.max(xmax, x);\n ymax = Math.max(ymax, y);\n xmin = Math.min(xmin, x);\n ymin = Math.min(ymin, y);\n }\n if(x < xmin || y < ymin || x > xmax || y > ymax) {\n return false;\n }\n let first;\n // 所有向量积均为非负数(逆时针,反过来顺时针是非正)说明在多边形内或边上\n for(let i = 0, len = vertexes.length; i < len; i++) {\n let { x: x1, y: y1 } = vertexes[i];\n let { x: x2, y: y2 } = vertexes[(i + 1) % len];\n let n = crossProduct(x2 - x1, y2 - y1, x - x1, y - y1);\n if(n !== 0) {\n n = n > 0 ? 1 : 0;\n // 第一个赋值,后面检查是否正负一致性,不一致是反例就跳出\n if(first === undefined) {\n first = n;\n }\n else if(first ^ n) {\n return false;\n }\n }\n }\n return true;\n}\n\n// 判断点是否在一个4边形内,比如事件发生是否在节点上\nfunction pointInQuadrilateral(x, y, x1, y1, x2, y2, x4, y4, x3, y3, matrix) {\n if(matrix && !isE(matrix)) {\n let w1, w2, w3, w4;\n let t = calPoint({ x: x1, y: y1 }, matrix);\n x1 = t.x; y1 = t.y; w1 = t.w;\n t = calPoint({ x: x2, y: y2 }, matrix);\n x2 = t.x; y2 = t.y; w2 = t.w;\n t = calPoint({ x: x3, y: y3 }, matrix);\n x3 = t.x; y3 = t.y; w3 = t.w;\n t = calPoint({ x: x4, y: y4 }, matrix);\n x4 = t.x; y4 = t.y; w4 = t.w;\n if(w1 && w1 !== 1) {\n x1 /= w1;\n y1 /= w1;\n }\n if(w2 && w2 !== 1) {\n x2 /= w2;\n y2 /= w2;\n }\n if(w3 && w3 !== 1) {\n x3 /= w3;\n y3 /= w3;\n }\n if(w4 && w4 !== 1) {\n x4 /= w4;\n y4 /= w4;\n }\n return pointInConvexPolygon(x, y, [\n { x: x1, y: y1 },\n { x: x2, y: y2 },\n { x: x4, y: y4 },\n { x: x3, y: y3 },\n ]);\n }\n else {\n return x >= x1 && y >= y1 && x <= x4 && y <= y4;\n }\n}\n\n/**\n * 余弦定理3边长求夹角\n * @param a\n * @param b\n * @param c\n */\nfunction angleBySide(a, b, c) {\n let theta = (Math.pow(b, 2) + Math.pow(c, 2) - Math.pow(a, 2)) / (2 * b * c);\n return Math.acos(theta);\n}\n\n/**\n * 余弦定理2边长和夹角求3边\n * @param alpha 弧度\n * @param a\n * @param b\n */\nfunction sideByAngle(alpha, a, b) {\n let cos = Math.cos(alpha);\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * cos);\n}\n\n/**\n * 两点距离\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\nfunction pointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}\n\n/**\n * 三角形内心\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleIncentre(x1, y1, x2, y2, x3, y3) {\n let a = pointsDistance(x2, y2, x3, y3);\n let b = pointsDistance(x1, y1, x3, y3);\n let c = pointsDistance(x1, y1, x2, y2);\n return {\n x: (a * x1 + b * x2 + c * x3) / (a + b + c),\n y: (a * y1 + b * y2 + c * y3) / (a + b + c),\n };\n}\n\n/**\n * 椭圆圆心和长短轴生成4个端点和控制点\n */\nfunction ellipsePoints(x, y, a, b = a) {\n let ox = a * H;\n let oy = b === a ? ox : b * H;\n return [\n [x - a, y],\n [x - a, y - oy, x - ox, y - b, x, y - b],\n [x + ox, y - b, x + a, y - oy, x + a, y],\n [x + a, y + oy, x + ox, y + b, x, y + b],\n [x - ox, y + b, x - a, y + oy, x - a, y],\n ];\n}\n\n/**\n * 扇形圆心和半径起始角度生成4个端点和控制点\n * 分为4个象限进行拟合,0、1、2、3\n */\nfunction sectorPoints(x, y, r, begin, end) {\n if(begin > end) {\n [begin, end] = [end, begin];\n }\n if(begin === end) {\n return [];\n }\n let list = [];\n let b = Math.floor(begin / 90);\n let e = Math.floor(end / 90);\n // 同象限直接算\n if(b === e || (e - b) === 1 && end % 90 === 0) {\n let h2 = h(d2r(Math.abs(begin - end)));\n let d = h2 * r;\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let alpha = Math.atan(d / r);\n if(b < 90) {\n // 第1个交点\n let rx = Math.sin(d2r(begin)) * r;\n let ry = Math.cos(d2r(begin)) * r;\n let p1 = [x + rx, y - ry];\n // 第1个控制点\n let deg = alpha + d2r(begin);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x + rx, y - ry];\n // 第2个交点\n rx = Math.sin(d2r(end)) * r;\n ry = Math.cos(d2r(end)) * r;\n let p4 = [x + rx, y - ry];\n // 第2个控制点\n deg = d2r(end) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x + rx, y - ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 180) {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 90)) * r;\n let ry = Math.sin(d2r(begin - 90)) * r;\n let p1 = [x + rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 90);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x + rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 90)) * r;\n ry = Math.sin(d2r(end - 90)) * r;\n let p4 = [x + rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 90) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x + rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 270) {\n // 第1个交点\n let rx = Math.sin(d2r(begin - 180)) * r;\n let ry = Math.cos(d2r(begin - 180)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 180);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.sin(d2r(end - 180)) * r;\n ry = Math.cos(d2r(end - 180)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 180) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 270)) * r;\n let ry = Math.sin(d2r(begin - 270)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 270);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 270)) * r;\n ry = Math.sin(d2r(end - 270)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 270) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n }\n // 跨象限循环算\n else {\n let i = b;\n let temp = [];\n for(; i <= e; i++) {\n if(i === 0) {\n let res = sectorPoints(x, y, r, begin, 90);\n temp.push(res);\n }\n else if(i === 1) {\n // 防止90~90这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 90) {\n let res = sectorPoints(x, y, r, begin < 90 ? 90 : begin, end > 180 ? 180 : end);\n temp.push(res);\n }\n }\n else if(i === 2) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 180) {\n let res = sectorPoints(x, y, r, begin < 180 ? 180 : begin, end > 270 ? 270 : end);\n temp.push(res);\n }\n }\n else if(i === 3) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 270) {\n let res = sectorPoints(x, y, r, begin < 270 ? 270 : begin, end);\n temp.push(res);\n }\n }\n }\n // 去掉重复的首尾扇弧点\n list = temp[0];\n for(let i = 1, len = temp.length; i < len; i++) {\n list.push(temp[i][1]);\n }\n }\n return list;\n}\n\n/**\n * 获取2个矩形重叠区域,如不重叠返回null\n * @param a\n * @param b\n */\nfunction getRectsIntersection(a, b) {\n if(!isRectsOverlap(a, b)) {\n return null;\n }\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n return [\n Math.max(ax1, bx1),\n Math.max(ay1, by1),\n Math.min(ax4, bx4),\n Math.min(ay4, by4),\n ];\n}\n\n/**\n * 2个矩形是否重叠\n */\nfunction isRectsOverlap(a, b, includeIntersect) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(includeIntersect) {\n if(ax1 > bx4 || ay1 > by4 || bx1 > ax4 || by1 > ay4) {\n return false;\n }\n }\n else if(ax1 >= bx4 || ay1 >= by4 || bx1 >= ax4 || by1 >= ay4) {\n return false;\n }\n return true;\n}\n\n/**\n * 2个矩形是否包含,a包含b\n */\nfunction isRectsInside(a, b, includeIntersect) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(includeIntersect) {\n if(ax1 <= bx1 && ay1 <= by1 && ax4 >= bx4 && ay4 >= by4) {\n return true;\n }\n }\n else if(ax1 < bx1 && ay1 < by1 && ax4 > bx4 && ay4 > by4) {\n return true;\n }\n return false;\n}\n\nfunction calCoordsInNode(px, py, node) {\n let { matrix = [1, 0, 0, 1, 0, 0], computedStyle = [] } = node;\n let { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] = [width * 0.5, height * 0.5] } = computedStyle;\n let t = calPoint({ x: px * width - ox, y: py * height - oy }, matrix);\n return { x: t.x + ox, y: t.y + oy };\n}\n\nfunction calPercentInNode(x, y, node) {\n let { computedStyle: { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] } } = node;\n // 先求无旋转时右下角相对于原点的角度ds\n let ds = Math.atan((height - oy) / (width - ox));\n let { x: x1, y: y1 } = calCoordsInNode(1, 1, node);\n let d1;\n let deg;\n // 根据旋转后的坐标,分4个象限,求旋转后的右下角相对于原点的角度d1,得出偏移角度deg,分顺逆时针[-180, 180]\n if(x1 >= ox && y1 >= oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n }\n deg = d1 - ds;\n }\n else if(x1 >= ox && y1 < oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((oy - y1) / (x1 - ox));\n }\n deg = d1 + ds;\n }\n else if(x1 < ox && y1 >= oy) {\n d1 = Math.atan((y1 - oy) / (ox - x1));\n deg = d1 - ds;\n }\n else if(x1 < ox && y1 < oy) {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n if(ds >= d1) {\n deg = d1 + Math.PI - ds;\n }\n else {\n deg = Math.PI - d1 + ds;\n deg = -deg;\n }\n }\n else {\n deg = 0;\n }\n // 目标点到原点的边长不会变\n let dt = Math.sqrt(Math.pow(x - ox, 2) + Math.pow(y - oy, 2));\n // 分4个象限,先求目标点到原点的角度d2,再偏移deg后求得原始坐标\n let d2;\n if(x >= ox && y >= oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox));\n }\n }\n else if(x >= ox && y < oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = -Math.atan((y - oy) / (ox - x));\n }\n }\n else if(x < ox && y >= oy) {\n d2 = Math.PI - Math.atan((y - oy) / (ox - x));\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox)) - Math.PI;\n }\n d2 -= deg;\n if(d2 > Math.PI) {\n d2 -= Math.PI;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 > Math.PI * 0.5) {\n d2 = Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= 0) {\n return {\n x: (ox + dt * Math.cos(d2)) / width,\n y: (oy + dt * Math.sin(d2)) / height,\n };\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return {\n x: (ox + dt * Math.cos(d2)) / width,\n y: (oy - dt * Math.sin(d2)) / height,\n };\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return {\n x: (ox - dt * Math.cos(d2)) / width,\n y: (oy - dt * Math.sin(d2)) / height,\n };\n }\n d2 = -Math.PI - d2;\n return {\n x: (ox - dt * Math.cos(d2)) / width,\n y: (oy + dt * Math.sin(d2)) / height,\n };\n}\n\nfunction d2r(n) {\n return n * Math.PI / 180;\n}\n\nfunction r2d(n) {\n return n * 180 / Math.PI;\n}\n\nfunction pointOnCircle(x, y, r, deg) {\n if(deg >= 270) {\n deg -= 270;\n deg = d2r(deg);\n return {\n x: x - Math.cos(deg) * r,\n y: y - Math.sin(deg) * r,\n };\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return {\n x: x - Math.sin(deg) * r,\n y: y + Math.cos(deg) * r,\n };\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return {\n x: x + Math.cos(deg) * r,\n y: y + Math.sin(deg) * r,\n };\n }\n else {\n deg = d2r(deg);\n return {\n x: x + Math.sin(deg) * r,\n y: y - Math.cos(deg) * r,\n };\n }\n}\n\n// 3个点确定平面标准方程\nfunction getPlainNormalEquation(points) {\n let { x: x1, y: y1, z: z1 } = points[0];\n let { x: x2, y: y2, z: z2 } = points[1];\n let { x: x3, y: y3, z: z3 } = points[2];\n let a = (y2 - y1) * (z3 - z1) - (z2 - z1) * (y3 - y1);\n let b = (x3 - x1) * (z2 - z1) - (x2 - x1) * (z3 - z1);\n let c = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n let d = -(a * x1 + b * y1 + c * z1);\n return { a, b, c, d };\n}\n\nexport default {\n pointInConvexPolygon,\n pointInQuadrilateral,\n d2r,\n r2d,\n // 贝塞尔曲线模拟1/4圆弧比例\n H,\n // <90任意角度贝塞尔曲线拟合圆弧的比例公式\n h,\n angleBySide,\n sideByAngle,\n pointsDistance,\n triangleIncentre,\n ellipsePoints,\n sectorPoints,\n getRectsIntersection,\n isRectsOverlap,\n isRectsInside,\n calCoordsInNode,\n calPercentInNode,\n pointOnCircle,\n getPlainNormalEquation,\n};\n","/**\n * @typedef {Object} gradientStatement\n * @property {Array} color - 颜色rgba,0~255,如 [0, 255, 0, 255]\n * @property {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n\n/**\n * 获取渐变图像像素数组\n * @param {number} originX - 渐变中心x坐标(相对图片左上角(0,0)的值,可在图片外,下同)\n * @param {number} originY - 渐变中心y坐标\n * @param {number} width - 图片宽度\n * @param {number} height - 图片高度\n * @param {Array} stop - 渐变声明列表\n * @param data - canvas的imgData.data\n * @returns {Array} 图像像素数组,每4个元素(rgba)构成一个像素点\n * @example\n // 矩形宽度为200*200,此时坐标为0~199,渐变中心为中点时,应传入99.5,可消除零点问题\n // 若渐变中心在某一整数轴上,就会引入零点问题,此时零点取y轴正半轴的色值,要消除这个问题,可以对渐变中心增加一个偏移量,使其不为整数\n let w = 200;\n let h = 200;\n let ctx = document.getElementById('example').getContext('2d');\n let imgData = ctx.getImageData(0,0, w, h);\n let data = getConicGradientImage(99.5, 99.5, w, h, [{\n color: [0,0,0,255],\n angle: 0,\n } ,{\n color: [255,0,0,255],\n angle: 2 * Math.PI,\n }]);\n for (let i = 0; i < imgData.data.length; i++) {\n imgData.data[i] = data[i];\n }\n ctx.putImageData(imgData, 0, 0);\n */\nfunction getConicGradientImage(\n originX,\n originY,\n width,\n height,\n stop,\n data\n) {\n if(stop.length < 2) {\n throw new Error(\n 'Conic gradient should recieve at least 2 gradient statements (start line and end line).'\n );\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n /**\n * 根据坐标获取角度\n * @param {number} x - x坐标,左上角为原点\n * @param {number} y - y坐标,左上角为原点\n * @returns {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n let getAngle = (x, y) => {\n // 此函数注释内的x、y轴基于 (originX, originY)\n // 计算相对 (originX, originY) 的坐标(dx, dy)\n let dx = x - originX;\n let dy = originY - y;\n // 在y轴上\n if(dx === 0) {\n return dy < 0\n ? // y轴负半轴,\n 1 * Math.PI\n : // y轴正半轴,因此,(originX, originY) 的angle视作0\n 0;\n }\n // 在x轴上\n if(dy === 0) {\n return dx < 0\n ? // x轴负半轴\n 1.5 * Math.PI\n : // x轴正半轴\n 0.5 * Math.PI;\n }\n let atan = Math.atan(dy / dx);\n /**\n * 2 | 1\n * -----|-----\n * 3 | 4\n */\n // 第一象限,atan > 0\n // 第四象限,atan < 0\n if(dx > 0) {\n return 0.5 * Math.PI - atan;\n }\n // 第二象限,atan < 0\n // 第三象限,atan > 0\n if(dx < 0) {\n return 1.5 * Math.PI - atan;\n }\n };\n\n let increasingList = stop.map(item => ({\n color: item[0],\n angle: item[1] * Math.PI * 2,\n }));\n\n for(let y = 0; y < height; y++) {\n for(let x = 0; x < width; x++) {\n // step 1. 找到当前点坐标相对 (originX, originY) 的角度\n let angle = getAngle(x, y);\n // step 2. 找到当前点坐标对应的渐变区间\n let j;\n for(j = 0; j < increasingList.length && increasingList[j].angle <= angle; j++) {\n }\n let start = increasingList[j - 1];\n let end = increasingList[j];\n if(!(start && end)) {\n // step 2-1. 不在渐变区间里\n continue;\n }\n // step 3. 计算色值并填充\n let factor = (angle - start.angle) / (end.angle - start.angle);\n let color = end.color.map(\n (v, idx) => factor * (v - start.color[idx]) + start.color[idx]\n );\n let i = (x + y * width) * 4;\n data[i] = color[0];\n data[i+1] = color[1];\n data[i+2] = color[2];\n data[i+3] = Math.min(255, color[3] * 255);\n }\n }\n return data;\n}\n\nexport default {\n getConicGradientImage,\n};\n","import util from './util';\n\nconst { int2rgba } = util;\n\nfunction canvasPolygon(ctx, list, dx = 0, dy = 0) {\n if(!list || !list.length) {\n return;\n }\n let start = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item) && item.length) {\n start = i;\n break;\n }\n }\n if(start === -1) {\n return;\n }\n let first = list[start];\n ctx.moveTo(first[0] + dx, first[1] + dy);\n // 特殊的情况,布尔运算数学库会打乱原有顺序,致使第一个点可能有冗余的贝塞尔值,move到正确的索引坐标\n if(first.length === 4) {\n ctx.moveTo(first[2] + dx, first[3] + dy);\n }\n else if(first.length === 6) {\n ctx.moveTo(first[4] + dx, first[5] + dy);\n }\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n ctx.lineTo(item[0] + dx, item[1] + dy);\n }\n else if(item.length === 4) {\n ctx.quadraticCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy);\n }\n else if(item.length === 6) {\n ctx.bezierCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy, item[4] + dx, item[5] + dy);\n }\n }\n}\n\nfunction svgPolygon(list) {\n if(!list || !list.length) {\n return '';\n }\n let start = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item) && item.length) {\n start = i;\n break;\n }\n }\n if(start === -1) {\n return '';\n }\n let first = list[start];\n let s = 'M' + first[0] + ',' + first[1];\n if(first.length === 4) {\n s = 'M' + first[2] + ',' + first[3];\n }\n else if(first.length === 6) {\n s = 'M' + first[4] + ',' + first[5];\n }\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n s += 'L' + item[0] + ',' + item[1];\n }\n else if(item.length === 4) {\n s += 'Q' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3];\n }\n else if(item.length === 6) {\n s += 'C' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3] + ' ' + item[4] + ',' + item[5];\n }\n }\n return s;\n}\n\nfunction canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, num, dx = 0, dy = 0) {\n ctx.moveTo(x1 + dx, y1 + dy);\n if(num === 3) {\n ctx.bezierCurveTo(controlA[0] + dx, controlA[1] + dy, controlB[0] + dx, controlB[1], x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 2) {\n ctx.quadraticCurveTo(controlB[0] + dx, controlB[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 1) {\n ctx.quadraticCurveTo(controlA[0] + dx, controlA[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else {\n ctx.lineTo(x2 + dx, y2 + dy);\n return 1;\n }\n}\n\nfunction svgLine(x1, y1, x2, y2, controlA, controlB, num) {\n if(num === 3) {\n return 'M' + x1 + ',' + y1\n + 'C' + controlA[0] + ',' + controlA[1] + ' ' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 2) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 1) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlA[0] + ',' + controlA[1]\n + ' ' + x2 + ',' + y2;\n }\n else {\n return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2;\n }\n}\n\nfunction canvasFilter(filter) {\n let s = '';\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur') {\n s += `blur(${v}px)`;\n }\n else if(k === 'dropShadow') {\n // 浏览器暂未支持spread,去掉v[3]\n s += `drop-shadow(${v[0]}px ${v[1]}px ${v[2]}px ${int2rgba(v[4])})`;\n }\n else if(k === 'hueRotate') {\n s += `hue-rotate(${v}deg)`;\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n s += `${k}(${v}%)`;\n }\n });\n return s;\n}\n\nexport default {\n canvasPolygon,\n svgPolygon,\n canvasLine,\n svgLine,\n canvasFilter,\n svgFilter: canvasFilter,\n};\n","import geom from '../math/geom';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport unit from './unit';\n\nconst { H } = geom;\nconst { PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_TOP,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n FONT_SIZE,\n },\n} = enums;\n\n/* 获取合适的虚线实体空白宽度ps/pd和数量n\n * 总长total,start边长bs,end边长be,内容长w,\n * 实体长范围[smin,smax],空白长范围[dmin,dmax]\n */\nfunction calFitDashed(total, bs, be, w, smin, smax, dmin, dmax) {\n let n = 1;\n let ps = 1;\n let pd = 1;\n // 从最大实体空白长开始尝试\n outer:\n for(let i = smax; i >= smin; i--) {\n for(let j = dmax; j >= dmin; j--) {\n // 已知实体空白长度,n实体和n-1空白组成total,计算获取n数量\n let per = i + j;\n let num = Math.floor((total + j) / per);\n let k = j;\n // 可能除不尽,此时扩展空白长\n if(num * per < j + total) {\n let free = total - num * i;\n k = free / (num - 1);\n if(k > dmax) {\n continue;\n }\n }\n per = i + k;\n // bs比实体大才有效,因为小的话必定和第一个实体完整相连\n if(bs > 1 && bs > i) {\n let mo = bs % per;\n if(mo > i) {\n continue;\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n if(num > 0) {\n n = num;\n ps = i;\n pd = k;\n }\n break outer;\n }\n }\n return {\n n,\n ps,\n pd,\n };\n}\n\n// dashed时n个实线和n-1虚线默认以3:1宽度组成,dotted则是n和n以1:1组成\nfunction calDashed(style, m1, m2, m3, m4, bw) {\n let total = m4 - m1;\n let w = m3 - m2;\n let bs = m2 - m1;\n let be = m4 - m3;\n if(style === 'dotted') {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n else {\n let { n, ps, pd } = calFitDashed(total, bs, be, w, bw, bw * 3, Math.max(1, bw * 0.25), bw * 2);\n if(n === 1) {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n // 降级为dotted\n return { n, ps, pd };\n }\n}\n\n// 获取边框分割为几块的坐标,虚线分割为若干四边形、三边型、五边形\n// 三边形重复内外边交点形成四边形,五边形进行切割形成2个四边形\n// direction为上右下左0123\nfunction calPoints(borderWidth, borderStyle, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, direction, beginRadius, endRadius) {\n let points = [];\n if(borderStyle === 'none') {\n return points;\n }\n if(['dashed', 'dotted'].indexOf(borderStyle) > -1) {\n // 寻找一个合适的虚线线段长度和之间空白边距长度\n let { n, ps, pd } = (direction === 0 || direction === 2)\n ? calDashed(borderStyle, x1, x2, x3, x4, borderWidth)\n : calDashed(borderStyle, y1, y2, y3, y4, borderWidth);\n if(n > 1) {\n for(let i = 0; i < n; i++) {\n // 最后一个可能没有到底,延长之\n let isLast = i === n - 1;\n let main1;\n let main2;\n let cross1;\n let cross2;\n if(direction === 0 || direction === 2) {\n main1 = i ? (x1 + ps * i + pd * i) : x1;\n }\n else {\n main1 = i ? (y1 + ps * i + pd * i) : y1;\n }\n main2 = main1 + ps;\n if(direction === 0) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x4, y1],\n [x3, y2],\n [x2, y2]\n ]);\n }\n else {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n cross2 = y1 + (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y1 + (x4 - main1) * Math.tan(deg2);\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x4, y1],\n [main1, cross1]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross1]\n ]);\n if(isLast) {\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x2, y2]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross2],\n [x3, y2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y1],\n [main2, y1],\n [main2, y2],\n [x2, y2]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y1 + (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross2]\n ]);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y1],\n [x3, y1],\n [x3, y2],\n [main1, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x3, y2],\n [main1, y2]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, y2],\n [main1, y2]\n ]);\n }\n }\n }\n }\n else if(direction === 1) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n cross1 = x4 - (main1 - y1) * Math.tan(deg1);\n cross2 = x4 - (main2 - y1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2],\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x3 + (main1 - y3) * Math.tan(deg2);\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x3 + (main2 - y3) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross2, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, x4],\n [x4, x4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n }\n else if(direction === 2) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x3, y3],\n [x4, y4]\n ]);\n }\n else {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n cross2 = y4 - (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y4 - (x4 - main1) * Math.tan(deg2);\n cross2 = y4 - (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, cross1],\n [x4, y4],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y4 - (main2 - x3) * Math.tan(deg2);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [main2, cross2],\n [main2, y4],\n [x3, y4]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y3],\n [main2, y3],\n [main2, y4],\n [x2, y4]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y4 - (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y4 - (main1 - x3) * Math.tan(deg1);\n points.push([\n [main1, cross2],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y3],\n [x3, y3],\n [x3, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y3],\n [x3, y3],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, y3],\n [main2, y3],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n }\n }\n else if(direction === 3) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x2, y2],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n cross2 = x1 + (main2 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x1 + (y4 - main1) * Math.tan(deg2);\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [x1, main1],\n [cross1, main1],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [x2, y2],\n [x1, y2]\n ]);\n if(isLast) {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4],\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x1 + (y4 - main2) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross2, main1],\n [x2, y2],\n [x1, y1]\n ]);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n }\n }\n if(direction === 0) {\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n }\n }\n // 兜底返回实线\n if(direction === 0) {\n if(x2 > x1) {\n points.push([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y1]\n ]);\n }\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n if(y2 > y1) {\n points.push([\n [x4, y1],\n [x4, y1],\n [x4, y2],\n [x3, y2]\n ]);\n }\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n if(x2 > x1) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x2, y4],\n [x1, y4]\n ]);\n }\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n if(y2 > y1) {\n points.push([\n [x1, y1],\n [x1, y1],\n [x2, y2],\n [x1, y2]\n ]);\n }\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n}\n\nfunction calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[1][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[0][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[1][0] > oxr && points[0][0] < oxl) {\n let ya = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, ya],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y1],\n [oxr, y1],\n [oxr, y2],\n [oxl, y2],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y1],\n [x3, y1],\n [x3, y2],\n [oxl, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [oxr, y1],\n [oxr, y2],\n [x2, y2],\n ]);\n }\n else {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n }\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, yb]\n ]);\n }\n // 跨越右圆角\n else if(points[1][0] > oxr) {\n let y = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n centerList.push([\n points[0],\n [oxr, y1],\n [oxr, y],\n points[3]\n ]);\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, y]\n ]);\n }\n // 跨越左圆角\n else if(points[0][0] < oxl) {\n let y = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, y],\n points[3]\n ]);\n centerList.push([\n [oxl, y1],\n points[1],\n points[2],\n [oxl, y],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y1 + bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierTopLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopLeft(points[0], points[1], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopLeft(points[3], points[2], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 0);\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 0);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y1 + ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierTopRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopRight(points[0], points[1], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopRight(points[3], points[2], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 1);\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 1);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierTopLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(p1x, p1y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(p2x, p2y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierTopRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (oy - p1y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy - Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy - Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (oy - p2y));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy - Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[2][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[1][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[2][1] > oyb && points[1][1] < oyt) {\n let xa = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n let xb = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [xa, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x3, oyt],\n [x4, oyt],\n [x4, oyb],\n [x3, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, oyb],\n [x3, oyb],\n ]);\n }\n else {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n }\n endList.push([\n [xb, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[2][1] > oyb) {\n let x = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n centerList.push([\n points[0],\n points[1],\n [x4, oyb],\n [x, oyb]\n ]);\n endList.push([\n [x, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [x, oyt]\n ]);\n centerList.push([\n [x, oyt],\n [x4, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x4 - brx;\n let rx2 = brx - (x4 - x3);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightTop(beginList[0][1], beginList[0][2], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierRightTop(beginList[0][0], beginList[0][3], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightTop(points[1], points[2], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightTop(points[0], points[3], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 2);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 2);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x4 - erx;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierRightBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightBottom(points[1], points[2], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightBottom(points[0], points[3], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 3);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 3);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierRightTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox + Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox + Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox + Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierRightBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[2][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[3][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[2][0] > oxr && points[3][0] < oxl) {\n let ya = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n beginList.push([\n points[0],\n [oxl, ya],\n [oxl, y4],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y3],\n [oxr, y3],\n [oxr, y4],\n [oxl, y4],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y3],\n [x3, y3],\n [x3, y4],\n [oxl, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [oxr, y3],\n [oxr, y4],\n [x2, y4],\n ]);\n }\n else {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n }\n endList.push([\n [oxr, yb],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越右圆角\n else if(points[2][0] > oxr) {\n let y = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n centerList.push([\n points[0],\n [oxr, y],\n [oxr, y4],\n points[3]\n ]);\n endList.push([\n [oxr, y],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越左圆角\n else if(points[3][0] < oxl) {\n let y = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y3;\n beginList.push([\n points[0],\n [oxl, y],\n [oxl, y4],\n points[3]\n ]);\n centerList.push([\n [oxl, y],\n points[1],\n points[2],\n [oxl, y4],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y4 - bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierBottomLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomLeft(points[3], points[2], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomLeft(points[0], points[1], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 4);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 4);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y4 - ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierBottomRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomRight(points[3], points[2], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomRight(points[0], points[1], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 5);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 5);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierBottomLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (p2y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy + Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy + Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (p1y - oy));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy + Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierBottomRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[3][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[0][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[3][1] > oyb && points[0][1] < oyt) {\n let xa = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n let xb = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n beginList.push([\n points[0],\n points[1],\n [xa, oyt],\n [x1, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, oyb],\n [x1, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, oyb],\n [x1, oyb],\n ]);\n }\n else {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n }\n endList.push([\n [x1, oyb],\n [xb, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[3][1] > oyb) {\n let x = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n centerList.push([\n points[0],\n points[1],\n [x, oyb],\n [x1, oyb]\n ]);\n endList.push([\n [x1, oyb],\n [x, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n beginList.push([\n points[0],\n points[1],\n [x, oyt],\n [x1, oyt]\n ]);\n centerList.push([\n [x1, oyt],\n [x, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x1 + brx;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftTop(beginList[0][0], beginList[0][3], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierLeftTop(beginList[0][1], beginList[0][2], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftTop(points[0], points[3], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftTop(points[1], points[2], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 6);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 6);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x1 + erx;\n let rx2 = erx - (x2 - x1);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierLeftBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftBottom(points[0], points[3], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftBottom(points[1], points[2], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 7);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 7);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierLeftTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierLeftBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox - Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox - Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox - Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\n/**\n * 简单计算椭圆的圆化坐标控制点,视作重合位置,外面判断backgroundClip并调整坐标\n * @param x 起始x\n * @param y 起始y\n * @param w 宽\n * @param h 高\n * @param btlr borderTopLeftRadius\n * @param btrr borderTopRightRadius\n * @param bbrr borderBottomRightRadius\n * @param bblr borderBottomLeftRadius\n * @returns {[]} 多边形的顶点和曲线控制点\n */\nfunction calRadius(x, y, w, h, btlr, btrr, bbrr, bblr) {\n let need;\n let [btlx, btly] = btlr;\n let [btrx, btry] = btrr;\n let [bbrx, bbry] = bbrr;\n let [bblx, bbly] = bblr;\n btlx = Math.max(btlx, 0);\n btly = Math.max(btly, 0);\n btrx = Math.max(btrx, 0);\n btry = Math.max(btry, 0);\n bbrx = Math.max(bbrx, 0);\n bbry = Math.max(bbry, 0);\n bblx = Math.max(bblx, 0);\n bbly = Math.max(bbly, 0);\n // 圆角必须x/y都>0才有效,否则视为不绘制\n if(btlx > 0 && btly > 0 || btrx > 0 && btry > 0 || bbrx > 0 && bbry > 0 || bblx > 0 && bbly > 0) {\n need = true;\n }\n if(need) {\n let list = [];\n if(btlx > 0 && btly > 0) {\n list.push([x, y + btly]);\n list.push([x, y + (btly) * (1 - H), x + btlx * (1 - H), y, x + btlx, y]);\n }\n else {\n list.push([x, y]);\n }\n if(btrx > 0 && btry > 0) {\n list.push([x + w - btrx, y]);\n list.push([x + w - btrx * (1 - H), y, x + w, y + btry * (1 - H), x + w, y + btry]);\n }\n else {\n list.push([x + w, y]);\n }\n if(bbrx > 0 && bbry > 0) {\n list.push([x + w, y + h - bbry]);\n list.push([x + w, y + h - bbry * (1 - H), x + w - bbrx * (1 - H), y + h, x + w - bbrx, y + h]);\n }\n else {\n list.push([x + w, y + h]);\n }\n if(bblx > 0 && bbly > 0) {\n list.push([x + bblx, y + h]);\n list.push([x + bblx * (1 - H), y + h, x, y + h - bbly * (1 - H), x, y + h - bbly]);\n }\n else {\n list.push([x, y + h]);\n }\n return list;\n }\n}\n\nfunction limit(points, x, y, direction) {\n if(direction === 0) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 1) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 2) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 3) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 4) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 5) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 6) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 7) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n}\n\nconst BR_KS = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS];\nfunction calBorderRadius(w, h, currentStyle, computedStyle, root) {\n let noRadius = true;\n BR_KS.forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n if(item.v > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item.u === PX) {\n return Math.max(0, item.v);\n }\n else if(item.u === PERCENT) {\n return Math.max(0, item.v * (i ? h : w) * 0.01);\n }\n else if(item.u === REM) {\n return Math.max(0, item.v * root.computedStyle[FONT_SIZE]);\n }\n else if(item.u === VW) {\n return Math.max(0, item.v * root.width * 0.01);\n }\n else if(item.u === VH) {\n return Math.max(0, item.v * root.height * 0.01);\n }\n else if(item.u === VMAX) {\n return Math.max(0, item.v * Math.max(root.width, root.height) * 0.01);\n }\n else if(item.u === VMIN) {\n return Math.max(0, item.v * Math.min(root.width, root.height) * 0.01);\n }\n return 0;\n });\n });\n // 优化提前跳出\n if(noRadius) {\n return;\n }\n // radius限制,相交的2个之和不能超过边长,如果2个都超过中点取中点,只有1个超过取交点,这包含了单个不能超过总长的逻辑\n BR_KS.forEach((k, i) => {\n let j = i % 2 === 0 ? 0 : 1;\n let target = j ? h : w;\n let prev = computedStyle[k];\n let next = computedStyle[BR_KS[(i + 1) % 4]];\n // 相加超过边长则是相交\n if(prev[j] + next[j] > target) {\n let half = target * 0.5;\n // 都超过一半中点取中点\n if(prev[j] >= half && next[j] >= half) {\n prev[j] = next[j] = half;\n }\n // 仅1个超过中点,因相交用总长减去另一方即可\n else if(prev[j] > half) {\n prev[j] = target - next[j];\n }\n else if(next[j] > half) {\n next[j] = target - prev[j];\n }\n }\n });\n}\n\nfunction calBorderRadiusInline(contentBoxList, currentStyle, computedStyle) {\n let first, last;\n if(contentBoxList.length) {\n first = contentBoxList[0];\n last = contentBoxList[contentBoxList.length - 1];\n // 不用instanceof防止循环依赖\n if(last.isEllipsis) {\n last = contentBoxList[contentBoxList.length - 2];\n }\n }\n // 先看first的左侧\n let w = first ? first.outerWidth : 0, h = first ? first.outerHeight : 0;\n w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n [BORDER_TOP_LEFT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item.u === PX) {\n v = Math.max(0, item.v);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item.v * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n // 再看end的右侧\n w = last ? last.outerWidth : 0;\n h = last ? last.outerHeight : 0;\n [BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item.u === PX) {\n v = Math.max(0, item.v);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item.v * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n}\n\nfunction renderBorder(xom, renderMode, ctx, points, color, dx, dy) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n points.forEach(point => {\n canvasPolygon(ctx, point, dx, dy);\n });\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let s = '';\n points.forEach(point => {\n s += svgPolygon(point);\n });\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', s],\n ['fill', color],\n ],\n });\n }\n}\n\nexport default {\n calPoints,\n calRadius,\n calBorderRadius,\n calBorderRadiusInline,\n renderBorder,\n};\n","import unit from './unit';\nimport reg from './reg';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\nimport mx from '../math/matrix';\nimport gradient from '../math/gradient';\nimport border from './border';\nimport mode from '../refresh/mode';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\n\nconst { rgba2int, isNil } = util;\nconst { PX, PERCENT, DEG, NUMBER, REM, VW, VH, VMAX, VMIN, calUnit } = unit;\nconst { d2r } = geom;\nconst { canvasPolygon } = painter;\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n },\n} = enums;\n\nfunction getLinearDeg(v) {\n let deg = 180;\n if(v === 'to top') {\n deg = 0;\n }\n else if(v === 'to top right') {\n deg = 45;\n }\n else if(v === 'to right') {\n deg = 90;\n }\n else if(v === 'to bottom right') {\n deg = 135;\n }\n else if(v === 'to bottom') {\n }\n else if(v === 'to bottom left') {\n deg = 225;\n }\n else if(v === 'to left') {\n deg = 270;\n }\n else if(v === 'to top left') {\n deg = 315;\n }\n // 数字角度,没有的话取默认角度\n else {\n let match = /([-+]?[\\d.]+)deg/.exec(v);\n if(match) {\n deg = parseFloat(match[1]);\n }\n }\n return deg % 360;\n}\n\nfunction getRadialPosition(data) {\n if(/^[-+]?[\\d.]/.test(data)) {\n let v = calUnit(data);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.v = PX;\n }\n return v;\n }\n else {\n return {\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n u: PERCENT,\n };\n }\n}\n\n// 获取color-stop区间范围,去除无用值\nfunction getColorStop(v, length, root) {\n let list = [];\n let firstColor = v[0][0];\n // 先把已经声明距离的换算成[0,1]以数组形式存入,未声明的原样存入\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n // 考虑是否声明了位置\n if(item.length > 1) {\n let p = item[1];\n if(p.u === PERCENT) {\n list.push([item[0], p.v * 0.01]);\n }\n else if(p.u === REM) {\n list.push([item[0], p.v * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p.u === VW) {\n list.push([item[0], p.v * root.width / length]);\n }\n else if(p.u === VH) {\n list.push([item[0], p.v * root.height / length]);\n }\n else if(p.u === VMAX) {\n list.push([item[0], p.v * Math.max(root.width, root.height) / length]);\n }\n else if(p.u === VMIN) {\n list.push([item[0], p.v * Math.min(root.width, root.height) / length]);\n }\n else {\n list.push([item[0], p.v / length]);\n }\n }\n else {\n list.push([item[0]]);\n }\n }\n if(list.length === 1) {\n list.push(util.clone(list[0]));\n }\n // 首尾不声明默认为[0, 1]\n if(list[0].length === 1) {\n list[0].push(0);\n }\n if(list.length > 1) {\n let i = list.length - 1;\n if(list[i].length === 1) {\n list[i].push(1);\n }\n }\n // 找到未声明位置的,需区间计算,找到连续的未声明的,前后的区间平分\n let start = list[0][1];\n for(let i = 1, len = list.length; i < len - 1; i++) {\n let item = list[i];\n if(item.length > 1) {\n start = item[1];\n }\n else {\n let j = i + 1;\n let end = list[list.length - 1][1];\n for(; j < len - 1; j++) {\n let item = list[j];\n if(item.length > 1) {\n end = item[1];\n break;\n }\n }\n let num = j - i + 1;\n let per = (end - start) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.push(start + per * (k + 1 - i));\n }\n i = j;\n }\n }\n // 每个不能小于前面的,canvas/svg不能兼容这种情况,需处理\n for(let i = 1, len = list.length; i < len; i++) {\n let item = list[i];\n let prev = list[i - 1];\n if(item[1] < prev[1]) {\n item[1] = prev[1];\n }\n }\n // 0之前的和1之后的要过滤掉\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item[1] > 1) {\n list.splice(i);\n let prev = list[i - 1];\n if(prev && prev[1] < 1) {\n let dr = item[0][0] - prev[0][0];\n let dg = item[0][1] - prev[0][1];\n let db = item[0][2] - prev[0][2];\n let da = item[0][3] - prev[0][3];\n let p = (1 - prev[1]) / (item[1] - prev[1]);\n list.push([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 1],\n );\n }\n break;\n }\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n if(item[1] < 0) {\n list.splice(0, i + 1);\n let next = list[i];\n if(next && next[1] > 0) {\n let dr = next[0][0] - item[0][0];\n let dg = next[0][1] - item[0][1];\n let db = next[0][2] - item[0][2];\n let da = next[0][3] - item[0][3];\n let p = (-item[1]) / (next[1] - item[1]);\n list.unshift([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 0],\n );\n }\n break;\n }\n }\n // 可能存在超限情况,如在使用px单位超过len或 {\n // item[0] = int2rgba(item[0]);\n if(item[1] < 0) {\n item[1] = 0;\n }\n else if(item[1] > 1) {\n item[1] = 1;\n }\n });\n // 都超限时,第一个颜色兜底\n if(!list.length) {\n list.push([firstColor, 0]);\n }\n return list;\n}\n\n// 根据角度和圆心获取渐变的4个点坐标\nfunction calLinearCoords(deg, length, cx, cy) {\n let x0;\n let y0;\n let x1;\n let y1;\n if(deg >= 270) {\n let r = d2r(360 - deg);\n x0 = cx + Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n else if(deg >= 180) {\n let r = d2r(deg - 180);\n x0 = cx + Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else if(deg >= 90) {\n let r = d2r(180 - deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else {\n let r = d2r(deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n return [x0, y0, x1, y1];\n}\n\nfunction calCircleCentre(position, x1, y1, iw, ih, root) {\n let cx, cy;\n let positionX = position[0], positionY = position[1];\n if(positionX.u === PERCENT) {\n cx = x1 + positionX.v * iw * 0.01;\n }\n else if(positionX.u === REM) {\n cx = x1 + positionX.v * root.computedStyle[FONT_SIZE];\n }\n else if(positionX.u === VW) {\n cx = x1 + positionX.v * root.width * 0.01;\n }\n else if(positionX.u === VH) {\n cx = x1 + positionX.v * root.height * 0.01;\n }\n else if(positionX.u === VMAX) {\n cx = x1 + positionX.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionX.u === VMIN) {\n cx = x1 + positionX.v * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cx = x1 + positionX.v;\n }\n if(positionY.u === PERCENT) {\n cy = y1 + positionY.v * ih * 0.01;\n }\n else if(positionY.u === REM) {\n cy = y1 + positionY.v * root.computedStyle[FONT_SIZE];\n }\n else if(positionY.u === VW) {\n cy = y1 + positionY.v * root.width * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * root.height * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cy = y1 + positionY.v;\n }\n return [cx, cy];\n}\n\n// 获取径向渐变圆心半径\nfunction calRadialRadius(shape, size, position, iw, ih, x1, y1, x2, y2, root) {\n let cx, cy, xl, yl, r, tx, ty, d = 0;\n // 扩展的from to ratio格式,圆心、长轴坐标、短轴缩放比\n if(Array.isArray(size)) {\n cx = x1 + size[0] * iw;\n cy = y1 + size[1] * ih;\n tx = x1 + size[4] * iw;\n ty = y1 + size[5] * ih;\n if(size[6] <= 0) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n xl = Math.sqrt(Math.pow((size[2] - size[0]) * iw, 2) + Math.pow((size[3] - size[1]) * ih, 2));\n yl = xl * size[6];\n r = Math.max(xl, yl);\n // 看旋转\n if(xl !== yl) {\n if(size[2] >= size[0]) {\n if(size[3] >= size[1]) {\n d = Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = -Math.asin((size[1] - size[3]) * ih / xl);\n }\n }\n else {\n if(size[3] >= size[1]) {\n d = d2r(180) - Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = Math.asin((size[1] - size[3]) * ih / xl) - d2r(180);\n }\n }\n }\n }\n }\n else {\n // 默认椭圆a是水平轴,b是垂直轴\n [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n tx = cx;\n ty = cy;\n let ratio = 1;\n if(size === 'closest-corner' && shape === 'circle') {\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.sqrt(Math.pow(xl, 2) + Math.pow(yl, 2));\n }\n }\n else if(size === 'closest-side' || size === 'closest-corner') {\n // 在边外特殊情况只有end颜色填充\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n let ratio = 1;\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.min(xl, yl);\n // css的角和边有对应关系,即边扩展倍数,计算为固定值\n if(size === 'closest-corner') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n else {\n if(cx <= x1) {\n xl = x1 - cx + iw;\n }\n else if(cx >= x2) {\n xl = cx - x2 + iw;\n }\n else if(cx < x1 + iw * 0.5) {\n xl = x2 - cx;\n }\n else {\n xl = cx - x1;\n }\n if(cy <= y1) {\n yl = y1 - cy + ih;\n }\n else if(cy >= y2) {\n yl = cy - y2 + ih;\n }\n else if(cy < y1 + ih * 0.5) {\n yl = y2 - cy;\n }\n else {\n yl = cy - y1;\n }\n r = Math.max(xl, yl);\n if(size !== 'farthest-side') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n if(shape === 'circle') {\n xl = yl = r;\n }\n return [cx, cy, r, xl, yl, tx, ty, d];\n}\n\nfunction parseGradient(s) {\n let gradient = reg.gradient.exec(s);\n if(gradient) {\n let o = {\n k: gradient[1],\n };\n if(o.k === 'linear') {\n let deg = /([-+]?[\\d.]+deg)|(to\\s+[toprighbml]+)/i.exec(gradient[2]);\n if(deg) {\n o.d = getLinearDeg(deg[0].toLowerCase());\n }\n // 扩展支持从a点到b点相对坐标,而不是css角度,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)/.exec(gradient[2]);\n if(points) {\n o.d = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n }\n else {\n o.d = 180;\n }\n }\n }\n else if(o.k === 'radial') {\n o.s = gradient[2].indexOf('circle') > -1 ? 'circle' : 'ellipse';\n let size = /(closest|farthest)-(side|corner)/i.exec(gradient[2]);\n if(size) {\n o.z = size[0].toLowerCase();\n }\n // 扩展支持从a点到b点相对坐标,而不是size,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)(?:\\s+([-+]?[\\d.]+))?(?:\\s+([-+]?[\\d.]+))?(?:\\s+([-+]?[\\d.]+))?/.exec(gradient[2]);\n if(points) {\n o.z = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n let i5 = !isNil(points[5]), i6 = !isNil(points[6]), i7 = !isNil(points[7]);\n // 重载,567是偏移x/y和ratio,都可省略即不偏移和半径1,只有5是ratio,只有56是x/y\n if(i5 && i6 && i7) {\n o.z.push(parseFloat(points[5]));\n o.z.push(parseFloat(points[6]));\n o.z.push(parseFloat(points[7]));\n }\n else if(i5 && i6) {\n o.z.push(parseFloat(points[5]));\n o.z.push(parseFloat(points[6]));\n o.z.push(1);\n }\n else if(i5) {\n o.z.push(o.z[0]);\n o.z.push(o.z[1]);\n o.z.push(parseFloat(points[5]));\n }\n else {\n o.z.push(o.z[0]);\n o.z.push(o.z[1])\n o.z.push(1);\n }\n }\n else {\n o.z = 'farthest-corner';\n }\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [{ v: 50, u: PERCENT }, { v: 50, u: PERCENT }];\n }\n }\n else if(o.k === 'conic') {\n let deg = /([-+]?[\\d.]+deg)/i.exec(gradient[2]);\n if(deg) {\n o.d = parseFloat(deg[0]) % 360;\n }\n else {\n o.d = 0;\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [{ v: 50, u: PERCENT }, { v: 50, u: PERCENT }];\n }\n }\n let v = gradient[2].match(/(([-+]?[\\d.]+[pxremvwhina%]+)?\\s*((#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))\\s*([-+]?[\\d.]+[pxremvwhina%]+)?)|(transparent)/ig) || [];\n o.v = v.map(item => {\n let color = /(?:#[0-9a-f]{3,8})|(?:rgba?\\s*\\(.+?\\))|(?:transparent)/i.exec(item);\n let arr = [rgba2int(color[0])];\n let percent = /[-+]?[\\d.]+[pxremvwhina%]+/.exec(item);\n if(percent) {\n let v = calUnit(percent[0]);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.v = PX;\n }\n arr[1] = v;\n }\n return arr;\n });\n return o;\n }\n}\n\nfunction getLinear(v, d, ox, oy, cx, cy, w, h, root, dx = 0, dy = 0) {\n ox += dx;\n oy += dy;\n cx += dx;\n cy += dy;\n // d为数组是2个坐标点,数字是css标准角度\n let x1, y1, x2, y2, stop;\n if(Array.isArray(d)) {\n x1 = ox + d[0] * w;\n y1 = oy + d[1] * h;\n x2 = ox + d[2] * w;\n y2 = oy + d[3] * h;\n let total = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n stop = getColorStop(v, total);\n }\n else {\n while(d >= 360) {\n d -= 360;\n }\n while(d < 0) {\n d += 360;\n }\n // 根据角度求直线上2点,设置半径为长宽最大值,这样一定在矩形外,看做一个向量A\n let len = Math.max(w, h);\n let coords = calLinearCoords(d, len, cx, cy, w, h);\n len *= 2;\n // start和4个顶点的向量在A上的投影长度\n let l1 = vector.dotProduct(ox - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l2 = vector.dotProduct(ox + w - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l3 = vector.dotProduct(ox + w - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l4 = vector.dotProduct(ox - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n // 最小和最大值为0~100%\n let min = l1, max = l1;\n min = Math.min(min, Math.min(l2, Math.min(l3, l4)));\n max = Math.max(max, Math.max(l2, Math.max(l3, l4)));\n // 求得0和100%的长度和坐标\n let total = max - min;\n let r1 = min / len;\n let dx = coords[2] - coords[0];\n let dy = coords[3] - coords[1];\n x1 = coords[0] + dx * r1;\n y1 = coords[1] + dy * r1;\n x2 = coords[2] - dx * r1;\n y2 = coords[3] - dy * r1;\n stop = getColorStop(v, total, root);\n }\n return {\n x1,\n y1,\n x2,\n y2,\n stop,\n };\n}\n\nfunction getRadial(v, shape, size, position, x1, y1, x2, y2, root, dx = 0, dy = 0) {\n let w = x2 - x1;\n let h = y2 - y1;\n x1 += dx;\n y1 += dy;\n x2 += dx;\n y2 += dy;\n let [cx, cy, r, xl, yl, tx, ty, d] = calRadialRadius(shape, size, position, w, h, x1, y1, x2, y2, root);\n // 圆形取最小值,椭圆根据最小圆进行transform,椭圆其中一边轴和r一样,另一边则大小缩放可能\n let matrix, scx = 1, scy = 1;\n if(xl !== yl || d) {\n matrix = [1, 0, 0, 1, 0, 0];\n if(d) {\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n matrix = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }\n if(xl !== r) {\n scx = xl / r;\n let m = [scx, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n if(yl !== r) {\n scy = yl / r;\n let m = [1, 0, 0, 0, 0, scy, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n }\n let stop = getColorStop(v, r, root);\n return {\n cx,\n cy,\n tx,\n ty,\n r,\n stop,\n scx,\n scy,\n matrix,\n d,\n };\n}\n\nfunction getConic(v, d, p, x1, y1, x2, y2, ratio, root) {\n let [cx, cy, r, deg] = calConicRadius(v, d, p, x1, y1, x2, y2, root);\n let stop = getColorStop(v, 1, root);\n r <<= 1; // 锥形半径*2,这样分割画圆时保证一定会填满原有矩形\n r *= ratio; // 矢量图形比较特殊,有可能超限,传入个倍数扩大半径\n return {\n cx,\n cy,\n w: x2 - x1,\n h: y2 - y1,\n r,\n deg,\n stop,\n };\n}\n\nfunction calConicRadius(v, deg, position, x1, y1, x2, y2, root) {\n let iw = x2 - x1;\n let ih = y2 - y1;\n let [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let r, a, b;\n if(cx >= x1 + iw * 0.5) {\n a = cx - x1;\n }\n else {\n a = x2 - cx;\n }\n if(cy >= y1 + ih * 0.5) {\n b = cy - y1;\n }\n else {\n b = y2 - cy;\n }\n r = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return [cx, cy, r, deg];\n}\n\nfunction renderConic(xom, renderMode, ctx, res, x, y, w, h, btlr, btrr, bbrr, bblr, isInline) {\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n let list = border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let offscreen = inject.getOffscreenCanvas(w, h, '__$$CONIC_GRADIENT$$__', null);\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(res.cx - x, res.cy - y, res.w, res.h, res.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x, y);\n ctx.restore();\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n}\n\nexport default {\n parseGradient,\n getLinear,\n getRadial,\n getConic,\n renderConic,\n};\n","import reg from './reg';\nimport util from '../util/util';\n\nlet { isNil } = util;\n\nfunction parseFlex(style, grow, shrink, basis) {\n if(isNil(style.flexGrow)) {\n style.flexGrow = grow || 0;\n }\n if(isNil(style.flexShrink)) {\n style.flexShrink = shrink || 0;\n }\n if(isNil(style.flexBasis)) {\n style.flexBasis = basis || 0;\n }\n}\n\nfunction parseMarginPadding(style, key, list) {\n let temp = style[key];\n if(!isNil(temp)) {\n let match = temp.toString().match(/([-+]?[\\d.]+[pxremvwhina%]*)|(auto)/ig);\n if(match) {\n if(match.length === 1) {\n match[3] = match[2] = match[1] = match[0];\n }\n else if(match.length === 2) {\n match[2] = match[0];\n match[3] = match[1];\n }\n else if(match.length === 3) {\n match[3] = match[1];\n }\n list.forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = match[i];\n }\n });\n }\n }\n}\n\nfunction parseOneBorder(style, k) {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n // 后面会统一格式化处理\n if(isNil(style[k + 'Width'])) {\n let w = /\\b[\\d.]+[pxremvwhina%]*\\b/i.exec(v);\n style[k + 'Width'] = w ? w[0] : 0;\n }\n if(isNil(style[k + 'Style'])) {\n let s = /\\b(solid|dashed|dotted)\\b/i.exec(v);\n style[k + 'Style'] = s ? s[1] : 'solid';\n }\n if(isNil(style[k + 'Color'])) {\n let c = /#[0-9a-f]{3,8}/i.exec(v);\n if(c && [4, 7, 9].indexOf(c[0].length) > -1) {\n style[k + 'Color'] = c[0];\n }\n else if(/\\btransparent\\b/i.test(v)) {\n style[k + 'Color'] = 'transparent';\n }\n else {\n c = /rgba?\\s*\\(.+\\)/i.exec(v);\n style[k + 'Color'] = c ? c[0] : 'transparent';\n }\n }\n}\n\nexport default {\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],\n borderTop: ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],\n borderRight: ['borderRightWidth', 'borderRightStyle', 'borderRightColor'],\n borderBottom: ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],\n borderLeft: ['borderLeftWidth', 'borderLeftStyle', 'borderLeftColor'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n background: ['backgroundColor', 'backgroundImage', 'backgroundRepeat', 'backgroundPosition'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n flex: ['flexGrow', 'flexShrink', 'flexBasis'],\n translate: ['translateX', 'translateY'],\n translate3d: ['translateX', 'translateY', 'translateY'],\n scale: ['scaleX', 'scaleY'],\n scale3d: ['scaleX', 'scaleY', 'scaleZ'],\n rotate: ['rotateZ'],\n skew: ['skewX', 'skewY'],\n textStroke: ['textStrokeWidth', 'textStrokeColor', 'textStrokeOver'],\n\n toFull(style, k) {\n let v = style[k];\n if(k === 'background') {\n // bg缩写多个时有color则必须是最后一个\n if(Array.isArray(v)) {\n let length = v.length;\n if(isNil(style.backgroundColor)) {\n let bgc = /^\\s*((transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))/i.exec(v[length - 1]);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.slice(0, length - 1);\n }\n }\n let bgi = [];\n let bgr = [];\n let bgp = [];\n v.forEach(item => {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(item);\n if(gd) {\n bgi.push(gd[0]);\n item = item.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n bgi.push(img[0]);\n item = item.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(item);\n if(repeat) {\n bgr.push(repeat[0].toLowerCase());\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = item.match(reg.position);\n if(position) {\n bgp.push(position.join(' '));\n }\n }\n });\n if(bgi.length) {\n style.backgroundImage = bgi;\n }\n if(bgr.length) {\n style.backgroundRepeat = bgr;\n }\n if(bgp.length) {\n style.backgroundPosition = bgp;\n this.toFull(style, 'backgroundPosition');\n }\n }\n else {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(v);\n if(gd) {\n style.backgroundImage = gd[0];\n v = v.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n style.backgroundImage = img[0];\n v = v.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(v);\n if(repeat) {\n style.backgroundRepeat = repeat[0].toLowerCase();\n }\n }\n if(isNil(style.backgroundColor)) {\n let bgc = /^(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.replace(bgc[0], '');\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = v.match(reg.position);\n if(position) {\n style.backgroundPosition = position.join(' ');\n this.toFull(style, 'backgroundPosition');\n }\n }\n }\n }\n else if(k === 'flex') {\n if(v === 'none') {\n parseFlex(style, 0, 0, 'auto');\n }\n else if(v === 'auto') {\n parseFlex(style, 1, 1, 'auto');\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+(auto|none|content)/.test(v) || /^[\\d.]+\\s+[\\d.]+\\s+[\\d.]+[pxremvwhina%]*/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+$/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), 0);\n }\n else if(/^[\\d.]+\\s+[\\d.]+[pxremvwhina%]+/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), 1, arr[1]);\n }\n else if(/^[\\d.]+$/.test(v)) {\n parseFlex(style, parseFloat(v), 1, 0);\n }\n else if(/^[\\d.]+[pxremvwhina%]+/i.test(v)) {\n parseFlex(style, 1, 1, v);\n }\n else {\n parseFlex(style, 0, 1, 'auto');\n }\n }\n else if(k === 'flexFlow') {\n v = v.toString().split(/\\s+/);\n if(v.length) {\n if(isNil(style.flexDirection)) {\n }\n style.flexDirection = v[0];\n if(v.length > 1) {\n style.flexWrap = v[1];\n }\n }\n }\n else if(k === 'borderRadius') {\n // borderRadius缩写很特殊,/分隔x/y,然后上右下左4个\n v = v.toString().split('/');\n if(v.length === 1) {\n v[1] = v[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = v[i].toString().split(/\\s+/);\n if(item.length === 0) {\n v[i] = [0, 0, 0, 0];\n }\n else if(item.length === 1) {\n v[i] = [item[0], item[0], item[0], item[0]];\n }\n else if(item.length === 2) {\n v[i] = [item[0], item[1], item[0], item[1]];\n }\n else if(item.length === 3) {\n v[i] = [item[0], item[1], item[2], item[1]];\n }\n else {\n v[i] = item.slice(0, 4);\n }\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = v[0][i] + ' ' + v[1][i];\n }\n });\n }\n else if(k === 'backgroundPosition') {\n if(!Array.isArray(v)) {\n v = [v];\n }\n let isEmpty = this[k].map(k2 => isNil(style[k2]));\n v.forEach(v2 => {\n v2 = v2.toString().split(/\\s+/);\n if(v2.length === 1) {\n v2[1] = '50%';\n }\n this[k].forEach((k2, i) => {\n if(isEmpty[i]) {\n style[k2] = style[k2] || [];\n style[k2].push(v2[i]);\n }\n });\n });\n }\n else if(['translate', 'scale', 'skew'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(['translate3d', 'scale3d'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[2] = arr[1] = arr[0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? 1 : 0;\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(k === 'margin' || k === 'padding') {\n parseMarginPadding(style, k, this[k]);\n }\n else if(/^border((Top)|(Right)|(Bottom)|(Left))$/.test(k)) {\n parseOneBorder(style, k);\n }\n else if(k === 'textStroke') {\n let w = /(?:^|\\s)([-+]?[\\d.]+[pxremvwhina%]*)/.exec(v);\n if(w) {\n style.textStrokeWidth = w[1];\n }\n let c = /(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(c) {\n style.textStrokeColor = c[0];\n }\n if(/\\bfill\\b/i.test(v)) {\n style.textStrokeOver = 'fill';\n }\n else {\n style.textStrokeOver = 'none';\n }\n }\n else if(this[k]) {\n this[k].forEach(k => {\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n }\n return style;\n }\n};\n","import enums from '../util/enums';\n\nconst { STYLE_KEY } = enums;\n\nconst {\n BACKGROUND_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n COLOR, // 特殊,新增GRADIENT渐变色\n TEXT_STROKE_COLOR, // 同上\n FONT_SIZE,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_TOP_WIDTH,\n LEFT,\n TOP,\n RIGHT,\n BOTTOM,\n FLEX_BASIS,\n WIDTH,\n HEIGHT,\n LINE_HEIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n STROKE_WIDTH,\n STROKE_MITERLIMIT,\n LETTER_SPACING,\n PERSPECTIVE,\n TEXT_STROKE_WIDTH,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n BACKGROUND_IMAGE,\n FILL,\n STROKE,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n} = STYLE_KEY;\n\nfunction isColorKey(k) {\n return k === BACKGROUND_COLOR || k === BORDER_BOTTOM_COLOR\n || k === BORDER_LEFT_COLOR || k === BORDER_RIGHT_COLOR\n || k === BORDER_TOP_COLOR || k === COLOR || k === TEXT_STROKE_COLOR;\n}\n\nfunction isLengthKey(k) {\n return k === FONT_SIZE || k === TEXT_STROKE_WIDTH\n || k === BORDER_BOTTOM_WIDTH || k === BORDER_LEFT_WIDTH || k === BORDER_RIGHT_WIDTH || k === BORDER_TOP_WIDTH\n || k === LEFT || k === TOP || k === RIGHT || k === BOTTOM || k === FLEX_BASIS || k === WIDTH || k === HEIGHT\n || k === LINE_HEIGHT || k === MARGIN_BOTTOM || k === MARGIN_TOP || k === MARGIN_LEFT || k === MARGIN_RIGHT\n || k === PADDING_TOP || k === PADDING_RIGHT || k === PADDING_LEFT || k === PADDING_BOTTOM\n || k === STROKE_WIDTH || k === STROKE_MITERLIMIT || k === LETTER_SPACING || k === PERSPECTIVE;\n}\n\nfunction isExpandKey(k) {\n return k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z\n || k === SKEW_X || k === SKEW_Y || k === SCALE_X || k === SCALE_Y || k === SCALE_Z\n || k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z;\n}\n\nfunction isGradientKey(k) {\n return k === BACKGROUND_IMAGE || k === FILL || k === STROKE;\n}\n\nfunction isRadiusKey(k) {\n return k === BORDER_BOTTOM_LEFT_RADIUS || k === BORDER_TOP_LEFT_RADIUS\n || k === BORDER_TOP_RIGHT_RADIUS || k === BORDER_BOTTOM_RIGHT_RADIUS;\n}\n\nexport default {\n isColorKey,\n isLengthKey,\n isExpandKey,\n isGradientKey,\n isRadiusKey,\n};\n","import reset from '../style/reset';\nimport enums from '../util/enums';\n\nconst { DOM: RESET_DOM, GEOM: RESET_GEOM } = reset;\nconst { STYLE_KEY } = enums;\nconst {\n POINTER_EVENTS,\n COLOR,\n STROKE_WIDTH,\n FILL,\n STROKE_DASHARRAY,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_REPEAT,\n BACKGROUND_SIZE,\n STROKE,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BOX_SHADOW,\n OVERFLOW,\n BACKGROUND_CLIP,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n TRANSLATE_PATH,\n TRANSFORM_STYLE,\n} = STYLE_KEY;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n addGeom(tagName, ks, cb) {\n if(Array.isArray(ks)) {\n ks.forEach(k => {\n o.addGeom(tagName, k, cb);\n });\n }\n else if(ks) {\n if(!GEOM.hasOwnProperty(ks)) {\n GEOM_KEY_SET.push(ks);\n }\n let hash = GEOM[ks] = GEOM[ks] || {};\n hash[tagName] = cb || true;\n }\n },\n isIgnore(k) {\n return k === POINTER_EVENTS || k === TRANSLATE_PATH;\n },\n isGeom(tagName, k) {\n return tagName && k && GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n },\n isRepaint(k, tagName) {\n return k === COLOR || k === STROKE_WIDTH || k === FILL || k === STROKE_DASHARRAY || k === STROKE_LINECAP\n || k === STROKE_LINEJOIN || k === STROKE_MITERLIMIT || k === BACKGROUND_COLOR || k === BACKGROUND_IMAGE\n || k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === BACKGROUND_REPEAT\n || k === BACKGROUND_SIZE || k === STROKE || k === BORDER_BOTTOM_COLOR || k === BORDER_LEFT_COLOR\n || k === BORDER_BOTTOM_COLOR || k === BORDER_RIGHT_COLOR || k === BORDER_TOP_COLOR\n || k === BORDER_TOP_LEFT_RADIUS || k === BORDER_TOP_RIGHT_RADIUS || k === BORDER_BOTTOM_RIGHT_RADIUS\n || k === BORDER_BOTTOM_LEFT_RADIUS || k === VISIBILITY || k === BOX_SHADOW || k === OVERFLOW\n || k === BACKGROUND_CLIP || k === TEXT_STROKE_WIDTH || k === TEXT_STROKE_COLOR || k === TEXT_STROKE_OVER\n || k === TRANSFORM_STYLE || o.isGeom(tagName, k);\n },\n isValid(tagName, k) {\n if(!k) {\n return false;\n }\n if(RESET_DOM.hasOwnProperty(k)) {\n return true;\n }\n // geom的fill等矢量才有的样式\n if(tagName && tagName.charAt(0) === '$' && RESET_GEOM.hasOwnProperty(k)) {\n return true;\n }\n if(GEOM.hasOwnProperty(k)) {\n return tagName && GEOM[k].hasOwnProperty(tagName);\n }\n if(k === 'translatePath') {\n return true;\n }\n return false;\n },\n};\n\no.addGeom('$line', ['xa', 'ya', 'xb', 'yb', 'controlA', 'controlB', 'start', 'end']);\no.addGeom('$circle', ['r']);\no.addGeom('$ellipse', ['rx', 'ry']);\no.addGeom('$rect', ['rx', 'ry']);\no.addGeom('$sector', ['begin', 'end', 'edge', 'closure']);\no.addGeom('$polyline', ['points', 'controls', 'start', 'end']);\no.addGeom('$polygon', ['points', 'controls', 'start', 'end', 'booleanOperations']);\n\nexport default o;\n","/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据模糊参数sigma求卷积核尺寸\n * @param sigma\n * @returns {number}\n */\nfunction kernelSize(sigma) {\n if(sigma <= 0) {\n return 0;\n }\n let d = Math.floor(sigma * 3 * Math.sqrt(2 * Math.PI) / 4 + 0.5);\n if(d < 2) {\n d = 2;\n }\n if(d % 2 === 0) {\n d++;\n }\n return d;\n}\n\n/**\n * 根据sigma求模糊扩展尺寸,卷积核求得后为d,再求半径/2,然后因为算法要执行3次,所以*3\n * 比如本来d为5,半径2.5算上自身像素点则各方向扩展2,*3则扩展6\n * @param sigma\n * @returns {number}\n */\nfunction outerSize(sigma) {\n let d = kernelSize(sigma);\n return outerSizeByD(d);\n}\n\nfunction outerSizeByD(d) {\n return Math.floor(d * 0.5) * 3;\n}\n\n/**\n * 一维高斯正态分布,根据标准差和卷积核尺寸返回一维权重数组\n * @param sigma\n * @param d\n */\nfunction gaussianWeight(sigma, d) {\n let list = [];\n let len = Math.floor(d * 0.5);\n let total = 0;\n for(let i = len; i >= 0; i--) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n for(let i = 1; i <= len; i++) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n if(total !== 1) {\n for(let i = 0; i < d; i++) {\n list[i] /= total;\n }\n }\n return list;\n}\n\nexport default {\n kernelSize,\n outerSize,\n outerSizeByD,\n gaussianWeight,\n};\n","import unit from './unit';\nimport font from './font';\nimport reset from './reset';\nimport gradient from './gradient';\nimport reg from './reg';\nimport abbr from './abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport key from '../animate/key';\nimport change from '../refresh/change';\nimport blur from '../math/blur';\n\nconst { STYLE_KEY, style2Upper, STYLE_KEY: {\n POSITION,\n WIDTH,\n HEIGHT,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n OPACITY,\n Z_INDEX,\n COLOR,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n LINE_HEIGHT,\n TEXT_ALIGN,\n FILTER,\n VISIBILITY,\n BOX_SHADOW,\n POINTER_EVENTS,\n FILL,\n STROKE,\n STROKE_WIDTH,\n STROKE_DASHARRAY,\n FLEX_BASIS,\n MATRIX,\n LETTER_SPACING,\n WHITE_SPACE,\n LINE_CLAMP,\n ORDER,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n WRITING_MODE,\n FONT_SIZE_SHRINK,\n} } = enums;\nconst { AUTO, PX, PERCENT, NUMBER, INHERIT, DEG, RGBA, STRING, EM, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, rgba2int, equalArr, equal, replaceRgba2Hex } = util;\nconst { isGeom, GEOM, GEOM_KEY_SET } = change;\nconst { VALID_STRING_VALUE } = reset;\n\nconst {\n isColorKey,\n isExpandKey,\n isLengthKey,\n isGradientKey,\n isRadiusKey,\n} = key;\n\nfunction isGradient(s) {\n if(reg.gradient.test(s)) {\n let gradient = reg.gradient.exec(s);\n if(gradient && ['linear', 'radial', 'conic'].indexOf(gradient[1]) > -1) {\n return true;\n }\n }\n}\n\nconst TRANSFORM_HASH = {\n translateX: TRANSLATE_X,\n translateY: TRANSLATE_Y,\n translateZ: TRANSLATE_Z,\n scaleX: SCALE_X,\n scaleY: SCALE_Y,\n scaleZ: SCALE_Z,\n skewX: SKEW_X,\n skewY: SKEW_Y,\n rotateX: ROTATE_X,\n rotateY: ROTATE_Y,\n rotateZ: ROTATE_Z,\n rotate: ROTATE_Z,\n};\n\nfunction compatibleTransform(k, arr) {\n if(k === SCALE_X || k === SCALE_Y || k === SCALE_Z) {\n arr.u = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr.u === NUMBER) {\n arr.u = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr.u) > -1) {\n arr.u = PX;\n }\n }\n else {\n if(arr.u === NUMBER) {\n arr.u = DEG;\n }\n }\n}\n\nfunction camel(v) {\n if(isNil(v)) {\n v = '';\n }\n v = v.toString();\n //有-才转换,否则可能是写好的驼峰\n if(v.indexOf('-') > -1) {\n return v.toString().toLowerCase().replace(/-([a-z])/ig, function($0, $1) {\n return $1.toUpperCase();\n });\n }\n return v;\n}\n\nfunction convertStringValue(k, v) {\n v = camel(v);\n let list = VALID_STRING_VALUE[k];\n let i = list.indexOf(v);\n if(i > -1) {\n return list[i];\n }\n // 兜底默认\n return list[0];\n}\n\n/**\n * 将传入的手写style标准化,并且用resetList默认值覆盖其中为空的\n * @param style 手写的style样式\n * @param resetList 默认样式,可选\n * @returns Object 标准化的枚举数组结构样式\n */\nfunction normalize(style, resetList = []) {\n if(!util.isObject(style)) {\n return {};\n }\n let res = {};\n // style只有单层无需深度clone\n style = util.extend({}, style);\n // 缩写提前处理,因为reset里没有缩写\n let temp = style.border;\n if(temp) {\n abbr.toFull(style, 'border');\n }\n ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'].forEach(k => {\n abbr.toFull(style, k);\n });\n temp = style.borderWidth;\n if(temp) {\n abbr.toFull(style, 'borderWidth');\n }\n temp = style.borderColor;\n if(temp) {\n abbr.toFull(style, 'borderColor');\n }\n temp = style.borderStyle;\n if(temp) {\n abbr.toFull(style, 'borderStyle');\n }\n temp = style.borderRadius;\n if(temp) {\n abbr.toFull(style, 'borderRadius');\n }\n temp = style.background;\n // 处理渐变背景缩写\n if(temp) {\n abbr.toFull(style, 'background');\n }\n // 背景位置\n temp = style.backgroundPosition;\n if(!isNil(temp)) {\n abbr.toFull(style, 'backgroundPosition');\n }\n // flex\n temp = style.flex;\n if(temp) {\n abbr.toFull(style, 'flex');\n }\n // flex-flow\n temp = style.flexFlow;\n if(temp) {\n abbr.toFull(style, 'flexFlow');\n }\n temp = style.margin;\n if(!isNil(temp)) {\n abbr.toFull(style, 'margin');\n }\n temp = style.padding;\n if(!isNil(temp)) {\n abbr.toFull(style, 'padding');\n }\n temp = style.textStroke;\n if(temp) {\n abbr.toFull(style, 'textStroke');\n }\n temp = style.rotate3d;\n if(temp) {\n abbr.toFull(style, 'rotate3d');\n }\n // 扩展css,将transform几个值拆分为独立的css为动画准备,同时不能使用transform\n ['translate', 'scale', 'skew', 'translate3d', 'scale3d', 'rotate'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n abbr.toFull(style, k);\n }\n });\n // 扩展的不能和transform混用,给出警告\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate3d',\n ].forEach(k => {\n let v = style[k];\n if(v !== undefined && style.transform) {\n inject.warn(`Can not use expand style \"${k}\" with transform`);\n }\n });\n // 默认reset,根据传入不同,当style为空时覆盖\n resetList.forEach(item => {\n let { k, v } = item;\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n // 背景图\n temp = style.backgroundImage;\n if(temp !== undefined) {\n if(!temp) {\n res[BACKGROUND_IMAGE] = [];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(isGradient(item)) {\n return {\n v: gradient.parseGradient(item),\n u: GRADIENT,\n };\n }\n if(reg.img.test(item)) {\n return {\n v: reg.img.exec(item)[2],\n u: STRING,\n };\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(isGradient(temp)) {\n res[BACKGROUND_IMAGE] = [{ v: gradient.parseGradient(temp), u: GRADIENT }];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [{ v: reg.img.exec(temp)[2], u: STRING }];\n }\n else {\n res[BACKGROUND_IMAGE] = [];\n }\n }\n temp = style.backgroundColor;\n if(temp !== undefined) {\n temp = temp || 'transparent';\n // 先赋值默认透明,后续操作有合法值覆盖\n let bgc = /^#[0-9a-f]{3,8}/i.exec(temp);\n if(bgc && [4, 7, 9].indexOf(bgc[0].length) > -1) {\n res[BACKGROUND_COLOR] = { v: rgba2int(bgc[0]), u: RGBA };\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = { v: rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), u: RGBA };\n }\n }\n ['backgroundPositionX', 'backgroundPositionY'].forEach((k, i) => {\n temp = style[k];\n if(temp !== undefined) {\n temp = temp || 0;\n k = i ? BACKGROUND_POSITION_Y : BACKGROUND_POSITION_X;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(/^[-+]?[\\d.]/.test(item)) {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n return v;\n }\n else {\n return {\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n u: PERCENT,\n };\n }\n });\n }\n });\n // 背景尺寸\n temp = style.backgroundSize;\n if(temp !== undefined) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[BACKGROUND_SIZE] = temp.map(item => {\n if(!item) {\n return [\n { u: AUTO },\n { u: AUTO },\n ];\n }\n let match = item.toString().match(/\\b(?:([-+]?[\\d.]+[pxremvwhina%]*)|(contain|cover|auto))/ig);\n if(match) {\n if(match.length === 1) {\n if(match[0].toLowerCase() === 'contain' || match[0].toLowerCase() === 'cover') {\n match[1] = match[0].toLowerCase();\n }\n else {\n match[1] = 'auto';\n }\n }\n let v = [];\n for(let i = 0; i < 2; i++) {\n let item = match[i].toLowerCase();\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push({ v: item, u: STRING });\n }\n else {\n v.push({ u: AUTO });\n }\n }\n return v;\n }\n else {\n return [\n { u: AUTO },\n { u: AUTO },\n ];\n }\n });\n }\n // border-color\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k + 'Color';\n let v = style[k];\n if(v !== undefined) {\n res[STYLE_KEY[style2Upper(k)]] = { v: rgba2int(v || 'transparent'), u: RGBA };\n }\n });\n // border-radius\n ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'].forEach(k => {\n k = 'border' + k + 'Radius';\n let v = style[k];\n if(v !== undefined) {\n v = v || 0;\n let arr = v.toString().split(/\\s+/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = arr[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n if(n.v < 0) {\n n.v = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = { u: 0, v: PX };\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp !== undefined) {\n let transform = res[TRANSFORM] = [];\n let match = (temp || '').toString().match(/\\w+\\(.+?\\)/g);\n if(match) {\n match.forEach(item => {\n let i = item.indexOf('(');\n let k = item.slice(0, i);\n let v = item.slice(i + 1, item.length - 1);\n if(k === 'matrix') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 6) {\n arr = arr.slice(0, 6);\n }\n if(arr.length === 6) {\n transform.push({ k: MATRIX, v: [\n arr[0], arr[1], 0, 0, arr[2], arr[3], 0, 0, 0, 0, 1, 0, arr[4], arr[5], 0, 1,\n ]});\n }\n }\n else if(k === 'matrix3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 16) {\n arr = arr.slice(0, 16);\n }\n if(arr.length === 16) {\n transform.push({ k: MATRIX, v: arr });\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr.v < 0) {\n arr.v = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push({ k: PERSPECTIVE, v: arr });\n }\n else if(k === 'rotate3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0].replace('(', ''));\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n transform.push({ k: ROTATE_3D, v: arr });\n }\n }\n else if(TRANSFORM_HASH.hasOwnProperty(k)) {\n let k2 = TRANSFORM_HASH[k];\n let arr = calUnit(v);\n compatibleTransform(k2, arr);\n transform.push({ k: k2, v: arr });\n }\n else if({ translate: true, scale: true, skew: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale' ? arr[0] : [0];\n }\n if(arr.length === 2) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n transform.push({ k: k1, v: arr1 });\n transform.push({ k: k2, v: arr2 });\n }\n }\n else if({ translate3d: true, scale3d: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale3d' ? [1] : [0];\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n if(arr.length === 3) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let k3 = STYLE_KEY[style2Upper(k + 'Z')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n let arr3 = calUnit(arr[2]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n compatibleTransform(k3, arr3);\n transform.push({ k: k1, v: arr1 });\n transform.push({ k: k2, v: arr2 });\n transform.push({ k: k3, v: arr3 });\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(temp !== undefined) {\n let arr = calUnit(temp || 0);\n if(arr.v < 0) {\n arr.v = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n res[PERSPECTIVE] = arr;\n }\n ['perspectiveOrigin', 'transformOrigin'].forEach(k => {\n temp = style[k];\n if(temp !== undefined) {\n if(temp === null) {\n temp = '';\n }\n let arr = res[STYLE_KEY[style2Upper(k)]] = [];\n let match = temp.toString().match(reg.position);\n if(match) {\n if(match.length === 1) {\n match[1] = match[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n arr.push(n);\n }\n else {\n arr.push({\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n u: PERCENT,\n });\n // 不规范的写法变默认值50%\n if(isNil(arr[i].v)) {\n arr[i].v = 50;\n }\n }\n }\n }\n else {\n arr.push({ v: 50, u: PERCENT });\n arr.push({ v: 50, u: PERCENT });\n }\n }\n });\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate',\n ].forEach(k => {\n let v = style[k];\n if(v === undefined) {\n return;\n }\n if(v === null) {\n if(k.indexOf('scale') === 0) {\n v = 1;\n }\n else {\n v = 0;\n }\n }\n let k2 = TRANSFORM_HASH[k];\n let n = calUnit(v);\n // 没有单位或默认值处理单位\n compatibleTransform(k2, n);\n res[k2] = n;\n });\n temp = style.rotate3d;\n if(temp !== undefined) {\n let arr = (temp || '').toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0].replace('(', ''));\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n }\n res[ROTATE_3D] = arr;\n }\n temp = style.opacity;\n if(temp !== undefined) {\n if(temp === null) {\n temp = 1;\n }\n temp = parseFloat(temp);\n if(!isNaN(temp)) {\n temp = Math.max(temp, 0);\n temp = Math.min(temp, 1);\n res[OPACITY] = temp;\n }\n else {\n res[OPACITY] = 1;\n }\n }\n temp = style.zIndex;\n if(temp !== undefined) {\n res[Z_INDEX] = parseInt(temp) || 0;\n }\n // 转化不同单位值为对象标准化,不写单位的变成number单位转化为px\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n ].forEach(k => {\n let v = style[k];\n if(v === undefined) {\n return;\n }\n if(v === 'auto') {\n v = { v: 0, u: AUTO };\n }\n else {\n v = calUnit(v || 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n }\n let k2 = STYLE_KEY[style2Upper(k)];\n res[k2] = v;\n // 限制padding/border为正数\n if({\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n width: true,\n height: true,\n }.hasOwnProperty(k) && v.v < 0) {\n v.v = 0;\n }\n });\n temp = style.flexBasis;\n if(temp !== undefined) {\n if(/content/i.test(temp)) {\n res[FLEX_BASIS] = { v: temp.toLowerCase(), u: STRING };\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v.v = Math.max(v.v, 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n }\n else {\n res[FLEX_BASIS] = { v: 0, u: AUTO };\n }\n }\n temp = style.order;\n if(temp !== undefined) {\n res[ORDER] = parseInt(temp) || 0;\n }\n temp = style.color;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[COLOR] = { u: INHERIT };\n }\n else if(isGradient(temp)) {\n res[COLOR] = { v: gradient.parseGradient(temp), u: GRADIENT };\n }\n else {\n res[COLOR] = { v: rgba2int(temp), u: RGBA };\n }\n }\n temp = style.textStrokeColor;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_COLOR] = { u: INHERIT };\n }\n else if(isGradient(temp)) {\n res[TEXT_STROKE_COLOR] = { v: gradient.parseGradient(temp), u: GRADIENT };\n }\n else {\n res[TEXT_STROKE_COLOR] = { v: rgba2int(temp), u: RGBA };\n }\n }\n temp = style.fontSize;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[FONT_SIZE] = { u: INHERIT };\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为非正数,否则为继承\n if(v <= 0) {\n res[FONT_SIZE] = { u: INHERIT };\n }\n else {\n if([NUMBER, DEG, EM].indexOf(v.u) > -1) {\n v.v = parseInt(v.v); // 防止小数\n v.u = PX;\n }\n res[FONT_SIZE] = v;\n }\n }\n }\n temp = style.fontSizeShrink;\n if(temp !== undefined) {\n let v = calUnit(temp);\n // 不能为非正数,否则为0\n if(v <= 0) {\n res[FONT_SIZE_SHRINK] = { v: 0, u: PX };\n }\n else {\n if([NUMBER, DEG, EM].indexOf(v.u) > -1) {\n v.v = parseInt(v.v); // 防止小数\n v.u = PX;\n }\n res[FONT_SIZE_SHRINK] = v;\n }\n }\n temp = style.textStrokeWidth;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_WIDTH] = { u: INHERIT };\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = { u: INHERIT };\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[TEXT_STROKE_WIDTH] = v;\n }\n }\n }\n temp = style.textStrokeOver;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_STROKE_OVER] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.textStrokeOver;\n if(/fill/i.test(temp)) {\n v = 'fill';\n }\n res[TEXT_STROKE_OVER] = { v, u: STRING };\n }\n }\n temp = style.fontWeight;\n if(temp !== undefined) {\n if(/bold/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 700, u: NUMBER };\n }\n else if(/normal/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 400, u: NUMBER };\n }\n else if(/lighter/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 200, u: NUMBER };\n }\n else if(/inherit/i.test(temp)) {\n res[FONT_WEIGHT] = { u: INHERIT };\n }\n else {\n res[FONT_WEIGHT] = { v: Math.max(0, parseInt(temp)) || 400, u: NUMBER };\n }\n }\n temp = style.fontStyle;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_STYLE] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.fontStyle;\n if(/italic/i.test(temp)) {\n v = 'italic';\n }\n else if(/oblique/i.test(temp)) {\n v = 'oblique';\n }\n res[FONT_STYLE] = { v, u: STRING };\n }\n }\n temp = style.fontFamily;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_FAMILY] = { u: INHERIT };\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = { v: temp.toString().toLowerCase()\n .replace(/['\"]/, '')\n .replace(/\\s*,\\s*/g, ','), u: STRING };\n }\n }\n temp = style.writingMode;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WRITING_MODE] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.writingMode;\n if(/vertical-?rl/i.test(temp)) {\n v = 'verticalRl';\n }\n else if(/vertical-?lr/i.test(temp)) {\n v = 'verticalLr';\n }\n res[WRITING_MODE] = { v, u: STRING };\n }\n }\n temp = style.textAlign;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_ALIGN] = { u: INHERIT };\n }\n else {\n let v = 'left';\n if(/center/i.test(temp)) {\n v = 'center';\n }\n else if(/right/i.test(temp)) {\n v = 'right';\n }\n res[TEXT_ALIGN] = { v, u: STRING };\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[LINE_HEIGHT] = { u: INHERIT };\n }\n else if(/normal/i.test(temp)) {\n res[LINE_HEIGHT] = { u: AUTO };\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v.u) > -1) {\n v.u = NUMBER;\n }\n res[LINE_HEIGHT] = v;\n }\n else {\n let n = Math.max(0, parseFloat(temp)) || 'normal';\n // 非法数字\n if(n === 'normal') {\n res[LINE_HEIGHT] = { u: AUTO };\n }\n else {\n res[LINE_HEIGHT] = { v: n, u: NUMBER };\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[LETTER_SPACING] = { u: INHERIT };\n }\n else if(/normal/i.test(temp)) {\n res[LETTER_SPACING] = { v: 0, u: PX };\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = { v: parseFloat(temp) || 0, u: PX };\n }\n }\n temp = style.whiteSpace;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WHITE_SPACE] = { u: INHERIT };\n }\n else {\n res[WHITE_SPACE] = { v: temp, u: STRING };\n }\n }\n temp = style.lineClamp;\n if(temp !== undefined) {\n temp = parseInt(temp) || 0;\n res[LINE_CLAMP] = Math.max(0, temp);\n }\n // fill和stroke为渐变时特殊处理,fillRule无需处理字符串\n ['fill', 'stroke'].forEach((k, i) => {\n temp = style[k];\n if(temp !== undefined) {\n k = i ? STROKE : FILL;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(!item) {\n return { v: 'none', u: STRING };\n }\n else if(isGradient(item)) {\n return { v: gradient.parseGradient(item), u: GRADIENT };\n }\n else {\n return { v: rgba2int(item), u: RGBA };\n }\n });\n }\n });\n temp = style.strokeWidth;\n if(temp !== undefined) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[STROKE_WIDTH] = temp.map(item => {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n v.v = Math.max(v.v, 0);\n return v;\n });\n }\n temp = style.strokeDasharray;\n if(temp !== undefined) {\n if(Array.isArray(temp)) {\n res[STROKE_DASHARRAY] = temp.map(item => {\n let match = (item || '').toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n return match;\n }\n return [];\n });\n }\n else {\n let match = (temp || '').toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n res[STROKE_DASHARRAY] = [match];\n }\n else {\n res[STROKE_DASHARRAY] = [[]];\n }\n }\n }\n // filter支持数组形式\n temp = style.filter;\n if(temp !== undefined) {\n let f = [];\n // 先替换掉rgba为#RGBA格式,然后分割\n let arr;\n if(Array.isArray(temp)) {\n arr = temp.map(item => {\n return (replaceRgba2Hex(item) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\n });\n }\n else {\n arr = (replaceRgba2Hex(temp) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\n }\n if(arr) {\n arr.forEach(item => {\n let match = /([\\w-]+)\\s*\\((\\s*.+\\s*)\\)/i.exec(item);\n if(match) {\n let k = match[1].toLowerCase(), v = match[2];\n if(k === 'drop-shadow' || k === 'dropshadow') {\n let coords = /([-+]?[\\d.]+[pxremvwhina%]*)[\\s,]+([-+]?[\\d.]+[pxremvwhina%]*)[\\s,]+(?:([-+]?[\\d.]+[pxremvwhina%]*)[\\s,])?([-+]?[\\d.]+[pxremvwhina%]*\\s*)?/ig.exec(item);\n if(coords) {\n let res = [];\n // v,h,blur,spread,其中v和h是必须,其余没有为0\n for(let i = 1; i <= 4; i++) {\n let item2 = coords[i];\n if(item2) {\n let v = calUnit(item2);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v.v < 0) {\n v.v = 0;\n }\n res.push(v);\n }\n else {\n res.push({ v: 0, u: PX });\n }\n }\n let color = /#[a-f\\d]{3,8}/i.exec(item);\n if(color) {\n res.push(rgba2int(color[0]));\n }\n else {\n res.push([0, 0, 0, 1]);\n }\n f.push({ k: 'dropShadow', v: res });\n }\n }\n else {\n let m2 = /([-+]?[\\d.]+\\s*[pxremvwhdg%]*)/i.exec(v);\n if(m2) {\n let v = calUnit(m2[0]);\n if(k === 'blur') {\n if([DEG, PERCENT].indexOf(v.u) > -1) {\n return;\n }\n if(v.u === NUMBER) {\n v.u = PX;\n }\n v.v = Math.max(v.v, 0);\n f.push({ k, v });\n }\n else if(k === 'hue-rotate' || k === 'huerotate') {\n if([NUMBER, DEG].indexOf(v.u) === -1) {\n return;\n }\n v.u = DEG;\n f.push({ k:'hueRotate', v });\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n if([NUMBER, PERCENT].indexOf(v.u) === -1) {\n return;\n }\n v.v = Math.max(v.v, 0);\n v.u = PERCENT;\n f.push({ k, v });\n }\n }\n }\n }\n });\n }\n res[FILTER] = f;\n }\n temp = style.visibility;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[VISIBILITY] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.visibility;\n if(/hidden/i.test(temp)) {\n v = 'hidden';\n }\n res[VISIBILITY] = { v, u: STRING };\n }\n }\n temp = style.pointerEvents;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[POINTER_EVENTS] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.pointerEvents;\n if(/none/i.test(temp)) {\n v = 'none';\n }\n res[POINTER_EVENTS] = { v, u: STRING };\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = [];\n // 先替换掉rgba为#RGBA格式,然后按逗号分割\n let arr = (replaceRgba2Hex(temp) || '').split(',');\n if(arr) {\n arr.forEach(item => {\n let coords = /([-+]?[\\d.]+[pxremvwhina%]*)\\s*([-+]?[\\d.]+[pxremvwhina%]*)\\s*([-+]?[\\d.]+[pxremvwhina%]*\\s*)?([-+]?[\\d.]+[pxremvwhina%]*\\s*)?/i.exec(item);\n if(coords) {\n let res = [];\n // v,h,blur,spread,其中v和h是必须,其余没有为0\n for(let i = 1; i <= 4; i++) {\n let item2 = coords[i];\n if(item2) {\n let v = calUnit(item2);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v.v < 0) {\n v.v = 0;\n }\n res.push(v);\n }\n else {\n res.push({ v: 0, u: PX });\n }\n }\n let color = /#[a-f\\d]{3,8}/i.exec(item);\n if(color) {\n res.push(rgba2int(color[0]));\n }\n else {\n res.push([0, 0, 0, 1]);\n }\n res.push(/inset/i.test(item) ? 'inset' : 'outset');\n bs.push(res);\n }\n });\n }\n res[BOX_SHADOW] = bs;\n }\n // 直接赋值的string类型\n [\n 'position',\n 'display',\n 'boxSizing',\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignSelf',\n 'alignContent',\n 'overflow',\n 'mixBlendMode',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'backgroundClip',\n 'textOverflow',\n 'transformStyle',\n 'backfaceVisibility',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = convertStringValue(k, style[k]);\n }\n });\n // 直接赋值的number类型\n [\n 'flexGrow',\n 'flexShrink',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = Math.max(parseFloat(style[k]) || 0, 0);\n }\n });\n temp = style.zIndex;\n if(temp !== undefined) {\n res[Z_INDEX] = parseFloat(temp) || 0;\n }\n // 这些支持多个的用数组表示\n [\n 'backgroundRepeat',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'fillRule',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n let v = style[k];\n if(!Array.isArray(v)) {\n v = [v];\n }\n if(k === 'backgroundRepeat') {\n v.forEach((item, i) => {\n if(item) {\n v[i] = camel(item);\n }\n });\n }\n res[STYLE_KEY[style2Upper(k)]] = v;\n }\n });\n GEOM_KEY_SET.forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[k] = style[k];\n }\n });\n return res;\n}\n\nfunction setFontStyle(style, specialFontSize) {\n let fontSize = specialFontSize || style[FONT_SIZE] || 0;\n let fontFamily = style[FONT_FAMILY] || inject.defaultFontFamily || 'arial';\n if(/\\s/.test(fontFamily)) {\n fontFamily = '\"' + fontFamily.replace(/\"/g, '\\\\\"') + '\"';\n }\n return (style[FONT_STYLE] || 'normal') + ' ' + (style[FONT_WEIGHT] || '400') + ' '\n + fontSize + 'px/' + fontSize + 'px ' + fontFamily;\n}\n\n/**\n * https://zhuanlan.zhihu.com/p/25808995\n * 根据字形信息计算baseline的正确值,差值上下均分\n * @param style computedStyle\n * @returns {number}\n */\nfunction getBaseline(style) {\n let fontSize = style[FONT_SIZE];\n let ff = calFontFamily(style[FONT_FAMILY]);\n let normal = calNormalLineHeight(style, ff);\n return (style[LINE_HEIGHT] - normal) * 0.5 + fontSize * (font.info[ff] || font.info[inject.defaultFontFamily] || font.info.arial).blr;\n}\n\n// 垂直排版的baseline和水平类似,只是原点坐标系不同,删除加本身高度变为加gap高度\nfunction getVerticalBaseline(style) {\n return style[LINE_HEIGHT] - getBaseline(style);\n}\n\nfunction calNormalLineHeight(style, ff) {\n if(!ff) {\n ff = calFontFamily(style[FONT_FAMILY]);\n }\n return style[FONT_SIZE] * (font.info[ff] || font.info[inject.defaultFontFamily] || font.info.arial).lhr;\n}\n\nfunction calFontFamily(fontFamily) {\n let ff = fontFamily.split(/\\s*,\\s*/);\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(font.hasLoaded(item) || inject.checkSupportFontFamily(item)) {\n return item;\n }\n }\n return inject.defaultFontFamily;\n}\n\nfunction calRelativePercent(n, parent, k) {\n n *= 0.01;\n while(parent) {\n let style = parent.currentStyle[k];\n if(style.u === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style.u === PX) {\n return n * style.v;\n }\n else if(style.u === PERCENT) {\n n *= style.v * 0.01;\n parent = parent.domParent;\n }\n else if(style.u === REM) {\n return n * style.v * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style.u === VW) {\n return n * style.v * parent.root.width * 0.01;\n }\n else if(style.u === VH) {\n return n * style.v * parent.root.height * 0.01;\n }\n else if(style.u === VMAX) {\n return n * style.v * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(style.u === VMIN) {\n return n * style.v * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n }\n return n;\n}\n\nfunction calRelative(currentStyle, k, v, parent, isWidth) {\n if(v.u === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v.u) > -1) {\n v = v.v;\n }\n else if(v.u === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v.v, parent, WIDTH);\n }\n else {\n v = calRelativePercent(v.v, parent, HEIGHT);\n }\n }\n else if(v.u === REM) {\n v = v.v * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n v = v.v * parent.root.width * 0.01;\n }\n else if(v.u === VH) {\n v = v.v * parent.root.height * 0.01;\n }\n else if(v.u === VMAX) {\n v = v.v * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n v = v.v * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n return v;\n}\n\nfunction isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nfunction equalStyle(k, a, b, target) {\n if(!a || !b) {\n return a === b;\n }\n if(k === TRANSFORM) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa.k !== ob.k) {\n return false;\n }\n let av = oa.v, bv = ob.v;\n if(oa.k === MATRIX) {\n if(!equalArr(av, bv)) {\n return false;\n }\n }\n else if(av.u !== bv.u || av.v !== bv.v) {\n return false;\n }\n }\n return true;\n }\n if(k === ROTATE_3D) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3].v === b[3].v && a[3].u === b[3].u;\n }\n if(k === FILTER) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa.k !== ob.k) {\n return false;\n }\n let av = oa.v, bv = ob.v;\n if(oa.k === 'dropShadow' || oa.k === 'drop-shadow') {\n if(av.length !== bv.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n let avj = av[j], bvj = bv[j];\n if(avj.u !== bvj.u || avj.v !== bvj.v) {\n return false;\n }\n }\n }\n else if(av.u !== bv.u || av.v !== bv.v) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n return a[0].v === b[0].v && a[0].u === b[0].u\n && a[1].v === b[1].v && a[1].u === b[1].u;\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa.v !== bb.v || aa.u !== bb.u || aa.v !== bb.v || aa.u !== bb.u) {\n return false;\n }\n }\n return true;\n }\n if(k === BOX_SHADOW) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if((!aa || !bb) && aa !== bb) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(aa[j].v !== bb[j].v || aa[j].u !== bb[j].u) {\n return false;\n }\n }\n for(let j = 0; j < 4; j++) {\n if(aa[4][j] !== bb[4][j]) {\n return false;\n }\n }\n if(aa[5] !== bb[5]) {\n return false;\n }\n }\n return true;\n }\n if(k === BACKGROUND_SIZE || k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa[0].v !== bb[0].v || aa[0].u !== bb[0].u || aa[1].v !== bb[1].v || aa[1].u !== bb[1].u) {\n return false;\n }\n }\n return true;\n }\n // if(k === OPACITY || k === Z_INDEX) {} 原始数字无需判断\n if(isLengthKey(k) || isExpandKey(k)) {\n return a.v === b.v && a.u === b.u;\n }\n if(isGradientKey(k)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i], bi = b[i];\n if(ai.u !== bi.u) {\n return false;\n }\n let av = ai.v, bv = bi.v;\n if(ai.u === GRADIENT) {\n if(av.k !== bv.k || av.d !== bv.d || av.s !== bv.s || av.z !== bv.z) {\n return false;\n }\n if(av.k === 'linear') {\n let ad = av.d, bd = bv.d;\n let isArrayD1 = Array.isArray(ad);\n let isArrayD2 = Array.isArray(bd);\n if(isArrayD1 !== isArrayD2) {\n return false;\n }\n if(isArrayD1) {\n if(ad[0] !== bd[0] || ad[1] !== bd[1] || ad[2] !== bd[2] || ad[3] !== bd[3]) {\n return false;\n }\n }\n else if(ad !== bd) {\n return false;\n }\n }\n else if(av.k === 'conic' && av.d !== bv.d) {\n return false;\n }\n if(av.k === 'radial' || av.k === 'conic') {\n let ap = av.p, bp = bv.p;\n if(ap[0].u !== bp[0].u || ap[0].v !== bp[0].v || ap[1].u !== bp[1].u || ap[1].v !== bp[1].v) {\n return false;\n }\n }\n for(let j = 0; j < 2; j++) {\n let aj = av.v[j], bj = bv.v[j];\n let ac = aj[0], bc = bj[0];\n if(ac[0] !== bc[0] || ac[1] !== bc[1] || ac[2] !== bc[2] || ac[3] !== bc[3]) {\n return false;\n }\n if(aj[1] && bj[1]) {\n if(aj[1].u !== bj[1].u || aj[1].v !== bj[1].v) {\n return false;\n }\n }\n else if(aj[1] || bj[1]) {\n return false;\n }\n }\n }\n else if(ai.u === RGBA) {\n if(!equalArr(av, bv)) {\n return false;\n }\n }\n else if(av !== bv) {\n return false;\n }\n }\n return true;\n }\n if(isColorKey(k)) {\n if(a.u !== b.u) {\n return false;\n }\n if(a.u === GRADIENT) {\n return equal(a.v, b.v);\n }\n else if(a.u === INHERIT) {\n return true;\n }\n else if(a.u === RGBA) {\n return equalArr(a.v, b.v);\n }\n }\n // multi都是纯值数组,equalArr本身即递归,非multi根据类型判断\n if(isGeom(target.tagName, k) && (target.isMulti || Array.isArray(a) && Array.isArray(b))) {\n return equal(a, b);\n }\n return a === b;\n}\n\nfunction cloneStyle(style, keys) {\n if(!keys) {\n keys = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n }\n let res = {};\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n if(k === TRANSFORM) {\n if(v) {\n let len = v.length;\n let n = new Array(len);\n for(let i = 0; i < len; i++) {\n let o = v[i];\n if(o.k === MATRIX) {\n n[i] = {\n k: o.k,\n v: o.v.slice(0),\n };\n }\n else {\n n[i] = {\n k: o.k,\n v: {\n v: o.v.v,\n u: o.v.u,\n },\n };\n }\n }\n res[k] = n;\n }\n }\n else if(k === ROTATE_3D) {\n res[k] = [v[0], v[1], v[2], { v: v[3].v, u: v[3].u }];\n }\n else if(k === FILTER) {\n if(v) {\n let len = v.length;\n let n = new Array(len);\n for(let i = 0; i < len; i++) {\n let o = v[i];\n let k = o.k, vv = o.v;\n if(k === 'dropShadow') {\n let arr = new Array(5);\n n[i] = { k, v: arr };\n for(let j = 0; j < 4; j++) {\n let temp = vv[j];\n arr[j] = { v: temp.v, u: temp.u };\n }\n arr[4] = vv[4].slice(0);\n }\n else {\n n[i] = {k, v: { v: vv.v, u: vv.u }};\n }\n }\n res[k] = n;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n if(v) {\n let n = new Array(2);\n for(let i = 0; i < 2; i++) {\n let o = v[i];\n n[i] = { v: o.v, u: o.u };\n }\n res[k] = n;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n res[k] = v.map(item => ({ v: item.v, u: item.u }));\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = new Array(6);\n for(let i = 0; i < 4; i++) {\n let o = item[i];\n n[i] = { v: o.v, u: o.u }; // x/y/blur/spread\n }\n n[4] = item[4].slice(0); //rgba\n n[5] = item[5]; // outset/inset\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n if(v) {\n res[k] = v.map(item => {\n return [\n { v: item[0].v, u: item[0].u },\n { v: item[1].v, u: item[1].u },\n ];\n });\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n res[k] = v;\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => ({\n v: item.v,\n u: item.u,\n }));\n }\n }\n else if(isLengthKey(k) || isExpandKey(k)) {\n res[k] = { v: v.v, u: v.u };\n }\n // 渐变特殊处理\n else if(isGradientKey(k)) {\n res[k] = v.map(item => {\n if(!item) {\n return null;\n }\n if(item.u === GRADIENT) {\n return { v: util.clone(item.v), u: GRADIENT };\n }\n // 颜色\n else if(item.u === RGBA) {\n return { v: item.v.slice(0), u: RGBA };\n }\n // string和none\n else {\n return { v: item.v, u: item.u };\n }\n });\n }\n else if(isColorKey(k)) {\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n if(v.u === GRADIENT) {\n res[k] = { v: util.clone(v.v), u: GRADIENT };\n }\n else if(v.u === RGBA) {\n res[k] = { v: v.v.slice(0), u: RGBA };\n }\n // inherit\n else {\n res[k] = { u: INHERIT };\n }\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // position等直接值类型赋值\n else {\n res[k] = v;\n }\n }\n return res;\n}\n\nfunction spreadBoxShadow(bbox, boxShadow) {\n let [x1, y1, x2, y2] = bbox;\n if(Array.isArray(boxShadow)) {\n let xl = 0, yt = 0, xr = 0, yb = 0;\n boxShadow.forEach(item => {\n let [x, y, sigma, spread, color, inset] = item;\n if(inset !== 'inset' && color[3] > 0) {\n let d = blur.outerSize(sigma);\n d += spread;\n xl = Math.min(xl, x - d);\n yt = Math.min(yt, x - d);\n xr = Math.max(xr, x + d);\n yb = Math.max(yb, y + d);\n }\n });\n x1 += xl;\n y1 += yt;\n x2 += xr;\n y2 += yb;\n }\n return [x1, y1, x2, y2];\n}\n\nfunction spreadFilter(bbox, filter) {\n let [x1, y1, x2, y2] = bbox;\n // filter对整体有影响,且filter子项可以先后多次重复出现,上面计算完后,依次处理\n if(Array.isArray(filter)) {\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let d = blur.kernelSize(v);\n let spread = blur.outerSizeByD(d);\n if(spread) {\n x1 -= spread;\n y1 -= spread;\n x2 += spread;\n y2 += spread;\n }\n }\n else if(k === 'dropShadow') {\n let d = blur.kernelSize(v[2]);\n let spread = blur.outerSizeByD(d);\n // x/y/blur,3个一起影响,要考虑正负号,spread一定为非负\n if(v[0] || v[1] || spread) {\n if(v[0] <= 0 || v[0] > 0 && v[0] < spread) {\n x1 += v[0] - spread;\n }\n if(v[1] <= 0 || v[1] > 0 && v[1] < spread) {\n y1 += v[1] - spread;\n }\n if(v[0] < 0 && -v[0] < spread || v[0] >= 0) {\n x2 += v[0] + spread;\n }\n if(v[1] < 0 && -v[1] < spread || v[1] >= 0) {\n y2 += v[1] + spread;\n }\n }\n }\n });\n }\n return [x1, y1, x2, y2];\n}\n\nexport default {\n normalize,\n setFontStyle,\n getBaseline,\n getVerticalBaseline,\n calRelative,\n equalStyle,\n isRelativeOrAbsolute,\n cloneStyle,\n calNormalLineHeight,\n calFontFamily,\n spreadBoxShadow,\n spreadFilter,\n};\n","import unit from '../style/unit';\nimport enums from '../util/enums';\nimport matrix from '../math/matrix';\nimport geom from '../math/geom';\n\nconst { STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n MATRIX,\n FONT_SIZE,\n}} = enums;\nconst { PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { identity, multiply, multiplyTfo, tfoMultiply, isE,\n multiplyTranslateX, multiplyTranslateY, multiplyTranslateZ,\n multiplyRotateX, multiplyRotateY, multiplyRotateZ,\n multiplySkewX, multiplySkewY, multiplyPerspective,\n multiplyScaleX, multiplyScaleY, multiplyScaleZ } = matrix;\nconst { d2r } = geom;\n\nfunction calRotateX(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[5] = t[10] = cos;\n t[6] = sin;\n t[9] = -sin;\n return t;\n}\n\nfunction calRotateY(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[10] = cos;\n t[8] = sin;\n t[2] = -sin;\n return t;\n}\n\nfunction calRotateZ(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\nfunction calRotate3d(t, v) {\n let [x, y, z, r] = v;\n r = d2r(r);\n let s = Math.sin(r);\n let c = Math.cos(r);\n if(x && !y && !z) {\n if(x < 0) {\n s = -s;\n }\n t[5] = c;\n t[9] = -s;\n t[6] = s;\n t[10] = c;\n }\n else if(y && !x && !z) {\n if(y < 0) {\n s = -s;\n }\n t[0] = c;\n t[8] = s;\n t[2] = -s;\n t[10] = c;\n }\n else if(z && !x && !y) {\n if(z < 0) {\n s = -s;\n }\n t[0] = c;\n t[4] = -s;\n t[1] = s;\n t[5] = c;\n }\n else {\n let len = Math.sqrt(x * x + y * y + z * z);\n if(len !== 1) {\n let rlen = 1 / len;\n x *= rlen;\n y *= rlen;\n z *= rlen;\n }\n let nc = 1 - c;\n let xy = x * y;\n let yz = y * z;\n let zx = z * x;\n let xs = x * s;\n let ys = y * s;\n let zs = z * s;\n\n t[0] = x * x * nc + c;\n t[1] = xy * nc + zs;\n t[2] = zx * nc - ys;\n t[3] = 0;\n\n t[4] = xy * nc - zs;\n t[5] = y * y * nc + c;\n t[6] = yz * nc + xs;\n t[7] = 0;\n\n t[8] = zx * nc + ys;\n t[9] = yz * nc - xs;\n t[10] = z * z * nc + c;\n t[11] = 0;\n\n t[12] = 0;\n t[13] = 0;\n t[14] = 0;\n t[15] = 1;\n }\n return t;\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let m = identity();\n for(let i = 0, len = transform.length; i < len; i++) {\n let item = transform[i];\n let k = item.k;\n let v = calSingleValue(k, item.v, ow, oh, root);\n if(k === TRANSLATE_X) {\n m = multiplyTranslateX(m, v);\n }\n else if(k === TRANSLATE_Y) {\n m = multiplyTranslateY(m, v);\n }\n else if(k === TRANSLATE_Z) {\n m = multiplyTranslateZ(m, v);\n }\n else if(k === ROTATE_X) {\n m = multiplyRotateX(m, d2r(v));\n }\n else if(k === ROTATE_Y) {\n m = multiplyRotateY(m, d2r(v));\n }\n else if(k === ROTATE_Z) {\n m = multiplyRotateZ(m, d2r(v));\n }\n else if(k === SKEW_X) {\n m = multiplySkewX(m, d2r(v));\n }\n else if(k === SKEW_Y) {\n m = multiplySkewY(m, d2r(v));\n }\n else if(k === SCALE_X) {\n m = multiplyScaleX(m, v);\n }\n else if(k === SCALE_Y) {\n m = multiplyScaleY(m, v);\n }\n else if(k === SCALE_Z) {\n m = multiplyScaleZ(m, v);\n }\n // 这种写法要求ppt必须在开头\n else if(k === PERSPECTIVE && !i) {\n m = multiplyPerspective(m, v);\n }\n else if(k === ROTATE_3D) {\n let t = identity();\n calRotate3d(t, [v[0], v[1], v[2], v[3].v]);\n m = multiply(m, t);\n }\n else if(k === MATRIX) {\n m = multiply(m, v);\n }\n }\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, ox, oy) {\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = tfoMultiply(ox, oy, res);\n res = multiplyTfo(res, -ox, -oy);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, ox, oy, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, ox, oy);\n}\n\nfunction calSingleValue(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(v.u === PX) {\n return v.v;\n }\n else if(v.u === PERCENT) {\n return v.v * (k === TRANSLATE_Y ? oh : ow) * 0.01;\n }\n else if(v.u === REM) {\n return v.v * root.__computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n return v.v * root.width * 0.01;\n }\n else if(v.u === VH) {\n return v.v * root.height * 0.01;\n }\n else if(v.u === VMAX) {\n return v.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n return v.v * Math.min(root.width, root.height) * 0.01;\n }\n }\n else if(k === MATRIX) {\n return v;\n }\n else if(k === ROTATE_3D) {\n return v;\n }\n return v.v;\n}\n\nfunction calPerspectiveMatrix(ppt, ox, oy) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n if(ox || oy) {\n res = tfoMultiply(ox, oy, res);\n res = multiplyTfo(res, -ox, -oy);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!m[11];\n}\n\nexport default {\n calSingleValue,\n calMatrix,\n calRotateX,\n calRotateY,\n calRotateZ,\n calRotate3d,\n calPerspectiveMatrix,\n calMatrixByOrigin,\n calMatrixWithOrigin,\n isPerspectiveMatrix,\n};\n","import mode from '../refresh/mode';\nimport css from '../style/css';\nimport transform from '../style/transform';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport unit from '../style/unit';\nimport mx from '../math/matrix';\n\nconst { STYLE_KEY: {\n COLOR,\n FONT_WEIGHT,\n FONT_FAMILY,\n FONT_SIZE,\n FONT_STYLE,\n LETTER_SPACING,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n ROTATE_Z,\n LINE_HEIGHT,\n} } = enums;\nconst { DEG } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst TuOrU = /[\\u{00A7}\\u{00A9}\\u{00AE}\\u{00B1}\\u{00BC}-\\u{00BE}\\u{00D7}\\u{00F7}\\u{02EA}-\\u{02EB}\\u{1100}-\\u{11FF}\\u{1401}-\\u{166C}\\u{166D}\\u{166E}\\u{166F}-\\u{167F}\\u{18B0}-\\u{18F5}\\u{18F6}-\\u{18FF}\\u{2016}\\u{2020}-\\u{2021}\\u{2030}-\\u{2031}\\u{203B}-\\u{203C}\\u{2042}\\u{2047}-\\u{2049}\\u{2051}\\u{2065}\\u{20DD}-\\u{20E0}\\u{20E2}-\\u{20E4}\\u{2100}-\\u{2101}\\u{2103}-\\u{2106}\\u{2107}\\u{2108}-\\u{2109}\\u{210F}\\u{2113}\\u{2114}\\u{2116}-\\u{2117}\\u{211E}-\\u{2123}\\u{2125}\\u{2127}\\u{2129}\\u{212E}\\u{2135}-\\u{2138}\\u{2139}\\u{213A}-\\u{213B}\\u{213C}-\\u{213F}\\u{2145}-\\u{2149}\\u{214A}\\u{214C}-\\u{214D}\\u{214F}\\u{2150}-\\u{215F}\\u{2160}-\\u{2182}\\u{2183}-\\u{2184}\\u{2185}-\\u{2188}\\u{2189}\\u{218C}-\\u{218F}\\u{221E}\\u{2234}-\\u{2235}\\u{2300}-\\u{2307}\\u{230C}-\\u{231F}\\u{2324}-\\u{2328}\\u{232B}\\u{237D}-\\u{239A}\\u{23BE}-\\u{23CD}\\u{23CF}\\u{23D1}-\\u{23DB}\\u{23E2}-\\u{23FF}\\u{2400}-\\u{2422}\\u{2424}-\\u{2426}\\u{2427}-\\u{243F}\\u{2440}-\\u{244A}\\u{244B}-\\u{245F}\\u{2460}-\\u{249B}\\u{249C}-\\u{24E9}\\u{24EA}-\\u{24FF}\\u{25A0}-\\u{25B6}\\u{25B7}\\u{25B8}-\\u{25C0}\\u{25C1}\\u{25C2}-\\u{25F7}\\u{25F8}-\\u{25FF}\\u{2600}-\\u{2619}\\u{2620}-\\u{266E}\\u{266F}\\u{2670}-\\u{26FF}\\u{2700}-\\u{2767}\\u{2776}-\\u{2793}\\u{2B12}-\\u{2B2F}\\u{2B50}-\\u{2B59}\\u{2B97}\\u{2BB8}-\\u{2BD1}\\u{2BD3}-\\u{2BEB}\\u{2BF0}-\\u{2BFF}\\u{2E50}-\\u{2E51}\\u{2E80}-\\u{2E99}\\u{2E9A}\\u{2E9B}-\\u{2EF3}\\u{2EF4}-\\u{2EFF}\\u{2F00}-\\u{2FD5}\\u{2FD6}-\\u{2FDF}\\u{2FE0}-\\u{2FEF}\\u{2FF0}-\\u{2FFB}\\u{2FFC}-\\u{2FFF}\\u{3000}\\u{3003}\\u{3004}\\u{3005}\\u{3006}\\u{3007}\\u{3012}-\\u{3013}\\u{3020}\\u{3021}-\\u{3029}\\u{302A}-\\u{302D}\\u{302E}-\\u{302F}\\u{3031}-\\u{3035}\\u{3036}-\\u{3037}\\u{3038}-\\u{303A}\\u{303B}\\u{303C}\\u{303D}\\u{303E}-\\u{303F}\\u{3040}\\u{3042}\\u{3044}\\u{3046}\\u{3048}\\u{304A}-\\u{3062}\\u{3064}-\\u{3082}\\u{3084}\\u{3086}\\u{3088}-\\u{308D}\\u{308F}-\\u{3094}\\u{3097}-\\u{3098}\\u{3099}-\\u{309A}\\u{309D}-\\u{309E}\\u{309F}\\u{30A2}\\u{30A4}\\u{30A6}\\u{30A8}\\u{30AA}-\\u{30C2}\\u{30C4}-\\u{30E2}\\u{30E4}\\u{30E6}\\u{30E8}-\\u{30ED}\\u{30EF}-\\u{30F4}\\u{30F7}-\\u{30FA}\\u{30FB}\\u{30FD}-\\u{30FE}\\u{30FF}\\u{3100}-\\u{3104}\\u{3105}-\\u{3126}\\u{3128}-\\u{312F}\\u{3130}\\u{3131}-\\u{318E}\\u{318F}\\u{3190}-\\u{3191}\\u{3192}-\\u{3195}\\u{3196}-\\u{319F}\\u{31A0}-\\u{31BF}\\u{31C0}-\\u{31E3}\\u{31E4}-\\u{31EF}\\u{3200}-\\u{321E}\\u{321F}\\u{3220}-\\u{3229}\\u{322A}-\\u{3247}\\u{3248}-\\u{324F}\\u{3250}\\u{3251}-\\u{325F}\\u{3260}-\\u{327F}\\u{3280}-\\u{3289}\\u{328A}-\\u{32B0}\\u{32B1}-\\u{32BF}\\u{32C0}-\\u{32FE}\\u{3358}-\\u{337A}\\u{3380}-\\u{33FF}\\u{3400}-\\u{4D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\u{11580}-\\u{115AE}\\u{115AF}-\\u{115B1}\\u{115B2}-\\u{115B5}\\u{115B6}-\\u{115B7}\\u{115B8}-\\u{115BB}\\u{115BC}-\\u{115BD}\\u{115BE}\\u{115BF}-\\u{115C0}\\u{115C1}-\\u{115D7}\\u{115D8}-\\u{115DB}\\u{115DC}-\\u{115DD}\\u{115DE}-\\u{115FF}\\u{11A00}\\u{11A01}-\\u{11A0A}\\u{11A0B}-\\u{11A32}\\u{11A33}-\\u{11A38}\\u{11A39}\\u{11A3A}\\u{11A3B}-\\u{11A3E}\\u{11A3F}-\\u{11A46}\\u{11A47}\\u{11A48}-\\u{11A4F}\\u{11A50}\\u{11A51}-\\u{11A56}\\u{11A57}-\\u{11A58}\\u{11A59}-\\u{11A5B}\\u{11A5C}-\\u{11A89}\\u{11A8A}-\\u{11A96}\\u{11A97}\\u{11A98}-\\u{11A99}\\u{11A9A}-\\u{11A9C}\\u{11A9D}\\u{11A9E}-\\u{11AA2}\\u{11AA3}-\\u{11AAF}\\u{11AB0}-\\u{11ABF}\\u{13000}-\\u{1342F}\\u{13430}-\\u{1343F}\\u{13440}\\u{13441}-\\u{13446}\\u{13447}-\\u{13455}\\u{13456}-\\u{1345F}\\u{14400}-\\u{14646}\\u{14647}-\\u{1467F}\\u{16FE0}-\\u{16FE1}\\u{16FE2}\\u{16FE3}\\u{16FE4}\\u{16FE5}-\\u{16FEF}\\u{16FF0}-\\u{16FF1}\\u{16FF2}-\\u{16FFF}\\u{17000}-\\u{187F7}\\u{187F8}-\\u{187FF}\\u{18800}-\\u{18AFF}\\u{18B00}-\\u{18CD5}\\u{18CD6}-\\u{18CFF}\\u{18D00}-\\u{18D08}\\u{18D09}-\\u{18D7F}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF4}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFC}\\u{1AFFD}-\\u{1AFFE}\\u{1AFFF}\\u{1B000}-\\u{1B0FF}\\u{1B100}-\\u{1B122}\\u{1B123}-\\u{1B12F}\\u{1B130}-\\u{1B131}\\u{1B132}\\u{1B133}-\\u{1B14F}\\u{1B150}-\\u{1B152}\\u{1B153}-\\u{1B154}\\u{1B155}\\u{1B156}-\\u{1B163}\\u{1B164}-\\u{1B167}\\u{1B168}-\\u{1B16F}\\u{1B170}-\\u{1B2FB}\\u{1B2FC}-\\u{1B2FF}\\u{1CF00}-\\u{1CF2D}\\u{1CF2E}-\\u{1CF2F}\\u{1CF30}-\\u{1CF46}\\u{1CF47}-\\u{1CF4F}\\u{1CF50}-\\u{1CFC3}\\u{1CFC4}-\\u{1CFCF}\\u{1D000}-\\u{1D0F5}\\u{1D0F6}-\\u{1D0FF}\\u{1D100}-\\u{1D126}\\u{1D127}-\\u{1D128}\\u{1D129}-\\u{1D164}\\u{1D165}-\\u{1D166}\\u{1D167}-\\u{1D169}\\u{1D16A}-\\u{1D16C}\\u{1D16D}-\\u{1D172}\\u{1D173}-\\u{1D17A}\\u{1D17B}-\\u{1D182}\\u{1D183}-\\u{1D184}\\u{1D185}-\\u{1D18B}\\u{1D18C}-\\u{1D1A9}\\u{1D1AA}-\\u{1D1AD}\\u{1D1AE}-\\u{1D1EA}\\u{1D1EB}-\\u{1D1FF}\\u{1D2E0}-\\u{1D2F3}\\u{1D2F4}-\\u{1D2FF}\\u{1D300}-\\u{1D356}\\u{1D357}-\\u{1D35F}\\u{1D360}-\\u{1D378}\\u{1D379}-\\u{1D37F}\\u{1D800}-\\u{1D9FF}\\u{1DA00}-\\u{1DA36}\\u{1DA37}-\\u{1DA3A}\\u{1DA3B}-\\u{1DA6C}\\u{1DA6D}-\\u{1DA74}\\u{1DA75}\\u{1DA76}-\\u{1DA83}\\u{1DA84}\\u{1DA85}-\\u{1DA86}\\u{1DA87}-\\u{1DA8B}\\u{1DA8C}-\\u{1DA9A}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA0}\\u{1DAA1}-\\u{1DAAF}\\u{1F000}-\\u{1F02B}\\u{1F02C}-\\u{1F02F}\\u{1F030}-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\\u{1FAC5}\\u{1FAC6}-\\u{1FACD}\\u{1FACE}-\\u{1FADB}\\u{1FADC}-\\u{1FADF}\\u{1FAE0}-\\u{1FAE8}\\u{1FAE9}-\\u{1FAEF}\\u{1FAF0}-\\u{1FAF8}\\u{1FAF9}-\\u{1FAFF}\\u{20000}-\\u{2A6DF}\\u{2A6E0}-\\u{2A6FF}\\u{2A700}-\\u{2B739}\\u{2B73A}-\\u{2B73F}\\u{2B740}-\\u{2B81D}\\u{2B81E}-\\u{2B81F}\\u{2B820}-\\u{2CEA1}\\u{2CEA2}-\\u{2CEAF}\\u{2CEB0}-\\u{2EBE0}\\u{2EBE1}-\\u{2F7FF}\\u{2F800}-\\u{2FA1D}\\u{2FA1E}-\\u{2FFFD}\\u{30000}-\\u{3134A}\\u{3134B}-\\u{3134F}\\u{31350}-\\u{323AF}\\u{323B0}-\\u{3FFFD}]/u;\n\n/**\n * 表示一行文本的类,保存它的位置、内容、从属信息,在布局阶段生成,并在渲染阶段被Text调用render()\n * 关系上直属于Text类,一个Text类可能因为换行原因导致有多个TextBox,一行内容中也可能有不同Text从而不同TextBox\n * 另外本类还会被LineBoxManager添加到LineBox里,LineBox为一行中的inline/文本组合,之间需要进行垂直对齐\n * 在textOverflow为ellipsis时,可能会收到后面节点的向前回退(后面不足放下…),使得省略号发生在本节点\n */\nclass TextBox {\n constructor(parent, index, x, y, w, h, content, isUpright = false) {\n this.__parent = parent;\n this.__index = index;\n this.__x = x;\n this.__y = y;\n if(isUpright) {\n this.__width = h;\n this.__height = w;\n }\n else {\n this.__width = w;\n this.__height = h;\n }\n this.__content = content;\n this.__virtualDom = {};\n this.__parentLineBox = null;\n this.__isVertical = isUpright;\n }\n\n /**\n * 渲染阶段被Text类调用,多行Text会有多个TextBox,内容被分拆开\n * @param renderMode\n * @param ctx\n * @param computedStyle\n * @param cacheStyle Text父节点Dom的缓存样式,相比computedStyle可以直接用,比如color被缓存为style字符串\n * @param dx\n * @param dy\n */\n render(renderMode, ctx, computedStyle, cacheStyle, dx, dy) {\n let { content, x, y, parent, width, height, isUpright } = this;\n let dom = parent.__domParent;\n let b = css.getBaseline(computedStyle);\n let bv = css.getVerticalBaseline(computedStyle);\n // 垂直文本x/y互换,渲染时使用rotate模拟,因为是基于baseline绘制,顺时针90deg时tfo是文字左下角,\n // 它等同于lineHeight(现在的w)减去b\n if(isUpright) {\n x += bv;\n }\n else {\n y += b;\n }\n x += dx;\n y += dy;\n if(isUpright) {\n this.__endX = x;\n this.__endY = y + height;\n }\n else {\n this.__endX = x + width;\n this.__endY = y;\n }\n let {\n [LETTER_SPACING]: letterSpacing,\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n [TEXT_STROKE_COLOR]: textStrokeColor,\n [FONT_SIZE]: fontSize,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let i = 0, length = content.length;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let me = dom.matrixEvent, list;\n let dev1 = 0, dev2 = 0;\n if(isUpright) {\n list = [\n { k: ROTATE_Z, v: { v: 90, u: DEG } },\n ];\n dev1 = bv * 0.6;\n dev2 = bv * 0.2;\n }\n let overFill = computedStyle[TEXT_STROKE_OVER] === 'fill';\n if(letterSpacing) {\n for(; i < length; i++) {\n let c = content.charAt(i);\n if(isUpright) {\n let cjk = TuOrU.test(c);\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n if(overFill) {\n ctx.fillText(c, x - dev1, y - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x - dev1, y - dev2);\n }\n if(!overFill) {\n ctx.fillText(c, x - dev1, y - dev2);\n }\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n if(overFill) {\n ctx.fillText(c, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x, y);\n }\n if(!overFill) {\n ctx.fillText(c, x, y);\n }\n }\n y += ctx.measureText(c).width + letterSpacing;\n }\n else {\n if(overFill) {\n ctx.fillText(c, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x, y);\n }\n if(!overFill) {\n ctx.fillText(c, x, y);\n }\n x += ctx.measureText(c).width + letterSpacing;\n }\n }\n }\n else {\n if(isUpright) {\n let cjk = TuOrU.test(content.charAt(0)), last = 0, count = 0, len = content.length;\n for(let i = 1; i < len; i++) {\n let nowCjk = TuOrU.test(content.charAt(i));\n // 不相等时cjk发生变化,输出之前的内容,记录当下的所有\n if(nowCjk !== cjk) {\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n count += fontSize;\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y + count, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x, y + count);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x, y + count);\n }\n if(!overFill) {\n ctx.fillText(s, x, y + count);\n }\n count += ctx.measureText(s).width;\n }\n last = i;\n cjk = !cjk;\n }\n // cjk单字符输出\n else if(nowCjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n count += fontSize;\n last = i;\n }\n }\n if(last < len) {\n let s = content.slice(last, len);\n // 最后的cjk只可能是一个字符\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y + count, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n if(overFill) {\n ctx.fillText(s, x, y + count);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x, y + count);\n }\n if(!overFill) {\n ctx.fillText(s, x, y + count);\n }\n }\n }\n }\n else {\n if(overFill) {\n ctx.fillText(content, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(content, x, y);\n }\n if(!overFill) {\n ctx.fillText(content, x, y);\n }\n }\n }\n }\n else if(renderMode === SVG) {\n let color = cacheStyle[COLOR];\n if(color.k) {\n color = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, color, dx, dy).v;\n }\n // 垂直的svg以中线为基线,需偏移baseline和中线的差值\n if(isUpright) {\n x += lineHeight * 0.5 - bv;\n }\n let props = [\n ['x', x],\n ['y', y],\n ['fill', color],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n // svg无法定义stroke的over\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n let textStrokeColor = cacheStyle[TEXT_STROKE_COLOR];\n // 渐变\n if(textStrokeColor.k) {\n textStrokeColor = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, textStrokeColor, dx, dy).v;\n }\n props.push(['stroke', textStrokeColor]);\n props.push(['stroke-width', computedStyle[TEXT_STROKE_WIDTH]]);\n }\n if(letterSpacing) {\n props.push(['letter-spacing', letterSpacing]);\n }\n if(isUpright) {\n props.push(['writing-mode', 'vertical-lr']);\n }\n this.__virtualDom = {\n type: 'item',\n tagName: 'text',\n props,\n content: util.encodeHtml(content),\n };\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endX() {\n return this.__endX;\n }\n\n get endY() {\n return this.__endY;\n }\n\n get width() {\n return this.__width;\n }\n\n get offsetWidth() {\n return this.__width;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get offsetHeight() {\n return this.__height;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get content() {\n return this.__content;\n }\n\n get baseline() {\n return this.parent.baseline;\n }\n\n get verticalBaseline() {\n return this.parent.verticalBaseline;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n}\n\nexport default TextBox;\n","import Node from './Node';\nimport mode from '../refresh/mode';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport transform from '../style/transform';\nimport enums from '../util/enums';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n COLOR,\n LINE_HEIGHT,\n ROTATE_Z,\n },\n} = enums;\nconst { DEG } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst CHAR = '…';\n\nclass Ellipsis extends Node {\n constructor(x, y, width, parent, text, isUpright) {\n super();\n this.__x = this.__x1 = x;\n this.__y = this.__y1 = y;\n this.__width = width;\n this.__parent = this.__domParent = parent;\n this.__text = text;\n parent.__ellipsis = this;\n this.__parentLineBox = null;\n this.__baseline = css.getBaseline(parent.computedStyle);\n this.__isVertical = isUpright;\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let { x, y, parent, isUpright } = this;\n let {\n computedStyle,\n cacheStyle: {\n [COLOR]: color,\n },\n } = parent;\n let b = css.getBaseline(computedStyle);\n let bv = css.getVerticalBaseline(computedStyle);\n if(isUpright) {\n x += bv;\n }\n else {\n y += b;\n }\n x += dx;\n y += dy;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle, this.__text.__fitFontSize);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n if(isUpright) {\n let me = parent.matrixEvent, list = [\n { k: ROTATE_Z, v: { v: 90, u: DEG } },\n ];\n let m = transform.calMatrixWithOrigin(list, x, y, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n ctx.fillText(CHAR, x, y);\n }\n else if(renderMode === SVG) {\n // 垂直的svg以中线为基线,需偏移baseline和中线的差值\n if(isUpright) {\n x += computedStyle[LINE_HEIGHT] * 0.5 - bv;\n }\n let props = [\n ['x', x],\n ['y', y],\n ['fill', color],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n if(isUpright) {\n props.push(['writing-mode', 'vertical-lr']);\n }\n let vd = this.__virtualDom = {\n type: 'text',\n children: [\n {\n type: 'item',\n tagName: 'text',\n props,\n content: CHAR,\n },\n ],\n };\n parent.virtualDom.children.push(vd);\n }\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n\n get isEllipsis() {\n return true;\n }\n}\n\nexport default Ellipsis;\n\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: {\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n OPACITY: OP,\n FILTER: FT,\n PERSPECTIVE: PPT,\n PERSPECTIVE_ORIGIN,\n Z_INDEX,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z: RZ,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n TRANSFORM: TF,\n TRANSFORM_ORIGIN,\n} } = enums;\n\nconst { isIgnore, isRepaint } = change;\n\n// 低位表示 0;\n },\n // 是否不包含value之外的\n exclude(lv, value) {\n return (lv | value) === value;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(isIgnore(k)) {\n return NONE;\n }\n if(k === Z_INDEX) {\n return CACHE;\n }\n if(k === TX) {\n return TRANSLATE_X;\n }\n if(k === TY) {\n return TRANSLATE_Y;\n }\n if(k === TZ) {\n return TRANSLATE_Z;\n }\n if(k === RZ) {\n return ROTATE_Z;\n }\n if(k === SX) {\n return SCALE_X;\n }\n if(k === SY) {\n return SCALE_Y;\n }\n if(k === SZ) {\n return SCALE_Z;\n }\n if(k === OP) {\n return OPACITY;\n }\n if(k === FT) {\n return FILTER;\n }\n if(k === PPT || k === PERSPECTIVE_ORIGIN) {\n return PERSPECTIVE;\n }\n if(isTransforms(k)) {\n return TRANSFORM;\n }\n if(isRepaint(k)) {\n return REPAINT;\n }\n return REFLOW;\n },\n isReflow(lv) {\n return lv >= REFLOW;\n },\n isRepaint(lv) {\n return lv < REFLOW;\n },\n}, ENUM);\n\nexport default o;\n","import Node from './Node';\nimport TextBox from './TextBox';\nimport Ellipsis from './Ellipsis';\nimport mode from '../refresh/mode';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n POSITION,\n LINE_HEIGHT,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n COLOR,\n VISIBILITY,\n LETTER_SPACING,\n OVERFLOW,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n WIDTH,\n HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n FILTER,\n FONT_SIZE_SHRINK,\n },\n ELLIPSIS,\n} = enums;\n\nconst { AUTO } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { isFunction } = util;\n\n/**\n * 测量的封装,主要是增加了shrinkFontSize声明时,不断尝试fontSize--,直到限制或者满足一行展示要求\n */\nfunction measureLineWidth(ctx, renderMode, start, length, content, w, ew, perW, computedStyle,\n fontFamily, fontSize, fontWeight, fontSizeShrink, letterSpacing, isUpright) {\n if(start >= length) {\n // 特殊情况不应该走进这里\n return { hypotheticalNum: 0, rw: 0, newLine: false };\n }\n let res = measure(ctx, renderMode, start, length, content, w - ew, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n if(res.newLine && fontSizeShrink > 0 && fontSizeShrink < fontSize) {\n while(res.newLine && fontSize > fontSizeShrink) {\n // 文字和ellipsis同时设置测量\n ctx.font = css.setFontStyle(computedStyle, --fontSize);\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], fontSize, computedStyle[FONT_WEIGHT]);\n }\n res = measure(ctx, renderMode, start, length, content, w - ew, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n res.fitFontSize = fontSize;\n res.ew = ew;\n // 有ew的时候还要尝试没有是否放得下\n if(ew) {\n let t = measure(ctx, renderMode, start, length, content, w, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n if(!t.newLine) {\n t.fitFontSize = fontSize;\n res = t;\n }\n }\n }\n }\n return res;\n}\n\n/**\n * 在给定宽度w的情况下,测量文字content多少个满足塞下,只支持水平书写,从start的索引开始,content长length\n * 尽可能地少的次数调用canvas的measureText或svg的html节点的width,因为比较消耗性能\n * 这就需要一种算法,不能逐字遍历看总长度是否超过,也不能单字宽度相加因为有文本整形某些字体多个字宽度不等于每个之和\n * 简单的2分法实现简单,但是次数稍多,对于性能不是最佳,因为内容的slice裁剪和传递给canvas测量都随尺寸增加而加大\n * 由于知道w和fontSize,因此能推测出平均值为fontSize/w,即字的个数,\n * 进行测量后得出w2,和真实w对比,产生误差d,再看d和fontSize推测差距个数,如此反复\n * 返回内容和end索引和长度,最少也要1个字符\n */\nfunction measure(ctx, renderMode, start, length, content, w, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright) {\n let i = start, j = length, rw = 0, newLine = false;\n // 特殊降级,有letterSpacing时,canvas无法完全兼容,只能采取单字测量的方式完成\n if(letterSpacing && [CANVAS, WEBGL].indexOf(renderMode) > -1) {\n let count = 0;\n for(; i < j; i++) {\n let mw = ctx.measureText(content.charAt(i)).width + letterSpacing;\n if(count + mw > w + (1e-10)) {\n newLine = true;\n break;\n }\n count += mw;\n }\n return { hypotheticalNum: i - start, rw: count, newLine: newLine || count > w + (1e-10) };\n }\n // 没有letterSpacing或者是svg模式可以完美获取TextMetrics\n let hypotheticalNum = Math.round(w / perW);\n // 不能增长0个字符,至少也要1个\n if(hypotheticalNum <= 0) {\n hypotheticalNum = 1;\n }\n // 超过内容长度范围也不行\n else if(hypotheticalNum > length - start) {\n hypotheticalNum = length - start;\n }\n // 类似2分的一个循环\n while(i < j) {\n let mw, str = content.slice(start, start + hypotheticalNum);\n if(renderMode === CANVAS || renderMode === WEBGL) {\n mw = ctx.measureText(str).width;\n }\n else if(renderMode === SVG) {\n mw = inject.measureTextSync(str, fontFamily, fontSize, fontWeight, isUpright);\n }\n if(letterSpacing) {\n mw += hypotheticalNum * letterSpacing;\n }\n if(mw === w) {\n rw = w;\n newLine = true;\n break;\n }\n // 超出,设置右边界,并根据余量推测减少个数,\n // 因为精度问题,固定宽度或者累加的剩余空间,不用相等判断,而是为原本w宽度加一点点冗余1e-10\n if(mw > w + (1e-10)) {\n newLine = true;\n // 限制至少1个\n if(hypotheticalNum === 1) {\n rw = mw;\n break;\n }\n // 注意特殊判断i和j就差1个可直接得出结果,因为现在超了而-1不超肯定是-1的结果\n if(i === j - 1 || i - start === hypotheticalNum - 1) {\n hypotheticalNum = i - start;\n break;\n }\n j = hypotheticalNum + start - 1;\n let reduce = Math.round((mw - w) / perW);\n if(reduce <= 0) {\n reduce = 1;\n }\n hypotheticalNum -= reduce;\n if(hypotheticalNum < i - start) {\n hypotheticalNum = i - start;\n }\n }\n // 还有空余,设置左边界,并根据余量推测增加的个数\n else {\n rw = mw;\n if(hypotheticalNum === length - start) {\n break;\n }\n i = hypotheticalNum + start;\n let add = Math.round((w - mw) / perW);\n if(add <= 0) {\n add = 1;\n }\n hypotheticalNum += add;\n if(hypotheticalNum > j - start) {\n hypotheticalNum = j - start;\n }\n }\n }\n return { hypotheticalNum, rw, newLine };\n}\n\nfunction getFontKey(ff, fs, fw, ls) {\n return ff + '_' + fs + '_' + fw + '_' + ls;\n}\n\nclass Text extends Node {\n constructor(content) {\n super();\n this.__content = util.isNil(content) ? '' : content.toString();\n this.__textBoxes = [];\n this.__charWidth = 0; // 最小字符宽度(单个)\n this.__textWidth = 0; // 整体宽度\n this.__bp = null; // block父节点\n this.__widthHash = {}; // 存储当前字体样式key下的charWidth/textWidth\n this.__limitCache = false;\n this.__hasContent = false;\n this.__fitFontSize = 0; // 自动缩小时的字体大小\n }\n\n /**\n * text在virtual时和普通一样,无需特殊处理\n * endSpace由外界inline布局控制,末尾最后一行的空白mpb,包含递归情况,递归为多个嵌套末尾节点的空白mpb之和\n * 即便宽度不足,每行还是强制渲染一个字符,换行依据lx开始,因为x可能是从中间开始的,非inline则两个相等\n * 最后一个字符排版时要考虑末尾mpb,排不下的话回退删掉这个字符,如果最后一个字符另起开头,排不下也强制排,每行至少1个字符\n * 在textOverflow时很特殊,多个inline同行,回退可能到前一个inline节点,这个通过x和lx判断是否行首,决定至少1个字符规则\n * @param data\n * @private\n */\n __layoutFlow(data) {\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n let { x, y, w, h, lx = x, ly = y, lineBoxManager, endSpace = 0, lineClamp = 0, lineClampCount = 0, isUpright = false } = data;\n this.__x = this.__x1 = x;\n this.__y = this.__y1 = y;\n let { __isDestroyed, content, computedStyle, textBoxes, root } = this;\n textBoxes.splice(0);\n // 空内容w/h都为0可以提前跳出,lineClamp超出一般不会进这,但有特例flex文本垂直预计算时,所以也要跳出\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || !content || lineClamp && lineClampCount >= lineClamp) {\n return lineClampCount;\n }\n // 顺序尝试分割字符串为TextBox,形成多行,begin为每行起始索引,i是当前字符索引\n let i = 0;\n let length = content.length;\n let maxW = 0;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [WHITE_SPACE]: whiteSpace,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = computedStyle;\n let size = isUpright ? h : w;\n let beginSpace = isUpright ? (y - ly) : (x - lx); // x>=lx,当第一行非起始处时前面被prev节点占据,这个差值可认为是count宽度\n // 基于最近block父节点的样式\n let bp = this.domParent;\n while(bp.computedStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n this.__bp = bp;\n let textOverflow = bp.computedStyle[TEXT_OVERFLOW];\n // 布局测量前置,根据renderMode不同提供不同的测量方法\n let renderMode = root.renderMode;\n let ctx;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx = renderMode === WEBGL\n ? inject.getFontCanvas().ctx\n : root.ctx;\n ctx.font = css.setFontStyle(computedStyle, 0);\n }\n // fontSize在中文是正好1个字宽度,英文不一定,等宽为2个,不等宽可能1~2个,特殊字符甚至>2个,取预估均值然后倒数得每个均宽0.8\n let perW = (fontSize * 0.8) + letterSpacing;\n let lineCount = 0;\n let mainCoords; // 根据书写模式指向不同x/y\n // 不换行特殊对待,同时考虑overflow和textOverflow\n if(whiteSpace === 'nowrap') {\n let isTextOverflow, textWidth = this.textWidth, w = size - endSpace - beginSpace;\n let {\n [POSITION]: position,\n [OVERFLOW]: overflow,\n [FONT_SIZE_SHRINK]: fontSizeShrink,\n } = bp.computedStyle;\n let containerSize = bp.currentStyle[isUpright ? HEIGHT: WIDTH];\n // 只要是overflow隐藏,不管textOverflow如何(默认是clip等同于overflow:hidden的功能)都截取\n if(overflow === 'hidden') {\n // abs自适应宽度时不裁剪\n if(position === 'absolute' && containerSize.u === AUTO) {\n isTextOverflow = false;\n }\n else {\n isTextOverflow = textWidth > size + (1e-10) - beginSpace - endSpace;\n }\n }\n // ellipsis生效情况,本节点开始向前回退查找,尝试放下一部分字符\n if(isTextOverflow && textOverflow === 'ellipsis') {\n [mainCoords] = this.__lineBack(ctx, renderMode, i, length, content, w, perW, x, y, maxW,\n endSpace, lineHeight, textBoxes, lineBoxManager, fontFamily, fontSize, fontWeight, fontSizeShrink, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n }\n // 默认是否clip跟随overflow:hidden,无需感知,裁剪由dom做,这里不裁剪\n else {\n // 但还是要判断缩小字体适应\n if(fontSizeShrink > 0 && fontSizeShrink < fontSize) {\n let fs = fontSize;\n this.__fitFontSize = 0;\n while(fs > fontSizeShrink && textWidth > w) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(computedStyle, --fs);\n textWidth = ctx.measureText(content).width + letterSpacing * content.length;\n }\n else if(renderMode === SVG) {\n textWidth = inject.measureTextSync(content, fontFamily, fs, fontWeight) + letterSpacing * content.length;\n }\n }\n this.__fitFontSize = fs;\n }\n let textBox = new TextBox(this, textBoxes.length, x, y, textWidth, lineHeight,\n content, isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, false);\n if(isUpright) {\n x += lineHeight;\n }\n else {\n y += lineHeight;\n }\n if(isTextOverflow) {\n lineCount++;\n }\n }\n // 和html一样,maxW此时在html是满格\n maxW = textWidth;\n }\n // 普通换行,注意x和lx的区别,可能相同(block起始处)可能不同(非起始处),第1行从x开始,第2行及以后都从lx开始\n // 然后第一次换行还有特殊之处,可能同一行前半部行高很大,此时y增加并非自身的lineHeight,而是整体LineBox的\n else {\n while(i < length) {\n let limit = i ? size : (size - beginSpace);\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n limit -= endSpace;\n }\n let { hypotheticalNum: num, rw, newLine } = measureLineWidth(ctx, renderMode, i, length, content, limit, 0, perW,\n computedStyle, fontFamily, fontSize, fontWeight, 0, letterSpacing);\n // 多行文本截断,这里肯定需要回退,注意防止恰好是最后一个字符,此时无需截取\n if(lineClamp && newLine && lineCount + lineClampCount >= lineClamp - 1 && i + num < length) {\n [mainCoords, maxW] = this.__lineBack(ctx, renderMode, i, i + num, content, limit - endSpace, perW,\n lineCount ? lx : x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, 0, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n break;\n }\n // 最后一行考虑endSpace,可能不够需要回退,但不能是1个字符\n if(i + num === length && endSpace && rw + endSpace > limit + (1e-10) && num > 1) {\n let res = measureLineWidth(ctx, renderMode, i, length, content, limit - endSpace, 0, perW,\n computedStyle, fontFamily, fontSize, fontWeight, 0, letterSpacing);\n num = res.hypotheticalNum;\n rw = res.rw;\n newLine = res.newLine;\n // 可能加上endSpace后超过了,还得再判断一次\n if(lineClamp && newLine && lineCount + lineClampCount >= lineClamp - 1) {\n [mainCoords, maxW] = this.__lineBack(ctx, renderMode, i, i + num, content, limit - endSpace, perW,\n lineCount ? lx : x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, 0, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n break;\n }\n }\n maxW = Math.max(maxW, rw);\n // 根据是否第一行分开处理行首空白\n let textBox = new TextBox(this, textBoxes.length,\n lineCount && !isUpright ? lx : x,\n lineCount && isUpright ? ly : y,\n rw, lineHeight, content.slice(i, i + num), isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, newLine);\n // 竖排横排换行不一样\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n // 至少也要1个字符形成1行,哪怕是首行,因为是否放得下逻辑在dom中做过了\n i += num;\n if(newLine) {\n lineCount++;\n }\n }\n // 换行后Text的x重设为lx\n if(lineCount) {\n if(isUpright) {\n this.__y = this.__y1 = ly;\n }\n else {\n this.__x = this.__x1 = lx;\n }\n }\n }\n if(isUpright) {\n this.__width = x - data.x;\n this.__height = maxW;\n this.__verticalBaseline = css.getVerticalBaseline(computedStyle);\n }\n else {\n this.__width = maxW;\n this.__height = y - data.y;\n this.__baseline = css.getBaseline(computedStyle);\n }\n return lineClampCount + lineCount;\n }\n\n __layoutNone() {\n this.__width = this.__height = this.__baseline = this.__verticalBaseline = 0;\n this.__textBoxes.splice(0);\n }\n\n // 末尾行因ellipsis的缘故向前回退字符生成textBox,可能会因不满足宽度导致无法生成,此时向前继续回退TextBox\n __lineBack(ctx, renderMode, i, length, content, limit, perW, x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, fontSizeShrink, letterSpacing, isUpright) {\n let ew, bp = this.__bp, computedStyle = bp.computedStyle;\n // 临时测量ELLIPSIS的尺寸\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle, 0);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], computedStyle[FONT_SIZE], computedStyle[FONT_WEIGHT]);\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(this.computedStyle, 0);\n if (ctx.font !== font) {\n ctx.font = font;\n }\n }\n this.__fitFontSize = 0;\n let { hypotheticalNum: num, rw, newLine, fitFontSize, ew: ew2 } = measureLineWidth(ctx, renderMode, i, length, content, limit - endSpace, ew, perW,\n computedStyle, fontFamily, fontSize, fontWeight, fontSizeShrink, letterSpacing);\n // 缩小的fontSize\n if(fitFontSize) {\n this.__fitFontSize = fitFontSize;\n }\n if(ew2) {\n ew = ew2;\n }\n // 缩小后可能不再换行,下面的逻辑都要预先判断newLine\n // 还是不够,需要回溯查找前一个inline节点继续回退,同时防止空行首,要至少一个textBox且一个字符\n if(newLine && rw + ew > limit + (1e-10) - endSpace) {\n // 向前回溯已有的tb,需注意可能是新行开头这时还没生成新的lineBox,而旧行则至少1个内容\n // 新行的话进不来,会添加上面num的内容,旧行不添加只修改之前的tb内容也有可能删除一些\n let lineBox = lineBoxManager.lineBox;\n if(!lineBoxManager.isNewLine && lineBox && lineBox.size) {\n let list = lineBox.list;\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n // 可能是个inlineBlock,整个省略掉,除非是第一个不作ellipsis处理\n if(!(tb instanceof TextBox)) {\n if(!j) {\n break;\n }\n let item = list.pop();\n if(isUpright) {\n y -= item.outerHeight;\n }\n else {\n x -= item.outerWidth;\n }\n limit += isUpright ? item.outerHeight : item.outerWidth;\n item.__layoutNone();\n continue;\n }\n // 先判断整个tb都删除是否可以容纳下,同时注意第1个tb不能删除因此必进\n let { content, width, height, parent } = tb;\n if(!j || limit >= width + ew + (1e-10) + endSpace) {\n let length = content.length;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = parent.computedStyle;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(parent.computedStyle, 0);\n }\n // 再进行查找,这里也会有至少一个字符不用担心\n let { hypotheticalNum: num, rw } = measureLineWidth(ctx, renderMode, 0, length, content, limit + width - endSpace, ew, perW,\n computedStyle, fontFamily, fontSize, fontWeight, 0, letterSpacing);\n // 可能发生x回退,当tb的内容产生减少时\n if(num !== content.length) {\n tb.__content = content.slice(0, num);\n if(isUpright) {\n y -= height - rw;\n tb.__height = rw;\n }\n else {\n x -= width - rw;\n tb.__width = rw;\n }\n }\n // 重新设置lineHeight和baseline,因为可能删除了东西\n lineBox.__resetLb(computedStyle[LINE_HEIGHT],\n isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle));\n let ep = isUpright\n ? new Ellipsis(x, y + rw + endSpace, ew, bp, this, isUpright)\n : new Ellipsis(x + rw + endSpace, y, ew, bp, this, isUpright);\n lineBoxManager.addItem(ep, true);\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n maxW = Math.max(maxW, rw + ew);\n return [y, maxW];\n }\n // 舍弃这个tb,x也要向前回退,w增加,这会发生在ELLIPSIS字体很大,里面内容字体很小时\n let item = list.pop();\n if(isUpright) {\n limit += height;\n y -= height;\n }\n else {\n limit += width;\n x -= width;\n }\n let tbs = item.parent.textBoxes;\n let k = tbs.indexOf(item);\n if(k > -1) {\n tbs.splice(k, 1);\n }\n // 还得去掉dom,防止inline嵌套一直向上,同时得判断不能误删前面一个的dom\n let dom = item.parent.parent;\n let prev = list[list.length - 1];\n if(prev instanceof TextBox) {\n prev = prev.parent.parent;\n }\n while(dom !== bp && dom !== prev) {\n let contentBoxList = dom.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n let computedStyle = dom.computedStyle;\n if(isUpright) {\n let mbp = computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM]\n + computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n y -= mbp;\n limit += mbp;\n }\n else {\n let mbp = computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT]\n + computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT]\n + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n x -= mbp;\n limit += mbp;\n }\n dom.__layoutNone();\n dom = dom.domParent;\n }\n let contentBoxList = prev.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n }\n }\n }\n // 本次回退不用向前追溯删除textBox会进这里,最少一个字符兜底\n let textBox = new TextBox(this, textBoxes.length, x, y, rw, lineHeight, content.slice(i, i + num), isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, false);\n // ELLIPSIS也作为内容加入,但特殊的是指向最近block使用其样式渲染\n if(newLine) {\n let ep = isUpright\n ? new Ellipsis(x, y + rw + endSpace, ew, bp, this, isUpright)\n : new Ellipsis(x + rw + endSpace, y, ew, bp, this, isUpright);\n lineBoxManager.addItem(ep, true);\n }\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n maxW = Math.max(maxW, rw + newLine ? ew : 0);\n return [isUpright ? x : y, maxW];\n }\n\n // 外部dom换行发现超行,且一定是ellipsis时,会进这里让上一行text回退,lineBox一定有值且最后一个一定是本text的最后的textBox\n __backtrack(bp, lineBoxManager, lineBox, textBox, limit, endSpace, ew, computedStyle, ctx, renderMode, isUpright) {\n let list = lineBox.list;\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n // 可能是个inlineBlock,整个省略掉,除非是第一个不作ellipsis处理\n if(!(tb instanceof TextBox)) {\n if(!j) {\n break;\n }\n let item = list.pop();\n limit += isUpright ? item.outerHeight : item.outerWidth;\n item.__layoutNone();\n continue;\n }\n // 先判断整个tb都删除是否可以容纳下,同时注意第1个tb不能删除因此必进\n let { content, width, height, parent } = tb;\n if(!j || limit >= width + ew + (1e-10) + endSpace) {\n let length = content.length;\n let {\n [LETTER_SPACING]: letterSpacing,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = parent.computedStyle;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(parent.computedStyle, 0);\n }\n let perW = (fontSize * 0.8) + letterSpacing;\n // 再进行查找,这里也会有至少一个字符不用担心\n let { hypotheticalNum: num, rw } = measureLineWidth(ctx, renderMode, 0, length, content, limit - endSpace + width, ew, perW,\n computedStyle, fontFamily, fontSize, fontWeight, 0, letterSpacing);\n // 可能发生x回退,当tb的内容产生减少时\n if(num !== content.length) {\n tb.__content = content.slice(0, num);\n if(isUpright) {\n tb.__height = rw;\n }\n else {\n tb.__width = rw;\n }\n }\n // 重新设置lineHeight和baseline,因为可能删除了东西\n lineBox.__resetLb(computedStyle[LINE_HEIGHT],\n isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle));\n let ep = isUpright\n ? new Ellipsis(tb.x, tb.y + rw + endSpace, ew, bp, this, isUpright)\n : new Ellipsis(tb.x + rw + endSpace, tb.y, ew, bp, this, isUpright);\n lineBoxManager.addItem(ep, true);\n return;\n }\n // 舍弃这个tb,x也要向前回退,w增加,这会发生在ELLIPSIS字体很大,里面内容字体很小时\n let item = list.pop();\n limit += isUpright ? height : width;\n let tbs = item.parent.textBoxes;\n let k = tbs.indexOf(item);\n if(k > -1) {\n tbs.splice(k, 1);\n }\n // 还得去掉dom,防止inline嵌套一直向上,同时得判断不能误删前面一个的dom\n let dom = item.parent.parent;\n let prev = list[list.length - 1];\n if(prev instanceof TextBox) {\n prev = prev.parent.parent;\n }\n while(dom !== bp && dom !== prev) {\n let contentBoxList = dom.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n let computedStyle = dom.computedStyle;\n if(isUpright) {\n let mbp = computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM]\n + computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n limit += mbp;\n }\n else {\n let mbp = computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT]\n + computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT]\n + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n limit += mbp;\n }\n dom.__layoutNone();\n dom = dom.domParent;\n }\n let contentBoxList = prev.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n }\n }\n\n __offsetX(diff, isLayout) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetX(diff);\n });\n }\n this.__x1 += diff;\n }\n\n __offsetY(diff, isLayout) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetY(diff);\n });\n }\n this.__y1 += diff;\n }\n\n __tryLayInline(total) {\n return total - this.firstCharWidth;\n }\n\n __inlineSize(isUpright) {\n let min, max;\n this.textBoxes.forEach((item, i) => {\n if(i) {\n min = Math.min(min, isUpright ? item.y : item.x);\n max = Math.max(max, (isUpright ? item.y : item.x) + item.width);\n }\n else {\n min = isUpright ? item.y : item.x;\n max = (isUpright ? item.y : item.x) + item.width;\n }\n });\n if(isUpright) {\n this.__y = this.__y1 = min;\n this.__x = this.__x1;\n this.__height = max - min;\n }\n else {\n this.__x = this.__x1 = min;\n this.__y = this.__y1;\n this.__width = max - min;\n }\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let { __isDestroyed, computedStyle, textBoxes, cacheStyle } = this;\n if(renderMode === SVG) {\n this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n // >=REPAINT清空bbox\n this.__bbox = null;\n this.__filterBbox = null;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n this.__hasContent = false;\n return;\n }\n this.__hasContent = true;\n if(renderMode === WEBGL) {\n return;\n }\n if(renderMode === CANVAS) {\n let font = css.setFontStyle(computedStyle, this.__fitFontSize);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = cacheStyle[COLOR];\n // 渐变\n if(color.k) {\n let dom = this.parent;\n color = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, color, dx, dy).v;\n }\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n let strokeWidth = computedStyle[TEXT_STROKE_WIDTH];\n if(ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n let textStrokeColor = cacheStyle[TEXT_STROKE_COLOR];\n // 渐变\n if(textStrokeColor.k) {\n let dom = this.parent;\n textStrokeColor = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, textStrokeColor, dx, dy).v;\n }\n if(ctx.strokeStyle !== textStrokeColor) {\n ctx.strokeStyle = textStrokeColor;\n }\n }\n // 可能为空,整个是个ellipsis\n textBoxes.forEach(item => {\n item.render(renderMode, ctx, computedStyle, cacheStyle, dx, dy);\n });\n if(renderMode === SVG) {\n this.__virtualDom.children = textBoxes.map(textBox => textBox.virtualDom);\n }\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n super.__destroy();\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n }\n\n getComputedStyle(key) {\n return this.__domParent.getComputedStyle(key);\n }\n\n updateContent(s, cb) {\n if(s === this.__content || this.__isDestroyed) {\n this.__content = s;\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n this.__widthHash = {};\n if(util.isNil(s)){\n s = '';\n }\n else {\n s = s.toString();\n }\n this.__content = s;\n this.__root.__addUpdate(this.__domParent, null, level.REFLOW, null, null, null, cb);\n }\n\n remove(cb) {\n let { __root: root } = this;\n let parent = this.isShadowRoot ? this.hostRoot.__parent: this.__parent;\n let i;\n if(parent) {\n let target = this.isShadowRoot ? this.hostRoot : this;\n i = parent.__children.indexOf(target);\n parent.__children.splice(i, 1);\n i = parent.__zIndexChildren.indexOf(target);\n parent.__zIndexChildren.splice(i, 1);\n let { __prev, __next } = this;\n if(__prev) {\n __prev.__next = __next;\n }\n if(__next) {\n __next.__prev = __prev;\n }\n }\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n parent.__deleteStruct(this, i);\n // 不可见仅改变数据结构\n if(this.computedStyle[DISPLAY] === 'none') {\n this.__destroy();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow逻辑做结构关系等,text视为父变更\n root.__addUpdate(this, null, level.REFLOW, null, true, null, cb);\n }\n\n get content() {\n return this.__content;\n }\n\n set content(v) {\n this.updateContent(v, null);\n }\n\n get textBoxes() {\n return this.__textBoxes;\n }\n\n get charWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('charWidth')) {\n let max = 0;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle, 0);\n for(let i = 0, len = content.length; i < len; i++) {\n max = Math.max(max, ctx.measureText(content.charAt([i])).width);\n }\n }\n else if(renderMode === SVG) {\n max = inject.measureTextListMax(content, fontFamily, fontSize, fontWeight);\n }\n o.charWidth = max + letterSpacing;\n }\n return o.charWidth;\n }\n\n get firstCharWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('firstCharWidth')) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle, 0);\n o.firstCharWidth = ctx.measureText(content.charAt(0)).width + letterSpacing;\n }\n else if(renderMode === SVG) {\n o.firstCharWidth = inject.measureTextSync(content.charAt(0), fontFamily, fontSize, fontWeight) + letterSpacing;\n }\n }\n return o.firstCharWidth;\n }\n\n get textWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('textWidth')) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle, 0);\n o.textWidth = ctx.measureText(content).width + letterSpacing * content.length;\n }\n else if(renderMode === SVG) {\n o.textWidth = inject.measureTextSync(content, fontFamily, fontSize, fontWeight) + letterSpacing * content.length;\n }\n }\n return o.textWidth;\n }\n\n get clientWidth() {\n return this.__width || 0;\n }\n\n get clientHeight() {\n return this.__height || 0;\n }\n\n get offsetWidth() {\n return this.__width || 0;\n }\n\n get offsetHeight() {\n return this.__height || 0;\n }\n\n get outerWidth() {\n return this.__width || 0;\n }\n\n get outerHeight() {\n return this.__height || 0;\n }\n\n get root() {\n return this.__domParent.__root;\n }\n\n get currentStyle() {\n return this.__domParent.__currentStyle;\n }\n\n get __currentStyle() {\n return this.__domParent.__currentStyle;\n }\n\n get style() {\n return this.__domParent.__style;\n }\n\n get computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get __computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get __cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __x1, __y1, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n this.__bbox = [__x1 - half, __y1 - half, __x1 + width + half, __y1 + height + half];\n }\n return this.__bbox;\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let bbox = this.__bbox || this.bbox;\n let filter = this.computedStyle[FILTER];\n this.__filterBbox = css.spreadFilter(bbox, filter);\n }\n return this.__filterBbox;\n }\n\n get isShadowRoot() {\n return !this.__parent && this.__host && this.__host !== this.root;\n }\n\n get matrix() {\n return this.__domParent.__matrix;\n }\n\n get matrixEvent() {\n return this.__domParent.__matrixEvent;\n }\n\n get perspectiveMatrix() {\n return this.__domParent.__perspectiveMatrix;\n }\n\n get fitFontSize() {\n return this.__fitFontSize;\n }\n}\n\nexport default Text;\n","import util from './util';\n\nconst { isFunction } = util;\n\nclass Event {\n constructor() {\n this.__eHash = {};\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.on(id[i], handle);\n }\n }\n else {\n if(!self.__eHash.hasOwnProperty(id)) {\n self.__eHash[id] = [];\n }\n // 遍历防止此handle被侦听过了\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n if(item[i] === handle) {\n return self;\n }\n }\n self.__eHash[id].push(handle);\n }\n return self;\n }\n\n once(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n function cb(...data) {\n handle.apply(self, data);\n self.off(id, cb);\n }\n\n cb.__karasEventCb = handle;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.once(id[i], handle);\n }\n }\n else if(handle) {\n self.on(id, cb);\n }\n return this;\n }\n\n off(id, handle) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.off(id[i], handle);\n }\n }\n else if(self.__eHash.hasOwnProperty(id)) {\n if(handle) {\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n // 需考虑once包裹的引用对比\n if(item[i] === handle || item[i].__karasEventCb === handle) {\n item.splice(i, 1);\n break;\n }\n }\n }\n // 未定义为全部清除\n else {\n delete self.__eHash[id];\n }\n }\n return this;\n }\n\n emit(id, ...data) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.emit(id[i], data);\n }\n }\n else {\n if(self.__eHash.hasOwnProperty(id)) {\n let list = self.__eHash[id];\n if(list.length) {\n list = list.slice();\n for(let i = 0, len = list.length; i < len; i++) {\n let cb = list[i];\n if(isFunction(cb)) {\n cb.apply(self, data);\n }\n }\n }\n }\n }\n return this;\n }\n\n static mix(...obj) {\n for(let i = obj.length - 1; i >= 0; i--) {\n let o = obj[i];\n let event = new Event();\n o.__eHash = {};\n let fns = ['on', 'once', 'off', 'emit'];\n for(let j = fns.length - 1; j >= 0; j--) {\n let fn = fns[j];\n o[fn] = event[fn];\n }\n }\n }\n\n static REFRESH = 'refresh';\n static PAUSE = 'pause';\n static PLAY = 'play';\n static FRAME = 'frame';\n static FINISH = 'finish';\n static CANCEL = 'cancel';\n static BEGIN = 'begin';\n static END = 'end';\n}\n\nexport default Event;\n","import Node from './Node';\nimport Text from './Text';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, extend } = util;\n\nconst REGISTER = {};\n\nclass Component extends Event {\n constructor(props = {}) {\n super();\n this.__tagName = /(?:function|class)\\s+([\\w$]+)/.exec(this.constructor.toString())[1];\n // 构建工具中都是{},手写可能出现[]情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__parent = null;\n this.__host = null;\n this.__ref = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n /**\n * build中调用初始化,处理过flatten\n */\n __init() {\n this.__ref = {};\n let sr = this.__shadowRoot;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点\n }\n else if(sr instanceof Node) {\n let style = css.normalize(this.props.style);\n let keys = Object.keys(style);\n extend(sr.style, style, keys);\n extend(sr.currentStyle, style, keys);\n // 事件添加到sr\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n });\n }\n // 自定义事件无视返回强制添加\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n k = k.slice(3);\n this.on(k, v);\n }\n });\n if(isFunction(this.componentDidMount)) {\n this.__root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n\n render() {\n inject.warn('Component should implement render()');\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n this.__isDestroyed = true;\n this.__isMounted = false;\n let ref = this.props.ref;\n if(!isNil(ref) && !isFunction(ref)) {\n delete this.__root.__ref[ref];\n }\n if(isFunction(this.componentWillUnmount)) {\n this.componentWillUnmount();\n }\n if(this.__shadow) {\n this.__shadow.__destroy();\n }\n this.__host = this.__hostRoot\n = this.__shadow = this.__shadowRoot\n = this.__prev = this.__next = this.__root\n = this.__parent = this.__domParent = null;\n }\n\n __emitEvent(e, force) {\n let sr = this.shadowRoot;\n if(sr instanceof Text) {\n return;\n }\n let res = sr.__emitEvent(e, force);\n if(res) {\n e.target = this;\n return true;\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get shadow() {\n return this.__shadow;\n }\n\n get shadowRoot() {\n return this.__shadowRoot;\n }\n\n get root() {\n return this.__root;\n }\n\n get host() {\n return this.__host;\n }\n\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(name && !util.isString(name) && name.prototype && name.prototype instanceof Component) {\n return name;\n }\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)) {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Component has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)\n || !obj.prototype || !(obj.prototype instanceof Component)) {\n throw new Error('Invalid param: Component register');\n }\n if(Component.hasRegister(name)) {\n throw new Error(`Component has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Component.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nObject.keys(change.GEOM).concat([\n 'x',\n 'y',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'children',\n 'animationList',\n 'currentStyle',\n 'computedStyle',\n 'cacheStyle',\n '__currentStyle',\n '__computedStyle',\n '__cacheStyle',\n 'currentProps',\n '__currentProps',\n 'cacheProps',\n '__cacheProps',\n 'baseline',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n '__struct',\n 'bbox',\n 'contentBoxList',\n 'listener',\n 'matrix',\n 'matrixEvent',\n]).forEach(fn => {\n Object.defineProperty(Component.prototype, fn, {\n get() {\n let sr = this.shadowRoot;\n if(sr) {\n return sr[fn];\n }\n },\n });\n});\n\n[\n '__layout',\n '__layoutFlow',\n '__layoutStyle',\n '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__computeReflow',\n '__mp',\n 'animate',\n 'removeAnimate',\n 'clearAnimate',\n 'frameAnimate',\n 'updateStyle',\n 'getBoundingClientRect',\n 'getComputedStyle',\n 'clearCache',\n '__structure',\n '__modifyStruct',\n '__updateStruct',\n 'flowChildren',\n 'absChildren',\n '__isRealInline',\n '__calBasis',\n '__calMinMax',\n '__computeMeasure',\n 'appendChild',\n 'prependChild',\n 'insertBefore',\n 'insertAfter',\n 'removeChild',\n 'remove',\n 'addEventListener',\n 'removeEventListener',\n].forEach(fn => {\n Component.prototype[fn] = function() {\n let sr = this.shadowRoot;\n if(sr && isFunction(sr[fn])) {\n return sr[fn].apply(sr, arguments);\n }\n };\n});\n\nexport default Component;\n","import Ellipsis from './Ellipsis';\nimport TextBox from './TextBox';\nimport enums from '../util/enums';\n\nconst {\n STYLE_KEY: {\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n },\n} = enums;\n\n/**\n * 获取inline的每一行内容的矩形坐标4个点,同时附带上border的矩形,比前面4个点尺寸大或相等(有无border/padding)\n * @param xom\n * @param isUpright\n * @param contentBoxList\n * @param start\n * @param end\n * @param lineBox\n * @param baseline\n * @param lineHeight\n * @param leading\n * @param isStart\n * @param isEnd\n * @param backgroundClip\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @returns {(*|number)[]}\n */\nfunction getInlineBox(xom, isUpright, contentBoxList, start, end, lineBox, baseline,\n lineHeight, leading, isStart, isEnd, backgroundClip,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth) {\n // 根据bgClip确定y伸展范围,inline渲染bg扩展到pb的位置不影响布局\n let bcStart = 0, bcEnd = 0;\n let pbStart = isUpright ? (paddingLeft + borderLeftWidth) : (paddingTop + borderTopWidth);\n let pbEnd = isUpright ? (paddingRight + borderRightWidth) : (paddingBottom + borderBottomWidth);\n if(backgroundClip === 'paddingBox') {\n bcStart = isUpright ? paddingLeft : paddingTop;\n bcEnd = isUpright ? paddingRight : paddingBottom;\n }\n else if(backgroundClip === 'borderBox') {\n bcStart = pbStart;\n bcEnd = pbEnd;\n }\n // inline的baseline和lineBox的差值,不同lh时造成的偏移,一般为多个textBox时比较小的那个发生\n // 垂直排版不能简单算baseline差值,因为原点坐标系不一样\n let diff;\n if(isUpright) {\n diff = lineBox.verticalBaseline - baseline;\n }\n else {\n diff = lineBox.baseline - baseline;\n }\n let x1, y1, x2, y2, bx1, by1, bx2, by2;\n // x坐标取首尾contentBox的左右2侧,clip布局时已算好;y是根据lineHeight和lineBox的高度以及baseline对齐后计算的\n // 垂直排版则互换x/y逻辑\n if(isUpright) {\n x1 = lineBox.x + diff - bcStart + leading;\n y1 = start.y;\n bx1 = lineBox.x + diff - pbStart + leading;\n }\n else {\n x1 = start.x;\n y1 = lineBox.y + lineBox.oy + diff - bcStart + leading;\n by1 = lineBox.y + lineBox.oy + diff - pbStart + leading;\n }\n // 容器内包含的inline节点,需考虑行首水平mbp(垂直排版为垂直头mbp)\n let dom = start instanceof TextBox ? start.parent.domParent : start.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(start === list[0]) {\n if(isUpright) {\n let {\n [MARGIN_TOP]: marginTop,\n [PADDING_TOP]: paddingTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n } = dom.computedStyle;\n y1 -= marginTop + paddingTop + borderTopWidth;\n }\n else {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n x1 -= marginLeft + paddingLeft + borderLeftWidth;\n }\n }\n dom = dom.domParent;\n }\n // 第一个需考虑容器本身的padding/border\n if(isUpright) {\n by1 = y1;\n if(isStart) {\n by1 -= paddingTop + borderTopWidth;\n if(backgroundClip === 'paddingBox') {\n y1 -= paddingTop;\n }\n else if(backgroundClip === 'borderBox') {\n y1 -= paddingTop + borderTopWidth;\n }\n }\n x2 = lineBox.x + diff + lineHeight + bcEnd - leading;\n bx2 = lineBox.x + diff + lineHeight + pbEnd - leading;\n y2 = end.y + end.outerHeight;\n }\n else {\n bx1 = x1;\n if(isStart) {\n bx1 -= paddingLeft + borderLeftWidth;\n if(backgroundClip === 'paddingBox') {\n x1 -= paddingLeft;\n }\n else if(backgroundClip === 'borderBox') {\n x1 -= paddingLeft + borderLeftWidth;\n }\n }\n x2 = end.x + end.outerWidth;\n y2 = lineBox.y + lineBox.oy + diff + lineHeight + bcEnd - leading;\n by2 = lineBox.y + lineBox.oy + diff + lineHeight + pbEnd - leading;\n }\n // TextBox的parent是Text,再是Dom,这里一定是inline,无嵌套就是xom本身,有则包含若干层最上层还是xom\n dom = end instanceof TextBox ? end.parent.domParent : end.domParent;\n // 从end开始,向上获取dom节点的尾部mpb进行累加,直到xom跳出\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(end === list[list.length - 1]) {\n if(isUpright) {\n let {\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = dom.computedStyle;\n y2 += marginBottom + paddingBottom + borderBottomWidth;\n }\n else {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n x2 += marginRight + paddingRight + borderRightWidth;\n }\n }\n dom = dom.domParent;\n }\n if(isUpright) {\n by2 = y2;\n if(isEnd) {\n by2 += paddingBottom + borderBottomWidth;\n if(backgroundClip === 'paddingBox') {\n y2 += paddingBottom;\n }\n else if(backgroundClip === 'borderBox') {\n y2 += paddingBottom + borderBottomWidth;\n }\n }\n }\n else {\n bx2 = x2;\n if(isEnd) {\n bx2 += paddingRight + borderRightWidth;\n if(backgroundClip === 'paddingBox') {\n x2 += paddingRight;\n }\n else if(backgroundClip === 'borderBox') {\n x2 += paddingRight + borderRightWidth;\n }\n }\n }\n return [x1, y1, x2, y2, bx1, by1, bx2, by2];\n}\n\n/**\n * 统计inline的所有contentBox排成一行时的总宽度,考虑嵌套的mpb\n * @param xom\n * @param contentBoxList\n * @param isUpright\n * @returns {number}\n */\nfunction getInlineWidth(xom, contentBoxList, isUpright) {\n let sum = 0;\n let length = contentBoxList.length;\n if(contentBoxList[length - 1] instanceof Ellipsis) {\n length--;\n }\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(isUpright) {\n sum += contentBox.height;\n }\n else {\n sum += contentBox.width;\n }\n // 嵌套时,首尾box考虑mpb\n let dom = contentBox instanceof TextBox ? contentBox.parent.domParent : contentBox.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(contentBox === list[0]) {\n if(isUpright) {\n let {\n [MARGIN_TOP]: marginTop,\n [PADDING_TOP]: paddingTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n } = dom.computedStyle;\n sum += marginTop + paddingTop + borderTopWidth;\n }\n else {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n sum += marginLeft + paddingLeft + borderLeftWidth;\n }\n }\n if(contentBox === list[list.length - 1]) {\n if(isUpright) {\n let {\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = dom.computedStyle;\n sum += marginBottom + paddingBottom + borderBottomWidth;\n }\n else {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n sum += marginRight + paddingRight + borderRightWidth;\n }\n }\n dom = dom.domParent;\n }\n }\n return sum;\n}\n\nexport default {\n getInlineBox,\n getInlineWidth,\n};\n","import unit from './unit';\nimport transform from './transform';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: { SCALE_X, SCALE_Y } } = enums;\nconst { NUMBER } = unit;\n\nfunction matrixResize(imgWidth, imgHeight, targetWidth, targetHeight, x, y, w, h) {\n if(imgWidth === targetWidth && imgHeight === targetHeight) {\n return;\n }\n let list = [\n { k: SCALE_X, v: { v: targetWidth / imgWidth, u: NUMBER } },\n { k: SCALE_Y, v: { v: targetHeight / imgHeight, u: NUMBER } },\n ];\n return transform.calMatrixWithOrigin(list, x, y, w, h);\n}\n\nexport default {\n matrixResize,\n};\n","import border from './border';\nimport transform from './transform';\nimport mx from '../math/matrix';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport enums from '../util/enums';\nimport image from './image';\n\nconst {\n STYLE_KEY: {\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n },\n} = enums;\nconst { clone, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBgc(xom, renderMode, ctx, color, list, x, y, w, h, btlr, btrr, bbrr, bblr,\n method = 'fill', isInline = false, dx = 0, dy = 0) {\n // radial渐变ellipse形状会有matrix,用以从圆缩放到椭圆\n let matrix, cx, cy;\n if(Array.isArray(color)) {\n matrix = color[1];\n cx = color[2];\n cy = color[3];\n color = color[0];\n }\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n list = list || border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n // 椭圆有matrix,用逆矩阵变化点来完成\n if(matrix) {\n matrix = transform.calMatrixByOrigin(matrix, cx, cy);\n let t = mx.inverse(matrix);\n list = list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i], y: item[i + 1] }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = xom.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n canvasPolygon(ctx, list, dx, dy);\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = svgPolygon(list);\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n },\n ],\n };\n xom.__cacheDefs.push(v);\n return ctx.add(v);\n }\n else {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n });\n // 椭圆渐变独有\n if(matrix) {\n let bb = xom.virtualDom.bb;\n bb[bb.length - 1].props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n }\n }\n }\n}\n\nfunction renderImage(xom, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, isInline,\n dx = 0, dy = 0) {\n let source = loadBgi.source;\n // 无source不绘制,可能错误或加载中\n if(source) {\n bx1 += dx;\n by1 += dy;\n bx2 += dx;\n by2 += dy;\n let bgW = bx2 - bx1;\n let bgH = by2 - by1;\n let { width, height } = loadBgi;\n let [w, h] = backgroundSize[i] || [];\n // -1为auto,-2为contain,-3为cover\n if(w === -1 && h === -1) {\n w = width;\n h = height;\n }\n else if(w === -2) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n w = bgW;\n h = w * height / width;\n }\n else if(height > bgH) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -3) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n h = bgH;\n w = h * width / height;\n }\n else if(height > bgH) {\n w = bgW;\n h = w * height / width;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -1) {\n w = h * width / height;\n }\n else if(h === -1) {\n h = w * height / width;\n }\n let bgX = computedStyle[BACKGROUND_POSITION_X][i] || 0;\n if(/%/.test(bgX)) {\n bgX = (bgW - w) * parseFloat(bgX) * 0.01;\n }\n bgX += bx1;\n let bgY = computedStyle[BACKGROUND_POSITION_Y][i] || 0;\n if(/%/.test(bgY)) {\n bgY = (bgH - h) * parseFloat(bgY) * 0.01;\n }\n bgY += by1;\n // 超出尺寸模拟mask截取\n let needMask = bgX < bx1 || bgY < by1 || (bgX + w) > (bx1 + bgW) || (bgY + h) > (by1 + bgH);\n // 计算因为repeat,需要向4个方向扩展渲染几个数量图片\n let xnl = 0;\n let xnr = 0;\n let ynt = 0;\n let ynb = 0;\n // repeat-x\n if(['repeatX', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgX - bx1;\n if(diff > 0) {\n xnl = Math.ceil(diff / w);\n }\n diff = bx1 + bgW - bgX - w;\n if(diff > 0) {\n xnr = Math.ceil(diff / w);\n }\n }\n // repeat-y\n if(['repeatY', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgY - by1;\n if(diff > 0) {\n ynt = Math.ceil(diff / h);\n }\n diff = by1 + bgH - bgY - h;\n if(diff > 0) {\n ynb = Math.ceil(diff / h);\n }\n }\n // 分同行列和4个角分别判断,先看同行同列,再看4个角的象限\n let repeat = [];\n if(xnl > 0) {\n for(let i = 0; i < xnl; i++) {\n let x = bgX - (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最左边超过没有\n if(!needMask && i === 0 && x < bx1) {\n needMask = true;\n }\n }\n }\n if(xnr > 0) {\n for(let i = 0; i < xnr; i++) {\n let x = bgX + (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最右边超过没有\n if(!needMask && i === xnr - 1 && x + w > bx1 + bgW) {\n needMask = true;\n }\n }\n }\n if(ynt > 0) {\n for(let i = 0; i < ynt; i++) {\n let y = bgY - (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最上边超过没有\n if(!needMask && i === 0 && y < by1) {\n needMask = true;\n }\n }\n }\n if(ynb > 0) {\n for(let i = 0; i < ynb; i++) {\n let y = bgY + (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最下边超过没有\n if(!needMask && i === ynb - 1 && y + w > by1 + bgH) {\n needMask = true;\n }\n }\n }\n // 原点和同行列十字画完,看4个角的情况\n if(xnl > 0 && ynt > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX - (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynt > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX + (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnl > 0 && ynb > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX - (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynb > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX + (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(needMask) {\n ctx.save();\n renderBgc(this, renderMode, ctx, '#FFF', null,\n bx1, by1, bgW, bgH, btlr, btrr, bbrr, bblr, 'clip');\n }\n // 先画不考虑repeat的中心声明的\n ctx.drawImage(source, bgX, bgY, w, h);\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n ctx.drawImage(source, item[0], item[1], w, h);\n });\n if(needMask) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let matrix = image.matrixResize(width, height, w, h, bgX, bgY, bgW, bgH);\n let props = [\n ['xlink:href', loadBgi.url],\n ['x', bgX],\n ['y', bgY],\n ['width', width],\n ['height', height],\n ];\n let needResize;\n if(matrix && !mx.isE(matrix)) {\n needResize = true;\n props.push(['transform', 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n if(needMask) {\n let p1 = { x: bx1, y: by1 };\n let p2 = { x: bx2, y: by2 };\n if(needResize) {\n let inverse = mx.inverse(matrix);\n p1 = mx.calPoint(p1, inverse);\n p2 = mx.calPoint(p2, inverse);\n }\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', `M${p1.x},${p1.y}L${p2.x},${p1.y}L${p2.x},${p2.y}L${p1.x},${p2.y}L${p1.x},${p1.y}`],\n ['fill', '#FFF'],\n ],\n }],\n };\n let id = ctx.add(v);\n xom.__cacheDefs.push(v);\n props.push(['clip-path', 'url(#' + id + ')']);\n }\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'img',\n tagName: 'image',\n props,\n }\n ],\n };\n xom.__cacheDefs.push(v);\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n v.children.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n return ctx.add(v);\n }\n else {\n // 先画不考虑repeat的中心声明的\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props,\n });\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n }\n }\n }\n}\n\nexport default {\n renderBgc,\n renderImage,\n};\n","import inject from '../util/inject';\nimport util from '../util/util';\n\nconst { isFunction } = util;\n\nfunction traversalBefore(list, length, diff) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__before && item.__before(diff);\n }\n}\n\nfunction traversalAfter(list, length, diff) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__after && item.__after(diff);\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__rootTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__now = inject.now();\n }\n\n __init() {\n let self = this;\n let { task } = self;\n inject.cancelAnimationFrame(self.id);\n let last = self.__now = inject.now();\n function cb() {\n // 必须清除,可能会发生重复,当动画finish回调中gotoAndPlay(0),下方结束判断发现aTask还有值会继续,新的init也会进入再次执行\n inject.cancelAnimationFrame(self.id);\n self.id = inject.requestAnimationFrame(function() {\n if(isPause || !task.length) {\n return;\n }\n let now = self.__now = inject.now();\n let diff = now - last;\n diff = Math.max(diff, 0);\n // let delta = diff * 0.06; // 比例是除以1/60s,等同于*0.06\n last = now;\n // 优先动画计算\n let clone = task.slice(0);\n let length = clone.length;\n // 普通的before/after,动画计算在before,所有回调在after\n traversalBefore(clone, length, diff);\n let list = self.__rootTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item(diff);\n }\n // 刷新成功后调用after,确保图像生成\n traversalAfter(clone, length, diff);\n // 执行每个Root的刷新并清空\n // 还有则继续,没有则停止节省性能\n if(task.length) {\n cb();\n }\n });\n }\n cb();\n }\n\n onFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n if(!task.length) {\n this.__init();\n }\n if(isFunction(handle)) {\n handle = {\n __after: handle,\n __karasFramecb: handle,\n };\n }\n task.push(handle);\n }\n\n offFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n for(let i = 0, len = task.length; i < len; i++) {\n let item = task[i];\n // 需考虑nextFrame包裹的引用对比\n if(item === handle || item.__karasFramecb === handle) {\n task.splice(i, 1);\n break;\n }\n }\n if(!task.length) {\n inject.cancelAnimationFrame(this.id);\n this.__now = null;\n }\n }\n\n nextFrame(handle) {\n if(!handle) {\n return;\n }\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n let cb = isFunction(handle) ? {\n __after: diff => {\n handle(diff);\n this.offFrame(cb);\n },\n } : {\n __before: handle.__before,\n __after: diff => {\n handle.__after && handle.__after(diff);\n this.offFrame(cb);\n },\n };\n cb.__karasFramecb = handle;\n this.onFrame(cb);\n }\n\n pause() {\n isPause = true;\n }\n\n resume() {\n if(isPause) {\n this.__init();\n isPause = false;\n }\n }\n\n get task() {\n return this.__task;\n }\n}\n\nexport default new Frame();\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nlet NEWTON_ITERATIONS = 4;\nlet NEWTON_MIN_SLOPE = 0.001;\nlet SUBDIVISION_PRECISION = 0.0000001;\nlet SUBDIVISION_MAX_ITERATIONS = 10;\n\nlet kSplineTableSize = 11;\nlet kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nlet float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if(currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while(Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for(let i = 0; i < NEWTON_ITERATIONS; ++i) {\n let currentSlope = getSlope(aGuessT, mX1, mX2);\n if(currentSlope === 0.0) {\n return aGuessT;\n }\n let currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing(x) {\n return x;\n}\n\nfunction bezier(mX1, mY1, mX2, mY2) {\n if(!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if(mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n let sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for(let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n let lastSample = kSplineTableSize - 1;\n\n for(; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n let dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n let guessForT = intervalStart + dist * kSampleStepSize;\n\n let initialSlope = getSlope(guessForT, mX1, mX2);\n if(initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if(initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if(x === 0 || x === 1) {\n return x;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n\nlet easing = {\n linear: bezier(1, 1, 0, 0),\n easeIn: bezier(0.42, 0, 1, 1),\n easeOut: bezier(0, 0, 0.58, 1),\n ease: bezier(0.25, 0.1, 0.25, 1),\n easeInOut: bezier(0.42, 0, 0.58, 1),\n cubicBezier: bezier,\n getEasing(v, v1, v2, v3) {\n if(arguments.length === 4) {\n return bezier(v, v1, v2, v3);\n }\n else if(Array.isArray(v) && v.length === 4) {\n return bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v) {\n v = v.toString();\n let timingFunction;\n if(/^\\s*(?:cubic-bezier\\s*)?\\(\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*,\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*\\)\\s*$/i.test(v)) {\n v = v.match(/[\\d.]+/g);\n timingFunction = bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v !== 'getEasing') {\n timingFunction = this[v];\n }\n return timingFunction;\n }\n },\n};\n\neasing['ease-in'] = easing.easeIn;\neasing['ease-out'] = easing.easeOut;\neasing['ease-in-out'] = easing.easeInOut;\n\nexport default easing;\n","import util from '../util/util';\n\nconst { isFunction, isNil } = util;\n\nclass Controller {\n constructor() {\n this.__records = []; // 默认记录和自动记录\n this.__records2 = []; // 非自动播放的动画记录\n this.__list = [] // 默认初始化播放列表,自动播放也存这里\n this.__list2 = []; // json中autoPlay为false的初始化存入这里\n this.__onList = []; // list中已存在的侦听事件,list2初始化时也需要增加上\n this.__lastTime = {}; // 每个类型的上次触发时间,防止重复emit\n }\n\n add(v, list = this.__list) {\n if(list.indexOf(v) === -1) {\n list.push(v);\n }\n }\n\n remove(v) {\n let i = this.__list.indexOf(v);\n if(i > -1) {\n this.__list.splice(i, 1);\n }\n }\n\n __destroy() {\n this.__records = [];\n this.__records2 = [];\n this.__list = [];\n this.__list2 = [];\n }\n\n __action(k, args) {\n this.__list.forEach(item => {\n item[k].apply(item, args);\n });\n }\n\n init(records = this.__records, list = this.__list) {\n // 检查尚未初始化的record,并初始化,后面才能调用各种控制方法\n if(records.length) {\n // 清除防止重复调用,并且新的json还会进入整体逻辑\n records.splice(0).forEach(item => {\n let { target, animate, areaStart, areaDuration } = item;\n if(target.isDestroyed || !animate) {\n return;\n }\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n animate.forEach(animate => {\n let { value, options } = animate;\n if(areaStart || !isNil(areaDuration)) {\n options = Object.assign({}, options); // clone防止多个使用相同的干扰\n options.areaStart = areaStart;\n options.areaDuration = areaDuration;\n }\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n });\n });\n }\n // 非自动播放后初始化需检测事件,给非自动播放添加上,并清空本次\n if(records === this.__records2) {\n let onList = this.__onList;\n let list2 = this.list2;\n if(list2.length && onList.length) {\n list2.forEach(item => {\n onList.forEach(arr => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[arr[0]]) {\n this.__lastTime[arr[0]] = time;\n arr[1] && arr[1]();\n }\n };\n cb.__karasEventCb = arr[1];\n item.off(arr[0], arr[1]);\n item.on(arr[0], cb);\n });\n });\n }\n }\n }\n\n __playAuto() {\n this.init();\n this.__action('play');\n }\n\n play(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('play', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n pause() {\n this.__action('pause');\n }\n\n resume(cb) {\n let once = true;\n this.__action('resume', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n __mergeAuto() {\n this.init();\n this.init(this.__records2);\n if(this.__list2.length) {\n this.__list = this.__list.concat(this.__list2);\n this.__list2 = [];\n }\n }\n\n cancel(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('cancel', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n finish(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('finish', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndStop(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n let once = true;\n this.__action('gotoAndStop', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndPlay(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n let once = true;\n this.__action('gotoAndPlay', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.__on(id[i], handle);\n }\n this.__onList.push([id, handle]);\n }\n else {\n this.__on(id, handle);\n this.__onList.push([id, handle]);\n }\n }\n\n __on(id, handle) {\n this.__list.forEach(item => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[id]) {\n this.__lastTime[id] = time;\n handle && handle();\n }\n };\n cb.__karasEventCb = handle;\n item.on(id, cb);\n });\n }\n\n off(id, handle) {\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.off(id[i], handle);\n }\n }\n else {\n this.list.forEach(item => {\n item.off(id, handle);\n });\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get list2() {\n return this.__list2;\n }\n\n __set(key, value) {\n this.list.forEach(item => {\n item[key] = value;\n });\n }\n\n set playbackRate(v) {\n this.__set('playbackRate', v);\n }\n\n set iterations(v) {\n this.__set('iterations', v);\n }\n\n set playCount(v) {\n this.__set('playCount', v);\n }\n\n set fps(v) {\n this.__set('fps', v);\n }\n\n set currentTime(v) {\n this.__set('currentTime', v);\n }\n\n set spfLimit(v) {\n this.__set('spfLimit', v);\n }\n\n set delay(v) {\n this.__set('delay', v);\n }\n\n set endDelay(v) {\n this.__set('endDelay', v);\n }\n\n set fill(v) {\n this.__set('fill', v);\n }\n\n set direction(v) {\n this.__set('direction', v);\n }\n}\n\nexport default Controller;\n","import css from '../style/css';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport Event from '../util/Event';\nimport inject from '../util/inject';\nimport frame from './frame';\nimport easing from './easing';\nimport change from '../refresh/change';\nimport key from './key';\nimport mx from '../math/matrix';\nimport level from '../refresh/level';\nimport Controller from './Controller';\n\nconst {\n STYLE_KEY: {\n FILTER,\n TRANSFORM_ORIGIN,\n PERSPECTIVE_ORIGIN,\n BACKGROUND_CLIP,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BOX_SHADOW,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n BACKGROUND_SIZE,\n FONT_SIZE,\n FLEX_BASIS,\n FLEX_DIRECTION,\n WIDTH,\n HEIGHT,\n TOP,\n BOTTOM,\n LINE_HEIGHT,\n OPACITY,\n Z_INDEX,\n TRANSFORM,\n COLOR,\n FONT_WEIGHT,\n FONT_STYLE,\n FONT_FAMILY,\n TEXT_ALIGN,\n MATRIX,\n ROTATE_3D,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n STROKE_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n TEXT_STROKE_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_TOP_WIDTH,\n LEFT,\n RIGHT,\n MARGIN_BOTTOM,\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_LEFT,\n PADDING_BOTTOM,\n STROKE_MITERLIMIT,\n LETTER_SPACING,\n PERSPECTIVE,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n BACKGROUND_IMAGE,\n FILL,\n STROKE,\n BACKGROUND_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n POSITION,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle, equalStyle } = css;\nconst { isGeom, GEOM } = change;\nconst {\n getLevel,\n isRepaint,\n NONE,\n TRANSFORM: TF,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n ROTATE_Z: RZ,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n SCALE,\n} = level;\n\nconst {\n isColorKey,\n isExpandKey,\n isLengthKey,\n isGradientKey,\n isRadiusKey,\n} = key;\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param keys 样式所有的key\n * @param root\n * @param node\n * @param aniParams 动画更新的特殊优化参数\n * @param cb\n */\nfunction genBeforeRefresh(keys, root, node, aniParams, cb) {\n if(aniParams && !aniParams.allInFn) {\n aniParams = null;\n }\n root.__addUpdate(node, keys, null, null, null, aniParams, cb);\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * 加好空数组transition/keys,后续计算两帧之间变化时存入\n * 加好空数组fixed,后续计算无帧变化时存入\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画,普通css不包含,特殊处理并添加到style最后\n let translatePath = style.translatePath;\n style = css.normalize(style);\n if(Array.isArray(translatePath) && [6, 8].indexOf(translatePath.length) > -1) {\n style[TRANSLATE_PATH] = translatePath.map(item => {\n let v = calUnit(item);\n if(v.u === NUMBER) {\n v.u = PX;\n }\n return v;\n });\n }\n return {\n style,\n time: offset * duration,\n easing: easing || es,\n timingFunction: getEasing(easing || es),\n transition: [], // 变化的属性\n keys: [], // 变化的k\n fixed: [], // 不变的k\n lastPercent: -1,\n };\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p.u === PX) {\n if(n.u === PERCENT) {\n return n.v * 0.01 * container - p.v;\n }\n else if(n.u === REM) {\n return n.v * root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width * 0.01 - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height * 0.01 - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) * 0.01 - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) * 0.01 - p.v;\n }\n }\n else if(p.u === PERCENT) {\n if(n.u === PX) {\n return n.v * 100 / container - p.v;\n }\n else if(n.u === REM) {\n return n.v * root.computedStyle[FONT_SIZE] * 100 / container - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width / container - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height / container - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) / container - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) / container - p.v;\n }\n }\n else if(p.u === REM) {\n if(n.u === PX) {\n return n.v / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * 0.01 * container / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n }\n else if(p.u === VW) {\n if(n.u === PX) {\n return n.v * 100 / root.__width - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / root.__width - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / root.__width - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height / root.__width - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) / root.__width - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) / root.__width - p.v;\n }\n }\n else if(p.u === VH) {\n if(n.u === PX) {\n return n.v * 100 / root.__height - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / root.__height - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width / root.__height - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / root.__height - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) / root.__height - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) / root.__height - p.v;\n }\n }\n else if(p.u === VMAX) {\n if(n.u === PX) {\n return n.v * 100 / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) / Math.max(root.__width, root.__height) - p.v;\n }\n }\n else if(p.u === VMIN) {\n if(n.u === PX) {\n return n.v * 100 / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) / Math.min(root.__width, root.__height) - p.v;\n }\n }\n return 0;\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n */\nfunction calDiff(prev, next, k, target) {\n let p = prev.style[k];\n let n = next.style[k];\n // 提前设置好引用,无需每帧计算时取引用,由于单位一定相同,可以简化直接引用到值v上无需单位u,有些直接量没有单位\n let cl = prev.clone[k];\n // translatePath可能不存在\n if(cl && cl.hasOwnProperty('v')) {\n cl = cl.v;\n }\n let res = { k, st: p, cl };\n if(k === TRANSFORM) {\n // transform不存在时需给默认矩阵,他只有1个matrix3d的值做动画\n if(!p && !n || !p.length && !n.length) {\n return;\n }\n let pm, nm;\n if(p && p[0]) {\n pm = p[0].v;\n }\n else {\n pm = mx.identity();\n }\n if(n && n[0]) {\n nm = n[0].v;\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res.v = [\n nm[0] - pm[0],\n nm[1] - pm[1],\n nm[2] - pm[2],\n nm[3] - pm[3],\n nm[4] - pm[4],\n nm[5] - pm[5],\n nm[6] - pm[6],\n nm[7] - pm[7],\n nm[8] - pm[8],\n nm[9] - pm[9],\n nm[10] - pm[10],\n nm[11] - pm[11],\n nm[12] - pm[12],\n nm[13] - pm[13],\n nm[14] - pm[14],\n nm[15] - pm[15],\n ];\n }\n else if(k === ROTATE_3D) {\n if(p[0] === n[0] && p[1] === n[1] && p[2] === n[2]\n && p[3].v === n[3].v && p[3].u === n[3].u) {\n return;\n }\n res.v = [n[0] - p[0], n[1] - p[1], n[2] - p[2], n[3].v - p[3].v];\n }\n else if(k === FILTER) {\n // filter很特殊,里面有多个滤镜,按顺序计算,为空视为默认值,如blur默认0,brightness默认1\n let len = Math.max(p ? p.length : 0, n ? n.length : 0);\n let v = [], has;\n for(let i = 0; i < len; i++) {\n let pv = p ? p[i] : null, nv = n ? n[i] : null;\n // 空或key不等都无变化\n if(isNil(pv) || isNil(nv) || pv.k !== nv.k) {\n v.push(null);\n }\n else {\n has = true;\n let k = pv.k, pvv = pv.v, nvv = nv.v;\n if(k === 'blur') {\n if(pvv.u === nvv.u) {\n v.push(nvv.v - pvv.v);\n }\n else {\n let v2 = calByUnit(pvv, nvv, 0, target.root);\n v.push(v2);\n }\n }\n else if(k === 'hueRotate' || k === 'saturate' || k === 'brightness' || k === 'contrast'\n || k === 'sepia' || k === 'invert' || k === 'grayscale') {\n v.push(nvv.v - pvv.v);\n }\n else if(k === 'dropShadow') {\n let v2 = [];\n for(let i = 0; i < 4; i++) {\n let a = pvv[i], b = nvv[i];\n if(a.u === b.u) {\n v2.push(b.v - a.v);\n }\n else {\n v2.push(calByUnit(a, b, i === 1 ? target.clientHeight: target.clientWidth, target.root));\n }\n }\n v2.push([\n nvv[4][0] - pvv[4][0],\n nvv[4][1] - pvv[4][1],\n nvv[4][2] - pvv[4][2],\n nvv[4][3] - pvv[4][3],\n ])\n v.push(v2);\n }\n }\n }\n if(!has) {\n return;\n }\n res.v = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n // x/y都相等无需\n if(n[0].v === p[0].v && n[0].u === p[0].u\n && n[1].v === p[1].v && n[1].u === p[1].u) {\n return;\n }\n res.v = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi.u === ni.u) {\n res.v.push(ni.v - pi.v);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res.v.push(v);\n }\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(pi.u === ni.u) {\n let v = ni.v - pi.v;\n res.v.push(v);\n }\n else {\n let k2;\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'width' : 'height';\n }\n else {\n k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\n }\n let v = calByUnit(pi, ni, target[k2], target.root);\n res.v.push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let a = p[i];\n let b = n[i];\n // 不能为空,outset/inset必须相等\n if(!a || !b || a[5] !== b[5]) {\n res.v.push(null);\n continue;\n }\n let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n if(a[j].u === b[j].u) {\n v.push(b[j].v - a[j].v);\n }\n else {\n let v2 = calByUnit(a[j], b[j], i === 1 ? target.offsetHeight : target.offsetWidth, target.root);\n v.push(v2);\n }\n }\n // rgba\n let c = [];\n for(let j = 0; j < 4; j++) {\n c.push(b[4][j] - a[4][j]);\n }\n v.push(c);\n res.v.push(v);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n let has;\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res.v.push(null);\n continue;\n }\n let temp = [];\n for(let j = 0; j < 2; j++) {\n let pp = pi[j], nn = ni[j];\n if(pp.u === nn.u) {\n temp.push(nn.v - pp.v);\n }\n else {\n let k2;\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'width' : 'height';\n }\n else {\n k2 = i ? 'offsetWidth' : 'offsetHeight';\n }\n let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res.v.push(null);\n }\n else {\n res.v.push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res.v = n - p;\n }\n else if(k === STROKE_WIDTH) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(pi.u === ni.u) {\n let v = ni.v - pi.v;\n res.v.push(v);\n }\n let v = calByUnit(pi, ni, target.offsetWidth, target.root);\n res.v.push(v);\n }\n }\n // 特殊的path,不存在style中但在动画某帧中,不会统一化所以可能反向计算frameR时后一帧没有\n else if(k === TRANSLATE_PATH && p) {\n let k1 = 'offsetWidth', k2 = 'offsetHeight';\n let computedStyle = target && target.__computedStyle;\n if(computedStyle) {\n if(['padding-box', 'paddingBox'].indexOf(computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'clientWidth';\n k2 = 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'width';\n k2 = 'height';\n }\n }\n res.v = p.map((item, i) => {\n let { v, u } = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return { v: (parseFloat(v) || 0) * 0.01 * target[k1], u: PX };\n }\n else {\n return { v: (parseFloat(v) || 0) * 0.01 * target[k2], u: PX };\n }\n }\n else if(u === REM) {\n return { v: (parseFloat(v) || 0) * target.root.computedStyle[FONT_SIZE] * 100, u: PX };\n }\n else if(u === VW) {\n return { v: (parseFloat(v) || 0) * 0.01 * target.root.__width, u: PX };\n }\n else if(u === VH) {\n return { v: (parseFloat(v) || 0) * 0.01 * target.root.__height, u: PX };\n }\n else if(u === VMAX) {\n return { v: (parseFloat(v) || 0) * 0.01 * Math.max(target.root.__width, target.root.__height), u: PX };\n }\n else if(u === VMIN) {\n return { v: (parseFloat(v) || 0) * 0.01 * Math.min(target.root.__width, target.root.__height), u: PX };\n }\n else {\n return { v: parseFloat(v) || 0, u: PX };\n }\n });\n }\n else if(isExpandKey(k)) {\n if(p.u === n.u) {\n let v = n.v - p.v;\n if(v === 0) {\n return;\n }\n res.v = v;\n }\n else {\n let v = calByUnit(p, n, target[k === TRANSLATE_X || k === TRANSLATE_Z ? 'outerWidth' : 'outerHeight'], target.root);\n if(!v) {\n return;\n }\n res.v = v;\n }\n }\n else if(isLengthKey(k)) {\n // auto不做动画\n if(p.u === AUTO || n.u === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p.u === n.u) {\n diff = n.v - p.v;\n }\n // lineHeight奇怪的单位变化,%相对于fontSize\n else if(k === LINE_HEIGHT) {\n diff = calByUnit(p, n, computedStyle[FONT_SIZE], target.root);\n }\n // fontSize的%相对于parent的\n else if(k === FONT_SIZE) {\n diff = calByUnit(p, n, parentComputedStyle[FONT_SIZE], target.root);\n }\n // 相对于父height的特殊属性\n else if(k === FLEX_BASIS\n && ['column', 'column-reverse', 'columnReverse'].indexOf(computedStyle[FLEX_DIRECTION]) > -1\n || [HEIGHT, TOP, BOTTOM].indexOf(k) > -1) {\n if(p.u !== AUTO && n.u !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p.u !== AUTO && n.u !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[WIDTH], target.root);\n }\n }\n // 兜底NaN非法\n if(diff === 0 || isNaN(diff)) {\n return;\n }\n res.v = diff;\n }\n else if(isGradientKey(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni || pi.u !== ni.u || pi.u === STRING) {\n res.v.push(null);\n continue;\n }\n let u = pi.u;\n pi = pi.v;\n ni = ni.v;\n let temp;\n // 渐变\n if(u === GRADIENT) {\n let r = calDiffGradient(pi, ni, target);\n if(!r) {\n res.v.push(null);\n continue;\n }\n temp = r;\n }\n // 纯色\n else {\n if(equalArr(ni, pi)) {\n res.v.push(null);\n continue;\n }\n temp = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res.v.push(temp);\n }\n }\n else if(isColorKey(k)) {\n if(n.u !== p.u) {\n return;\n }\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n n = n.v;\n p = p.v;\n if(n.u === GRADIENT) {\n let r = calDiffGradient(p, n, target);\n if(!r) {\n return;\n }\n res.v = r;\n }\n else {\n if(equalArr(n, p)) {\n return;\n }\n res.v = [\n n[0] - p[0],\n n[1] - p[1],\n n[2] - p[2],\n n[3] - p[3]\n ];\n }\n }\n else if(GEOM.hasOwnProperty(k)) {\n let tagName = target.tagName;\n if(isNil(p)) {\n return;\n }\n else if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calDiff)) {\n let fn = GEOM[k][tagName].calDiff;\n if(target.isMulti) {\n let arr = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n arr.push(fn(p[i], n[i]));\n }\n return arr;\n }\n else {\n res.v = fn(p, n);\n }\n }\n // 特殊处理multi\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.min(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(null);\n }\n else {\n let v3 = [];\n for(let k = 0, len3 = Math.max(pv2.length, nv2.length); k < len3; k++) {\n let pv3 = pv2[k];\n let nv3 = nv2[k];\n // control由4点变2点\n if(isNil(pv3) || isNil(nv3)) {\n v3.push(0);\n }\n else {\n v3.push(nv3 - pv3);\n }\n }\n v2.push(v3);\n }\n }\n res.v.push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n res.v.push([\n nv[0] - pv[0],\n nv[1] - pv[1],\n ]);\n }\n }\n }\n else {\n if(n === p || equalArr(n, p) || k === 'edge' || k === 'closure' || k === 'booleanOperations') {\n return;\n }\n let v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || isNil(nv)) {\n v.push(0);\n }\n v.push(nv - pv);\n }\n res.v = v;\n }\n }\n // 非multi特殊处理这几类数组类型数据\n else if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.max(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n // control由4点变2点\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(0);\n }\n else {\n v2.push(nv2 - pv2);\n }\n }\n res.v.push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [\n n[0] - p[0],\n n[1] - p[1],\n ];\n }\n // 其它简单数据,除了edge/closure/booleanOperations没有增量\n else {\n if(n === p || k === 'edge' || k === 'closure' || k === 'booleanOperations') {\n return;\n }\n else {\n res.v = n - p;\n }\n }\n }\n // display等不能有增量过程的\n else {\n return;\n }\n return res;\n}\n\n// 渐变的差异计算\nfunction calDiffGradient(p, n, target) {\n if(p.k !== n.k) {\n return;\n }\n let pv = p.v;\n let nv = n.v;\n let temp = [[]];\n let eq = equalArr(pv, nv);\n // 渐变值部分是通用的\n for(let i = 0, len = Math.min(pv.length, nv.length); i < len; i++) {\n let a = pv[i];\n let b = nv[i];\n let t = [];\n t.push([\n b[0][0] - a[0][0],\n b[0][1] - a[0][1],\n b[0][2] - a[0][2],\n b[0][3] - a[0][3],\n ]);\n if(a[1] && b[1]) {\n if(a[1].u === b[1].u) {\n t.push(b[1].v - a[1].v);\n }\n else {\n let v = calByUnit(a[1], b[1], target.clientWidth, target.root);\n t.push(v || 0);\n }\n }\n temp[0].push(t);\n }\n if(p.k === 'linear') {\n let isArrP = Array.isArray(p.d);\n let isArrN = Array.isArray(n.d);\n if(isArrN !== isArrP) {\n return;\n }\n if(isArrP) {\n let v = [n.d[0] - p.d[0], n.d[1] - p.d[1], n.d[2] - p.d[2], n.d[3] - p.d[3]];\n if(eq && equalArr(v, [0, 0, 0, 0])) {\n return;\n }\n temp[1] = v;\n }\n else {\n let v = n.d - p.d;\n // 颜色角度都没变化\n if(eq && v === 0) {\n return;\n }\n temp[1] = v;\n }\n }\n else if(p.k === 'radial') {\n let isArrP = Array.isArray(p.z);\n let isArrN = Array.isArray(n.z);\n if(isArrN !== isArrP) {\n return;\n }\n temp[2] = [];\n // sketch中a点到b点特殊格式表达,z是数组忽略p和s\n if(isArrP) {\n // 距离中心外形全等\n if(eq && equalArr(p.z, n.z)) {\n return;\n }\n for(let i = 0; i < 5; i++) {\n let pz = p.z[i];\n // 半径比例省略为1\n if(pz === undefined) {\n pz = 1;\n }\n let nz = n.z[i];\n if(nz === undefined) {\n nz = 1;\n }\n temp[2].push(nz - pz);\n }\n }\n else {\n if(eq && p.z === n.z && p.s === n.s && equalArr(p.p, n.p)) {\n return;\n }\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp.u === np.u) {\n temp[2].push(np.v - pp.v);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n }\n }\n else if(p.k === 'conic') {\n if(eq && p.d === n.d && equalArr(p.p, n.p)) {\n return;\n }\n temp[1]= n.d - p.d;\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n }\n return temp;\n}\n\n/**\n * 计算两帧之间不相同的变化,存入transition,相同的忽略\n * 同时不变化的key也得存入fixed\n */\nfunction calFrame(prev, next, keys, target) {\n let currentStyle = target.__currentStyle, hasTp, allInFn = true;\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let ts = calDiff(prev, next, k, target);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n if(k === TRANSLATE_PATH) {\n hasTp = true;\n }\n ts.cs = currentStyle[k];\n let fn = CAL_HASH[k];\n if(fn) {\n ts.fn = fn;\n }\n else {\n allInFn = false;\n }\n prev.transition.push(ts);\n prev.keys.push(k);\n }\n else if(k !== TRANSLATE_PATH) {\n prev.fixed.push(k);\n allInFn = false;\n }\n }\n // translatePath需特殊处理translate,防止被覆盖\n if(hasTp) {\n let i = prev.keys.indexOf(TRANSLATE_X);\n if(i === -1) {\n prev.keys.push(TRANSLATE_X);\n }\n i = prev.keys.indexOf(TRANSLATE_Y);\n if(i === -1) {\n prev.keys.push(TRANSLATE_Y);\n }\n i = prev.fixed.indexOf(TRANSLATE_X);\n if(i > -1) {\n prev.fixed.splice(i, 1);\n }\n i = prev.fixed.indexOf(TRANSLATE_Y);\n if(i > -1) {\n prev.fixed.splice(i, 1);\n }\n }\n prev.allInFn = allInFn;\n // 特殊优化,加速通知Root的更新\n if(allInFn) {\n let lv = NONE;\n let computedStyle = target.__computedStyle;\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n lv |= getLevel(k);\n if(k === Z_INDEX) {\n prev.hasZ = ['relative', 'absolute'].indexOf(computedStyle[POSITION]) > -1;\n }\n else if(k === COLOR) {\n prev.hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n prev.hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n prev.hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n prev.hasTsOver = true;\n }\n }\n // 提前计算\n prev.lv = lv;\n prev.isRepaint = isRepaint(lv);\n // 常见的几种动画matrix计算是否可优化提前计算\n if(prev.isRepaint && (lv & (TX | TY | TZ | RZ | SCALE))) {\n if((lv & TF) || (\n (lv & SX) && !computedStyle[SCALE_X]\n || (lv & SY) && !computedStyle[SCALE_Y]\n || (lv & SZ) && !computedStyle[SCALE_Z]\n || (lv & RZ) && (computedStyle[ROTATE_X] || computedStyle[ROTATE_Y]\n || computedStyle[SKEW_X] || computedStyle[SKEW_Y])\n )) {\n prev.optimize = false;\n }\n else {\n prev.optimize = true;\n }\n }\n }\n return next;\n}\n\nfunction getEasing(ea) {\n let timingFunction;\n if(ea) {\n if((timingFunction = /^\\s*steps\\s*\\(\\s*(\\d+)(?:\\s*,\\s*(\\w+))?\\s*\\)/i.exec(ea))) {\n let steps = parseInt(timingFunction[1]);\n let stepsD = timingFunction[2];\n timingFunction = function(percent) {\n // steps有效定义正整数\n if(steps && steps > 0) {\n let per = 1 / steps;\n let n = stepsD === 'start' ? Math.ceil(percent / per) : Math.floor(percent / per);\n return n / steps;\n }\n return percent;\n };\n }\n else {\n timingFunction = easing.getEasing(ea);\n }\n }\n return timingFunction;\n}\n\n/**\n * calIntermediateStyle计算优化,不能类型的style动画计算方式不同,也有可以复用的,\n * 全部if分支判断太长且浪费,相同计算的用hash存储,k为样式,v为方法,一次hash获取即可\n */\nconst CAL_HASH = [];\nCAL_HASH[TRANSFORM] = calTransform;\nCAL_HASH[ROTATE_3D] = calRotate3d;\nCAL_HASH[FILTER] = calFilter;\nCAL_HASH[TRANSFORM_ORIGIN] = CAL_HASH[PERSPECTIVE_ORIGIN]\n = CAL_HASH[BORDER_TOP_LEFT_RADIUS] = CAL_HASH[BORDER_TOP_RIGHT_RADIUS]\n = CAL_HASH[BORDER_BOTTOM_RIGHT_RADIUS] = CAL_HASH[BORDER_BOTTOM_LEFT_RADIUS] = calOrigin;\nCAL_HASH[STROKE_WIDTH] = CAL_HASH[BACKGROUND_POSITION_X] = CAL_HASH[BACKGROUND_POSITION_Y] = calPosition;\nCAL_HASH[BOX_SHADOW] = calBoxShadow;\nCAL_HASH[BACKGROUND_SIZE] = calBgSize;\nCAL_HASH[OPACITY] = CAL_HASH[Z_INDEX] = calNumber;\nCAL_HASH[TRANSLATE_PATH] = calPath;\nCAL_HASH[FONT_SIZE] = CAL_HASH[TEXT_STROKE_WIDTH] = CAL_HASH[BORDER_BOTTOM_WIDTH] = CAL_HASH[BORDER_LEFT_WIDTH]\n = CAL_HASH[BORDER_RIGHT_WIDTH] = CAL_HASH[BORDER_TOP_WIDTH] = CAL_HASH[LEFT] = CAL_HASH[TOP] = CAL_HASH[RIGHT]\n = CAL_HASH[BOTTOM] = CAL_HASH[FLEX_BASIS] = CAL_HASH[WIDTH] = CAL_HASH[HEIGHT] = CAL_HASH[LINE_HEIGHT]\n = CAL_HASH[MARGIN_BOTTOM] = CAL_HASH[MARGIN_TOP] = CAL_HASH[MARGIN_LEFT] = CAL_HASH[MARGIN_RIGHT]\n = CAL_HASH[PADDING_TOP] = CAL_HASH[PADDING_RIGHT] = CAL_HASH[PADDING_LEFT] = CAL_HASH[PADDING_BOTTOM]\n = CAL_HASH[STROKE_WIDTH] = CAL_HASH[STROKE_MITERLIMIT] = CAL_HASH[LETTER_SPACING] = CAL_HASH[PERSPECTIVE]\n = CAL_HASH[TRANSLATE_X] = CAL_HASH[TRANSLATE_Y] = CAL_HASH[TRANSLATE_Z] = CAL_HASH[SKEW_X] = CAL_HASH[SKEW_Y]\n = CAL_HASH[SCALE_X] = CAL_HASH[SCALE_Y] = CAL_HASH[SCALE_Z] = CAL_HASH[ROTATE_X] = CAL_HASH[ROTATE_Y]\n = CAL_HASH[ROTATE_Z] = calLength;\nCAL_HASH[BACKGROUND_IMAGE] = CAL_HASH[FILL] = CAL_HASH[STROKE] = calGradient;\nCAL_HASH[BACKGROUND_COLOR] = CAL_HASH[BORDER_BOTTOM_COLOR] = CAL_HASH[BORDER_LEFT_COLOR] = CAL_HASH[BORDER_RIGHT_COLOR]\n = CAL_HASH[BORDER_TOP_COLOR] = CAL_HASH[COLOR] = CAL_HASH[TEXT_STROKE_COLOR] = calColor;\n\n// transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\nfunction calTransform(k, v, percent, st, cl, frame, currentStyle) {\n if(!st || !st.length) {\n st = frame.style[k] = [{k: MATRIX, v: mx.identity()}];\n }\n if(!cl || !cl.length) {\n cl = frame.clone[k] = [{k: MATRIX, v: mx.identity()}];\n }\n for(let i = 0; i < 16; i++) {\n st[0].v[i] = cl[0].v[i] + v[i] * percent;\n }\n}\n\nfunction calRotate3d(k, v, percent, st, cl, frame, currentStyle) {\n st[0] = cl[0] + v[0] * percent;\n st[1] = cl[1] + v[1] * percent;\n st[2] = cl[2] + v[2] * percent;\n st[3].v = cl[3].v + v[3] * percent;\n}\n\nfunction calFilter(k, v, percent, st, cl, frame, currentStyle) {\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n if(item) {\n let k2 = st[i].k, v2 = st[i].v, clv = cl[i].v;\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0].v = clv[0].v + item[0] * percent;\n v2[1].v = clv[1].v + item[1] * percent;\n v2[2].v = clv[2].v + item[2] * percent;\n v2[3].v = clv[3].v + item[3] * percent;\n let c1 = v2[4], cv = clv[4], c2 = item[4];\n c1[0] = cv[0] + c2[0] * percent;\n c1[1] = cv[1] + c2[1] * percent;\n c1[2] = cv[2] + c2[2] * percent;\n c1[3] = cv[3] + c2[3] * percent;\n }\n // 其它都是带单位单值\n else {\n v2.v = clv.v + item * percent;\n }\n }\n }\n}\n\nfunction calOrigin(k, v, percent, st, cl, frame, currentStyle) {\n if(v[0] !== 0) {\n st[0].v = cl[0].v + v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1].v = cl[1].v + v[1] * percent;\n }\n}\n\nfunction calPosition(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((item, i) => {\n if(v[i]) {\n item.v = cl[i].v + v[i] * percent;\n }\n });\n}\n\nfunction calBoxShadow(k, v, percent, st, cl, frame, currentStyle) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n if(!v[i]) {\n continue;\n }\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j].v = cl[i][j].v + v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] = cl[i][4][j] + v[i][4][j] * percent;\n }\n }\n}\n\nfunction calBgSize(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((item, i) => {\n let o = v[i];\n if(o) {\n item[0].v = cl[i][0].v + o[0] * percent;\n item[1].v = cl[i][1].v + o[1] * percent;\n }\n });\n}\n\nfunction calNumber(k, v, percent, st, cl, frame, currentStyle) {\n st = cl + v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(st < 0) {\n st = 0;\n }\n else if(st > 1) {\n st = 1;\n }\n }\n currentStyle[k] = st;\n}\n\n// 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\nfunction calPath(k, v, percent, st, cl, frame, currentStyle) {\n let t = 1 - percent;\n if(v.length === 8) {\n currentStyle[TRANSLATE_X] = {\n v: v[0].v * t * t * t\n + 3 * v[2].v * percent * t * t\n + 3 * v[4].v * percent * percent * t\n + v[6].v * percent * percent * percent,\n u: PX,\n };\n currentStyle[TRANSLATE_Y] = {\n v: v[1].v * t * t * t\n + 3 * v[3].v * percent * t * t\n + 3 * v[5].v * percent * percent * t\n + v[7].v * percent * percent * percent,\n u: PX,\n };\n }\n else if(v.length === 6) {\n currentStyle[TRANSLATE_X] = {\n v: v[0].v * t * t\n + 2 * v[2].v * percent * t\n + v[4].v * percent * percent,\n u: PX,\n };\n currentStyle[TRANSLATE_Y] = {\n v: v[1].v * t * t\n + 3 * v[3].v * percent * t\n + v[5].v * percent * percent,\n u: PX,\n };\n }\n}\n\nfunction calLength(k, v, percent, st, cl, frame, currentStyle) {\n st.v = cl + v * percent;\n}\n\nfunction calGradient(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n let cli = cl[i].v;\n if(st2.u === GRADIENT) {\n st2 = st2.v;\n let [c, d, p, z] = v2;\n for(let j = 0, len = Math.min(st2.v.length, c.length); j < len; j++) {\n let a = st2.v[j];\n let b = c[j];\n a[0][0] = cli.v[j][0][0] + b[0][0] * percent;\n a[0][1] = cli.v[j][0][1] + b[0][1] * percent;\n a[0][2] = cli.v[j][0][2] + b[0][2] * percent;\n a[0][3] = cli.v[j][0][3] + b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1].v = cli.v[j][1].v + b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] = cli.d[0] + d[0] * percent;\n st2.d[1] = cli.d[1] + d[1] * percent;\n st2.d[2] = cli.d[2] + d[2] * percent;\n st2.d[3] = cli.d[3] + d[3] * percent;\n }\n else {\n st2.d = cli.d + d * percent;\n }\n }\n else if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] = cli.z[0] + z[0] * percent;\n st2.z[1] = cli.z[1] + z[1] * percent;\n st2.z[2] = cli.z[2] + z[2] * percent;\n st2.z[3] = cli.z[3] + z[3] * percent;\n st2.z[4] = cli.z[4] + z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0].v = cli.p[0].v + p[0] * percent;\n st2.p[1].v = cli.p[1].v + p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d = cli.d + d * percent;\n st2.p[0][0] = cli.p[0] + p[0] * percent;\n st2.p[1][0] = cli.p[1] + p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2 = st2.v;\n st2[0] = cli[0] + v2[0] * percent;\n st2[1] = cli[1] + v2[1] * percent;\n st2[2] = cli[2] + v2[2] * percent;\n st2[3] = cli[3] + v2[3] * percent;\n }\n });\n}\n\n// color可能超限[0,255],但浏览器已经做了限制,无需关心\nfunction calColor(k, v, percent, st, cl, frame, currentStyle) {\n let t = st.v;\n t[0] = cl[0] + v[0] * percent;\n t[1] = cl[1] + v[1] * percent;\n t[2] = cl[2] + v[2] * percent;\n t[3] = cl[3] + v[3] * percent;\n}\n\n/**\n * 最后一帧无法计算transition,对整体keys的style进行对比\n */\nfunction calLastStyle(style, target, keys) {\n let currentStyle = target.__currentStyle, currentProps = target.__currentProps, res = [];\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i], v = style[k];\n let isGeom = GEOM.hasOwnProperty(k);\n if(!equalStyle(k, v, isGeom ? currentProps[k] : currentStyle[k], target)) {\n if(isGeom) {\n currentProps[k] = v;\n }\n else {\n currentStyle[k] = v;\n }\n res.push(k);\n }\n }\n return res;\n}\n\nfunction gotoOverload(animation, options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n options = options || {};\n if(!isNil(options.areaStart)) {\n animation.areaStart = options.areaStart;\n }\n if(!isNil(options.areaDuration)) {\n animation.areaDuration = options.areaDuration;\n }\n return { options, cb };\n}\n\nfunction frameCb(self) {\n self.emit(Event.FRAME, self.__isChange);\n if(self.__firstPlay) {\n self.__firstPlay = false;\n self.emit(Event.PLAY);\n }\n let cb = self.__playCb;\n if(isFunction(cb)) {\n cb(self.__isChange);\n // 清理要检查,gotoAndStop()这种cb回调中直接再次调用goto的话cb会不一致不能删除\n if(self.__playCb === cb) {\n self.__playCb = null;\n }\n }\n}\n\nlet uuid = 0;\n\nclass Animation extends Event {\n constructor(target, list, options) {\n super();\n this.__id = uuid++;\n list = clone(list || []);\n if(Array.isArray(list)) {\n list = list.filter(item => item && isObject(item));\n }\n // 动画过程另外一种形式,object描述k-v形式\n else if(list && isObject(list)) {\n let nl = [];\n Object.keys(list).forEach(k => {\n let v = list[k];\n if(Array.isArray(v)) {\n for(let i = 0, len = v.length; i < len; i++) {\n let o = nl[i] = nl[i] || {\n offset: i / (len - 1),\n };\n o[k] = v[i];\n }\n }\n });\n list = nl;\n }\n else {\n list = [];\n }\n if(isNumber(options)) {\n this.__options = {\n duration: options,\n };\n options = this.__options;\n }\n let op = this.__options = options || {\n duration: 0,\n };\n this.__begin = true;\n this.__playState = 'idle';\n this.__target = target;\n this.__root = target.root;\n this.__isChange = false; // 每帧是否有变化,无变化不刷新也会触发frame事件\n this.__firstPlay = true;\n this.__firstEnter = true;\n let iterations = this.iterations = op.iterations;\n let duration = this.duration = op.duration;\n let { frames, framesR, keys, originStyle } = this.__init(list, iterations, duration, op.easing, target);\n this.__frames = frames;\n this.__framesR = framesR;\n this.__keys = keys;\n this.__originStyle = originStyle;\n this.__isDelay = false;\n this.__outBeginDelay = false;\n this.__playCount = 0;\n let fps = parseInt(op.fps) || 0;\n if(fps <= 0) {\n fps = 60;\n }\n this.fps = fps;\n this.spfLimit = op.spfLimit;\n this.delay = op.delay;\n this.endDelay = op.endDelay;\n this.playbackRate = op.playbackRate;\n this.fill = op.fill;\n this.iterations = op.iterations;\n this.direction = op.direction;\n this.easing = op.easing;\n this.areaStart = op.areaStart; // ae中的功能,播放中间一段动画,为0忽略\n this.areaDuration = op.areaDuration;\n this.__currentFrames = {\n reverse: true,\n 'alternate-reverse': true,\n alternateReverse: true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n let controller = op.controller;\n if(controller instanceof Controller) {\n controller.add(this);\n }\n else if(controller) {\n this.addControl();\n }\n // 时间戳\n this.__timestamp = frame.__now;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return { frames: [], framesR: [], keys: [], originStyle: {} };\n }\n // 标准化帧\n let frames = Animation.parse(list, duration, easing, target);\n // 为方便两帧之间计算变化,强制统一所有帧的css属性相同,没有写的为节点的当前样式currentStyle\n let keys = Animation.unify(frames, target);\n Animation.inherit(frames, keys, target);\n let framesR = clone(frames).reverse();\n // 存储原本样式以便恢复用\n let { __currentStyle, __currentProps } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(target.tagName, k)) {\n originStyle[k] = __currentProps[k];\n }\n originStyle[k] = __currentStyle[k];\n });\n originStyle = cloneStyle(originStyle, keys);\n // 再计算两帧之间的变化,存入transition/fixed属性\n Animation.calTransition(frames, keys, target);\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item.time = duration - item.time;\n });\n Animation.calTransition(framesR, keys, target);\n return { frames, framesR, keys, originStyle };\n }\n\n __clean(isFinish) {\n this.__cancelTask();\n this.__nextTime = 0;\n if(isFinish) {\n // gotoAndStop到一个很大的时间的话,也需要防止超过\n this.__currentTime = this.__delay + this.__duration * this.__iterations + this.__endDelay;\n this.__playState = 'finished';\n }\n else {\n this.__playCount = this.__currentTime = 0;\n this.__playState = 'idle';\n }\n }\n\n play(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'running') {\n return this;\n }\n this.__cancelTask();\n this.__playCb = cb;\n this.__playState = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n this.__firstPlay = true;\n this.__firstEnter = true;\n this.__playCount = 0;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!this.__enterFrame) {\n this.__enterFrame = true;\n let framesR = this.__framesR;\n let direction = this.__direction;\n // 初始化根据方向确定帧序列\n this.__currentFrames = {\n reverse: true,\n 'alternate-reverse': true,\n alternateReverse: true,\n }.hasOwnProperty(direction) ? framesR : frames;\n this.__currentTime = this.__nextTime = this.__fpsTime = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n // frame.offFrame(this);\n frame.onFrame(this);\n this.__startTime = frame.__now;\n this.__end = false;\n return this;\n }\n\n __before(diff) {\n this.__timestamp = frame.__now;\n let target = this.__target;\n let fps = this.__fps;\n let currentFrames = this.__currentFrames;\n let iterations = this.__iterations;\n let stayBegin = this.__stayBegin;\n let stayEnd = this.__stayEnd;\n let delay = this.__delay;\n let areaStart = this.__areaStart;\n let areaDuration = this.__areaDuration;\n let root = this.__root;\n let duration = this.__duration;\n let endDelay = this.__endDelay;\n let length = currentFrames.length;\n let playbackRate = this.__playbackRate;\n let spfLimit = this.__spfLimit;\n let currentTime = this.__currentTime = this.__nextTime;\n let lastFrame = this.__currentFrame;\n let dur = areaDuration ? Math.min(duration, areaDuration) : duration;\n this.__isChange = false;\n // 定帧限制每帧时间间隔最大为spf\n if(spfLimit) {\n if(spfLimit === true) {\n diff = Math.min(diff, 1000 / fps);\n }\n else if(spfLimit > 0) {\n diff = Math.min(diff, spfLimit);\n }\n }\n // 播放时间累加,并且考虑播放速度加成\n if(playbackRate !== 1 && playbackRate > 0) {\n diff *= playbackRate;\n }\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n this.__nextTime += diff;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!this.__firstEnter && fps < 60) {\n diff = this.__fpsTime += diff;\n if(diff < 1000 / fps) {\n this.__inFps = true;\n return;\n }\n this.__fpsTime = 0;\n }\n this.__firstEnter = false;\n // delay仅第一次生效等待\n if(currentTime < delay - areaStart) {\n if(stayBegin && !this.__isDelay) {\n let currentFrame = this.__currentFrame = currentFrames[0];\n let keys = calLastStyle(currentFrame.style, target, this.__keys);\n // 特殊处理,将ts上的cs指向当前currentStyle,一些继承样式如color被更新,否则delay后计算会报错\n let transition = currentFrame.transition;\n if(transition) {\n let currentStyle = target.__currentStyle;\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n item.cs = currentStyle[item.k] = item.st;\n }\n }\n this.__isChange = !!keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, null);\n }\n this.__begin = false; // 默认是true,delay置false防触发\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n this.__outBeginDelay = true;\n this.__isDelay = true;\n return;\n }\n this.__isDelay = false;\n // 减去delay,计算在哪一帧\n currentTime -= delay - areaStart;\n if(this.__outBeginDelay) {\n this.__outBeginDelay = false;\n this.__begin = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let playCount = Math.min(iterations - 1, Math.floor(currentTime / dur));\n currentTime -= dur * playCount;\n // 如果发生轮换,需重新确定正反向\n if(this.__playCount < playCount) {\n this.__begin = true;\n this.__playCount = playCount;\n let direction = this.__direction;\n let frames = this.__frames;\n let framesR = this.__framesR;\n // 有正反向播放需要重设帧序列\n if(direction === 'alternate' || direction === 'alternate-reverse' || direction === 'alternateReverse') {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = this.__currentFrames = isEven ? frames : framesR;\n }\n else {\n currentFrames = this.__currentFrames = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(length === 2) {\n i = currentTime < dur ? 0 : 1;\n frameTime = dur;\n }\n else {\n i = Animation.binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i].time;\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(length === 2) {\n percent = currentTime / duration; // 不能是dur,按照原本计算\n }\n else {\n let total = currentFrames[i + 1].time - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i];\n let notSameFrame = lastFrame !== currentFrame;\n // 对比前后两帧是否为同一关键帧,不是则清除之前关键帧上的percent标识为-1,这样可以识别跳帧和本轮第一次进入此帧\n if(notSameFrame) {\n lastFrame && (lastFrame.lastPercent = -1);\n this.__currentFrame = currentFrame;\n }\n /** 这里要考虑全几种场景:\n * 1. 单次播放无endDelay且fill不停留(有/无差异,下同)\n * 2. 单次播放无endDelay且fill停留\n * 3. 单次播放有endDelay且fill不停留\n * 4. 单次播放有endDelay且fill停留\n * 5. 多次播放无endDelay且fill不停留(尾次/非尾次,下同)\n * 6. 多次播放无endDelay且fill停留\n * 7. 多次播放有endDelay且fill不停留\n * 8. 多次播放有endDelay且fill停留\n */\n let needClean;\n let keys;\n if(isLastFrame) {\n inEndDelay = currentTime < dur + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n keys = calLastStyle(currentFrame.style, target, this.__keys);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n keys = calLastStyle(this.__originStyle, target, this.__keys);\n currentFrame = null; // 特殊清空,genBeforeRefresh()时不传过去\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n this.__nextEnd = true;\n if(!inEndDelay) {\n this.__playCount++;\n this.__finished = true;\n frame.offFrame(this);\n needClean = true;\n this.__nextTime = 0;\n }\n }\n else {\n keys = Animation.calIntermediateStyle(currentFrame, percent, target, notSameFrame);\n }\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, null);\n if(needClean) {\n let playCb = this.__playCb;\n this.__clean(true);\n // 丑陋的做法,防止gotoAndStop()这样的cb被clean()掉\n if(playCb) {\n this.__playCb = playCb;\n }\n }\n }\n\n __after() {\n if(this.__inFps) {\n this.__inFps = false;\n return;\n }\n frameCb(this);\n if(this.__begin) {\n this.__begin = false;\n this.emit(Event.BEGIN, this.__playCount);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(this.__nextEnd && !this.__end) {\n this.__end = true;\n this.emit(Event.END, this.__playCount - 1);\n }\n if(this.__finished) {\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'finished';\n this.emit(Event.FINISH, this.__isChange);\n }\n }\n\n pause(silence) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n this.__playState = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'finished') {\n if(isFunction(cb)) {\n cb();\n }\n return this;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n this.__clean(true);\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'finished';\n let root = this.__root;\n if(root) {\n let target = this.__target;\n let style;\n // 是否停留在最后一帧\n let currentFrame = null;\n if(this.__stayEnd) {\n let framesR = this.__framesR;\n let direction = this.__direction;\n let iterations = this.__iterations;\n if('reverse'.indexOf(direction) > -1) {\n [frames, framesR] = [framesR, frames];\n }\n if(iterations === Infinity || iterations % 2) {\n currentFrame = frames[frames.length - 1];\n style = currentFrame.style;\n }\n else {\n currentFrame = framesR[framesR.length - 1];\n style = currentFrame.style;\n }\n }\n else {\n style = this.__originStyle;\n }\n this.__currentFrame = currentFrame;\n let keys = calLastStyle(style, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, () => {\n frameCb(this);\n this.emit(Event.FINISH, this.__isChange);\n if(isFunction(cb)) {\n cb(this.__isChange);\n }\n });\n }\n return this;\n }\n\n cancel(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'idle') {\n if(isFunction(cb)) {\n cb();\n }\n return this;\n }\n this.__clean();\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'idle';\n this.__currentFrame = null;\n let root = this.__root;\n if(root) {\n let target = this.__target;\n let keys = calLastStyle(this.__originStyle, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, null,() => {\n frameCb(this);\n this.emit(Event.CANCEL, this.__isChange);\n if(isFunction(cb)) {\n cb(this.__isChange);\n }\n });\n }\n return this;\n }\n\n gotoAndPlay(v, options, cb) {\n let t = gotoOverload(this, options, cb);\n options = t.options;\n cb = t.cb;\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let frames = this.__frames;\n let delay = this.__delay;\n let areaStart = this.__areaStart;\n let areaDuration = this.__areaDuration;\n let endDelay = this.__endDelay;\n let dur = areaDuration ? Math.min(duration, areaDuration) : duration;\n if(isDestroyed || dur <= 0 || frames.length < 1) {\n return this;\n }\n // 计算出时间点直接累加播放\n this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > dur + delay - areaStart + endDelay) {\n return this.finish(cb);\n }\n return this.play(cb);\n }\n\n gotoAndStop(v, options, cb) {\n let t = gotoOverload(this, options, cb);\n options = t.options;\n cb = t.cb;\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let frames = this.__frames;\n let delay = this.__delay;\n let areaStart = this.__areaStart;\n let areaDuration = this.__areaDuration;\n let endDelay = this.__endDelay;\n let dur = areaDuration ? Math.min(duration, areaDuration) : duration;\n if(isDestroyed || dur <= 0 || frames.length < 1) {\n return this;\n }\n v = this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > dur + delay - areaStart + endDelay) {\n return this.finish(cb);\n }\n // 先play一帧,回调里模拟暂停\n return this.play(() => {\n this.__playState = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb();\n }\n });\n }\n\n // 返回不包含delay且去除多轮的时间\n __goto(v, isFrame, excludeDelay) {\n let iterations = this.__iterations;\n let duration = this.__duration;\n let areaDuration = this.__areaDuration;\n let dur = areaDuration ? Math.min(duration, areaDuration) : duration;\n this.__playState = 'paused';\n if(isNaN(v) || v < 0) {\n throw new Error('Param of gotoAnd(Play/Stop) is illegal: ' + v);\n }\n if(isFrame) {\n v = (v - 1) / this.spf;\n }\n if(excludeDelay) {\n v += this.__delay;\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n this.__nextTime = v;\n v -= this.__delay;\n // 超过时间长度需要累加次数,这里可以超过iterations,因为设定也许会非常大\n let playCount = 0;\n while(v >= dur && playCount < iterations - 1) {\n playCount++;\n v -= dur;\n }\n this.__playCount = playCount;\n // 防止play()重置时间和当前帧组,提前计算好\n this.__enterFrame = true;\n let frames = this.__frames;\n let framesR = this.__framesR;\n let direction = this.__direction;\n if({\n alternate: true,\n 'alternate-reverse': true,\n alternateReverse: true,\n }.hasOwnProperty(direction)) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n this.__currentFrames = isEven ? frames : framesR;\n }\n else {\n this.__currentFrames = isEven ? framesR : frames;\n }\n }\n return v;\n }\n\n addControl() {\n let root = this.__root;\n if(!root) {\n return;\n }\n let ac = root.animateController;\n if(ac) {\n ac.add(this);\n }\n }\n\n removeControl() {\n let root = this.__root;\n if(!root) {\n return;\n }\n let ac = root.__animateController;\n if(ac) {\n ac.remove(this);\n }\n }\n\n __setTarget(target) {\n this.__target = target;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__playCb = null;\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n this.removeControl();\n this.__clean();\n this.__target = this.__root = null;\n this.__startTime = 0;\n this.__isDestroyed = true;\n }\n\n __checkModify() {\n if(this.__playState !== 'idle' && this.__playState !== 'finished') {\n inject.warn('Modification will not come into effect when animation is running');\n }\n }\n\n get id() {\n return this.__id;\n }\n\n get target() {\n return this.__target;\n }\n\n get root() {\n return this.__root;\n }\n\n get keys() {\n return this.__keys;\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__duration;\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__duration !== v) {\n this.__duration = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__delay;\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__delay !== v) {\n this.__delay = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__endDelay;\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__endDelay !== v) {\n this.__endDelay = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__fps;\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n if(this.__fps !== v) {\n if(v <= 0) {\n v = 60;\n }\n this.__fps = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__iterations;\n }\n\n set iterations(v) {\n if(v === Infinity || util.isString(v) && v.toLowerCase() === 'infinity') {\n v = Infinity;\n }\n else {\n v = parseInt(v);\n if(isNaN(v) || v < 0) {\n v = 1;\n }\n }\n if(this.__iterations !== v) {\n this.__iterations = v;\n }\n return v;\n }\n\n get fill() {\n return this.__fill;\n }\n\n set fill(v) {\n v = v || 'none';\n if(this.__fill !== v) {\n this.__fill = v;\n this.__checkModify();\n }\n this.__stayBegin = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n this.__stayEnd = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__direction;\n }\n\n set direction(v) {\n v = v || 'normal';\n if(this.__direction !== v) {\n this.__direction = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__frames;\n }\n\n get framesR() {\n return this.__framesR;\n }\n\n get playbackRate() {\n return this.__playbackRate;\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n if(this.__playbackRate !== v) {\n this.__playbackRate = v;\n }\n return v;\n }\n\n get easing() {\n return this.__easing;\n }\n\n set easing(v) {\n this.__easing = v;\n }\n\n get startTime() {\n return this.__startTime;\n }\n\n get currentTime() {\n return this.__currentTime;\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__currentTime !== v) {\n this.__currentTime = v;\n this.__nextTime = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__nextTime;\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__nextTime !== v) {\n this.__nextTime = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__timestamp;\n }\n\n get pending() {\n return this.__playState !== 'running';\n }\n\n get finished() {\n return this.__playState === 'finished';\n }\n\n get playState() {\n return this.__playState;\n }\n\n get playCount() {\n return this.__playCount;\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n if(this.__playCount !== v) {\n this.__playCount = v;\n }\n return v;\n }\n\n get areaStart() {\n return this.__areaStart;\n }\n\n set areaStart(v) {\n v = Math.max(0, parseInt(v) || 0);\n if(this.__areaStart !== v) {\n this.__areaStart = v;\n }\n return v;\n }\n\n get areaDuration() {\n return this.__areaDuration;\n }\n\n set areaDuration(v) {\n v = Math.max(0, parseInt(v) || 0);\n if(this.__areaDuration !== v) {\n this.__areaDuration = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n get animating() {\n let playState = this.__playState;\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || this.__stayEnd || this.__stayBegin;\n }\n\n get spfLimit() {\n return this.__spfLimit;\n }\n\n set spfLimit(v) {\n if(util.isNumber(v) || /^\\d/.test(v)) {\n v = Math.max(0, parseInt(v) || 0);\n }\n else {\n v = !!v;\n }\n if(this.__spfLimit !== v) {\n this.__spfLimit = v;\n }\n return v;\n }\n\n static parse(list, duration, easing, target) {\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let current = list[i];\n if(current.hasOwnProperty('offset')) {\n current.offset = parseFloat(current.offset) || 0;\n current.offset = Math.max(0, current.offset);\n current.offset = Math.min(1, current.offset);\n // 超过区间[0,1]\n if(isNaN(current.offset) || current.offset < 0 || current.offset > 1) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n // <=前面的\n else if(current.offset <= offset) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n }\n // 缩写处理\n Object.keys(current).forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr.toFull(current, k);\n }\n });\n // 检查key合法性\n Object.keys(current).forEach(k => {\n if(k !== 'easing' && k !== 'offset' && !change.isValid(target && target.tagName, k)) {\n delete current[k];\n }\n });\n }\n // 只有1帧复制出来变成2帧方便运行\n if(list.length === 1) {\n list[0] = clone(list[0]);\n if(list[0].offset === 1) {\n list.unshift({\n offset: 0,\n });\n }\n else {\n let copy = clone(list[0]);\n copy.offset = 1;\n list.push(copy);\n }\n }\n // 强制clone防止同引用\n else {\n list.forEach((item, i) => {\n list[i] = clone(item);\n });\n }\n // 首尾时间偏移强制为[0, 1],不是的话前后加空帧\n let first = list[0];\n if(first.hasOwnProperty('offset') && first.offset > 0) {\n first = {\n offset: 0,\n };\n list.unshift(first);\n }\n else {\n first.offset = 0;\n }\n let last = list[list.length - 1];\n if(last.hasOwnProperty('offset') && last.offset < 1) {\n last = {\n offset: 1,\n };\n list.push(last);\n }\n else {\n last.offset = 1;\n }\n // 计算没有设置offset的帧\n for(let i = 1, len = list.length; i < len; i++) {\n let start = list[i];\n // 从i=1开始offset一定>0,找到下一个有offset的,均分中间无声明的\n if(!start.hasOwnProperty('offset')) {\n let end;\n let j = i + 1;\n for(; j < len; j++) {\n end = list[j];\n if(end.hasOwnProperty('offset')) {\n break;\n }\n }\n let num = j - i + 1;\n start = list[i - 1];\n let per = (end.offset - start.offset) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.offset = start.offset + per * (k + 1 - i);\n }\n i = j;\n }\n }\n let frames = [];\n for(let i = 0, len = list.length; i < len; i++) {\n frames[i] = framing(list[i], duration, easing);\n }\n return frames;\n }\n\n static unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item.style;\n Object.keys(style).forEach(k => {\n let v = style[k];\n // 未定义的过滤掉,null空有意义\n if(v !== undefined && !hash.hasOwnProperty(k)) {\n hash[k] = true;\n // geom为属性字符串,style都为枚举int\n if(!GEOM.hasOwnProperty(k)) {\n k = parseInt(k);\n }\n // path动画要转为translateXY,所以手动添加,使2帧之间存在过渡,有可能之前已存在这个动画,可忽视\n if(k === TRANSLATE_PATH) {\n if(!hash.hasOwnProperty(TRANSLATE_X)) {\n keys.push(TRANSLATE_X);\n }\n if(!hash.hasOwnProperty(TRANSLATE_Y)) {\n keys.push(TRANSLATE_Y);\n }\n hash[TRANSLATE_X] = hash[TRANSLATE_Y] = true;\n }\n keys.push(k);\n }\n });\n });\n // 添补没有声明完全的关键帧属性为节点当前值\n frames.forEach(item => {\n let style = item.style;\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n if(target) {\n style[k] = clone(target.getProps(k));\n }\n }\n else {\n if(k === TRANSLATE_X && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = clone(style[TRANSLATE_PATH][0]);\n }\n else if(k === TRANSLATE_Y && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = clone(style[TRANSLATE_PATH][1]);\n }\n else if(target) {\n style[k] = cloneStyle(target.__currentStyle, [k])[k];\n }\n }\n }\n });\n });\n return keys;\n }\n\n static inherit(frames, keys, target) {\n let computedStyle = target && target.__computedStyle;\n frames.forEach(item => {\n let style = item.style;\n keys.forEach(k => {\n let v = style[k];\n // geom的属性可能在帧中没有\n if(isNil(v)) {\n return;\n }\n if(k === TRANSFORM) {\n if(target) {\n let ow = target.__outerWidth;\n let oh = target.__outerHeight;\n let m = tf.calMatrix(v, ow, oh, target.__root);\n style[k] = [{ k: MATRIX, v: m }];\n }\n }\n else if(v.u === INHERIT && computedStyle) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = { v: util.rgba2int(computedStyle[k]), u: RGBA };\n }\n else if(isLengthKey(k)) {\n style[k] = { v: computedStyle[k], u: PX };\n }\n else if(k === FONT_WEIGHT) {\n style[k] = { v: computedStyle[k], u: NUMBER };\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = { v: computedStyle[k], u: STRING };\n }\n }\n });\n });\n }\n\n static calTransition(frames, keys, target) {\n let prev = frames[0];\n prev.clone = cloneStyle(prev.style, keys);\n for(let i = 1, len = frames.length; i < len; i++) {\n let next = frames[i];\n next.clone = cloneStyle(next.style, keys);\n prev = calFrame(prev, next, keys, target);\n }\n }\n\n static binarySearch(i, j, time, frames) {\n while(i < j) {\n if(i === j - 1) {\n if(frames[j].time <= time) {\n return j;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame.time === time) {\n return middle;\n }\n if(frame.time > time) {\n j = Math.max(middle - 1, i);\n }\n else {\n i = Math.min(middle, j);\n }\n }\n return i;\n }\n\n static calIntermediateStyle(frame, percent, target, notSameFrame) {\n let style = frame.style;\n let transition = frame.transition;\n let timingFunction = frame.timingFunction;\n let allInFn = frame.allInFn;\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n // 同一关键帧同一percent可以不刷新,比如diff为0时,或者steps情况,离开会清空\n if(frame.lastPercent === percent) {\n return [];\n }\n frame.lastPercent = percent;\n let currentStyle = target.__currentStyle, res = frame.keys;\n // 特殊性能优化,for拆开v8会提升不少\n if(allInFn) {\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, cs = item.cs, cl = item.cl, fn = item.fn;\n // 同一帧内计算可避免赋值currentStyle\n if(notSameFrame) {\n cs = item.cs = currentStyle[k] = item.st;\n }\n fn(k, v, percent, cs, cl, frame, currentStyle);\n }\n }\n else {\n let currentProps = target.__currentProps, modify;\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, cs = item.cs, st = item.st, cl = item.cl, fn = item.fn;\n if(fn) {\n // 同一帧内计算可避免赋值currentStyle\n if(notSameFrame) {\n cs = item.cs = currentStyle[k] = item.st;\n }\n fn(k, v, percent, cs, cl, frame, currentStyle);\n }\n else if(GEOM.hasOwnProperty(k)) {\n let tagName = target.tagName;\n if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calIncrease)) {\n let fn = GEOM[k][tagName].calIncrease;\n if(target.isMulti) {\n st = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n st = fn(st, v, percent);\n }\n }\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n let cli = cl[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n let o2 = o[j];\n let n2 = n[j];\n if(!isNil(o2) && !isNil(n2)) {\n for(let k = 0, len3 = Math.min(o2.length, n2.length); k < len3; k++) {\n if(!isNil(o2[k]) && !isNil(n2[k])) {\n o2[k] = cli[j][k] + n2[k] * percent;\n }\n }\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n v.forEach((item, i) => {\n let st2 = st[i];\n if(!isNil(item[0]) && !isNil(st2[0])) {\n st2[0] = cl[i][0] + item[0] * percent;\n }\n if(!isNil(item[1]) && !isNil(st2[1])) {\n st2[1] = cl[i][1] + item[1] * percent;\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[i] = cl[i] + item * percent;\n }\n });\n }\n }\n else {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n if(!isNil(o[j]) && !isNil(n[j])) {\n o[j] = cl[i][j] + n[j] * percent;\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(!isNil(st[0]) && !isNil(v[0])) {\n st[0] = cl[0] + v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] = cl[1] + v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n st = cl + v * percent;\n }\n }\n }\n currentProps[k] = st;\n }\n // string等的直接量,在不同帧之间可能存在变化,同帧变化后不再改变\n else {\n if(currentStyle[k] !== st) {\n currentStyle[k] = st;\n }\n else {\n if(!modify) {\n modify = true;\n res = res.slice(0);\n }\n let j = res.indexOf(k);\n res.splice(j, 1);\n }\n }\n }\n // 无变化的也得检查是否和当前相等,防止跳到一个不变化的帧上,而前一帧有变化的情况,allInFn不会有这里\n let fixed = frame.fixed;\n for(let i = 0, len = fixed.length; i < len; i++) {\n let k = fixed[i];\n let isGeom = GEOM.hasOwnProperty(k);\n if(!equalStyle(k, style[k], isGeom ? currentProps[k] : currentStyle[k], target)) {\n if(GEOM.hasOwnProperty(k)) {\n currentProps[k] = style[k];\n }\n else {\n currentStyle[k] = style[k];\n }\n if(!modify) {\n modify = true;\n res = res.slice(0);\n }\n res.push(k);\n }\n }\n }\n return res;\n }\n}\n\nexport default Animation;\n","import mode from '../refresh/mode';\nimport geom from '../math/geom';\nimport blur from '../math/blur';\nimport util from '../util/util';\nimport painter from '../util/painter';\n\nconst { int2rgba } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBoxShadow(xom, renderMode, ctx, data, x1, y1, x2, y2, w, h, dx = 0, dy = 0) {\n x1 += dx;\n y1 += dy;\n x2 += dx;\n y2 += dy;\n let [x, y, sigma, spread, color, inset] = data;\n let c = int2rgba(color);\n let n = Math.abs(sigma) * 2 + Math.abs(spread) * 2 + Math.abs(x) * 2 + Math.abs(y) * 2;\n // box本身坐标顺时针\n let box = [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y2],\n [x1, y1],\n ];\n // 算上各种偏移/扩散的最外层坐标,且逆时针\n let outer = [\n [x1 - n, y1 - n],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n ];\n if(color[3] > 0) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.save();\n ctx.beginPath();\n // inset裁剪box外面\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n // 是否相交判断需要绘制\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n // 扩散区域类似边框填充\n if(spread) {\n canvasPolygon(ctx, cross);\n canvasPolygon(ctx, box.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, box);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, cross);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n // 画在外围的空心矩形,宽度要比blur大,n考虑了这一情况取了最大值\n canvasPolygon(ctx, [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ]);\n }\n else {\n canvasPolygon(ctx, box);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ]);\n }\n }\n // outset需裁减掉box本身的内容,clip()非零环绕显示box外的阴影内容,fill()绘制在内无效\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n // 分为是否有spread,因模糊成本spread区域将没有模糊\n if(spread) {\n // 扩散区域类似边框填充\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, blurBox);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n // 阴影部分看相交情况裁剪,有相交时逆时针绘制相交区域即可排除之\n if(cross) {\n canvasPolygon(ctx, [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse());\n }\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, blurBox);\n }\n else {\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, box);\n }\n }\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n }\n else if(renderMode === mode.SVG) {\n let d = blur.outerSize(sigma);\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n xom.__cacheDefs.push(v);\n let filter = ctx.add(v);\n let v2 = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross) + svgPolygon(box.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v2);\n xom.__cacheDefs.push(v2);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(blurBox.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', (cross ? svgPolygon([\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse()) : '')\n + svgPolygon(box) + svgPolygon(blurBox) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n }\n }\n}\n\nexport default {\n renderBoxShadow,\n};\n","const hash = {};\n\nfunction mbmName(v) {\n if(v) {\n if(hash.hasOwnProperty(v)) {\n return hash[v];\n }\n return hash[v] = v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n if(v === 'normal') {\n return false;\n }\n return v === 'multiply'\n || v === 'screen'\n || v === 'overlay'\n || v === 'darken'\n || v === 'lighten'\n || v === 'colorDodge'\n || v === 'color-dodge'\n || v === 'colorBurn'\n || v === 'color-burn'\n || v === 'hardLight'\n || v === 'hard-light'\n || v === 'softLight'\n || v === 'soft-light'\n || v === 'difference'\n || v === 'exclusion'\n || v === 'hue'\n || v === 'saturation'\n || v === 'color'\n || v === 'luminosity';\n}\n\nexport default {\n mbmName,\n isValidMbm,\n};\n","import Node from './Node';\nimport Component from './Component';\nimport inline from './inline';\nimport Ellipsis from './Ellipsis';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport gradient from '../style/gradient';\nimport border from '../style/border';\nimport css from '../style/css';\nimport bg from '../style/bg';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Animation from '../animate/Animation';\nimport frame from '../animate/frame';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport mode from '../refresh/mode';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport font from '../style/font';\nimport bs from '../style/bs';\nimport mbm from '../style/mbm';\nimport reset from '../style/reset';\n\nconst { svgPolygon } = painter;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { normalize, equalStyle } = css;\n\nconst {\n STYLE_KEY,\n STYLE_RV_KEY,\n style2Upper,\n STYLE_KEY: {\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n WIDTH,\n HEIGHT,\n MATRIX,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n TRANSFORM,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n SKEW_X,\n SKEW_Y,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n ROTATE_3D,\n TRANSFORM_ORIGIN,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_REPEAT,\n BOX_SHADOW,\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BORDER_TOP_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n FONT_STYLE,\n COLOR,\n VISIBILITY,\n POINTER_EVENTS,\n BORDER_TOP,\n BORDER_RIGHT,\n BORDER_BOTTOM,\n BORDER_LEFT,\n BACKGROUND_CLIP,\n FONT_SIZE,\n FONT_FAMILY,\n LINE_HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n FONT_WEIGHT,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n TEXT_ALIGN,\n LETTER_SPACING,\n WHITE_SPACE,\n WRITING_MODE,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n BOX_SIZING,\n FONT_SIZE_SHRINK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, NUMBER, RGBA, STRING, REM, VW, VH, VMAX, VMIN, DEG, GRADIENT } = unit;\nconst { int2rgba, rgba2int, joinArr, isNil, isFunction } = util;\nconst { calRelative, calNormalLineHeight, calFontFamily, spreadBoxShadow, spreadFilter } = css;\nconst { GEOM } = change;\nconst { mbmName, isValidMbm } = mbm;\nconst { point2d, multiply,\n multiplyRotateX, multiplyRotateY, multiplyRotateZ,\n multiplySkewX, multiplySkewY,\n multiplyScaleX, multiplyScaleY, multiplyScaleZ } = mx;\n\nconst {\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n ROTATE_Z: RZ,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n SCALE,\n TRANSFORM_ALL,\n CACHE,\n MASK,\n} = level;\nconst { d2r } = geom;\nconst { calRotateX, calRotateY, calRotateZ, calRotate3d } = tf;\n\nfunction getFirstEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = 0; i < length; i++) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren && child.flowChildren.length) {\n n += getFirstEmptyInlineWidth(child);\n break;\n }\n else if(child.__isInline) {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nfunction getLastEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = length - 1; i >= 0; i--) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren && child.flowChildren.length) {\n n += getLastEmptyInlineWidth(child);\n break;\n }\n else {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nclass Xom extends Node {\n constructor(tagName, props = {}) {\n super();\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__tagName = tagName;\n this.__style = this.props.style || {}; // style被解析后的k-v形式\n this.__currentStyle = []; // 动画过程中绘制一开始会merge动画样式\n this.__computedStyle = []; // 类似getComputedStyle()将currentStyle计算好数值赋给\n this.__listener = {};\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n this.addEventListener(k, v);\n }\n });\n this.__animationList = [];\n this.__loadBgi = {\n // 刷新回调函数,用以destroy取消用\n cb: function() {\n },\n };\n this.__cacheStyle = []; // 是否缓存重新计算computedStyle的样式key\n this.__cacheDefs = []; // svg专用,缓存渲染时使用已有的defs,diff过程用,否则会defs被清空\n let isClip = this.__clip = !!this.props.clip;\n this.__mask = isClip || !!this.props.mask;\n this.__refreshLevel = REFLOW;\n this.__limitCache = false;\n this.__isInline = false;\n this.__hasContent = false;\n this.__opacity = 1;\n this.__matrix = [];\n this.__matrixEvent = [];\n this.__perspectiveMatrix = null;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\n this.__cache = this.__cacheTotal = this.__cacheFilter = this.__cacheMask;\n this.__layoutData = null; // 缓存上次布局x/y/w/h数据\n this.__hasComputeReflow = false; // 每次布局计算缓存标,使得每次开始只computeReflow一次\n this.__parentLineBox = null; // inline时指向\n this.__fontRegister = {}; // 优先级字体尚未加载时记录回调hash,销毁时删除回调\n }\n\n __structure(lv, j) {\n let res = super.__structure(lv, j);\n if(this.__hasMask) {\n res.hasMask = this.__hasMask;\n }\n return res;\n }\n\n __modifyStruct() {}\n\n // 设置margin/padding的实际值,layout时执行,inline的垂直方向仍然计算值,但在布局时被忽略\n __mp(currentStyle, computedStyle, w) {\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left',\n ].forEach(k => {\n let a = STYLE_KEY[style2Upper('margin' + k)];\n let b = STYLE_KEY[style2Upper('padding' + k)];\n computedStyle[a] = this.__calSize(currentStyle[a], w, true);\n computedStyle[b] = this.__calSize(currentStyle[b], w, true);\n });\n }\n\n __calSize(v, w, includePercent) {\n if(v.u === PX) {\n return v.v;\n }\n else if(v.u === PERCENT) {\n if(includePercent) {\n return v.v * w * 0.01;\n }\n }\n else if(v.u === REM || v.u === REM) {\n return v.v * this.__root.computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n return v.v * this.__root.width * 0.01;\n }\n else if(v.u === VH) {\n return v.v * this.__root.height * 0.01;\n }\n else if(v.u === VMAX) {\n return v.v * Math.max(this.__root.width, this.__root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n return v.v * Math.min(this.__root.width, this.__root.height) * 0.01;\n }\n return 0;\n }\n\n __computeReflow() {\n if(this.__hasComputeReflow) {\n return;\n }\n this.__hasComputeReflow = true;\n\n let { __currentStyle: currentStyle, __computedStyle: computedStyle, __domParent: parent } = this;\n let isRoot = !parent;\n let parentComputedStyle = parent && parent.__computedStyle;\n // 继承的特殊处理,根节点用默认值\n [FONT_SIZE, FONT_FAMILY, FONT_WEIGHT, WRITING_MODE, FONT_SIZE_SHRINK].forEach(k => {\n let v = currentStyle[k];\n // ff特殊处理\n if(k === FONT_FAMILY) {\n if(v.u === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n else {\n computedStyle[k] = v.v;\n let ff = v.v.split(/\\s*,\\s*/);\n // 从左到右即声明的字体优先级\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(font.hasRegister(item)) {\n // 如果已经注册加载了,或者注册且本地支持的,说明可用\n if(font.hasLoaded(item) || inject.checkSupportFontFamily(item)) {\n break;\n }\n }\n // 不可用的都特殊记住等待注册回调__loadFontCallback\n this.__fontRegister[item] = true;\n font.onRegister(item, this);\n }\n }\n }\n else if(v.u === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // fontSize和shrinkFontSize会有%\n else if(v.u === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v.v * 0.01);\n }\n else if(v.u === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v.v);\n }\n else if(v.u === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.width * 0.01 * v.v);\n }\n else if(v.u === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.height * 0.01 * v.v);\n }\n else if(v.u === VMAX) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.max(this.root.width, this.root.height) * 0.01 * v.v);\n }\n else if(v.u === VMIN) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.min(this.root.width, this.root.height) * 0.01 * v.v);\n }\n else {\n computedStyle[k] = v.v;\n }\n });\n [\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n ].forEach(k => {\n // border-width不支持百分比\n let item = currentStyle[k];\n computedStyle[k] = this.__calSize(item, 0, false);\n });\n [\n POSITION,\n DISPLAY,\n BOX_SIZING,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n TEXT_OVERFLOW,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n // writingMode特殊判断inline\n if(parentComputedStyle && computedStyle[WRITING_MODE] !== parentComputedStyle[WRITING_MODE] && computedStyle[DISPLAY] === 'inline') {\n computedStyle[DISPLAY] = 'inlineBlock';\n }\n // 匿名块对象\n if(computedStyle[POSITION] === 'absolute' || parentComputedStyle && parentComputedStyle[DISPLAY] === 'flex') {\n if(['block', 'flex'].indexOf(computedStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = 'block';\n }\n }\n let textAlign = currentStyle[TEXT_ALIGN];\n if(textAlign.u === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign.v;\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight.u === INHERIT) {\n if(isRoot) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n else {\n let p = parent;\n let ph;\n while(p) {\n ph = p.currentStyle[LINE_HEIGHT];\n if(ph.u !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph.u) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph.u === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph.v, 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n else if(lineHeight.u === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight.v, 0) * fontSize || calNormalLineHeight(computedStyle);\n }\n // 防止为0\n else {\n let v = Math.max(this.__calSize(lineHeight, fontSize, true), 0);\n computedStyle[LINE_HEIGHT] = v || calNormalLineHeight(computedStyle);\n }\n let letterSpacing = currentStyle[LETTER_SPACING];\n if(letterSpacing.u === INHERIT) {\n computedStyle[LETTER_SPACING] = isRoot ? 0 : parentComputedStyle[LETTER_SPACING];\n }\n else {\n computedStyle[LETTER_SPACING] = this.__calSize(letterSpacing, fontSize, true);\n }\n //whiteSpace\n let whiteSpace = currentStyle[WHITE_SPACE];\n if(whiteSpace.u === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace.v;\n }\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n this.__width = this.__height = 0;\n // 布局前固定尺寸的线设置好,子元素percent尺寸要用到,flex的子元素侧轴stretch也要特殊提前处理,认为定高\n if(width.u !== AUTO) {\n this.__width = computedStyle[WIDTH] = this.__calSize(width, isRoot ? this.__width : parent.__width, true);\n }\n if(height.u !== AUTO) {\n this.__height = computedStyle[HEIGHT] = this.__calSize(height, isRoot ? this.__height : parent.__height, true);\n }\n else {\n let p = this.__domParent;\n if(p) {\n let crs = p.__currentStyle;\n let alignSelf = currentStyle[ALIGN_SELF];\n // flex的子元素stretch提前处理认为高度,以便其子元素%高度计算\n if(crs[DISPLAY] === 'flex' && p.__height) {\n if(crs[FLEX_DIRECTION].indexOf('row') > -1\n && (alignSelf === 'stretch'\n || crs[ALIGN_ITEMS] === 'stretch' && alignSelf === 'auto')) {\n this.__height = p.__height;\n }\n }\n }\n }\n }\n\n __emitFontRegister(fontFamily) {\n let node = this, fontRegister = node.__fontRegister;\n if(node.__isDestroyed) {\n return;\n }\n delete fontRegister[fontFamily];\n let { root, currentStyle } = node;\n if(!root) {\n return;\n }\n let v = currentStyle[FONT_FAMILY];\n if(v.u === INHERIT) {\n return;\n }\n let ff = v.v.split(/\\s*,\\s*/);\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(item === fontFamily) {\n // 加载成功回调可能没注册信息,需要多判断一下\n if(font.hasRegister(item)) {\n root.__addUpdate(node, null, REFLOW, null, null, null, null);\n }\n // 后面低优先级的无需再看\n return;\n }\n // 有更高优先级的已经支持了,回调刷新无效\n else if(font.hasRegister(item)\n && (font.hasLoaded(item) || inject.checkSupportFontFamily(item))) {\n return;\n }\n }\n }\n\n // dom常用的几种尺寸赋值\n __ioSize(w, h) {\n let computedStyle = this.__computedStyle;\n // 可能不传,在虚拟布局时用不到\n if(!isNil(w)) {\n this.__width = computedStyle[WIDTH] = w;\n this.__clientWidth = w += computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT];\n this.__offsetWidth = w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n this.__outerWidth = w + computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT];\n }\n if(!isNil(h)) {\n this.__height = computedStyle[HEIGHT] = h;\n this.__clientHeight = h += computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n this.__offsetHeight = h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n this.__outerHeight = h + computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM];\n }\n }\n\n // 为basis的b/min/max添加mpb,只有当b未显示指定等于w/content时才加,同时返回mpb值\n __addMBP(isDirectionRow, w, currentStyle, computedStyle, res, isDirectItem) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BOX_SIZING]: boxSizing,\n } = currentStyle;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n if(isDirectionRow) {\n let m = this.__calSize(marginLeft, w, isDirectItem)\n + this.__calSize(marginRight, w, isDirectItem);\n let bp = 0;\n if(isDirectItem || boxSizing === 'contentBox') {\n bp = this.__calSize(paddingLeft, w, isDirectItem)\n + this.__calSize(paddingRight, w, isDirectItem)\n + borderLeftWidth + borderRightWidth;\n }\n res = res.map(item => item + m + bp);\n }\n else {\n let m = this.__calSize(marginTop, w, isDirectItem)\n + this.__calSize(marginBottom, w, isDirectItem);\n let bp = 0;\n if(isDirectItem || boxSizing === 'contentBox') {\n bp = this.__calSize(paddingTop, w, isDirectItem)\n + this.__calSize(paddingBottom, w, isDirectItem)\n + borderTopWidth + borderBottomWidth;\n }\n res = res.map(item => item + m + bp);\n }\n return res;\n }\n\n __layout(data, isAbs, isColumn, isRow) {\n this.__layoutFlow(data, isAbs, isColumn, isRow);\n }\n\n // absolute且无尺寸时,isAbs标明先假布局一次计算尺寸,还有flex列计算时isColumn假布局,flex横计算时writingMode垂直假布局\n __layoutFlow(data, isAbs, isColumn, isRow) {\n this.__computeReflow();\n let { __isDestroyed, __currentStyle, __computedStyle, __ellipsis } = this;\n // 虚拟省略号每次清除\n if(__ellipsis) {\n this.__ellipsis = null;\n }\n this.__parentLineBox = null;\n this.__isIbFull = this.__isUprightIbFull = false;\n let {\n [DISPLAY]: display,\n [POSITION]: position,\n } = __computedStyle;\n this.__layoutData = {\n x: data.x,\n y: data.y,\n w: data.w,\n h: data.h,\n lx: data.lx,\n ly: data.ly,\n isUpright: data.isUpright, // 从Root开始,父级的书写模式需每层传递\n container: data.container,\n };\n // 防止display:none不统计mask,isVirtual忽略,abs/flex布局后续会真正来走一遍\n if(!isAbs && !isColumn && !isRow) {\n this.clearCache();\n this.__cacheStyle = [];\n this.__refreshLevel = REFLOW;\n this.__limitCache = false;\n this.__isInline = false;\n let { next } = this;\n // mask关系只有布局才会变更,普通渲染关系不会改变,clip也是mask的一种\n if(!this.__mask && next && (next.__mask)) {\n let count = 0;\n while(next) {\n if(next.__mask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n if(__isDestroyed || display === 'none') {\n this.__x = data.x;\n this.__y = data.y;\n this.__layoutNone();\n this.__hasComputeReflow = false;\n return;\n }\n // absolute特殊,在自己布局时已计算相对于容器的mbp\n if(position !== 'absolute') {\n this.__mp(__currentStyle, __computedStyle, data.w);\n }\n // 只有inline会继承计算行数,其它都是原样返回\n let lineClampCount = data.lineClampCount || 0;\n // 4种布局,默认block,inlineBlock基本可以复用inline逻辑,除了尺寸\n if(display === 'flex') {\n data.lineClampCount = 0;\n this.__layoutFlex(data, isAbs, isColumn, isRow);\n }\n else if(display === 'inlineBlock') {\n data.lineClampCount = 0;\n this.__layoutInline(data, isAbs, isColumn, isRow);\n }\n else if(display === 'inline') {\n lineClampCount = this.__layoutInline(data, isAbs, isColumn, isRow, true);\n }\n else {\n data.lineClampCount = 0;\n this.__layoutBlock(data, isAbs, isColumn, isRow);\n }\n // 非虚拟布局才执行,防止重复\n if(!isAbs && !isColumn && !isRow) {\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__x;\n let y = this.__y;\n if(!this.__isInline) {\n x = this.__x1 = x + __computedStyle[MARGIN_LEFT];\n x = this.__x2 = x + __computedStyle[BORDER_LEFT_WIDTH];\n x = this.__x3 = x + __computedStyle[PADDING_LEFT];\n x = this.__x4 = x + this.__width;\n x = this.__x5 = x + __computedStyle[PADDING_RIGHT];\n this.__x6 = x + __computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__y1 = y + __computedStyle[MARGIN_TOP];\n y = this.__y2 = y + __computedStyle[BORDER_TOP_WIDTH];\n y = this.__y3 = y + __computedStyle[PADDING_TOP];\n y = this.__y4 = y + this.__height;\n y = this.__y5 = y + __computedStyle[PADDING_BOTTOM];\n this.__y6 = y + __computedStyle[BORDER_BOTTOM_WIDTH];\n }\n // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(position === 'relative') {\n let {[TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left} = __currentStyle;\n let {parent} = this;\n if(top.u !== AUTO) {\n let n = calRelative(__currentStyle, TOP, top, parent);\n if(n) {\n this.__offsetY(n, true, null);\n if(this.__isInline) {\n let list = this.__contentBoxList;\n if(Array.isArray(list)) {\n let last;\n list.forEach(item => {\n let p = item.__parentLineBox;\n if(p && p !== last) {\n p.__oy += n;\n }\n last = p;\n });\n }\n }\n }\n __computedStyle[TOP] = n;\n __computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom.u !== AUTO) {\n let n = calRelative(__currentStyle, BOTTOM, bottom, parent);\n if(n) {\n this.__offsetY(-n, true, null);\n if(this.__isInline) {\n let list = this.__contentBoxList;\n if(Array.isArray(list)) {\n let last;\n list.forEach(item => {\n let p = item.__parentLineBox;\n if(p && p !== last) {\n p.__oy -= n;\n }\n last = p;\n });\n }\n }\n }\n __computedStyle[BOTTOM] = n;\n __computedStyle[TOP] = 'auto';\n }\n else {\n __computedStyle[TOP] = __computedStyle[BOTTOM] = 'auto';\n }\n if(left.u !== AUTO) {\n let n = calRelative(__currentStyle, LEFT, left, parent, true);\n if(n) {\n this.__offsetX(n, true, null);\n }\n __computedStyle[LEFT] = n;\n __computedStyle[RIGHT] = 'auto';\n }\n else if (right.u !== AUTO) {\n let n = calRelative(__currentStyle, RIGHT, right, parent, true);\n if(n) {\n this.__offsetX(-n, true, null);\n }\n __computedStyle[RIGHT] = n;\n __computedStyle[LEFT] = 'auto';\n }\n else {\n __computedStyle[LEFT] = __computedStyle[RIGHT] = 'auto';\n }\n }\n else if (position !== 'absolute') {\n __computedStyle[TOP] = __computedStyle[BOTTOM] = __computedStyle[LEFT] = __computedStyle[RIGHT] = 'auto';\n }\n __computedStyle[WIDTH] = this.__width;\n __computedStyle[HEIGHT] = this.__height;\n // abs为parse的根节点时特殊自己执行,前提是真布局\n if(position !== 'absolute') {\n this.__execAr();\n }\n this.__hasComputeReflow = false;\n }\n return lineClampCount;\n }\n\n __layoutStyle() {\n let currentStyle = this.__currentStyle;\n let computedStyle = this.__computedStyle;\n let cacheStyle = this.__cacheStyle;\n this.__calStyle(level.REFLOW, currentStyle, computedStyle, cacheStyle);\n this.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n\n __execAr() {\n // 动态json引用时动画暂存,第一次布局时处理这些动画到root的animateController上\n let ar = this.__animateRecords;\n if(ar) {\n this.__animateRecords = null;\n // parse没有dom时,animate的target引用都是json,vd后生成需重新赋值\n ar.list.forEach(item => {\n if(item.target.vd instanceof Xom) {\n item.target = item.target.vd;\n }\n });\n let ac = ar.controller || this.root.animateController;\n // 不自动播放进入记录列表,初始化并等待手动调用\n if(ar.options && ar.options.autoPlay === false) {\n ac.__records2 = ac.__records2.concat(ar.list);\n ac.init(ac.__records2, ac.list2);\n }\n else {\n ac.__records = ac.__records.concat(ar.list);\n ac.__playAuto();\n }\n }\n }\n\n __layoutNone() {\n this.__computeReflow();\n let { __computedStyle } = this;\n __computedStyle[DISPLAY] = 'none';\n this.__reset0();\n this.__hasComputeReflow = false;\n }\n\n __reset0() {\n let { __computedStyle } = this;\n __computedStyle[MARGIN_TOP]\n = __computedStyle[MARGIN_RIGHT]\n = __computedStyle[MARGIN_BOTTOM]\n = __computedStyle[MARGIN_LEFT]\n = __computedStyle[BORDER_TOP_WIDTH]\n = __computedStyle[BORDER_RIGHT_WIDTH]\n = __computedStyle[BORDER_BOTTOM_WIDTH]\n = __computedStyle[BORDER_LEFT_WIDTH]\n = __computedStyle[PADDING_TOP]\n = __computedStyle[PADDING_RIGHT]\n = __computedStyle[PADDING_BOTTOM]\n = __computedStyle[PADDING_LEFT]\n = __computedStyle[WIDTH]\n = __computedStyle[HEIGHT]\n = this.__width\n = this.__height\n = this.__clientWidth\n = this.__clientHeight\n = this.__offsetWidth\n = this.__offsetHeight\n = this.__outerWidth\n = this.__outerHeight\n = 0;\n }\n\n // 预先计算是否是固定宽高,布局点位和尺寸考虑margin/border/padding\n __preLayout(data, isInline) {\n let { x, y, w, h, w2, h2, w3, h3, lx, ly, lineBoxManager, endSpace = 0, isUpright: isParentVertical, container } = data;\n this.__x = x;\n this.__y = y;\n let { __currentStyle: currentStyle, __computedStyle: computedStyle } = this;\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let position = computedStyle[POSITION];\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [WRITING_MODE]: writingMode,\n [BOX_SIZING]: boxSizing,\n } = computedStyle;\n let isUpright = writingMode.indexOf('vertical') === 0;\n // 除了auto外都是固定宽高度\n let fixedWidth;\n let fixedHeight;\n // 绝对定位是left+right这种其实等于定义了width,但不能修改原始style,存入特殊变量标识\n if(w2 !== undefined) {\n fixedWidth = true;\n w = w2;\n }\n // flex时也会用到,子级得出目标主尺寸后按这个来\n else if(w3 !== undefined) {\n fixedWidth = true;\n w = w3;\n }\n else if(width.u !== AUTO && !isInline) {\n fixedWidth = true;\n // abs的百分比尺寸相对于container\n if(position === 'absolute' && width.u === PERCENT) {\n w = this.__calSize(width, container.__clientWidth, true);\n }\n else {\n w = this.__calSize(width, w, true);\n if(boxSizing === 'borderBox') {\n w -= borderLeftWidth + borderRightWidth + paddingLeft + paddingRight;\n }\n }\n }\n if(h2 !== undefined) {\n fixedHeight = true;\n h = h2;\n }\n else if(h3 !== undefined) {\n fixedHeight = true;\n h = h3;\n }\n // height的百分比需要parent有值不能auto,或者parent的flex定高且侧轴stretch时;abs的百分比相对于container\n else if(height.u !== AUTO && !isInline) {\n if(position === 'absolute' && height.u === PERCENT) {\n h = this.__calSize(height, container.__clientHeight, true);\n }\n else {\n let p = this.__domParent;\n if(height.u === PERCENT) {\n // 一般都是0,除了定高,或者flex的stretch\n if(p.height) {\n fixedHeight = true;\n h = this.__calSize(height, p.height || 0, true);\n }\n }\n else {\n fixedHeight = true;\n h = this.__calSize(height, h, true);\n }\n if(boxSizing === 'borderBox') {\n h -= borderTopWidth + borderBottomWidth + paddingTop + paddingBottom;\n }\n }\n }\n // margin/border/padding影响x和y和尺寸,注意inline的y不受mpb影响(垂直模式则是x)\n if(!isInline) {\n x += borderLeftWidth + marginLeft + paddingLeft;\n y += borderTopWidth + marginTop + paddingTop;\n }\n else {\n if(isUpright) {\n y += borderTopWidth + marginTop + paddingTop;\n }\n else {\n x += borderLeftWidth + marginLeft + paddingLeft;\n }\n }\n data.x = x;\n data.y = y;\n // inline的w/h很特殊,需不考虑inline自身水平的mpb以便换行,因为mpb只在首尾行生效,所以首尾需特殊处理中间忽略\n // 当嵌套inline时更加复杂,假如inline有尾部mpb,最后一行需考虑,如果此inline是父的最后一个且父有mpb需叠加\n let selfEndSpace = 0;\n if(isInline) {\n if(isUpright) {\n selfEndSpace = paddingBottom + borderBottomWidth + marginBottom;\n }\n else {\n selfEndSpace = paddingRight + borderRightWidth + marginRight;\n }\n }\n // 传入w3/h3时,flex的item已知目标主尺寸,需减去mbp,其一定是block,和inline互斥\n else {\n if(width.u === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height.u === AUTO || h3 !== undefined) {\n h -= borderTopWidth + borderBottomWidth + marginTop + marginBottom + paddingTop + paddingBottom;\n }\n }\n return {\n fixedWidth,\n fixedHeight,\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n selfEndSpace,\n isParentVertical,\n isUpright,\n };\n }\n\n // 处理margin:xx auto居中对齐或右对齐\n __marginAuto(style, data, isUpright) {\n let {\n [POSITION]: position,\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = style;\n if(position !== 'absolute' && (display === 'block' || display === 'flex')) {\n if(isUpright) {\n if((height.u !== AUTO || this.isReplaced) && marginTop.u === AUTO && marginBottom.u === AUTO) {\n let oh = this.outerHeight;\n if(oh < data.h) {\n this.__offsetY((data.h - oh) * 0.5, true, null);\n }\n }\n }\n else {\n if((width.u !== AUTO || this.isReplaced) && marginLeft.u === AUTO && marginRight.u === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true, null);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, optimize) {\n let {\n __x1,\n __y1,\n __offsetWidth,\n __offsetHeight,\n } = this;\n if(this.__isInline) {\n __computedStyle[TRANSFORM_ORIGIN] = [__x1, __y1];\n return __cacheStyle[MATRIX] = this.__matrix = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // 优化计算scale不能为0,无法计算倍数差,rotateZ优化不能包含rotateX/rotateY/skew\n if(!isNil(optimize)) {}\n else if(matrixCache && lv < REFLOW && !(lv & TF)) {\n if((lv & SX) && !__computedStyle[SCALE_X]\n || (lv & SY) && !__computedStyle[SCALE_Y]\n || (lv & SZ) && !__computedStyle[SCALE_Z]\n || (lv & RZ) && (__computedStyle[ROTATE_X] || __computedStyle[ROTATE_Y]\n || __computedStyle[SKEW_X] || __computedStyle[SKEW_Y])) {\n }\n else {\n optimize = true;\n }\n }\n // translate/scale变化特殊优化,d/h/l不能有值,否则不能这样直接简化运算,因为这里不包含perspective,所以一定没有\n if(optimize && matrixCache) {\n let transform = __computedStyle[TRANSFORM];\n if(lv & TX) {\n let v = __currentStyle[TRANSLATE_X];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n let x = v - __computedStyle[TRANSLATE_X];\n __computedStyle[TRANSLATE_X] = v;\n transform[12] += x;\n matrixCache[12] += x;\n }\n if(lv & TY) {\n let v = __currentStyle[TRANSLATE_Y];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetHeight, true);\n }\n let y = v - __computedStyle[TRANSLATE_Y];\n __computedStyle[TRANSLATE_Y] = v;\n transform[13] += y;\n matrixCache[13] += y;\n }\n if(lv & TZ) {\n let v = __currentStyle[TRANSLATE_Z];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n let z = v - __computedStyle[TRANSLATE_Z];\n __computedStyle[TRANSLATE_Z] = v;\n transform[14] += z;\n matrixCache[14] += z;\n }\n if(lv & RZ) {\n let v = __currentStyle[ROTATE_Z].v;\n __computedStyle[ROTATE_Z] = v;\n v = d2r(v);\n let sin = Math.sin(v), cos = Math.cos(v);\n let x = __computedStyle[SCALE_X], y = __computedStyle[SCALE_Y];\n let cx = matrixCache[0] = transform[0] = cos * x;\n let sx = matrixCache[1] = transform[1] = sin * x;\n let sy = matrixCache[4] = transform[4] = -sin * y;\n let cy = matrixCache[5] = transform[5] = cos * y;\n let t = __computedStyle[TRANSFORM_ORIGIN], ox = t[0], oy = t[1];\n ox += __x1;\n oy += __y1;\n matrixCache[12] = transform[12] + ox - cx * ox - oy * sy;\n matrixCache[13] = transform[13] + oy - sx * ox - oy * cy;\n }\n if(lv & SCALE) {\n if(lv & SX) {\n if(!__computedStyle[SCALE_X]) {\n return this.__calMatrix(REFLOW, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_X].v;\n let x = v / __computedStyle[SCALE_X];\n __computedStyle[SCALE_X] = v;\n transform[0] *= x;\n transform[1] *= x;\n transform[2] *= x;\n matrixCache[0] *= x;\n matrixCache[1] *= x;\n matrixCache[2] *= x;\n }\n if(lv & SY) {\n if(!__computedStyle[SCALE_Y]) {\n return this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_Y].v;\n let y = v / __computedStyle[SCALE_Y];\n __computedStyle[SCALE_Y] = v;\n transform[4] *= y;\n transform[5] *= y;\n transform[6] *= y;\n matrixCache[4] *= y;\n matrixCache[5] *= y;\n matrixCache[6] *= y;\n }\n if(lv & SZ) {\n if(!__computedStyle[SCALE_Z]) {\n return this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_Z].v;\n let z = v / __computedStyle[SCALE_Z];\n __computedStyle[SCALE_Z] = v;\n transform[8] *= z;\n transform[9] *= z;\n transform[10] *= z;\n matrixCache[8] *= z;\n matrixCache[9] *= z;\n matrixCache[10] *= z;\n }\n let t = __computedStyle[TRANSFORM_ORIGIN], ox = t[0], oy = t[1];\n ox += __x1;\n oy += __y1;\n matrixCache[12] = transform[12] + ox - transform[0] * ox - transform[4] * oy;\n matrixCache[13] = transform[13] + oy - transform[1] * ox - transform[5] * oy;\n matrixCache[14] = transform[14] - transform[2] * ox - transform[6] * oy;\n }\n }\n // 先根据cache计算需要重新计算的computedStyle\n else {\n if(__cacheStyle[TRANSFORM_ORIGIN] === undefined) {\n __cacheStyle[TRANSFORM_ORIGIN] = true;\n matrixCache = null;\n __computedStyle[TRANSFORM_ORIGIN] = __currentStyle[TRANSFORM_ORIGIN].map((item, i) => {\n return this.__calSize(item, i ? __offsetHeight : __offsetWidth, true);\n });\n }\n if(__cacheStyle[TRANSFORM] === undefined\n || __cacheStyle[TRANSLATE_X] === undefined\n || __cacheStyle[TRANSLATE_Y] === undefined\n || __cacheStyle[TRANSLATE_Z] === undefined\n || __cacheStyle[ROTATE_X] === undefined\n || __cacheStyle[ROTATE_Y] === undefined\n || __cacheStyle[ROTATE_Z] === undefined\n || __cacheStyle[ROTATE_3D] === undefined\n || __cacheStyle[SCALE_X] === undefined\n || __cacheStyle[SCALE_Y] === undefined\n || __cacheStyle[SCALE_Z] === undefined\n || __cacheStyle[SKEW_X] === undefined\n || __cacheStyle[SKEW_Y] === undefined) {\n __cacheStyle[TRANSFORM]\n = __cacheStyle[TRANSLATE_X]\n = __cacheStyle[TRANSLATE_Y]\n = __cacheStyle[TRANSLATE_Z]\n = __cacheStyle[ROTATE_X]\n = __cacheStyle[ROTATE_Y]\n = __cacheStyle[ROTATE_Z]\n = __cacheStyle[SCALE_X]\n = __cacheStyle[SCALE_Y]\n = __cacheStyle[SCALE_Z]\n = __cacheStyle[SKEW_X]\n = __cacheStyle[SKEW_Y]\n = true;\n matrixCache = null;\n this.__selfPerspective = 0;\n this.__selfPerspectiveMatrix = null;\n let matrix, ct = __currentStyle[TRANSFORM];\n // transform相对于自身\n if(ct && ct.length) {\n let first = ct[0];\n // 特殊处理,抽取出来transform的ppt,视为tfo原点的透视\n if(first.k === PERSPECTIVE) {\n let ppt = this.__selfPerspective = this.__calSize(first.v, this.__clientWidth, true);\n let tfo = __computedStyle[TRANSFORM_ORIGIN];\n this.__selfPerspectiveMatrix = tf.calPerspectiveMatrix(ppt, tfo[0] + __x1, tfo[1] + __y1);\n matrix = tf.calMatrix(ct.slice(1), __offsetWidth, __offsetHeight, this.__root);\n }\n else {\n matrix = tf.calMatrix(ct, __offsetWidth, __offsetHeight, this.__root);\n }\n }\n // 没有transform则看是否有扩展的css独立变换属性\n else {\n __computedStyle[TRANSLATE_X] = 0;\n let v = __currentStyle[TRANSLATE_X];\n if(v) {\n v = __computedStyle[TRANSLATE_X] = this.__calSize(v, this.__offsetWidth, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[12] = v;\n }\n }\n __computedStyle[TRANSLATE_Y] = 0;\n v = __currentStyle[TRANSLATE_Y];\n if(v) {\n v = __computedStyle[TRANSLATE_Y] = this.__calSize(v, this.__offsetHeight, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[13] = v;\n }\n }\n __computedStyle[TRANSLATE_Z] = 0;\n v = __currentStyle[TRANSLATE_Z];\n if(v) {\n v = __computedStyle[TRANSLATE_Z] = this.__calSize(v, this.__offsetWidth, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[14] = v;\n }\n }\n __computedStyle[ROTATE_X] = 0;\n v = __currentStyle[ROTATE_X];\n if(v) {\n v = __computedStyle[ROTATE_X] = v.v;\n if(v) {\n matrix = matrix || mx.identity();\n if(matrix) {\n matrix = multiplyRotateX(matrix, d2r(v));\n }\n else {\n matrix = calRotateX(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_Y] = 0;\n v = __currentStyle[ROTATE_Y];\n if(v) {\n v = __computedStyle[ROTATE_Y] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplyRotateY(matrix, d2r(v));\n }\n else {\n matrix = calRotateY(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_Z] = 0;\n v = __currentStyle[ROTATE_Z];\n if(v) {\n v = __computedStyle[ROTATE_Z] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplyRotateZ(matrix, d2r(v));\n }\n else {\n matrix = calRotateZ(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_3D] = [0, 0, 0, 0];\n v = __currentStyle[ROTATE_3D];\n if(v) {\n v = __computedStyle[ROTATE_3D] = [v[0], v[1], v[2], v[3].v];\n if((v[0] || v[1] || v[2]) && v[3]) {\n if(matrix) {\n matrix = multiply(matrix, calRotate3d(mx.identity(), v));\n }\n else {\n matrix = calRotate3d(mx.identity(), v);\n }\n }\n }\n __computedStyle[SKEW_X] = 0;\n v = __currentStyle[SKEW_X];\n if(v) {\n v = __computedStyle[SKEW_X] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplySkewX(matrix, d2r(v));\n }\n else {\n matrix = mx.identity();\n matrix[4] = Math.tan(d2r(v));\n }\n }\n }\n __computedStyle[SKEW_Y] = 0;\n v = __currentStyle[SKEW_Y];\n if(v) {\n v = __computedStyle[SKEW_Y] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplySkewY(matrix, d2r(v));\n }\n else {\n matrix = mx.identity();\n matrix[1] = Math.tan(d2r(v));\n }\n }\n }\n __computedStyle[SCALE_X] = 1;\n v = __currentStyle[SCALE_X];\n if(v) {\n v = __computedStyle[SCALE_X] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleX(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[0] = v;\n }\n }\n }\n __computedStyle[SCALE_Y] = 1;\n v = __currentStyle[SCALE_Y];\n if(v) {\n v = __computedStyle[SCALE_Y] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleY(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[5] = v;\n }\n }\n }\n __computedStyle[SCALE_Z] = 1;\n v = __currentStyle[SCALE_Z];\n if(v) {\n v = __computedStyle[SCALE_Z] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleZ(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[10] = v;\n }\n }\n }\n }\n __computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = __computedStyle[TRANSFORM];\n let tfo = __computedStyle[TRANSFORM_ORIGIN];\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo[0] + __x1, tfo[1] + __y1);\n }\n }\n return this.__matrix = matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算,返回背景渲染范围\n */\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let {\n __x1,\n __x2,\n __x3,\n __x4,\n __x5,\n __x6,\n __y1,\n __y2,\n __y3,\n __y4,\n __y5,\n __y6,\n } = this;\n this.__bbox = null;\n let bx1 = __x1, by1 = __y1, bx2 = __x6, by2 = __y6;\n let backgroundClip = __computedStyle[BACKGROUND_CLIP] = __currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = __x2;\n by1 = __y2;\n bx2 = __x5;\n by2 = __y5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = __x3;\n by1 = __y3;\n bx2 = __x4;\n by2 = __y4;\n }\n let isInline = this.__isInline;\n if(isInline && !this.__contentBoxList.length) {\n isInline = false;\n }\n // 这些直接赋值的不需要再算缓存\n [\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n BACKGROUND_REPEAT,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BACKGROUND_CLIP,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n ].forEach(k => {\n __computedStyle[k] = __currentStyle[k];\n });\n if(isNil(__cacheStyle[FILTER])) {\n this.__calFilter(__currentStyle, __computedStyle, __cacheStyle);\n }\n // 特殊的判断,MATRIX不存在于样式key中,所有的transform共用一个\n if(isNil(__cacheStyle[MATRIX]) || (lv & TRANSFORM_ALL)) {\n this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_X])) {\n __cacheStyle[BACKGROUND_POSITION_X] = true;\n let {\n [BACKGROUND_POSITION_X]: bgX,\n } = __currentStyle;\n __computedStyle[BACKGROUND_POSITION_X] = (bgX || []).map(item => {\n if(item.u === PERCENT) {\n return item.v + '%';\n }\n return this.__calSize(item, bx2 - bx1, true);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_Y])) {\n __cacheStyle[BACKGROUND_POSITION_Y] = true;\n let {\n [BACKGROUND_POSITION_Y]: bgY,\n } = __currentStyle;\n __computedStyle[BACKGROUND_POSITION_Y] = (bgY || []).map(item => {\n if(item.u === PERCENT) {\n return item.v + '%';\n }\n return this.__calSize(item, by2 - by1, true);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_SIZE])) {\n __cacheStyle[BACKGROUND_SIZE] = true;\n __computedStyle[BACKGROUND_SIZE] = (__currentStyle[BACKGROUND_SIZE] || []).map(item => {\n if(Array.isArray(item)) {\n // 每项是x/y2个\n return item.map((item2, i) => {\n if(item2.u === AUTO) {\n return -1;\n }\n else if(item2.u === STRING) {\n return item2.v === 'contain' ? -2 : -3;\n }\n return this.__calSize(item2, i ? (by2 - by1) : (bx2 - bx1), true);\n });\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_IMAGE])) {\n let bgI = __currentStyle[BACKGROUND_IMAGE];\n __computedStyle[BACKGROUND_IMAGE] = bgI.map(item => {\n if(item) {\n return item.v;\n }\n return null;\n });\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(bgi.u === STRING) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[bgi.v];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = bgi.v;\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi.v) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi.v;\n loadBgi.source = null;\n let node = this;\n let root = this.__root;\n let ctx = this.ctx;\n inject.measureImg(bgi.v, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败不绘制bgi\n if(data.success && data.url === loadBgi.url && !this.isDestroyed) {\n loadBgi.source = data.source;\n loadBgi.width = data.width;\n loadBgi.height = data.height;\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n root.__addUpdate(node, null, REPAINT, null, null, null, null);\n }\n });\n }\n return true;\n }\n else if(!isInline && bgi.v && bgi.u === GRADIENT) {\n // gradient在渲染时才生成\n return true;\n }\n });\n }\n if(isNil(__cacheStyle[BOX_SHADOW])) {\n __cacheStyle[BOX_SHADOW] = true;\n __computedStyle[BOX_SHADOW] = (__currentStyle[BOX_SHADOW] || []).map(item => {\n return item.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n return this.__calSize(item2, i === 0 ? (bx2 - bx1) : (by2 - by1), true);\n });\n });\n }\n [\n BACKGROUND_COLOR,\n BORDER_TOP_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n ].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n __cacheStyle[k] = int2rgba(__computedStyle[k] = __currentStyle[k].v);\n }\n });\n // 圆角边计算\n if(isNil(__cacheStyle[BORDER_TOP_LEFT_RADIUS])\n || isNil(__cacheStyle[BORDER_TOP_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_LEFT_RADIUS])) {\n __cacheStyle[BORDER_TOP_LEFT_RADIUS]\n = __cacheStyle[BORDER_TOP_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_LEFT_RADIUS]\n = true;\n // 非替代的inline计算看contentBox首尾\n if(isInline) {\n border.calBorderRadiusInline(this.__contentBoxList, __currentStyle, __computedStyle, this.__root);\n }\n // 普通block整体计算\n else {\n border.calBorderRadius(this.__offsetWidth, this.__offsetHeight, __currentStyle, __computedStyle, this.__root);\n }\n }\n // width/style/radius影响border,color不影响渲染缓存\n let btlr = __computedStyle[BORDER_TOP_LEFT_RADIUS];\n let btrr = __computedStyle[BORDER_TOP_RIGHT_RADIUS];\n let bbrr = __computedStyle[BORDER_BOTTOM_RIGHT_RADIUS];\n let bblr = __computedStyle[BORDER_BOTTOM_LEFT_RADIUS];\n let borderTopWidth = __computedStyle[BORDER_TOP_WIDTH];\n let borderRightWidth = __computedStyle[BORDER_RIGHT_WIDTH];\n let borderBottomWidth = __computedStyle[BORDER_BOTTOM_WIDTH];\n let borderLeftWidth = __computedStyle[BORDER_LEFT_WIDTH];\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parent = this.__domParent;\n let parentComputedStyle = parent && parent.__computedStyle;\n if(__currentStyle[FONT_STYLE].u === INHERIT) {\n __computedStyle[FONT_STYLE] = parent ? parentComputedStyle[FONT_STYLE] : 'normal';\n }\n else if(isNil(__cacheStyle[FONT_STYLE])) {\n __computedStyle[FONT_STYLE] = __currentStyle[FONT_STYLE].v;\n }\n __cacheStyle[FONT_STYLE] = __computedStyle[FONT_STYLE];\n let color = __currentStyle[COLOR];\n if(color.u === INHERIT) {\n let v = __computedStyle[COLOR] = parent ? parentComputedStyle[COLOR] : rgba2int(reset.INHERIT.color);\n if(v.k) {\n __cacheStyle[COLOR] = v;\n }\n else {\n __cacheStyle[COLOR] = int2rgba(__computedStyle[COLOR]);\n }\n }\n else if(isNil(__cacheStyle[COLOR])) {\n if(color.u === GRADIENT) {\n __cacheStyle[COLOR] = __computedStyle[COLOR] = color.v;\n }\n else {\n __cacheStyle[COLOR] = int2rgba(__computedStyle[COLOR] = rgba2int(color.v));\n }\n }\n let textStrokeColor = __currentStyle[TEXT_STROKE_COLOR];\n if(textStrokeColor.u === INHERIT) {\n let v = __computedStyle[TEXT_STROKE_COLOR] = parent ? parentComputedStyle[TEXT_STROKE_COLOR] : rgba2int(reset.INHERIT.textStrokeColor);\n if(v.k) {\n __cacheStyle[TEXT_STROKE_COLOR] = v;\n }\n else {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(__computedStyle[TEXT_STROKE_COLOR]);\n }\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_COLOR])) {\n if(textStrokeColor.u === GRADIENT) {\n __cacheStyle[TEXT_STROKE_COLOR] = __computedStyle[TEXT_STROKE_COLOR] = textStrokeColor.v;\n }\n else if(textStrokeColor.u === RGBA) {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(__computedStyle[TEXT_STROKE_COLOR] = rgba2int(textStrokeColor.v));\n }\n }\n if(__currentStyle[TEXT_STROKE_WIDTH].u === INHERIT) {\n __computedStyle[TEXT_STROKE_WIDTH] = parent ? parentComputedStyle[TEXT_STROKE_WIDTH] : reset.INHERIT.textStrokeWidth;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_WIDTH])) {\n let v = __currentStyle[TEXT_STROKE_WIDTH];\n if(v.u === REM) {\n v = v.v * this.__root.__computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n v = v.v * this.__root.width * 0.01;\n }\n else if(v.u === VH) {\n v = v.v * this.__root.height * 0.01;\n }\n else if(v.u === VMAX) {\n v = v.v * Math.max(this.__root.width, this.__root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n v = v.v * Math.min(this.__root.width, this.__root.height) * 0.01;\n }\n else {\n v = v.v;\n }\n __computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(__currentStyle[TEXT_STROKE_OVER].u === INHERIT) {\n __cacheStyle[TEXT_STROKE_OVER] = __computedStyle[TEXT_STROKE_OVER] = parent ? parentComputedStyle[TEXT_STROKE_OVER] : reset.INHERIT.textStrokeOver;\n }\n else {\n __cacheStyle[TEXT_STROKE_OVER] = __computedStyle[TEXT_STROKE_OVER] = __currentStyle[TEXT_STROKE_OVER].v;\n }\n if(__currentStyle[VISIBILITY].u === INHERIT) {\n __computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n __computedStyle[VISIBILITY] = __currentStyle[VISIBILITY].v;\n }\n __cacheStyle[VISIBILITY] = __computedStyle[VISIBILITY];\n if(__currentStyle[POINTER_EVENTS].u === INHERIT) {\n __computedStyle[POINTER_EVENTS] = parent ? parentComputedStyle[POINTER_EVENTS] : 'auto';\n }\n else if(isNil(__cacheStyle[POINTER_EVENTS])) {\n __computedStyle[POINTER_EVENTS] = __currentStyle[POINTER_EVENTS].v;\n }\n __cacheStyle[POINTER_EVENTS] = __computedStyle[POINTER_EVENTS];\n // transformStyle需要特殊判断,在一些情况下强制flat,取消规范的opacity<1限制\n if(__computedStyle[TRANSFORM_STYLE] === 'preserve3d') {\n if(__computedStyle[OVERFLOW] === 'hidden'\n || __computedStyle[FILTER].length\n || this.__cacheAsBitmap) {\n __computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n }\n // 影响父级flat的\n if((__computedStyle[MIX_BLEND_MODE] !== 'normal' || this.__mask) && parentComputedStyle) {\n parentComputedStyle[TRANSFORM_STYLE] = 'flat';\n }\n this.__bx1 = bx1;\n this.__bx2 = bx2;\n this.__by1 = by1;\n this.__by2 = by2;\n return [bx1, by1, bx2, by2];\n }\n\n __calPerspective(__currentStyle, __computedStyle, __cacheStyle) {\n this.__perspectiveMatrix = null;\n let rebuild;\n let { __x1, __y1 } = this;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = __currentStyle[PERSPECTIVE];\n __computedStyle[PERSPECTIVE] = this.__calSize(v, this.__clientWidth, true);\n }\n if(isNil(__cacheStyle[PERSPECTIVE_ORIGIN])) {\n __cacheStyle[PERSPECTIVE_ORIGIN] = true;\n rebuild = true;\n __computedStyle[PERSPECTIVE_ORIGIN] = __currentStyle[PERSPECTIVE_ORIGIN].map((item, i) => {\n return this.__calSize(item, i ? this.__offsetHeight : this.__offsetWidth, true);\n });\n }\n let ppt = __computedStyle[PERSPECTIVE];\n // perspective为0无效\n if(rebuild && ppt) {\n let po = __computedStyle[PERSPECTIVE_ORIGIN];\n this.__perspectiveMatrix = tf.calPerspectiveMatrix(ppt, po[0] + __x1, po[1] + __y1);\n }\n return this.__perspectiveMatrix;\n }\n\n __calFilter(__currentStyle, __computedStyle, __cacheStyle) {\n __cacheStyle[FILTER] = true;\n this.__filterBbox = null;\n return __computedStyle[FILTER] = (__currentStyle[FILTER] || []).map(item => {\n let { k, v } = item;\n if(k === 'dropShadow') {\n let v2 = v.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n return this.__calSize(item2, i === 0 ? (this.__bx2 - this.__bx1) : (this.__by2 - this.__by1), true);\n });\n return { k, v: v2 };\n }\n else {\n // 部分%单位的滤镜强制使用数字\n if(v.u === DEG || v.u === NUMBER || v.u === PERCENT) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.root.width, true);\n }\n return { k, v };\n }\n });\n }\n\n __calOffscreen(ctx, __computedStyle) {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow, root = this.__root;\n let { width, height } = root;\n let origin = ctx;\n let {\n [MIX_BLEND_MODE]: mixBlendMode,\n [FILTER]: filter,\n [OVERFLOW]: overflow,\n [DISPLAY]: display,\n } = __computedStyle;\n if(mixBlendMode !== 'normal' && isValidMbm(mixBlendMode)) {\n mixBlendMode = mbmName(mixBlendMode);\n let c = inject.getOffscreenCanvas(width, height, null, 'blend');\n offscreenBlend = {\n ctx,\n target: c,\n mixBlendMode,\n };\n ctx = c.ctx;\n }\n if(this.__hasMask) {\n let c = inject.getOffscreenCanvas(width, height, null, 'mask1');\n offscreenMask = {\n ctx,\n target: c,\n };\n ctx = c.ctx;\n }\n if(filter && filter.length) {\n let c = inject.getOffscreenCanvas(width, height, null, 'filter');\n offscreenFilter = {\n ctx,\n filter,\n target: c,\n };\n ctx = c.ctx;\n }\n if(overflow === 'hidden' && display !== 'inline') {\n let c = inject.getOffscreenCanvas(width, height, null, 'overflow');\n let bx1 = this.__bx1;\n let bx2 = this.__bx2;\n let by1 = this.__by1;\n let by2 = this.__by2;\n let {\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [BACKGROUND_CLIP]: backgroundClip,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n } = __computedStyle;\n let btlr = borderTopLeftRadius.slice(0);\n let btrr = borderTopRightRadius.slice(0);\n let bbrr = borderBottomRightRadius.slice(0);\n let bblr = borderBottomLeftRadius.slice(0);\n if(backgroundClip === 'paddingBox') {\n btlr[0] -= borderLeftWidth;\n btlr[1] -= borderTopWidth;\n btrr[0] -= borderRightWidth;\n btrr[1] -= borderTopWidth;\n bbrr[0] -= borderRightWidth;\n bbrr[1] -= borderBottomWidth;\n bblr[0] -= borderLeftWidth;\n bblr[1] -= borderBottomWidth;\n }\n else if(backgroundClip === 'contentBox') {\n btlr[0] -= borderLeftWidth + paddingLeft;\n btlr[1] -= borderTopWidth + paddingTop;\n btrr[0] -= borderRightWidth + paddingRight;\n btrr[1] -= borderTopWidth + paddingTop;\n bbrr[0] -= borderRightWidth + paddingRight;\n bbrr[1] -= borderBottomWidth + paddingBottom;\n bblr[0] -= borderLeftWidth + paddingLeft;\n bblr[1] -= borderBottomWidth + paddingBottom;\n }\n let borderList = border.calRadius(bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n offscreenOverflow = {\n ctx,\n target: c,\n matrix: this.__matrixEvent,\n x: this.__x1,\n y: this.__y1,\n offsetWidth: this.__offsetWidth,\n offsetHeight: this.__offsetHeight,\n borderList,\n };\n ctx = c.ctx;\n }\n // 无离屏不返回\n if(origin === ctx) {\n return;\n }\n return {\n ctx,\n offscreenBlend,\n offscreenMask,\n offscreenFilter,\n offscreenOverflow,\n };\n }\n\n // 自定义图形可能需要覆盖判断,所以是public方法\n calContent(__currentStyle, __computedStyle) {\n let visibility = __currentStyle[VISIBILITY];\n if(visibility !== 'hidden') {\n let bgI = __currentStyle[BACKGROUND_IMAGE];\n if(Array.isArray(bgI)) {\n for(let i = 0, len = bgI.length; i < len; i++) {\n if(bgI[i]) {\n return this.__hasContent = true;\n }\n }\n }\n if(__currentStyle[BACKGROUND_COLOR].v[3] > 0) {\n let width = __computedStyle[WIDTH], height = __computedStyle[HEIGHT],\n paddingTop = __computedStyle[PADDING_TOP], paddingRight = __computedStyle[PADDING_RIGHT],\n paddingBottom = __computedStyle[PADDING_BOTTOM], paddingLeft = __computedStyle[PADDING_LEFT];\n if(width && height || paddingTop || paddingRight || paddingBottom || paddingLeft) {\n return this.__hasContent = true;\n }\n }\n for(let list = ['Top', 'Right', 'Bottom', 'Left'], i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n if(__computedStyle[STYLE_KEY[style2Upper('border' + k + 'Width')]] > 0\n && __currentStyle[STYLE_KEY[style2Upper('border' + k + 'Color')]].v[3] > 0) {\n return this.__hasContent = true;\n }\n }\n let bs = __currentStyle[BOX_SHADOW];\n if(Array.isArray(bs)) {\n for(let i = 0, len = bs.length; i < len; i++) {\n let item = bs[i];\n if(item && item[4][3] > 0) {\n return this.__hasContent = true;\n }\n }\n }\n }\n return this.__hasContent = false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @see node/mode\n * @param ctx canvas/svg/webgl共用\n * @param dx cache时偏移x\n * @param dy cache时偏移y\n * @return Object\n * x1/x2/x3/x4/x5/x6/y1/y2/y3/y4/y5/y6 坐标\n * break svg判断无变化提前跳出\n */\n render(renderMode, ctx, dx = 0, dy = 0) {\n let {\n __isDestroyed: isDestroyed,\n } = this;\n let cacheStyle = this.__cacheStyle;\n let computedStyle = this.__computedStyle;\n if(isDestroyed) {\n return { isDestroyed, break: true };\n }\n let virtualDom;\n // svg设置vd上的lv属性标明lineHeight的话,另外特殊字体如arial拥有lineGap也会产生间隙,背景色不绘制这个间隙\n * x轴根据contentBox的范围坐标,y则固定和font/lineHeight相关\n * 圆角发生在首尾lineBox处,中间不会有,bgi则产生类似bgc作为mask的效果\n * 另外要注意多个时的顺序,必须依次渲染,后面的bb可能会覆盖前面行的\n */\n if(isRealInline) {\n let contentBoxList = this.contentBoxList;\n let length = contentBoxList.length;\n if(contentBoxList[length - 1] instanceof Ellipsis) {\n length--;\n }\n let hasBgi = backgroundImage.some(item => item);\n if(length) {\n let {\n [FONT_SIZE]: fontSize,\n [FONT_FAMILY]: fontFamily,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let iw = 0, ih = 0;\n let offscreen, svgBgSymbol = [];\n // bgi视作inline排满一行绘制,然后按分行拆开给每行\n if(hasBgi) {\n iw = inline.getInlineWidth(this, contentBoxList, isUpright);\n ih = lineHeight;\n // 垂直模式互换,计算时始终按照宽度为主轴计算的\n if(isUpright) {\n [iw, ih] = [ih, iw];\n }\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n if(isUpright) {\n iw += paddingTop + paddingBottom;\n ih += paddingLeft + paddingRight;\n }\n else {\n iw += paddingLeft + paddingRight;\n ih += paddingTop + paddingBottom;\n }\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n if(isUpright) {\n iw += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n ih += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n }\n else {\n iw += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n ih += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n }\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n offscreen = inject.getOffscreenCanvas(iw, ih, '__$$INLINE_BGI$$__', null);\n }\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === bgi) {\n let uuid = bg.renderImage(this, renderMode, offscreen && offscreen.ctx || ctx, loadBgi,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, true, dx, dy);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, 0, 0, iw, ih, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, 0, 0, iw, lineHeight,\n btlr, btrr, bbrr, bblr, true);\n }\n else {\n let uuid = bg.renderBgc(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, null,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr, 'fill', true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n }\n });\n }\n // 获取当前dom的baseline,再减去lineBox的baseline得出差值,这样渲染范围y就是lineBox的y+差值为起始,lineHeight为高\n // lineGap,一般为0,某些字体如arial有,渲染高度需减去它,最终是lineHeight - leading,上下均分\n let leading = fontSize * ((font.info[calFontFamily(fontFamily)] || {}).lgr || 0) * 0.5;\n let baseline = isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle);\n // 注意只有1个的时候特殊情况,圆角只在首尾行出现\n let isFirst = true;\n let lastContentBox = contentBoxList[0], lastLineBox = lastContentBox.parentLineBox;\n // bgi需统计宽度累计值,将当前行所处理想单行的x范围位置计算出来,并进行bgi贴图绘制,svg还需统计第几行\n let count = 0;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(contentBox.parentLineBox !== lastLineBox) {\n // 上一行\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, isUpright, contentBoxList,\n lastContentBox, contentBoxList[i - 1], lastLineBox, baseline, lineHeight, leading, isFirst, false,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], null,\n ix1, iy1, ix2 - ix1, iy2 - iy1, btlr, [0, 0], [0, 0], bblr, 'fill', false, dx, dy);\n }\n let w = ix2 - ix1, h = iy2 - iy1; // 世界参考系的宽高,根据writingMode不同取值使用\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n if(isUpright) {\n ctx.drawImage(offscreen.canvas, 0, count, iw, h, ix1 + dx, iy1 + dy, iw, h);\n }\n else {\n ctx.drawImage(offscreen.canvas, count, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n [\n 'd',\n isUpright\n ? `M${0},${count}L${ih},${count}L${ih},${h+count}L${0},${h+count},L${0},${count}`\n : `M${count},${0}L${w+count},${0}L${w+count},${ih}L${count},${ih},L${count},${0}`\n ],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', isUpright ? ix1 : (ix1 - count)],\n ['y', isUpright ? (iy1 - count) : iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n count += isUpright ? h : w; // 增加主轴方向的一行/列尺寸\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1, dx, dy);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n // right在最后这里不渲染\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n isFirst = false;\n lastContentBox = contentBox;\n lastLineBox = contentBox.parentLineBox;\n }\n // 最后一个特殊判断\n if(i === length - 1) {\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, isUpright, contentBoxList,\n lastContentBox, contentBoxList[i], lastLineBox, baseline, lineHeight, leading, isFirst, true,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n // 要算上末尾空白inline,可能有多个和递归嵌套\n let n = getLastEmptyInlineWidth(this);\n ix2 += n;\n bx2 += n;\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], null,\n ix1, iy1, ix2 - ix1, iy2 - iy1, isFirst ? btlr : [0, 0], btrr, bbrr, isFirst ? bblr : [0, 0],\n 'fill', false, dx, dy);\n }\n let w = ix2 - ix1, h = iy2 - iy1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n if(isUpright) {\n ctx.drawImage(offscreen.canvas, 0, count, iw, h, ix1 + dx, iy1 + dy, iw, h);\n }\n else {\n ctx.drawImage(offscreen.canvas, count, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n [\n 'd',\n isUpright\n ? `M${0},${count}L${ih},${count}L${ih},${h+count}L${0},${h+count},L${0},${count}`\n : `M${count},${0}L${w+count},${0}L${w+count},${ih}L${count},${ih},L${count},${0}`\n ],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', isUpright ? ix1 : (ix1 - count)],\n ['y', isUpright ? (iy1 - count) : iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1, dx, dy);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n let list = border.calPoints(borderRightWidth, computedStyle[BORDER_RIGHT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 1, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n }\n }\n if(offscreen) {\n offscreen.ctx.clearRect(0, 0, iw, ih);\n }\n return res;\n }\n // 无内容且无尺寸的无需渲染\n else if(bx1 === bx2 || by1 === by2) {\n return res;\n }\n }\n // block渲染,bgc垫底\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n // 渐变或图片叠加\n if(backgroundImage) {\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === bgi) {\n bg.renderImage(this, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, false, dx, dy);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1, dx, dy);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_TOP], cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_RIGHT], cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_BOTTOM], cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_LEFT], cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n return res;\n }\n\n // 强制刷新API\n refresh(lv, cb) {\n let root = this.__root;\n if(isFunction(lv) || !lv) {\n lv = CACHE;\n }\n if(lv) {\n this.clearCache(lv < REPAINT);\n }\n if(root && !this.__isDestroyed) {\n root.__addUpdate(this, null, lv, null, null, null, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n let ref = this.props.ref;\n if(!isNil(ref) && !isFunction(ref)) {\n delete this.__root.__ref[ref];\n }\n super.__destroy();\n this.clearAnimate();\n this.clearFrameAnimate();\n this.clearCache();\n let fontRegister = this.__fontRegister;\n for(let i in fontRegister) {\n if(fontRegister.hasOwnProperty(i)) {\n font.offRegister(i, this);\n }\n }\n this.__host = this.__hostRoot = this.__root\n = this.__prev = this.__next\n = this.__parent = this.__domParent = null;\n this.__reset0();\n }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { __isDestroyed, __computedStyle: computedStyle, __mask } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __mask) {\n return;\n }\n let { event: { type } } = e;\n let { __listener, __hasMask } = this;\n let cb;\n if(__listener.hasOwnProperty(type)) {\n cb = __listener[type];\n }\n // touchmove之类强制的直接由Root通知即可\n if(force) {\n if(computedStyle[POINTER_EVENTS] !== 'none' && !e.__stopImmediatePropagation\n && (isFunction(cb) || Array.isArray(cb))) {\n if(Array.isArray(cb)) {\n cb.forEach(item => {\n if(isFunction(item)) {\n item.call(this, e);\n }\n });\n }\n else {\n cb.call(this, e);\n }\n }\n return true;\n }\n // 非force的判断事件坐标是否在节点内\n if(this.willResponseEvent(e)) {\n // 如果有mask,点在mask上才行,点在clip外才行\n if(__hasMask) {\n let next = this.next;\n let isClip = next.__clip;\n let hasEmitMask;\n while(next && next.__mask) {\n if(next.willResponseEvent(e, true)) {\n hasEmitMask = true;\n break;\n }\n next = next.next;\n }\n if(!isClip && !hasEmitMask) {\n return;\n }\n }\n if(Array.isArray(cb) && !e.__stopImmediatePropagation) {\n cb.forEach(item => {\n if(isFunction(item)) {\n item.call(this, e);\n }\n });\n }\n else if(isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n\n willResponseEvent(e, ignore) {\n let { x, y } = e;\n let { __x1, __y1, __offsetWidth, __offsetHeight, __matrixEvent, __computedStyle } = this;\n if(__computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __x1, __y1,\n __x1 + __offsetWidth, __y1,\n __x1 + __offsetWidth, __y1 + __offsetHeight,\n __x1, __y1 + __offsetHeight,\n __matrixEvent\n );\n if(inThis) {\n if(!e.target && !ignore) {\n e.target = this;\n // 缓存target给move用\n if(e.event.type === 'touchstart') {\n this.root && (this.root.__touchstartTarget = this);\n }\n }\n return true;\n }\n }\n\n __gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx = 0, dy = 0) {\n let iw = bx2 - bx1;\n let ih = by2 - by1;\n // 无尺寸无需创建渐变\n if(!iw || !ih) {\n return;\n }\n let { k, v, d, s, z, p } = bgi;\n let cx = bx1 + iw * 0.5;\n let cy = by1 + ih * 0.5;\n let res = { k };\n if(k === 'linear') {\n let gd = gradient.getLinear(v, d, bx1, by1, cx, cy, iw, ih, this.root, dx, dy);\n res.v = this.__getLg(renderMode, ctx, gd);\n }\n else if(k === 'radial') {\n let gd = gradient.getRadial(v, s, z, p, bx1, by1, bx2, by2, this.root, dx, dy);\n if(gd) {\n res.v = this.__getRg(renderMode, ctx, gd)\n if(gd.matrix) {\n res.v = [res.v, gd.matrix, gd.cx, gd.cy];\n }\n }\n }\n else if(k === 'conic') {\n let bbox = this.bbox;\n let m1 = Math.max(Math.abs(bbox[2] - bbox[0]), Math.abs(bbox[3] - bbox[1]));\n let m2 = Math.max(Math.abs(iw), Math.abs(ih));\n let gd = gradient.getConic(v, d, p, bx1, by1, bx2, by2, m1 / m2, this.root, dx, dy);\n res.v = this.__getCg(renderMode, ctx, gd);\n }\n return res;\n }\n\n __getLg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let lg = ctx.createLinearGradient(gd.x1, gd.y1, gd.x2, gd.y2);\n gd.stop.forEach(item => {\n lg.addColorStop(item[1], int2rgba(item[0]));\n });\n return lg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', gd.x1],\n ['y1', gd.y1],\n ['x2', gd.x2],\n ['y2', gd.y2],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__cacheDefs.push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getRg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let rg = ctx.createRadialGradient(gd.cx, gd.cy, 0, gd.tx, gd.ty, gd.r);\n gd.stop.forEach(item => {\n rg.addColorStop(item[1], int2rgba(item[0]));\n });\n return rg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'radialGradient',\n props: [\n ['cx', gd.tx],\n ['cy', gd.ty],\n ['r', gd.r],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n if(gd.tx !== gd.cx) {\n v.props.push(['fx', gd.cx]);\n }\n if(gd.ty !== gd.cy) {\n v.props.push(['fy', gd.cy]);\n }\n let uuid = ctx.add(v);\n this.__cacheDefs.push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __cacheTotal = this.__cacheTotal;\n let __cacheFilter = this.__cacheFilter;\n let __cacheMask = this.__cacheMask;\n let __cache = this.__cache;\n if(__cache && !onlyTotal) {\n __cache.release();\n this.__refreshLevel |= REPAINT;\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n this.__refreshLevel |= CACHE;\n this.clearTopCache();\n }\n\n clearTopCache() {\n let p = this.__domParent;\n while(p) {\n let __cacheTotal = p.__cacheTotal;\n let __cacheFilter = p.__cacheFilter;\n let __cacheMask = p.__cacheMask;\n p.__refreshLevel |= CACHE;\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n p = p.__domParent;\n }\n }\n\n updateStyle(style, cb) {\n let formatStyle = normalize(style);\n this.updateFormatStyle(formatStyle, cb);\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let root = this.__root, currentStyle = this.__currentStyle, currentProps = this.__currentProps;\n let keys = [];\n Object.keys(style).forEach(i => {\n let isGeom = GEOM.hasOwnProperty(i);\n if(!isGeom) {\n i = parseInt(i);\n }\n if(!equalStyle(i, isGeom ? currentProps[i] : currentStyle[i], style[i], this)) {\n if(isGeom) {\n currentProps[i] = style[i];\n }\n else {\n currentStyle[i] = style[i];\n }\n keys.push(i);\n }\n });\n if(!keys.length || this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(root) {\n root.__addUpdate(this, keys, null, null, null, null, cb);\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.__isDestroyed) {\n animation.__destroy();\n return animation;\n }\n this.__animationList.push(animation);\n if(options.autoPlay === false) {\n return animation;\n }\n return animation.play();\n }\n\n removeAnimate(o) {\n if(o instanceof Animation) {\n let i = this.__animationList.indexOf(o);\n if(i > -1) {\n o.cancel();\n o.__destroy();\n this.__animationList.splice(i, 1);\n }\n }\n }\n\n clearAnimate() {\n this.__animationList.splice(0).forEach(o => {\n o.cancel();\n o.__destroy();\n });\n }\n\n frameAnimate(cb) {\n if(isFunction(cb)) {\n let list = this.__frameAnimateList;\n // 防止重复\n for(let i = 0, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n return cb;\n }\n }\n let enter = {\n __after(diff) {\n cb(diff);\n },\n __karasFramecb: cb,\n };\n list.push(enter);\n frame.onFrame(enter);\n return cb;\n }\n }\n\n removeFrameAnimate(cb) {\n for(let i = 0, list = this.__frameAnimateList, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n list.splice(i, 1);\n frame.offFrame(cb);\n return;\n }\n }\n }\n\n clearFrameAnimate() {\n this.__frameAnimateList.splice(0).forEach(o => {\n frame.offFrame(o);\n });\n }\n\n // isLayout为false时,为relative,true则是absolute/justify/marginAuto等直接改layoutData数据的\n // lv是reflow偏移时传入,需要清除cacheStyle,并且对位图cache进行偏移设置\n // 注意所有的offset/resize都要避免display:none的,比如合并margin导致block的孩子inline因clamp为none时没有layoutData\n __offsetX(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetX(diff);\n if(isLayout) {\n this.__layoutData.x += diff;\n }\n this.__x1 += diff;\n this.__x2 += diff;\n this.__x3 += diff;\n this.__x4 += diff;\n this.__x5 += diff;\n this.__x6 += diff;\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n if(this.__bbox) {\n this.__bbox[0] += diff;\n this.__bbox[2] += diff;\n }\n if(this.__filterBbox) {\n this.__filterBbox[0] += diff;\n this.__filterBbox[2] += diff;\n }\n }\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff);\n if(isLayout) {\n this.__layoutData && (this.__layoutData.y += diff);\n }\n this.__y1 += diff;\n this.__y2 += diff;\n this.__y3 += diff;\n this.__y4 += diff;\n this.__y5 += diff;\n this.__y6 += diff;\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n if(this.__bbox) {\n this.__bbox[1] += diff;\n this.__bbox[3] += diff;\n }\n if(this.__filterBbox) {\n this.__filterBbox[1] += diff;\n this.__filterBbox[3] += diff;\n }\n if(this.__cache) {\n this.__cache.__offsetY(diff);\n }\n if(this.__cacheTotal) {\n this.__cacheTotal.__offsetY(diff);\n }\n if(this.__cacheFilter) {\n this.__cacheFilter.__offsetY(diff);\n }\n if(this.__cacheMask) {\n this.__cacheMask.__offsetY(diff);\n }\n }\n }\n\n __resizeX(diff, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n this.__computedStyle.width = this.__width += diff;\n this.__clientWidth += diff;\n this.__offsetWidth += diff;\n this.__outerWidth += diff;\n this.__layoutData && (this.__layoutData.w += diff);\n this.__x4 += diff;\n this.__x5 += diff;\n this.__x6 += diff;\n if(diff < 0) {\n this.__limitCache = false;\n }\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n }\n this.clearCache();\n }\n\n __resizeY(diff, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n this.__computedStyle.height = this.__height += diff;\n this.__clientHeight += diff;\n this.__offsetHeight += diff;\n this.__outerHeight += diff;\n this.__layoutData.h += diff;\n this.__y4 += diff;\n this.__y5 += diff;\n this.__y6 += diff;\n if(diff < 0) {\n this.__limitCache = false;\n }\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n }\n this.clearCache();\n }\n\n getComputedStyle(key) {\n let computedStyle = this.__computedStyle;\n let res = {};\n let keys = [];\n if(key) {\n let temp;\n if(Array.isArray(key)) {\n temp = key;\n }\n else {\n temp = [key];\n }\n temp.forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr[k].forEach(k => {\n keys.push(STYLE_KEY[style2Upper(k)]);\n });\n }\n else {\n keys.push(STYLE_KEY[style2Upper(k)]);\n }\n });\n }\n else {\n keys = Object.keys(computedStyle);\n }\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n res[k] = computedStyle[k];\n }\n else {\n res[STYLE_RV_KEY[k]] = computedStyle[k];\n }\n });\n return res;\n }\n\n getBoundingClientRect(includeBbox) {\n let box;\n if(includeBbox) {\n box = this.bbox;\n }\n else {\n let { __x1, __y1, __offsetWidth, __offsetHeight } = this;\n box = [__x1, __y1, __x1 + __offsetWidth, __y1 + __offsetHeight];\n }\n let matrixEvent = this.__matrixEvent;\n let p1 = point2d(mx.calPoint({ x: box[0], y: box[1] }, matrixEvent));\n let p2 = point2d(mx.calPoint({ x: box[2], y: box[1] }, matrixEvent));\n let p3 = point2d(mx.calPoint({ x: box[2], y: box[3] }, matrixEvent));\n let p4 = point2d(mx.calPoint({ x: box[0], y: box[3] }, matrixEvent));\n return {\n left: Math.min(p1.x, Math.min(p2.x, Math.min(p3.x, p4.x))),\n top: Math.min(p1.y, Math.min(p2.y, Math.min(p3.y, p4.y))),\n right: Math.max(p1.x, Math.max(p2.x, Math.max(p3.x, p4.x))),\n bottom: Math.max(p1.y, Math.max(p2.y, Math.max(p3.y, p4.y))),\n points: [p1, p2, p3, p4],\n };\n }\n\n // img和geom返回false,在inline布局时判断是否是真的inline\n __isRealInline() {\n return true;\n }\n\n remove(cb) {\n let { __root: root } = this;\n let parent = this.isShadowRoot ? this.hostRoot.__parent: this.__parent;\n let i;\n if(parent) {\n // 移除component的shadowRoot视为移除component\n let target = this.isShadowRoot ? this.hostRoot : this;\n i = parent.__children.indexOf(target);\n parent.__children.splice(i, 1);\n i = parent.__zIndexChildren.indexOf(target);\n parent.__zIndexChildren.splice(i, 1);\n let { __prev, __next } = target;\n if(__prev) {\n __prev.__next = __next;\n }\n if(__next) {\n __next.__prev = __prev;\n }\n }\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n parent.__deleteStruct(this, i);\n // 不可见仅改变数据结构\n if(this.__computedStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n this.__destroy();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow逻辑做结构关系等\n root.__addUpdate(this, null, REFLOW, null, true, null, cb);\n }\n\n addEventListener(type, cb) {\n if(type && isFunction(cb)) {\n type = type.toLowerCase();\n let arr = this.__listener[type] = this.__listener[type] || [];\n for(let i = 0, len = arr.length; i < len; i++) {\n if(arr[i] === cb) {\n return;\n }\n }\n arr.push(cb);\n }\n }\n\n removeEventListener(type, cb) {\n if(!type) {\n return;\n }\n type = type.toLowerCase();\n let arr = this.__listener[type];\n if(Array.isArray(arr) && cb) {\n for(let i = 0, len = arr.length; i < len; i++) {\n if(arr[i] === cb) {\n arr.splice(i, 1);\n break;\n }\n }\n }\n else if(isFunction(arr) && arr === cb) {\n delete this.__listener[type];\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get clientWidth() {\n return this.__clientWidth || 0;\n }\n\n get clientHeight() {\n return this.__clientHeight || 0;\n }\n\n get offsetWidth() {\n return this.__offsetWidth || 0;\n }\n\n get offsetHeight() {\n return this.__offsetHeight || 0;\n }\n\n get outerWidth() {\n return this.__outerWidth || 0;\n }\n\n get outerHeight() {\n return this.__outerHeight || 0;\n }\n\n // 相对自身原点,不考虑margin的范围,>=REPAINT渲染或个别有影响的渲染改变(如blur)清空缓存\n get bbox() {\n if(!this.__bbox) {\n let {\n __x1, __y1, __offsetWidth, __offsetHeight,\n __computedStyle: {\n [BOX_SHADOW]: boxShadow,\n },\n } = this;\n this.__bbox = spreadBoxShadow([__x1, __y1, __x1 + __offsetWidth, __y1 + __offsetHeight], boxShadow);\n }\n return this.__bbox;\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let bbox = this.__bbox || this.bbox;\n let filter = this.__computedStyle[FILTER];\n this.__filterBbox = spreadFilter(bbox, filter);\n }\n return this.__filterBbox;\n }\n\n get listener() {\n return this.__listener;\n }\n\n get opacity() {\n return this.__opacity;\n }\n\n get matrix() {\n return this.__matrix;\n }\n\n get matrixEvent() {\n let __domParent = this.__domParent, matrix = this.__matrix;\n while(__domParent) {\n matrix = mx.multiply(__domParent.__perspectiveMatrix, matrix);\n matrix = mx.multiply(__domParent.__matrix, matrix);\n __domParent = __domParent.__domParent;\n }\n return matrix;\n }\n\n get perspectiveMatrix() {\n return this.__perspectiveMatrix;\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.__computedStyle;\n }\n\n get animationList() {\n return this.__animationList;\n }\n\n get currentStyle() {\n return this.__currentStyle;\n }\n\n get cacheStyle() {\n return this.__cacheStyle;\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get contentBoxList() {\n return this.__contentBoxList;\n }\n\n get baseline() {\n return this.__offsetHeight;\n }\n\n get firstBaseline() {\n return this.__offsetHeight;\n }\n\n get verticalBaseline() {\n return this.__offsetWidth;\n }\n\n get mask() {\n return this.__mask;\n }\n\n set mask(v) {\n v = !!v;\n if(this.__mask !== v) {\n this.__mask = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n let p = this.__domParent;\n if(p) {\n if(v) {\n p.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n p.__computedStyle[TRANSFORM_STYLE] = p.__currentStyle[TRANSFORM_STYLE];\n }\n }\n root.__addUpdate(this, null, MASK, null, null, null, null);\n }\n }\n }\n\n get clip() {\n return this.__clip;\n }\n\n set clip(v) {\n v = !!v;\n if(this.__clip !== v) {\n this.__clip = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n let p = this.__domParent;\n if(p) {\n if(v) {\n p.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n p.__computedStyle[TRANSFORM_STYLE] = p.__currentStyle[TRANSFORM_STYLE];\n }\n }\n root.__addUpdate(this, null, MASK, null, null, null, null);\n }\n }\n }\n\n get cacheAsBitmap() {\n return this.__cacheAsBitmap;\n }\n\n set cacheAsBitmap(v) {\n v = !!v;\n if(this.__cacheAsBitmap !== v) {\n this.__cacheAsBitmap = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n if(v) {\n this.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n this.__computedStyle[TRANSFORM_STYLE] = this.__currentStyle[TRANSFORM_STYLE];\n }\n root.__addUpdate(this, null, REPAINT, null, null, null, null);\n }\n }\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get env() {\n let root = this.__root;\n if(root) {\n return root.__env || {\n x: this.__x1,\n y: this.__y1,\n width: root.__width,\n height: root.__height,\n node: root,\n };\n }\n }\n}\n\nexport default Xom;\n","import TextBox from './TextBox';\nimport enums from '../util/enums';\nimport css from '../style/css';\n\nconst { STYLE_KEY: {\n DISPLAY,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n PADDING_TOP,\n PADDING_BOTTOM,\n PADDING_LEFT,\n PADDING_RIGHT,\n LINE_HEIGHT,\n} } = enums;\n\n/**\n * css中常见的概念,一行内容,里面可能有若干不同的内容,仅在布局阶段出现,不参与渲染逻辑\n * 本类是个抽象逻辑概念,会包含Text的内容TextBox和inlineBlock等节点,而内容TextBox则属于Text\n * 一个Text可能因为换行产生多个TextBox,从而形成不同行的内容就属于不同的LineBox\n * 本类属于block(包含flex和inlineBlock,下同)节点下,一个dom会有个专门列表,\n * 包含若干个LineBox保存着若干行文本内容TextBox,不直接关联Text,\n * inline则不会有此对象和列表,其复用最近block父层的,这样解决嵌套问题,\n * block在布局时将列表向孩子传递下去,每遇到block会重新生成\n * 每当发生换行时,专门列表中会新生成一个LineBox,让后续内容继续跟随新的LB\n * LB内部要进行垂直对齐,Text内容较简单x字符底部为baseline,inlineBlock等节点按最后一行baseline\n */\nclass LineBox {\n constructor(x, y, lineHeight, baseline, isUpright) {\n this.__list = [];\n this.__x = x;\n this.__y = y;\n this.__oy = 0; // 很难受,relative的offset不能直接加在x上,会引发重复以及block父尺寸问题\n this.__lineHeight = lineHeight; // 可能出现空的inline,因此一个inline进入布局时先设置当前lineBox的最小lineHeight/baseline\n this.__baseline = baseline;\n this.__isUpright = isUpright;\n this.__bOffset = 0;\n }\n\n add(item) {\n this.list.push(item);\n item.__parentLineBox = this;\n }\n\n verticalAlign(isUpright) {\n let baseline = isUpright ? this.verticalBaseline : this.baseline;\n let lineHeight = isUpright ? this.verticalLineHeight : this.lineHeight;\n let increase = lineHeight;\n // 只有1个也需要对齐,因为可能内嵌了空inline使得baseline发生变化\n if(this.list.length) {\n this.list.forEach(item => {\n if(item.isEllipsis) {\n return;\n }\n // 垂直排版计算不太一样,因为原点坐标系不一样\n if(isUpright) {\n let n = item.verticalBaseline;\n if(n !== baseline) {\n let d = baseline - n;\n item.__offsetX(d, true);\n // 同下方\n increase = Math.max(increase, item.offsetWidth + d);\n }\n }\n else {\n let n = item.baseline;\n if(n !== baseline) {\n let d = baseline - n;\n item.__offsetY(d, true);\n // text的话对齐下移可能影响整体高度,在同行有img/ib这样的替换元素下,需记录最大偏移导致的高度调整值\n // 比如一个字符和img,字符下调y即字符的baseline和图片底部对齐,导致高度增加lineHeight和baseline的差值\n increase = Math.max(increase, item.offsetHeight + d);\n }\n }\n });\n // 特殊情况,有img这样的替换元素时,要参与这一行和baseline的对齐扩充,常见于css的img底部额外4px问题\n // 先计算总体baseline和本身baseline差值得出偏移,然后加到本身lineHeight上得出尺寸,再和其它扩充取最大值\n let diff = baseline - this.__baseline;\n increase = Math.max(increase, this.__lineHeight + diff);\n }\n return Math.max(0, increase - lineHeight);\n }\n\n __offsetX(diff, isAlign) {\n this.__x += diff;\n // vertical-align或水平情况特殊对齐,可能替换元素img和text导致偏移\n if(isAlign) {\n this.list.forEach(item => {\n item.__offsetX(diff, true);\n });\n }\n }\n\n __offsetY(diff, isAlign) {\n this.__y += diff;\n // vertical-align情况或水平特殊对齐,可能替换元素img和textBox导致偏移\n if(isAlign) {\n this.list.forEach(item => {\n item.__offsetY(diff, true);\n });\n }\n }\n\n /**\n * 防止非行首空inline,每当遇到inline就设置当前lineBox的lineHeight/baseline,这样有最小值兜底\n * @param l\n * @param b\n * @private\n */\n __setLB(l, b) {\n this.__lineHeight = Math.max(l, this.__lineHeight);\n this.__baseline = Math.max(b, this.__baseline);\n }\n\n __resetLb(l, b) {\n this.list.forEach(item => {\n let dom = item;\n if(item instanceof TextBox) {\n dom = item.parent.parent;\n }\n let computedStyle = dom.computedStyle;\n while(computedStyle[DISPLAY] === 'inline') {\n l = Math.max(l, computedStyle[LINE_HEIGHT]);\n b = Math.max(b, css.getBaseline(computedStyle));\n dom = dom.domParent;\n computedStyle = dom.computedStyle;\n }\n });\n this.__lineHeight = l;\n this.__baseline = b;\n }\n\n get list() {\n return this.__list;\n }\n\n get size() {\n return this.__list.length;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get endX() {\n return this.x + this.width;\n }\n\n get endY() {\n return this.y + this.height;\n }\n\n get width() {\n if(this.isUpright) {\n return this.verticalLineHeight;\n }\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let x1 = first.x;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n x1 -= marginLeft + borderLeftWidth + paddingLeft;\n }\n dom = dom.domParent;\n }\n let x2 = last.x + last.outerWidth;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_RIGHT]: paddingRight,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n x2 += marginRight + borderRightWidth + paddingRight;\n }\n dom = dom.domParent;\n }\n return x2 - x1;\n }\n return 0;\n }\n\n get height() {\n if(!this.isUpright) {\n return this.lineHeight;\n }\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let y1 = first.y;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n y1 -= marginTop + borderTopWidth + paddingTop;\n }\n dom = dom.domParent;\n }\n let y2 = last.y + last.outerHeight;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_BOTTOM]: marginBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [PADDING_BOTTOM]: paddingBottom,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n y2 += marginBottom + borderBottomWidth + paddingBottom;\n }\n dom = dom.domParent;\n }\n return y2 - y1;\n }\n return 0;\n }\n\n get bOffset() {\n return this.__bOffset;\n }\n\n get baseline() {\n let baseline = this.__baseline;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n baseline = Math.max(baseline, item.baseline);\n });\n return baseline;\n }\n\n get verticalBaseline() {\n let baseline = this.__baseline;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n baseline = Math.max(baseline, item.verticalBaseline);\n });\n return baseline;\n }\n\n get lineHeight() {\n let lineHeight = this.__lineHeight;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerHeight);\n });\n return lineHeight;\n }\n\n get verticalLineHeight() {\n let lineHeight = this.__lineHeight;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerWidth);\n });\n return lineHeight;\n }\n\n get isUpright() {\n return this.__isUpright;\n }\n}\n\nexport default LineBox;\n","import LineBox from './LineBox';\n\n/**\n * 维护一个上下文的LineBox,向LineBox中添加Item以及新增下一行的LineBox,多个LineBox组成一个区域\n * 一个block/inlineBlock拥有一个本类对象,上下文即对应这个dom流,而inline则复用最近非inline父元素的\n * 同时LineBox可能连续也可能不连续,不连续的是中间有block之类的隔离开来\n */\nclass LineBoxManager {\n constructor(x, y, lineHeight, baseline, isUpright) {\n this.__x = this.__lastX = x; // last存储目前最后一行LineBox的结尾位置,供后续inline使用\n this.__y = this.__lastY = y;\n this.__max = isUpright ? y : x;\n this.__domList = [];\n this.__domStack = [];\n this.__list = []; // 包含若干LineBox\n this.__isNewLine = true; // 区域内是否是新行,容器dom(block)开头肯定是\n this.__lineHeight = lineHeight;\n this.__baseline = baseline;\n this.__isEnd = true; // 在dom中是否一个区域处在结尾,外部控制\n this.__spreadList = []; // verticalAlign时每个区域增加的y高度\n this.__isVertical = isUpright;\n }\n\n /**\n * 每次换行时重新生成LineBox存入列表,同时由于flow流当前一定是流(dom)的结尾,设置isEnd\n * @returns {LineBox}\n */\n genLineBox(x, y) {\n let lineBox = new LineBox(x, y, this.__lineHeight, this.__baseline, this.isUpright);\n this.list.push(lineBox);\n this.__isEnd = true;\n return lineBox;\n }\n\n /**\n * inline的特殊调用,防止空内容但有mbp的inline不占位,放入一个有lineHeight的空lineBox\n * 只有新行开头时需要,后面的无论是否有内容都会影响lineHeight\n * @param x\n * @param y\n * @param l\n * @param b\n * @returns {LineBox}\n */\n genLineBoxByInlineIfNewLine(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseline = Math.max(this.__baseline, b);\n if(this.__isNewLine) {\n let lineBox = new LineBox(x, y, lineHeight, baseline, this.isUpright);\n this.list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n }\n\n /**\n * 外部设置为结尾,如一个LineBox后出现一个block,此时会被隔断,不再作为流的末尾\n */\n setNotEnd() {\n this.__isEnd = false;\n }\n\n /**\n * 外部设置新行,下次新生成LineBox\n */\n setNewLine() {\n this.__isNewLine = true;\n }\n\n /**\n * 当前LineBox放入一个新项,当新行时(如第一行)产生一个新的LineBox并存入列表\n * 是否新区域和新行都是可以被外部控制,默认第一行是新\n * 当被隔断后会被外部重置新行,这样会生成新的来作为新加项的LineBox\n * 当换行时外部也会调用新行,这样再次添加Item时会自动生成新的LineBox而不是用之前的\n * @param o TextBox/Inline/InlineBlock\n * @param nextNewLine 是否设置newLine,标明下次添加新生成LineBox\n * @returns {LineBox}\n */\n addItem(o, nextNewLine) {\n let lineBox, isUpright = this.isUpright;\n // 新行新的lineBox,否则复用最后一个\n if(this.__isNewLine) {\n this.__isNewLine = false;\n lineBox = this.genLineBox(o.x, o.y);\n }\n else {\n let list = this.list;\n let length = list.length;\n lineBox = list[length - 1];\n }\n // inline递归过程中所有inline父子顺序列表,每个dom都需要对当前内容保存\n this.__domStack.forEach(item => {\n item.__contentBoxList.push(o);\n });\n lineBox.add(o);\n // 设置结束x的位置给next的inline标记用,o可能是TextBox或inlineBlock,当next新行时注意位置\n if(nextNewLine) {\n this.__isNewLine = true;\n if(isUpright) {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = this.__y;\n }\n else {\n this.__lastX = this.__x;\n this.__lastY = o.y + o.outerHeight;\n }\n }\n else {\n if(isUpright) {\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = o.y;\n }\n }\n this.__max = Math.max(this.__max, isUpright ? (o.y + o.outerHeight) : (o.x + o.outerWidth));\n return lineBox;\n }\n\n horizonAlign(size, textAlign, isUpright) {\n this.list.forEach(lineBox => {\n let diff = size - (isUpright ? lineBox.height : lineBox.width);\n if(diff > 0) {\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(isUpright) {\n lineBox.__offsetY(diff, true);\n }\n else {\n lineBox.__offsetX(diff, true);\n }\n }\n });\n }\n\n /**\n * 垂直对齐过程中,如果遇到占位元素如img,可能会导致每行lineBox高度增加,需返回增加量,\n * next行也需要y偏移\n * @returns {number}\n */\n verticalAlign(isUpright) {\n let spreadList = this.__spreadList;\n spreadList.splice(0);\n let spread = 0;\n this.list.forEach(lineBox => {\n if(spread) {\n lineBox.__bOffset = spread; // 对齐造成的误差需记录给baseline修正\n if(isUpright) {\n lineBox.__offsetX(spread, true);\n }\n else {\n lineBox.__offsetY(spread, true);\n }\n }\n spread += lineBox.verticalAlign(isUpright);\n spreadList.push(spread);\n });\n return spread;\n }\n\n addX(n) {\n this.__lastX += n;\n }\n\n addY(n) {\n this.__lastY += n;\n }\n\n /**\n * inline递归过程中布局调用,不断出入栈dom对象,获取当前行状态下有哪些dom还在\n * @param dom\n */\n pushContentBoxList(dom) {\n this.__domList.push(dom);\n this.__domStack.push(dom);\n }\n\n popContentBoxList() {\n this.__domStack.pop();\n }\n\n __offsetX(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetX(diff);\n });\n }\n\n __offsetY(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetY(diff);\n });\n }\n\n /**\n * inline的特殊调用,非行首无论是否有内容都设置lineBox的lineHeight\n * @param l\n * @param b\n * @private\n */\n setLbByInlineIfNotNewLine(l, b) {\n let length = this.list.length;\n if(length && !this.isNewLine) {\n this.list[length - 1].__setLB(l, b, false);\n }\n }\n\n get size() {\n return this.list.length;\n }\n\n get lastX() {\n return this.__lastX;\n }\n\n get lastY() {\n return this.__lastY;\n }\n\n get endX() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endX;\n }\n return this.__x;\n }\n\n get endY() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endY;\n }\n return this.__y;\n }\n\n get isEnd() {\n return this.__isEnd;\n }\n\n get isNewLine() {\n return this.__isNewLine;\n }\n\n get breakLine() {\n return this.list.length > 1;\n }\n\n get domList() {\n return this.__domList;\n }\n\n get baseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let n = 0;\n for(let i = 0; i < length - 1; i++) {\n n += list[i].height;\n }\n // 需考虑因为verticalAlign造成的lineBox偏移offset值,修正计算正确的baseline\n return n + list[length - 1].baseline + list[length - 1].bOffset;\n }\n return 0;\n }\n\n get firstBaseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseline;\n }\n return 0;\n }\n\n get verticalBaseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseline + list[0].bOffset;\n }\n return 0;\n }\n\n get lineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].lineHeight;\n }\n return 0;\n }\n\n get verticalLineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].verticalLineHeight;\n }\n return 0;\n }\n\n get lineBox() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1];\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get width() {\n let w = 0;\n this.list.forEach(item => {\n w = Math.max(w, item.width);\n });\n return w;\n }\n\n get spreadList() {\n return this.__spreadList;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n\n get max() {\n return this.__max;\n }\n}\n\nexport default LineBoxManager;\n","const TAG_NAME = {\n 'div': true,\n 'p': true,\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst INLINE = {\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst BOLD = {\n 'b': true,\n 'strong': true,\n}\n\nexport default {\n TAG_NAME,\n INLINE,\n BOLD,\n};\n","import Xom from '../Xom';\nimport reset from '../../style/reset';\nimport css from '../../style/css';\nimport unit from '../../style/unit';\nimport enums from '../../util/enums';\nimport mode from '../../refresh/mode';\nimport util from '../../util/util';\nimport painter from '../../util/painter';\nimport transform from '../../style/transform';\nimport mx from '../../math/matrix';\nimport inject from '../../util/inject';\nimport gradient from '../../math/gradient';\nimport level from '../../refresh/level';\n\nconst {\n STYLE_KEY: {\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n WIDTH,\n HEIGHT,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n FILL,\n STROKE,\n STROKE_MITERLIMIT,\n STROKE_WIDTH,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_DASHARRAY,\n STROKE_DASHARRAY_STR,\n FILL_RULE,\n FLEX_BASIS,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN, RGBA, GRADIENT } = unit;\nconst { int2rgba, isNil, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nconst REGISTER = {};\n\nclass Geom extends Xom {\n constructor(tagName, props) {\n super(tagName, props);\n this.__isMulti = !!this.props.multi;\n this.__style = css.normalize(this.style, reset.DOM_ENTRY_SET.concat(reset.GEOM_ENTRY_SET));\n this.__currentStyle = util.extend([], this.__style);\n this.__currentProps = util.clone(this.props);\n this.__cacheProps = {};\n }\n\n __tryLayInline(w, total) {\n this.__computeReflow();\n // 无children,直接以style的width为宽度,不定义则为0\n let { currentStyle: {\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n // 减去水平mbp\n w -= this.__calSize(marginRight, total, true);\n w -= this.__calSize(paddingRight, total, true);\n w -= borderRightWidth;\n w -= this.__calSize(marginLeft, total, true);\n w -= this.__calSize(paddingLeft, total, true);\n w -= borderLeftWidth;\n return w;\n }\n\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, computedStyle } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n if(isFixed) {\n b = max = min = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n else if(([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = max = min = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n __layout(data, isAbs, isColumn, isRow) {\n super.__layout(data, isAbs, isColumn, isRow);\n this.__layoutStyle();\n }\n\n __layoutBlock(data, isAbs, isColumn, isRow) {\n let { fixedWidth, fixedHeight, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n let tw = 0, th = 0;\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n this.__ioSize(tw, th);\n if(isAbs || isColumn || isRow) {\n return;\n }\n this.__marginAuto(this.currentStyle, data);\n this.__cacheProps = {};\n }\n\n __layoutFlex(data, isAbs, isColumn, isRow) {\n // 无children所以等同于block\n this.__layoutBlock(data, isAbs, isColumn, isRow);\n }\n\n __layoutInline(data, isAbs, isInline) {\n let { fixedWidth, fixedHeight, w, h } = this.__preLayout(data, false);\n let tw = fixedWidth ? w : 0;\n let th = fixedHeight ? h : 0;\n this.__ioSize(tw, th);\n this.__cacheProps = {};\n }\n\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let res = super.__calStyle(lv, __currentStyle, __computedStyle, __cacheStyle);\n if(isNil(__cacheStyle[STROKE_WIDTH])) {\n __cacheStyle[STROKE_WIDTH] = true;\n let strokeWidth = __currentStyle[STROKE_WIDTH] || [];\n let w = this.width;\n __computedStyle[STROKE_WIDTH] = strokeWidth.map(item => {\n return this.__calSize(item, w, true);\n });\n }\n if(isNil(__cacheStyle[STROKE_DASHARRAY])) {\n __cacheStyle[STROKE_DASHARRAY] = true;\n __computedStyle[STROKE_DASHARRAY] = __currentStyle[STROKE_DASHARRAY] || [];\n __cacheStyle[STROKE_DASHARRAY_STR] = __computedStyle[STROKE_DASHARRAY].map(item => joinArr(item, ','));\n }\n // 直接赋值的\n [\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n FILL_RULE,\n ].forEach(k => {\n __computedStyle[k] = __currentStyle[k];\n });\n // stroke/fll移至render里处理,因为cache涉及渐变坐标偏移\n [FILL, STROKE].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n let v = __currentStyle[k];\n let cs = __computedStyle[k] = [];\n let res = __cacheStyle[k] = [];\n if(Array.isArray(v)) {\n v.forEach(item => {\n if(item && item.u === GRADIENT) {\n // let t = this.__gradient(renderMode, ctx, x3, y3, x4, y4, item[0], 0, 0);\n cs.push(item.v);\n res.push(true);\n }\n else if(item && item.u === RGBA && item.v[3] > 0) {\n cs.push(item.v);\n res.push(int2rgba(item.v));\n }\n else {\n cs.push('none');\n res.push('none');\n }\n });\n }\n }\n });\n return res;\n }\n\n calContent(currentStyle, computedStyle) {\n let res = super.calContent(currentStyle, computedStyle);\n this.__hasXomContent = res;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_WIDTH]: strokeWidth,\n } = computedStyle;\n let empty = true;\n for(let i = 0, len = fill.length; i < len; i++) {\n let item = fill[i];\n if(item.k || item[3] > 0) {\n empty = false;\n break;\n }\n }\n for(let i = 0, len = stroke.length; i < len; i++) {\n let item = stroke[i];\n if((item.k || item[3] > 0) && strokeWidth[i] > 0) {\n empty = false;\n break;\n }\n }\n // 矢量图形默认有内容\n if(!empty) {\n return true;\n }\n // 没有fill和stroke则认为矢量图形为空\n if(!res && empty) {\n return false;\n }\n return res;\n }\n\n __preSet(renderMode, res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.x3 + width * 0.5;\n let cy = res.y3 + height * 0.5;\n let {\n [STROKE_DASHARRAY_STR]: strokeDasharrayStr,\n } = __cacheStyle;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_WIDTH]: strokeWidth,\n [STROKE_LINECAP]: strokeLinecap,\n [STROKE_LINEJOIN]: strokeLinejoin,\n [STROKE_MITERLIMIT]: strokeMiterlimit,\n [STROKE_DASHARRAY]: strokeDasharray,\n [FILL_RULE]: fillRule,\n } = computedStyle;\n stroke = stroke.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n fill = fill.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS) {\n if(fill) {\n if(fill.k === 'linear') {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'radial' && !Array.isArray(fill.v)) {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'conic') {\n //\n }\n else if(!fill.k && ctx.fillStyle !== fill) {\n ctx.fillStyle = fill;\n }\n }\n if(stroke) {\n if(stroke.k === 'linear') {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'radial' && !Array.isArray(stroke.v)) {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'conic') {\n //\n }\n else if(!stroke.k && ctx.strokeStyle !== stroke) {\n ctx.strokeStyle = stroke;\n }\n }\n if(strokeWidth !== undefined && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n if(strokeLinecap !== undefined && ctx.lineCap !== strokeLinecap) {\n ctx.lineCap = strokeLinecap;\n }\n if(strokeLinejoin !== undefined && ctx.lineJoin !== strokeLinejoin) {\n ctx.lineJoin = strokeLinejoin;\n }\n if(strokeMiterlimit !== undefined && ctx.miterLimit !== strokeMiterlimit) {\n ctx.miterLimit = strokeMiterlimit;\n }\n // 小程序没这个方法\n if(util.isFunction(ctx.getLineDash)) {\n if(strokeDasharray && !util.equalArr(ctx.getLineDash(), strokeDasharray)) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n else if(strokeDasharray) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n // data在无cache时没有提前设置\n let preData = this.__preSet(renderMode, res);\n return Object.assign(res, preData);\n }\n\n __renderPolygon(renderMode, ctx, res) {\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list }, isMulti, bbox } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n }\n }\n\n __renderOnePolygon(renderMode, ctx, isMulti, list, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill && fill.k === 'conic';\n let isStrokeCE = stroke && stroke.k === 'conic';\n // 椭圆是array\n let isFillRE = fill && fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth && strokeWidth > 0 && stroke && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth && strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth && strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke.v = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, true);\n }\n }\n\n __drawPolygon(renderMode, ctx, isMulti, list, res, isFill, isStroke) {\n let {\n fill,\n stroke,\n strokeWidth,\n fillRule,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n if(renderMode === mode.CANVAS) {\n this.__preSetCanvas(renderMode, ctx, res);\n ctx.beginPath();\n if(isMulti) {\n list.forEach(item => canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n if(isFill && fill && fill !== 'none') {\n ctx.fill(fillRule);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n ctx.stroke();\n }\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n // 2个都没有常出现在多fill/stroke时,也有可能特殊单个故意这样写的\n if((!fill || fill === 'none') && (!stroke || stroke === 'none')) {\n return;\n }\n if(isFill && fill && fill !== 'none') {\n props.push(['fill', fill.v || fill]);\n if(fillRule && fillRule !== 'nonzero') { // evenodd\n props.push(['fill-rule', fillRule]);\n }\n }\n else {\n props.push(['fill', 'none']);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n props.push(['stroke', stroke.v || stroke]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n else {\n props.push(['stroke-width', 0]);\n }\n this.addGeom('path', props);\n }\n }\n\n __inversePtList(list, isMulti, t, dx = 0, dy = 0) {\n if(isMulti) {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n return item.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i] + dx, y: item[i + 1] + dy }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n });\n }\n else {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i] + dx, y: item[i + 1] + dy }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n }\n }\n\n __radialEllipse(renderMode, ctx, list, isMulti, res, method) {\n let {\n strokeWidth,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n let [color, matrix, cx, cy] = res[method].v;\n // 椭圆渐变的转换,顶点逆矩阵变换\n matrix = transform.calMatrixByOrigin(matrix, cx, cy);\n let t = mx.inverse(matrix);\n list = this.__inversePtList(list, isMulti, t, dx, dy);\n // 用正向matrix渲染\n if(renderMode === mode.CANVAS) {\n if(matrix) {\n ctx.save();\n // 获取当前matrix,在webgl中为E,在canvas中分无cache和有cache模式\n let me = ctx.getTransform();\n me = [me.a, me.b, 0, 0, me.c, me.d, 0, 0, 0, 0, 1, 0, me.e, me.f, 1, 0];\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx[method + 'Style'] !== color) {\n ctx[method + 'Style'] = color;\n }\n if(isMulti) {\n list.forEach(item => painter.canvasPolygon(ctx, item));\n }\n else {\n canvasPolygon(ctx, list);\n }\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n if(method === 'fill') {\n props.push(['fill', color]);\n props.push(['strokeWidth', 0]);\n }\n else if(method === 'stroke') {\n props.push(['fill', 'none']);\n props.push(['stroke', color]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n this.addGeom('path', props);\n }\n }\n\n __conicGradient(renderMode, ctx, list, isMulti, res) {\n let {\n fill,\n bbox,\n dx = 0,\n dy = 0,\n } = res;\n let color = fill.v;\n if(renderMode === mode.CANVAS) {\n let [x1, y1, x2, y2] = bbox;\n let w = x2 - x1, h = y2 - y1;\n let offscreen = inject.getOffscreenCanvas(w, h, '__$$CONIC_GRADIENT$$__', null);\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(w * 0.5, h * 0.5, w, h, fill.v.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n if(isMulti) {\n list.forEach(item => {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, item, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n });\n }\n else {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n }\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isMulti) {\n list.forEach(item => {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(item)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n });\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n }\n\n __propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(strokeDasharrayStr) {\n props.push(['stroke-dasharray', strokeDasharrayStr]);\n }\n if(strokeLinecap && strokeLinecap !== 'butt') {\n props.push(['stroke-linecap', strokeLinecap]);\n }\n if(strokeLinejoin && strokeLinejoin !== 'miter') {\n props.push(['stroke-linejoin', strokeLinejoin]);\n }\n if(strokeMiterlimit && strokeMiterlimit !== 4) {\n props.push(['stroke-miterlimit', strokeMiterlimit]);\n }\n }\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n getProps(k) {\n let v = this.currentProps[k];\n if(!isNil(v)) {\n return v;\n }\n return this['__' + k];\n }\n\n __isRealInline() {\n return false;\n }\n\n get isMulti() {\n return this.__isMulti;\n }\n\n get currentProps() {\n return this.__currentProps;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(name && !util.isString(name) && name.prototype && name.prototype instanceof Geom) {\n return name;\n }\n if(!name || !util.isString(name) || name.charAt(0) !== '$') {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Geom has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$'\n || !obj.prototype || !(obj.prototype instanceof Geom)) {\n throw new Error('Invalid param');\n }\n if(Geom.hasRegister(name)) {\n throw new Error(`Geom has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Geom.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nexport default Geom;\n","import enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\nimport css from '../style/css';\nimport Text from '../node/Text';\nimport Component from '../node/Component';\nimport Geom from '../node/geom/Geom';\nimport mode from './mode';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n WIDTH,\n HEIGHT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n BORDER_TOP_WIDTH,\n PADDING_TOP,\n BORDER_LEFT_WIDTH,\n PADDING_LEFT,\n },\n} = enums;\nconst { AUTO, PX, REM, VW, VH, VMAX, VMIN, PERCENT } = unit;\nconst { REPAINT, REFLOW, CACHE } = level;\nconst { isRelativeOrAbsolute } = css;\n\nfunction clearSvgCache(node, child) {\n if(child) {\n node.__refreshLevel |= REPAINT;\n }\n else {\n node.__refreshLevel |= CACHE;\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n clearSvgCache(child, true);\n });\n }\n}\n\n// 合并margin,和原本不合并情况下的差值\nfunction getMergeMargin(topList, bottomList) {\n let total = 0;\n let max = topList[0] || 0;\n let min = topList[0] || 0;\n topList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n bottomList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n // 正数取最大,负数取最小,正负则相加\n let target = 0;\n if(max > 0 && min > 0) {\n target = Math.max(max, min);\n }\n else if(max < 0 && min < 0) {\n target = Math.min(max, min);\n }\n else if(max !== 0 || min !== 0) {\n target = max + min;\n }\n return {\n target, // 应该的目标margin\n total, // 累计的margin\n diff: target - total,\n };\n}\n\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c.u !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex\nfunction isFixedSize(node, includeParentFlex) {\n let res = isFixedWidthOrHeight(node, WIDTH) && isFixedWidthOrHeight(node, HEIGHT);\n if(res && includeParentFlex) {\n let parent = node.__domParent;\n if(parent) {\n if(parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction getPrevMergeMargin(prev, mtList, mbList) {\n while(prev && !(prev instanceof Text)\n && !(prev instanceof Component && prev.shadowRoot instanceof Text)\n && ['block', 'flex'].indexOf(prev.computedStyle[DISPLAY]) > -1\n && prev.computedStyle[POSITION] !== 'absolute') {\n mbList.push(prev.computedStyle[MARGIN_BOTTOM]);\n if(prev.offsetHeight > 0) {\n break;\n }\n mtList.push(prev.computedStyle[MARGIN_TOP]);\n prev = prev.__prev;\n }\n}\n\nfunction getNextMergeMargin(next, mtList, mbList) {\n while(next && !(next instanceof Text)\n && !(next instanceof Component && next.shadowRoot instanceof Text)\n && ['block', 'flex'].indexOf(next.computedStyle[DISPLAY]) > -1\n && next.computedStyle[POSITION] !== 'absolute') {\n mtList.push(next.computedStyle[MARGIN_TOP]);\n if(next.offsetHeight > 0) {\n break;\n }\n mbList.push(next.computedStyle[MARGIN_BOTTOM]);\n next = next.__next;\n }\n}\n\nfunction offsetNext(next, diff, parentFixed, absList) {\n while(next) {\n let cs = next.currentStyle;\n // flow流和auto/px/rem的absolute流需要偏移diff值\n if(cs[POSITION] !== 'absolute'\n || (cs[TOP].u === AUTO && cs[BOTTOM].u === AUTO\n || cs[TOP].u === AUTO && [PX, REM, VW, VH, VMAX, VMIN].indexOf(cs[BOTTOM].u) > -1)) {\n next.__offsetY(diff, true, REFLOW);\n }\n // absolute中百分比的特殊计算偏移,但要排除parent固定尺寸\n else if(!parentFixed && cs[POSITION] === 'absolute'\n && (cs[TOP].u === PERCENT || cs[BOTTOM].u === PERCENT)) {\n if(cs[TOP].u === PERCENT) {\n next.__offsetY(diff * 0.01 * cs[TOP].v, true, REFLOW);\n }\n else {\n next.__offsetY(diff * (1 - 0.01 * cs[BOTTOM].v), true, REFLOW);\n }\n }\n // abs的percent调整,记录\n if(!(cs instanceof Text) && !(cs instanceof Component && cs.shadowRoot instanceof Text)) {\n if(cs[POSITION] === 'absolute' && cs[HEIGHT].u === PERCENT) {\n absList.push(next);\n }\n }\n next = next.__next;\n }\n return diff;\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * ---\n * 当一个元素absolute时,其变化不会影响父元素和兄弟元素,直接自己重新layout\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block/flex变化时,往上查找最上层flex视为其变化,如没有flex则影响后面兄弟offset和父resize\n * 以上情况向上查找时遇到父absolute均提前跳出,并layout\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * ===\n * 返回最上层节点,可能为node自己\n */\nfunction checkTop(root, node, addDom, removeDom) {\n if(root === node) {\n return root;\n }\n if(node instanceof Text) {\n node = node.__domParent;\n }\n // add/remove情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return node;\n }\n if(removeDom && node.computedStyle[POSITION] === 'absolute') {\n return node;\n }\n let target = node;\n // add/remove的相邻出现inline的话,视为父节点reflow\n if(addDom || removeDom) {\n let isSiblingBlock = true;\n let { __prev, __next } = node;\n if(__prev\n && (__prev instanceof Text\n || ['inline', 'inlineBlock'].indexOf(__prev.computedStyle[DISPLAY]) > -1)) {\n isSiblingBlock = false;\n }\n else if(__next\n && (__next instanceof Text\n || ['inline', 'inlineBlock'].indexOf(__next.computedStyle[DISPLAY]) > -1)) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.__domParent;\n if(target === root) {\n return root;\n }\n }\n }\n // 如果一直是absolute,则不影响其它节点\n if(target.currentStyle[POSITION] === 'absolute' && target.computedStyle[POSITION] === 'absolute') {\n return target;\n }\n // inline节点变为最近的父非inline,自身可能会display变化前后状态都要看,\n // absolute不变会影响但被上面if排除,而absolute发生变化则也需要进入这里\n if(['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.__domParent;\n if(target === root) {\n return root;\n }\n }\n // 父节点不会display变化,因为同步检测,只看computedStyle即可\n while(['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1\n && target.computedStyle[POSITION] !== 'absolute');\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n // root也会进这里,因为root强制固定size\n if(isFixedSize(target, true)) {\n return target;\n }\n }\n // 此时target指向node,如果是inline/absolute变化则是其最近的非inline父\n let parent = target;\n // 向上检查flex/absolute/fixedSize,以最上层的flex视作其更改,node本身flex不进入\n let top;\n do {\n if(parent === root) {\n break;\n }\n if(parent.computedStyle[DISPLAY] === 'flex') {\n top = parent;\n }\n // 遇到固定size提前跳出,以及absolute也是\n if(parent.computedStyle[POSITION] === 'absolute' || isFixedSize(parent, true)) {\n break;\n }\n parent = parent.__domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(top) {\n target = top;\n }\n return target;\n}\n\n/**\n * checkReflow之后,节点重新布局对自己next的节点的offset影响,计算偏移量让所有next兄弟offsetY,\n * 以及递归向上父级resize和父级所有next兄弟offsetY\n */\nfunction checkNext(root, top, node, hasZ, addDom, removeDom) {\n let cps = top.computedStyle, crs = top.currentStyle;\n let position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = crs[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = crs[DISPLAY] === 'none';\n let isLast0 = top.offsetHeight === 0;\n // none不可见布局无效可以无视,add/remove已提前判断,none时不会进来\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = top.__domParent, oldH = top.offsetHeight;\n // svg在特殊children顺序变化的情况需清除缓存以便diff运行\n // add/remove已提前自己做好,zIndex有效变化也触发,position变更static和非static触发\n let svg = root.renderMode === mode.SVG;\n if(!addDom && !removeDom) {\n if(hasZ && position === 'static' && crs[POSITION] === 'static') {\n hasZ = false;\n }\n else if(position !== crs[POSITION] && (position === 'static' || crs[POSITION] === 'static')) {\n hasZ = true;\n }\n // 特殊,zIndexChildren不变化但影响svg的diff\n else if(isLastNone !== isNowNone && !hasZ) {\n svg && clearSvgCache(parent, false);\n }\n }\n else {\n hasZ = false;\n }\n // remove自身且abs时不影响其它,除了svg的zIndex\n if(removeDom && top === node && node.computedStyle[POSITION] === 'absolute') {\n top.clearCache(true);\n svg && clearSvgCache(parent, false);\n return;\n }\n // 后续调整offsetY需要考虑mergeMargin各种情况(包含上下2个方向),之前合并前和合并后的差值都需记录\n // 先记录没更新前的,如果是空节点则m1作为整个,忽视m2\n let t1 = 0, d1 = 0, t2 = 0, d2 = 0;\n let mbList = [], mtList = [];\n let prev = top.isShadowRoot ? top.__hostRoot.__prev : top.__prev;\n let next = top.isShadowRoot ? top.__hostRoot.__next : top.__next;\n if(addDom || isLast0) {\n getPrevMergeMargin(prev, mtList, mbList);\n getNextMergeMargin(next, mtList, mbList);\n if(!addDom) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n let t = getMergeMargin(mtList, mbList);\n t1 = t.target;\n d1 = t.diff;\n }\n else {\n getPrevMergeMargin(prev, mtList, mbList);\n mtList.push(cps[MARGIN_TOP]);\n let t = getMergeMargin(mtList, mbList);\n t1 = t.target;\n d1 = t.diff;\n mtList.splice(0);\n mbList.splice(0);\n getNextMergeMargin(next, mtList, mbList);\n mbList.push(cps[MARGIN_BOTTOM]);\n t = getMergeMargin(mtList, mbList);\n t2 = t.target;\n d2 = t.diff;\n }\n // __layoutData使用prev或者父节点,并重新计算y(不包含合并margin),因为display:none或add的无数据或不对\n let __layoutData = parent.__layoutData;\n let x = __layoutData.x;\n let y = __layoutData.y;\n let w = parent.__width;\n let h = parent.__currentStyle[HEIGHT].u === AUTO ? __layoutData.h : parent.__height;\n let current = top;\n // cp的shadowRoot要向上到cp本身,考虑高阶组件在内到真正的顶层cp\n if(current.isShadowRoot) {\n current = current.__hostRoot;\n }\n // y使用prev或者parent的,首个节点无prev,prev要忽略absolute的和display:none的\n let ref = current.__prev;\n let hasFlowPrev;\n while(ref) {\n // 注意有可能是text,此时可以直接用text位置,因为none的话不会进来,而text绝对不会absolute\n let isText = ref instanceof Text;\n let computedStyle = ref.computedStyle;\n if(isText || computedStyle[POSITION] !== 'absolute' && computedStyle[DISPLAY] !== 'none') {\n y = ref.y + ref.outerHeight;\n hasFlowPrev = true;\n break;\n }\n ref = ref.__prev;\n }\n // 找不到prev以默认parent的为基准,找到则增加自身,排除remove\n let __computedStyle = parent.__computedStyle;\n if(!hasFlowPrev) {\n y += __computedStyle[MARGIN_TOP] + __computedStyle[BORDER_TOP_WIDTH] + __computedStyle[PADDING_TOP];\n }\n x += __computedStyle[MARGIN_LEFT] + __computedStyle[BORDER_LEFT_WIDTH] + __computedStyle[PADDING_LEFT];\n // 特殊的如add/remove时为absolute和none的在调用时即检查提前跳出了,不触发reflow,这里一定是触发的\n // 找到最上层容器供absolute使用,注意top本身是否abs的区别,非abs可能为relative)\n let container = isNowAbs ? parent : top;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n container = container.__domParent;\n }\n if(!container) {\n container = root;\n }\n // 删除的节点的影响top是自己,无需重新布局只要看next节点的offsetY\n if(removeDom && top === node) {\n }\n // 一定不是add/remove,同步操作提前判断\n else if(isNowNone) {\n top.__layoutNone();\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n }\n // 现在是定位流,还要看之前是什么\n else if(isNowAbs) {\n parent.__layoutAbs(container, __layoutData, top);\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n // add/remove的zIndex已提前做好无需关心,只看普通变更\n if(!addDom && !removeDom) {\n // 之前也是abs,可以跳出不会影响其它只看zIndex即可\n if(isLastAbs) {\n top.clearCache(true);\n return;\n }\n }\n }\n // 现在是普通流,不管之前是啥直接布局\n else {\n let ld = Object.assign({}, addDom ? __layoutData : top.__layoutData, {\n x,\n y,\n w,\n h,\n });\n top.__layout(ld, false, false, false);\n // 防止Geom\n if(!(top instanceof Geom)) {\n top.__layoutAbs(container, ld, null);\n }\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n }\n // add的情况在自身是abs时不影响next,除了svg的zIndex\n if(addDom && top === node && node.currentStyle[POSITION] === 'absolute') {\n top.clearCache(true);\n svg && clearSvgCache(parent, false);\n return;\n }\n // 向上查找最近的relative的parent,获取ox/oy并赋值,无需继续向上递归,因为parent已经递归包含了\n let p = parent;\n while(p) {\n if(p.__computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && top.__offsetX(ox, false, null);\n oy && top.__offsetY(oy, false, null);\n break;\n }\n p = p.__domParent;\n }\n // 高度不变一直0提前跳出,不影响包含margin合并,但需排除节点add/remove,因为空节点会上下穿透合并\n let isNow0 = removeDom && top === node || top.offsetHeight === 0;\n // 几种忽略的情况\n if(addDom && isNow0 || removeDom && isLast0) {\n top.clearCache(true);\n return;\n }\n // 查看现在的上下margin合并情况,和之前的对比得出diff差值进行offsetY/resizeY\n if(top.isShadowRoot) {\n top = top.__hostRoot;\n }\n let t3 = 0, d3 = 0, t4 = 0, d4 = 0;\n mbList.splice(0);\n mtList.splice(0);\n if(removeDom || isNow0) {\n getPrevMergeMargin(prev, mtList, mbList);\n getNextMergeMargin(next, mtList, mbList);\n if(!removeDom) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n let t = getMergeMargin(mtList, mbList);\n t3 = t.target;\n d3 = t.diff;\n }\n else {\n getPrevMergeMargin(prev, mtList, mbList);\n mtList.push(cps[MARGIN_TOP]);\n let t = getMergeMargin(mtList, mbList);\n t3 = t.target;\n d3 = t.diff;\n mtList.splice(0);\n mbList.splice(0);\n getNextMergeMargin(next, mtList, mbList);\n mbList.push(cps[MARGIN_BOTTOM]);\n t = getMergeMargin(mtList, mbList);\n t4 = t.target;\n d4 = t.diff;\n }\n let nowH;\n if(removeDom) {\n // remove有没有向上影响,决定布局后的高度nowH\n let isRemoveSelf = top === node || node.isShadowRoot && node.__hostRoot === top;\n if(isRemoveSelf) {\n nowH = 0;\n }\n else {\n nowH = top.offsetHeight;\n }\n }\n else if(isNowAbs) {\n nowH = 0;\n }\n else {\n nowH = top.offsetHeight;\n }\n // 查看mergeMargin对top造成的偏移\n if(!removeDom && d3) {\n top.__offsetY(d3, true, REFLOW);\n }\n // 差值计算注意考虑margin合并前的值,和合并后的差值,height使用offsetHeight不考虑margin\n let diff = t3 + t4 - t1 - t2 + nowH - oldH;\n // console.log('t3', t3, 'd3', d3, 't4', t4, 'd4', d4, 't1', t1, 'd1', d1, 't2', t2, 'd2', d2, nowH, oldH, diff);\n if(!diff) {\n top.clearCache(true);\n return;\n }\n let parentFixed = isFixedWidthOrHeight(parent, HEIGHT);\n if(!parentFixed) {\n parent.__resizeY(diff, REFLOW);\n }\n // 调整的同时遇到百分比高度的abs需记录下来最后重新布局\n let absList = [];\n offsetNext(next, diff, parentFixed, absList);\n top.clearCache(true);\n // 影响完next之后,向上递归,所有parent的next都影响,遇到固定尺寸或absolute跳出\n while(parent && !parentFixed && parent.__computedStyle[POSITION] !== 'absolute') {\n next = parent.__next;\n parent = parent.__domParent;\n parentFixed = parent && isFixedWidthOrHeight(parent, HEIGHT);\n if(!parentFixed) {\n parent.__resizeY(diff, REFLOW);\n }\n offsetNext(next, diff, parentFixed, absList);\n if(parentFixed) {\n parent.clearCache(false);\n }\n }\n // 记录的受影响的abs节点,都是百分比高度,需重新布局\n absList.forEach(item => {\n let ld = item.__layoutData, container = ld.container;\n item.__domParent.__layoutAbs(container, ld, item);\n });\n}\n\nexport default {\n getMergeMargin,\n checkTop,\n checkNext,\n clearSvgCache,\n};\n","import Xom from './Xom';\nimport Node from './Node';\nimport Text from './Text';\nimport Component from './Component';\nimport util from '../util/util';\n\n/**\n * 打平children,多维嵌套的数组变成一维\n */\nfunction buildChildren(parent, children) {\n let list = [];\n flatten(parent, children, list);\n return list;\n}\n\nfunction flatten(parent, children, list) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n flatten(parent, item, list);\n });\n }\n else if(children instanceof Xom) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n children.__parent = parent;\n list.push(children);\n }\n else if(children instanceof Component) {\n children.__parent = parent;\n list.push(children);\n }\n else if(!util.isNil(children) && children !== '') {\n let t = new Text(children);\n t.__parent = parent;\n list.push(t);\n }\n}\n\n/**\n * 设置关系,父子和兄弟,被添加到真实dom中前调用\n */\nfunction relation(root, host, parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(root, host, parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__root = root;\n children.__host = children.__hostRoot = host;\n children.__parent = parent;\n children.__domParent = parent;\n children.__isDestroyed = false;\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n if(!(children instanceof Text)) {\n let ref = children.props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = children;\n }\n else if(ref && util.isFunction(ref)) {\n ref(children);\n }\n }\n if(children instanceof Xom && children.__children) {\n relation(root, host, children, children.__children, {});\n }\n else if(children instanceof Component) {\n let sr = children.render();\n let hoc = [];\n while(sr && sr instanceof Component) {\n hoc.push(sr);\n let res = sr.render();\n if(res) {\n sr.__shadow = res;\n res.__host = sr;\n }\n sr = res;\n }\n if(!(sr instanceof Node)) {\n sr = new Text(sr);\n }\n if(hoc.length) {\n children.__shadow = hoc[0];\n hoc[0].__host = children;\n hoc.forEach(item => {\n item.__shadowRoot = sr;\n item.__hostRoot = children;\n item.__root = root;\n item.__domParent = parent;\n });\n }\n else {\n children.__shadow = sr;\n sr.__host = children;\n }\n children.__shadowRoot = sr;\n sr.__hostRoot = children;\n sr.__root = root;\n sr.__domParent = parent;\n sr.__isDestroyed = false;\n children.__init();\n if(sr instanceof Xom && sr.__children) {\n relation(root, children, sr, sr.__children, {});\n }\n }\n }\n return children;\n}\n\n// 设置每个节点root引用,组件初始化\nfunction buildRoot(root, children) {\n root.__root = root;\n root.__host = root;\n relation(root, root, root, children, {});\n}\n\nexport default {\n buildChildren,\n buildRoot,\n relation,\n};\n","import Xom from './Xom';\nimport Text from './Text';\nimport Node from './Node';\nimport LineBoxManager from './LineBoxManager';\nimport Component from './Component';\nimport tag from './tag';\nimport TextBox from './TextBox';\nimport Ellipsis from './Ellipsis';\nimport reset from '../style/reset';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from './builder';\nimport mode from '../refresh/mode';\nimport level from '../refresh/level';\nimport geom from '../math/geom';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_RIGHT,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n WIDTH,\n HEIGHT,\n TEXT_ALIGN,\n FLEX_DIRECTION,\n FLEX_BASIS,\n FLEX_SHRINK,\n FLEX_GROW,\n ALIGN_SELF,\n ALIGN_ITEMS,\n JUSTIFY_CONTENT,\n Z_INDEX,\n WHITE_SPACE,\n LINE_HEIGHT,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n WRITING_MODE,\n },\n ELLIPSIS,\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { isRelativeOrAbsolute, getBaseline, getVerticalBaseline } = css;\nconst { extend, isNil, isFunction, assignMatrix } = util;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { isE, multiply } = mx;\nconst { REFLOW } = level;\n\n// 渲染获取zIndex顺序\nfunction genZIndexChildren(dom) {\n let normal = [];\n let hasMc;\n let mcHash = {};\n let lastMaskIndex;\n let children = dom.children;\n children.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n // 遮罩单独保存后特殊排序\n if(item instanceof Xom && item.__mask) {\n // 开头的mc忽略,后续的连续mc以第一次出现为准\n if(lastMaskIndex !== undefined) {\n mcHash[lastMaskIndex].push(item);\n }\n else if(i) {\n lastMaskIndex = i - 1;\n children[lastMaskIndex].__iIndex = lastMaskIndex;\n mcHash[lastMaskIndex] = [item];\n hasMc = true;\n }\n }\n else {\n lastMaskIndex = undefined;\n if(item instanceof Xom) {\n child.__zIndex = item.currentStyle[Z_INDEX];\n if(isRelativeOrAbsolute(item)) {\n // 临时变量为排序使用\n child.__aIndex = true;\n normal.push(child);\n }\n else {\n // 之前遗留清除\n child.__aIndex = undefined;\n normal.push(child);\n }\n }\n else {\n child.__zIndex = 0;\n normal.push(child);\n }\n child.__iIndex = i;\n }\n });\n normal.sort(function(a, b) {\n if(a.__zIndex !== b.__zIndex) {\n return a.__zIndex - b.__zIndex;\n }\n // zIndex相等时abs优先flow\n if(a.__aIndex !== b.__aIndex) {\n if(a.__aIndex) {\n return 1;\n }\n return -1;\n }\n // 都相等看索引\n return a.__iIndex - b.__iIndex;\n });\n // 将遮罩插入到对应顺序上\n if(hasMc) {\n for(let i = normal.length - 1; i >= 0; i--) {\n let idx = normal[i].__iIndex;\n if(mcHash.hasOwnProperty(idx)) {\n normal.splice(i + 1, 0, ...mcHash[idx]);\n }\n }\n }\n return normal;\n}\n\n// flex布局阶段顺序,不是渲染也和struct结构无关,可以无视mask\nfunction genOrderChildren(flowChildren) {\n let normal = [];\n flowChildren.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n child.__order = item.currentStyle[ORDER];\n }\n else {\n child.__order = 0;\n }\n normal.push(child);\n child.__iIndex = i;\n });\n normal.sort(function(a, b) {\n if(a.__order !== b.__order) {\n return a.__order - b.__order;\n }\n // order相等时看节点索引\n return a.__iIndex - b.__iIndex;\n });\n return normal;\n}\n\n/**\n * lineClamp超出范围时ib作为最后一行最后一个无法挤下时进行回溯\n */\nfunction backtrack(bp, lineBoxManager, lineBox, total, endSpace, isUpright) {\n let ew, computedStyle = bp.computedStyle, root = bp.root, renderMode = root.renderMode;\n let list = lineBox.list;\n // 根据textBox里的内容,确定当前内容,索引,x和剩余宽度\n list.forEach(item => {\n total -= isUpright ? item.outerHeight : item.outerWidth;\n });\n let ctx;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx = renderMode === WEBGL\n ? inject.getFontCanvas().ctx\n : root.ctx;\n }\n // 临时测量ELLIPSIS的尺寸\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], computedStyle[FONT_SIZE], computedStyle[FONT_WEIGHT]);\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n // 无论删除一个ib还是textBox,放得下的话都可以暂停循环,注意强制保留行首\n if(!i || total + item.outerWidth >= ew + (1e-10)) {\n if(item instanceof TextBox) {\n let text = item.parent;\n text.__backtrack(bp, lineBoxManager, lineBox, item, total, endSpace, ew, computedStyle, ctx, renderMode, isUpright);\n }\n else {\n let ep = new Ellipsis(item.x + item.outerWidth + endSpace, item.y, ew, bp, item, isUpright);\n lineBoxManager.addItem(ep, true);\n }\n break;\n }\n // 放不下删除\n else {\n if(item instanceof TextBox) {\n let text = item.parent;\n let i = text.textBoxes.indexOf(item);\n if(i > -1) {\n text.textBoxes.splice(i, 1);\n }\n }\n else {\n item.__layoutNone();\n }\n list.pop();\n total += isUpright ? item.outerHeight : item.outerWidth;\n }\n }\n}\n\nclass Dom extends Xom {\n constructor(tagName, props, children) {\n super(tagName, props);\n let { style } = this;\n if(!style.display || !{\n flex: true,\n block: true,\n inline: true,\n 'inline-block': true,\n inlineBlock: true,\n none: true,\n }.hasOwnProperty(style.display)) {\n if(tag.INLINE.hasOwnProperty(this.tagName)) {\n style.display = 'inline';\n }\n else {\n style.display = 'block';\n }\n }\n if(!style[FONT_WEIGHT] && tag.BOLD.hasOwnProperty(tagName)) {\n style.fontWeight = 700;\n }\n this.__style = css.normalize(style, reset.DOM_ENTRY_SET);\n // currentStyle/currentProps不深度clone,继承一层即可,动画时也是extend这样只改一层引用不动原始静态style\n this.__currentStyle = extend([], this.__style);\n this.__children = builder.buildChildren(this, children);\n this.__flexLine = []; // flex布局多行模式时存储行\n this.__ellipsis = null; // 虚拟节点,有的话渲染\n this.__zIndexChildren = null;\n }\n\n __structure(lv, j) {\n let res = super.__structure(lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, i) => {\n let temp = child.__structure(lv + 1, i);\n if(Array.isArray(temp)) {\n arr = arr.concat(temp);\n }\n else {\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res.num = zIndexChildren.length;\n res.total = total;\n return arr;\n }\n\n __modifyStruct() {\n let struct = this.__struct;\n let total = struct.total || 0;\n let root = this.__root, __structs = root.__structs;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct.lv, struct.childIndex);\n let i = __structs.indexOf(struct);\n root.__structs.splice(i, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = this.__struct;\n d = (struct.total || 0) - total;\n if(d) {\n let p = this.__domParent;\n while(p) {\n p.__struct.total = p.__struct.total || 0;\n p.__struct.total += d;\n p = p.__domParent;\n }\n }\n }\n }\n\n __insertStruct(child, childIndex) {\n let struct = this.__struct;\n let cs = child.__structure(struct.lv + 1, childIndex);\n let root = this.__root, structs = root.__structs;\n // 根据是否有prev确定插入索引位置\n let zIndexChildren = this.__zIndexChildren;\n let i;\n if(childIndex) {\n let ps = zIndexChildren[childIndex - 1].__struct;\n let total = ps.total || 0;\n i = structs.indexOf(ps) + total + 1;\n }\n else {\n i = structs.indexOf(struct) + 1;\n }\n let total;\n if(Array.isArray(cs)) {\n structs.splice(i, 0, ...cs);\n total = (cs[0].total || 0) + 1;\n }\n else {\n structs.splice(i, 0, cs);\n total = (cs.total || 0) + 1;\n }\n // 调整后面children的childIndex,+1\n i++;\n for(let len = zIndexChildren.length; i < len; i++) {\n zIndexChildren[i].__struct.childIndex++;\n }\n // 向上添加parent的total数量\n struct.num++;\n struct.total += total;\n let p = this.__domParent;\n while(p) {\n struct = p.__struct;\n struct.total = struct.total || 0;\n struct.total += total;\n p = p.__domParent;\n }\n }\n\n __deleteStruct(child, childIndex) {\n let cs = child.__struct;\n let total = (cs.total || 0) + 1;\n let root = this.__root, structs = root.__structs;\n let i = structs.indexOf(cs);\n structs.splice(i, total);\n // zIndexChildren后面的childIndex偏移\n let zIndexChildren = this.__zIndexChildren;\n for(let i = childIndex + 1, len = zIndexChildren.length; i < len; i++) {\n zIndexChildren[i].__struct.childIndex--;\n }\n // 向上减少parent的total数量\n let struct = this.__struct;\n struct.num--;\n struct.total = struct.total || 0;\n struct.total -= total;\n let p = this.__domParent;\n while(p) {\n struct = p.__struct;\n struct.total = struct.total || 0;\n struct.total -= total;\n p = p.__domParent;\n }\n }\n\n /**\n * 因为zIndex/abs/add的变化造成的更新,只需重排这一段顺序即可\n */\n __updateStruct() {\n let structs = this.__root.__structs;\n let struct = this.__struct;\n let total = struct.total || 0;\n let index = structs.indexOf(struct);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n let needSort;\n zIndexChildren.forEach((child, i) => {\n let cs = child.__struct;\n cs.childIndex = i; // 仅后面排序用\n });\n // 按之前的structs划分为相同数量的若干段进行排序\n let source = [], arr = [], count = 0;\n for(let i = index + 1; i <= index + total; i++) {\n let cs = structs[i];\n let o = {\n cs,\n list: structs.slice(i, i + (cs.total || 0) + 1),\n };\n if(cs.childIndex !== count++) {\n needSort = true;\n }\n source.push(o);\n i += cs.total || 0;\n }\n\n if(needSort) {\n let list = [];\n source.sort(function(a, b) {\n return a.cs.childIndex - b.cs.childIndex;\n });\n source.forEach(item => {\n list = list.concat(item.list);\n });\n structs.splice(index + 1, total, ...list);\n }\n }\n\n /**\n * 给定父宽度情况下,尝试行内放下后的剩余宽度,为负数即放不下,这里只会出现行内级即inline(Block)\n * 调用前提是非行开头的inline尝试计算是否放得下,开头无需且禁止判断,防止出现永远放不下一个字符卡死\n * 返回非负数就是放得下,这样一些尺寸为0的也算\n * @param free 剩余宽度\n * @param total 容器尺寸\n * @param isUpright 垂直排版\n * @returns {number|*}\n * @private\n */\n __tryLayInline(free, total, isUpright) {\n this.__computeReflow();\n let { flowChildren, currentStyle: {\n [DISPLAY]: display,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } } = this;\n // inline没w/h,并且尝试孩子第一个能放下即可,如果是文字就是第一个字符\n if(display === 'inline') {\n if(flowChildren.length) {\n let first = flowChildren[0];\n if(first instanceof Component) {\n first = first.shadowRoot;\n }\n if(first instanceof Xom) {\n free = first.__tryLayInline(free, total, isUpright);\n }\n else {\n free -= first.firstCharWidth;\n }\n }\n }\n // inlineBlock尝试所有孩子在一行上\n else {\n if(width.u !== AUTO) {\n free -= isUpright ? this.__calSize(height, total, true) : this.__calSize(width, total, true);\n }\n else {\n for(let i = 0; i < flowChildren.length; i++) {\n // 当放不下时直接返回,无需继续多余的尝试计算\n if(free < 0) {\n return free;\n }\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n free = item.__tryLayInline(free, total, isUpright);\n }\n // text强制一行,否则非头就是放不下,需从头开始\n else {\n free -= item.textWidth;\n }\n }\n }\n // ib要减去末尾mpb\n if(isUpright) {\n free -= this.__calSize(marginBottom, total, true);\n free -= this.__calSize(paddingBottom, total, true);\n free -= borderBottomWidth;\n }\n else {\n free -= this.__calSize(marginRight, total, true);\n free -= this.__calSize(paddingRight, total, true);\n free -= borderRightWidth;\n }\n }\n // 还要减去开头的mpb\n if(isUpright) {\n free -= this.__calSize(marginTop, total, true);\n free -= this.__calSize(paddingTop, total, true);\n free -= borderTopWidth;\n }\n else {\n free -= this.__calSize(marginLeft, total, true);\n free -= this.__calSize(paddingLeft, total, true);\n free -= borderLeftWidth;\n }\n return free;\n }\n\n // 设置y偏移值,递归包括children,此举在justify-content/margin-auto/relative等对齐用\n __offsetX(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetX(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetX(diff, isLayout);\n }\n // 记得偏移LineBox\n if(isLayout && !this.__isInline && this.lineBoxManager) {\n this.lineBoxManager.__offsetX(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetX(diff, isLayout, lv);\n }\n });\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetY(diff, isLayout);\n }\n if(isLayout && !this.__isInline && this.lineBoxManager) {\n this.lineBoxManager.__offsetY(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetY(diff, isLayout, lv);\n }\n });\n }\n\n\n /**\n * flex布局时,计算basis尺寸,如果有固定声明则以其为标准,content为内容最大尺寸,auto依赖w/h或降级content\n * basis要考虑相加直接item的mpb,非绝对值单位以container为基准,basis为内容时为max值\n * item的孩子为孙子节点需递归,不参与basis计算,只参与min/max,尺寸和mpb均只考虑绝对值\n * 自动计算时影响尺寸的只有换行的text,以及一组inline,均按其中最大尺寸的一个计算\n * auto自动计算递归进行,如果是普通row方向,按最大text的charWidth为准\n * 如果是column方向,则虚拟布局后看text的height\n * 在abs下时进入特殊状态,无论是row/column,都会按row方向尝试最大尺寸,直到舞台边缘或容器声明的w折行\n * 返回b,声明则按css值,否则是auto/content\n * 返回min为最小宽度,遇到字符/inline则单列排版后需要的最大宽度\n * 返回max为最大宽度,理想情况一排最大值,在abs时virtualMode状态参与计算,文本抵达边界才进行换行\n * 当为column方向时,特殊进行虚拟布局isVirtual,需要获取高度\n * @param isDirectionRow\n * @param isAbs\n * @param isColumn\n * @param data\n * @param isDirectChild\n * @private\n */\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { flowChildren, __currentStyle: currentStyle, __computedStyle: computedStyle } = this;\n let { x, y, w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_DIRECTION]: flexDirection,\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n [DISPLAY]: display,\n [LINE_CLAMP]: lineClamp,\n [WRITING_MODE]: writingMode,\n } = computedStyle;\n let isUpright = writingMode.indexOf('vertical') === 0;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content\n let isAuto = flexBasis.u === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n let isContent = !isAuto && !isFixed;\n let fixedSize;\n // flex的item固定basis计算\n if(isFixed) {\n b = fixedSize = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n // 已声明主轴尺寸的,当basis是auto时为main值\n else if(isAuto && ([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = fixedSize = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // 非固定尺寸的basis为auto时降级为content\n else if(isAuto) {\n isContent = true;\n }\n let countMin = 0, countMax = 0;\n lineClamp = lineClamp || 0;\n // row的flex时,child只需计算宽度的basis/min/max,递归下去也是如此,即便包含递归的flex\n if(isDirectionRow) {\n // flex的item还是flex时\n if(display === 'flex') {\n let isR = ['column', 'columnReverse'].indexOf(flexDirection) === -1;\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, min2, max2] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h }, false);\n if(isR) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n // text除了flex还需要分辨垂直排版\n else {\n if(isUpright) {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n isUpright,\n });\n min += item.width;\n max += item.width;\n }\n if(isR) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n });\n }\n // 特殊的flex水平布局但书写垂直,遇到后直接假布局获取宽度,因为水平尺寸视为无限但垂直不是,\n // 这里一定是第一个垂直排版不会递归下去,因为flex的child匿名block,水平的垂直书写inline匿名ib\n else if(isUpright) {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n this.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n isUpright,\n }, isAbs, false, true);\n min = max = b = this.width;\n }\n // flex的item是block/inline时,inline也会变成block统一对待,递归下去会有inline出现,但row的水平size为无穷不会换行可以忽略\n else {\n let lineBoxManager = data.lineBoxManager;\n if(display !== 'inline') {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n }\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, min2, max2] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h, lineBoxManager }, false);\n let display = item.computedStyle[DISPLAY];\n // row看块级最大尺寸和连续行级最大尺寸的宽\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n });\n }\n if(fixedSize) {\n max = Math.max(fixedSize, max);\n }\n // row降级为内容时basis等同于max\n if(isContent) {\n b = max;\n }\n }\n // column的flex时,每个child做一次虚拟布局,获取到每个child的高度和宽度\n else {\n this.__layoutFlow({\n x,\n y,\n w,\n h,\n isUpright,\n }, isAbs, true, false);\n min = max = b = this.height; // column的child,max和b总相等\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n // flow的layout包裹方法,布局后递归计算computedStyle,abs节点在__layoutAbs中做\n __layout(data, isAbs, isColumn, isRow) {\n super.__layout(data, isAbs, isColumn, isRow);\n this.__layoutStyle();\n }\n\n // 布局结束后递归向下计算computedStyle,父级必须先算因为有inherit\n __layoutStyle() {\n super.__layoutStyle();\n this.flowChildren.forEach(child => {\n if(!(child instanceof Text)) {\n child.__layoutStyle();\n }\n });\n }\n\n __layoutNone() {\n super.__layoutNone();\n let { children } = this;\n children.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n item.__layoutNone();\n }\n });\n }\n\n /**\n * block布局,本身固定尺寸优先,否则看内容从上往下从左往右flow流排布\n * 内部inline和inlineBlock组成LineBox,通过LineBoxManager来管理混排的现象\n * LineBoxManager只有block和inlineBlock内部生成,inline会复用最近父级的\n * 内部的block在垂直方向要考虑margin合并的问题,强制所有节点为bfc,精简逻辑\n * @param data\n * @param isAbs abs无尺寸时提前虚拟布局计算尺寸\n * @param isColumn flex列无尺寸时提前虚拟布局计算尺寸\n * @param isRow flex行布局时出现writingMode垂直排版计算尺寸\n */\n __layoutBlock(data, isAbs, isColumn, isRow) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [OVERFLOW]: overflow,\n } = computedStyle;\n let { fixedWidth, fixedHeight, x, y, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n // abs虚拟布局需预知width,固定可提前返回\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return;\n }\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return;\n }\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n // 虚线管理一个block内部的LineBox列表,使得inline的元素可以中途衔接处理折行\n // 内部维护inline结束的各种坐标来达到目的,遇到block时中断并处理换行坐标\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n // 因精度问题,统计宽度均从0开始累加每行,最后取最大值,仅在abs布局时isVirtual生效\n let maxSize = 0;\n let countSize = 0;\n let lx = x; // 行首,考虑了mbp\n let ly = y;\n // 连续block(flex相同,下面都是)的上下margin合并值记录,合并时从列表中取\n let mergeMarginEndList = [], mergeMarginStartList = [];\n let length = flowChildren.length;\n let ignoreNextLine; // lineClamp超过后,后面的均忽略并置none,注意block内部行数统计是跨子block的\n let ignoreNextWrap; // whiteSpace单行超过后,后面的均忽略并置none,注意这也是跨block的会被隔断重计\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n if(isXom) {\n item.__computeReflow(); // writing-mode可能会造成inline改变为ib\n }\n let isInline = isXom && item.computedStyle[DISPLAY] === 'inline';\n let isInlineBlock = isXom && item.computedStyle[DISPLAY] === 'inlineBlock';\n let isRealInline = isInline && item.__isRealInline();\n let lastLineClampCount = lineClampCount;\n // 每次循环开始前,这次不是block的话,看之前遗留待合并margin,并重置\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginEndList.length && mergeMarginStartList.length) {\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n if(isUpright) {\n x += diff;\n }\n else {\n y += diff;\n }\n }\n }\n mergeMarginStartList = [];\n mergeMarginEndList = [];\n }\n if(isXom) {\n // inline和inlineBlock的细节不同之处,ib除了w/h之外,更想像block一样占据一行\n // 比如2个inline前面占一半后面比一半多但还是会从一半开始然后第2行换行继续,但ib放不下则重开一行\n // inline和ib能互相嵌套,形成的LineBox中则是TextBox和节点混合\n if(isInlineBlock || isInline) {\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n // x开头或者nowrap单行的非block,不用考虑是否放得下直接放\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager, // ib内部新生成会内部判断,这里不管统一传入\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样,注意nowrap排除\n if(item.__isIbFull) {\n lineClampCount++;\n }\n if((isUpright && item.__isUprightIbFull || !isUpright && item.__isIbFull)\n && whiteSpace !== 'nowrap') {\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 单行时inline在ellipsis会导致行数变化,否则判断坐标尺寸(恰好有点空剩余inline排不下),注意前提是非abs,其虚拟计算尺寸无视限制\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // abs统计宽度,注意nowrap时累加\n if(isAbs) {\n if(whiteSpace === 'nowrap') {\n countSize += isUpright ? item.outerHeight : item.outerWidth;\n }\n else {\n countSize = isUpright ? item.outerHeight : item.outerWidth;\n if(lineClampCount > lastLineClampCount) {\n countSize = Math.max(countSize, isUpright ? h : w);\n }\n }\n maxSize = Math.max(maxSize, countSize);\n }\n }\n else {\n // 非开头先尝试是否放得下,内部判断了inline/ib,ib要考虑是否有width\n let free = item.__tryLayInline(isUpright ? (h + ly - y) : (w + lx - x), isUpright ? h : w, isUpright);\n // 放得下继续,奇怪的精度问题,加上阈值\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n // ib和非换行inline累加\n if(isInlineBlock || lineClampCount === lastLineClampCount) {\n countSize += isUpright ? item.outerHeight : item.outerWidth;\n maxSize = Math.max(maxSize, countSize);\n }\n // inline换行时一定超过边界至少撑满w\n else {\n maxSize = Math.max(maxSize, isUpright ? h : w);\n countSize = isUpright ? (y - ly) : (x - lx);\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n // 放不下处理之前的lineBox,并考虑重新开头或截断\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 超过行数,整个block共用计数器\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(this, lineBoxManager, lineBox, isUpright ? h : w, 0, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineBoxManager.addItem(item, false);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n lineClampCount++;\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n maxSize = Math.max(maxSize, countSize);\n // 此处发生换行撑满\n maxSize = Math.max(maxSize, isUpright ? h : w);\n // 新行重计\n countSize = isUpright ? item.outerHeight : item.outerWidth;\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n }\n // block/flex先处理之前可能遗留的最后一行LineBox,然后递归时不传lineBoxManager,其内部生成新的\n else {\n ignoreNextWrap = false; // block出现的话只隔断单行,不影响多行计数器\n // 非开头,说明之前的text/ib未换行,需要增加行数\n if((isUpright && y > ly) || (!isUpright && x > lx)) {\n lineClampCount++;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isUpright) {\n y = ly;\n }\n else {\n x = lx;\n }\n if(lineBoxManager.isEnd) {\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 自身无内容\n let isNone = item.currentStyle[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [WIDTH]: width,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(isUpright && paddingLeft <= 0 && paddingRight <= 0 && width <= 0 && borderLeftWidth <= 0 && borderRightWidth <= 0) {\n mergeMarginEndList.push(marginRight);\n mergeMarginStartList.push(marginLeft);\n isEmptyBlock = true;\n }\n else if(!isUpright && paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginEndList.push(marginBottom);\n mergeMarginStartList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n if(isUpright) {\n x += item.outerWidth;\n lineBoxManager.__lastX = x;\n }\n else {\n y += item.outerHeight;\n lineBoxManager.__lastY = y;\n }\n // absolute/flex前置虚拟计算\n if(isAbs) {\n maxSize = Math.max(maxSize, isUpright ? item.outerHeight : item.outerWidth);\n countSize = 0;\n }\n // 空block要留下轮循环看,除非是最后一个,此处非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginEndList.length) {\n if(isUpright) {\n mergeMarginStartList.push(marginLeft);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n item.__offsetX(diff, true, null);\n x += diff;\n }\n }\n else {\n mergeMarginStartList.push(marginTop);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n item.__offsetY(diff, true, null);\n y += diff;\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginStartList = [];\n mergeMarginEndList = [isUpright ? marginRight : marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0\n else if(i === length - 1) {\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n if(isUpright) {\n x += diff;\n }\n else {\n y += diff;\n }\n }\n }\n }\n }\n // 文字和inline类似\n else {\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n // x开头,不用考虑是否放得下直接放\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // 和inline很像,只是没有ib\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // abs统计宽度,注意nowrap时累加\n if(isAbs) {\n if(whiteSpace === 'nowrap') {\n countSize += isUpright ? item.height : item.width;\n }\n else {\n countSize = isUpright ? item.height : item.width;\n if(lineClampCount > lastLineClampCount) {\n countSize = Math.max(countSize, isUpright ? h : w);\n }\n }\n maxSize = Math.max(maxSize, countSize);\n }\n }\n else {\n // 非开头先尝试是否放得下\n let free = item.__tryLayInline(isUpright ? (h + ly - y) : (w + lx - x));\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n if(lineClampCount === lastLineClampCount) {\n countSize += isUpright ? item.height : item.width;\n maxSize = Math.max(maxSize, countSize);\n }\n // inline换行一定超过边界\n else {\n maxSize = Math.max(maxSize, isUpright ? h : w);\n countSize = isUpright ? (y - ly) : (x - lx);\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 和inline/ib一样\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(this, lineBoxManager, lineBox, isUpright ? h : w, 0, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n maxSize = Math.max(maxSize, countSize);\n // 此处发生换行撑满\n maxSize = Math.max(maxSize, isUpright ? h : w);\n // 新行重计\n countSize = isUpright ? item.height : item.width;\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n }\n });\n // 结束后如果是以LineBox结尾,则需要设置y到这里,否则流布局中block会设置\n // 当以block换行时,新行是true,否则是false即结尾\n if(lineBoxManager.isEnd) {\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n }\n let tw = 0, th = 0;\n // 根据书写模式、嵌套等条件计算宽高,只有父子同向才会主轴撑满\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n else if(isAbs) {\n tw = isUpright ? (x - data.x) : maxSize;\n }\n else {\n tw = x - data.x;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n else if(isAbs) {\n th = isUpright ? maxSize : (y - data.y);\n }\n else {\n th = y - data.y;\n }\n this.__ioSize(tw, th);\n // 除了水平abs的虚拟外,都需要垂直对齐,因为img这种占位元素会影响lineBox高度,水平abs虚拟只需宽度\n if(!isAbs) {\n let spread = lineBoxManager.verticalAlign(isUpright);\n if(spread) {\n if(isUpright && !fixedWidth) {\n this.__resizeX(spread, null);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread, null);\n }\n /**\n * parent以及parent的next无需处理,因为深度遍历后面还会进行,\n * 但自己的block需处理,因为对齐只处理了inline元素,忽略了block,\n * 同时由于block和inline区域可能不连续,每个增加的y不一样,\n * 需要按照每个不同区域来判断,区域是按索引次序依次增大的,\n * 只有在inline出现过后才开始生效,inline之前的block忽略\n */\n let count = 0, spreadList = lineBoxManager.spreadList;\n let isLastBlock = false, hasStart = false;\n flowChildren.forEach(item => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isBlock = isXom && ['block', 'flex'].indexOf(item.computedStyle[DISPLAY]) > -1;\n if(isBlock) {\n if(!hasStart) {\n return;\n }\n isLastBlock = true;\n if(isUpright) {\n item.__offsetX(spreadList[count], true, null);\n }\n else {\n item.__offsetY(spreadList[count], true, null);\n }\n }\n else {\n hasStart = true;\n if(isLastBlock) {\n count++;\n }\n isLastBlock = false;\n }\n });\n }\n // 非abs提前的虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐\n if(!isColumn && !isRow) {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(isUpright ? th : tw, textAlign, isUpright);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n // 所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(isUpright ? th : tw, textAlign, isUpright);\n });\n this.__marginAuto(currentStyle, data, isUpright);\n }\n }\n }\n\n // 弹性布局时的计算位置\n __layoutFlex(data, isAbs, isColumn, isRow) {\n let { flowChildren, currentStyle, computedStyle, __flexLine } = this;\n let {\n [FLEX_DIRECTION]: flexDirection,\n [JUSTIFY_CONTENT]: justifyContent,\n [ALIGN_ITEMS]: alignItems,\n [LINE_CLAMP]: lineClamp,\n [FLEX_WRAP]: flexWrap,\n [ALIGN_CONTENT]: alignContent,\n [LINE_HEIGHT]: lineHeight,\n [TEXT_ALIGN]: textAlign,\n } = computedStyle;\n let { fixedWidth, fixedHeight, x, y, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return;\n }\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return;\n }\n // 每次布局情况多行内容\n __flexLine.splice(0);\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n let isDirectionRow = ['column', 'columnReverse'].indexOf(flexDirection) === -1;\n // 计算伸缩基数\n let growList = [];\n let shrinkList = [];\n let basisList = [];\n let maxList = [];\n let minList = [];\n let orderChildren = genOrderChildren(flowChildren);\n orderChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n let [b, min, max] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h }, true);\n let { [FLEX_GROW]: flexGrow, [FLEX_SHRINK]: flexShrink } = currentStyle;\n computedStyle[FLEX_BASIS] = b;\n growList.push(flexGrow);\n shrinkList.push(flexShrink);\n // 根据basis不同,计算方式不同\n basisList.push(b);\n maxList.push(max);\n minList.push(min);\n }\n // 文本\n else {\n growList.push(0);\n shrinkList.push(1);\n // 水平flex垂直文字和垂直flex水平文字都先假布局一次取结果,其它取文本最大最小宽度即可\n if(isDirectionRow && isUpright || !isDirectionRow && !isUpright) {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n let n = isUpright ? item.width: item.height;\n basisList.push(n);\n maxList.push(n);\n minList.push(n);\n }\n // 水平flex水平文本和垂直flex垂直文本\n else {\n let cw = item.charWidth;\n let tw = item.textWidth;\n basisList.push(tw);\n maxList.push(tw);\n minList.push(cw);\n }\n }\n });\n let containerSize = isDirectionRow ? w : h;\n let isMultiLine = ['wrap', 'wrapReverse'].indexOf(flexWrap) > -1;\n /**\n * 判断是否需要分行,根据假设主尺寸来统计尺寸和计算,假设主尺寸是clamp(min_main_size, flex_base_size, max_main_size)\n * 当多行时,由于每行一定有最小限制,所以每行一般情况都不是shrink状态,\n * 但也有极端情况,比如一行只能放下1个元素时,且此元素比容器小,会是shrink\n */\n let line = [], sum = 0, hypotheticalList = [];\n basisList.forEach((item, i) => {\n let min = minList[i], max = maxList[i];\n let hypothetical;\n if(item < min) {\n hypothetical = min;\n }\n else if(item > max) {\n hypothetical = max;\n }\n else {\n hypothetical = item;\n }\n hypotheticalList.push(hypothetical);\n if(isMultiLine) {\n // 超过尺寸时,要防止sum为0即1个也会超过尺寸\n if(sum + hypothetical > containerSize) {\n if(sum) {\n __flexLine.push(line);\n line = [orderChildren[i]];\n sum = hypothetical;\n }\n else {\n line.push(orderChildren[i]);\n __flexLine.push(line);\n line = [];\n sum = 0;\n }\n }\n else {\n line.push(orderChildren[i]);\n sum += hypothetical;\n }\n }\n else {\n line.push(orderChildren[i]);\n }\n });\n if(line.length) {\n __flexLine.push(line);\n }\n let offset = 0, clone = { x, y, w, h };\n let maxCrossList = [], marginAutoCountList = [], freeList = [];\n __flexLine.forEach(item => {\n let length = item.length;\n let end = offset + length;\n let [x1, y1, maxCross, marginAutoCount, free] = this.__layoutFlexLine(clone, isDirectionRow, isAbs, isColumn, isRow, isUpright,\n containerSize, fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems,\n orderChildren.slice(offset, end), item, textAlign,\n growList.slice(offset, end), shrinkList.slice(offset, end), basisList.slice(offset, end),\n hypotheticalList.slice(offset, end), minList.slice(offset, end), maxList.slice(offset, end));\n // 下一行/列更新坐标\n if(isDirectionRow) {\n clone.y = y1;\n }\n else {\n clone.x = x1;\n }\n x = Math.max(x, x1);\n y = Math.max(y, y1);\n maxCrossList.push(maxCross);\n marginAutoCountList.push(marginAutoCount);\n freeList.push(free);\n offset += length;\n });\n // abs预布局只计算宽度无需对齐\n if(isAbs) {\n let max = 0;\n __flexLine.forEach(line => {\n let count = 0;\n line.forEach(item => {\n if(isDirectionRow) {\n count += isUpright ? item.outerHeight : item.outerWidth;\n }\n else {\n count = Math.max(count, isUpright ? item.outerHeight : item.outerWidth);\n }\n // 文字发生换行无论row/column一定放不下需占满容器尺寸\n if(item instanceof Text) {\n if(isUpright) {\n if(item.textWidth > h) {\n max = Math.max(max, h);\n }\n }\n else {\n if(item.textWidth > w) {\n max = Math.max(max, w);\n }\n }\n }\n });\n max = Math.max(max, count);\n });\n if(isUpright) {\n this.__ioSize(undefined, max);\n }\n else {\n this.__ioSize(max, undefined);\n }\n return;\n }\n // 同block计算\n let tw = 0, th = 0;\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n else {\n tw = x - data.x;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n else {\n th = y - data.y;\n }\n this.__ioSize(tw, th);\n if(isColumn || isRow) {\n return;\n }\n // flexDirection当有reverse时交换每line的主轴序\n if(flexDirection === 'rowReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = tw - item.outerWidth - (item.x - data.x) * 2;\n if(diff) {\n item.__offsetX(diff, true, null);\n }\n });\n });\n }\n else if(flexDirection === 'columnReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = th - item.outerHeight - (item.y - data.y) * 2;\n if(diff) {\n item.__offsetY(diff, true, null);\n }\n });\n });\n }\n // wrap-reverse且多轴线时交换轴线序,需要2行及以上才行\n let length = __flexLine.length;\n if(flexWrap === 'wrapReverse' && length > 1) {\n let crossSum = 0, crossSumList = [];\n maxCrossList.forEach(item => {\n crossSumList.push(crossSum);\n crossSum += item;\n });\n let count = 0;\n for(let i = length - 1; i >= 0; i--) {\n let line = __flexLine[i];\n let source = crossSumList[i];\n let diff = count - source;\n if(diff) {\n line.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true, null);\n }\n else {\n item.__offsetX(diff, true, null);\n }\n });\n }\n count += maxCrossList[i];\n }\n __flexLine.reverse();\n }\n // 侧轴对齐分flexLine做,要考虑整体的alignContent的stretch和每行的alignItems的stretch\n // 先做整体的,得出交叉轴空白再均分给每一行做单行的,整体的只有1行忽略\n let per;\n if(length > 1 && (fixedHeight && isDirectionRow || !isDirectionRow)) {\n let diff = isDirectionRow ? th - (y - data.y) : tw - (x - data.x);\n // 有空余时才进行对齐\n if(diff > 0) {\n if(alignContent === 'center') {\n let per = diff * 0.5;\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per, true, null);\n }\n else {\n item.__offsetX(per, true, null);\n }\n });\n }\n else if(alignContent === 'flexStart') {}\n else if(alignContent === 'flexEnd') {\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true, null);\n }\n else {\n item.__offsetX(diff, true, null);\n }\n });\n }\n else if(alignContent === 'spaceBetween') {\n let between = diff / (length - 1);\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(between, true, null);\n }\n else {\n item.__offsetX(between, true, null);\n }\n });\n }\n });\n }\n else if(alignContent === 'spaceAround') {\n let around = diff / (length + 1);\n __flexLine.forEach((item, i) => {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(around * (i + 1), true, null);\n }\n else {\n item.__offsetX(around * (i + 1), true, null);\n }\n });\n });\n }\n // 默认stretch,每个flexLine进行扩充\n else {\n per = diff / length;\n // 因为每行都cross扩充了per,所有除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per * i, true, null);\n }\n else {\n item.__offsetX(per * i, true, null);\n }\n });\n }\n });\n }\n }\n }\n // 每行再进行main/cross对齐,在alignContent为stretch时计算每行的高度\n if(!isColumn && !isRow) {\n if(length > 1) {\n __flexLine.forEach((item, i) => {\n let maxCross = maxCrossList[i];\n if(per) {\n maxCross += per;\n }\n this.__flexAlign(item, alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCountList[i], freeList[i]);\n });\n }\n else if(length) {\n let maxCross = isDirectionRow ? th : tw;\n this.__flexAlign(__flexLine[0], alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCountList[0], freeList[0]);\n }\n this.__marginAuto(currentStyle, data, isUpright);\n }\n }\n\n /**\n * 计算获取子元素的b/min/max完毕后,尝试进行flex每行布局\n * https://www.w3.org/TR/css-flexbox-1/#layout-algorithm\n * 假想主尺寸,其为clamp(min_main_size, flex_base_size, max_main_size)\n * 随后按算法一步步来 https://zhuanlan.zhihu.com/p/354567655\n * 规范没提到mpb,item的要计算,孙子的只考虑绝对值\n * 先收集basis和假设主尺寸\n */\n __layoutFlexLine(data, isDirectionRow, isAbs, isColumn, isRow, isUpright,\n containerSize, fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems,\n orderChildren, flexLine, textAlign,\n growList, shrinkList, basisList, hypotheticalList, minList, maxList) {\n let { x, y, w, h } = data;\n let hypotheticalSum = 0;\n hypotheticalList.forEach(item => {\n hypotheticalSum += item;\n });\n // 根据假设尺寸确定使用grow还是shrink,冻结非弹性项并设置target尺寸,确定剩余未冻结数量\n let isOverflow = hypotheticalSum >= containerSize;\n let targetMainList = [];\n basisList.forEach((item, i) => {\n if(isOverflow) {\n if(!shrinkList[i] || (basisList[i] < hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n else {\n if(!growList[i] || (basisList[i] > hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n });\n // 初始可用空间,冻结使用确定的target尺寸,未冻结使用假想\n let free = 0;\n basisList.forEach((item, i) => {\n if(targetMainList[i] !== undefined) {\n free += targetMainList[i];\n }\n else {\n free += item;\n }\n });\n let total = Infinity;\n if(isDirectionRow) {\n total = w;\n }\n else if(fixedHeight) {\n total = h;\n }\n else {\n total = free;\n }\n free = Math.abs(total - free); // 压缩也使用正值\n let lessOne = 0;\n // 循环,文档算法不够简练,其合并了grow和shrink,实际拆开写更简单\n let factorSum = 0;\n if(isOverflow) {\n // 计算真正的因子占比,同时得出缩小尺寸数值\n // 还需判断每个item收缩不能 {\n if(targetMainList[i] === undefined) { // 冻结项的目标主尺寸有值,因子无值或为0\n factorSum += item;\n return item;\n }\n });\n while(true) {\n // 都冻结了\n if(factorSum === 0) {\n break;\n }\n if(factorSum < 1) {\n lessOne += free * (1 - factorSum);\n free *= factorSum;\n }\n let needReset, factorSum2 = 0, count1 = 0, count2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要收缩的尺寸\n let n = basisList[i] - s; // 实际尺寸\n // 比min还小设置为min,同时设0冻结剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n count1 += basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸,最终从free里减去\n }\n // else if(n > maxList[i]) {\n // targetMainList[i] = maxList[i];\n // factorList[i] = 0;\n // needReset = true;\n // count1 += maxList[i];\n // }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n count2 += n;\n }\n }\n });\n if(!needReset) {\n free -= count2;\n break;\n }\n free -= count1;\n factorSum = factorSum2;\n }\n }\n else {\n let factorList = growList.map((item, i) => {\n if(targetMainList[i] === undefined) {\n factorSum += item;\n return item;\n }\n });\n while(true) {\n if(factorSum === 0) {\n break;\n }\n if(factorSum < 1) {\n lessOne += free * (1 - factorSum);\n free *= factorSum;\n }\n let needReset, factorSum2 = 0, count1 = 0, count2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要扩展的尺寸\n let n = basisList[i] + s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n count1 += basisList[i] - minList[i];\n }\n // else if(n > maxList[i]) {\n // targetMainList[i] = maxList[i];\n // factorList[i] = 0;\n // needReset = true;\n // count1 += maxList[i];\n // }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n count2 += n;\n }\n }\n });\n if(!needReset) {\n free -= count2;\n break;\n }\n free -= count1;\n factorSum = factorSum2;\n }\n }\n let maxCross = 0;\n let lbmList = [];\n let marginAutoCount = 0;\n orderChildren.forEach((item, i) => {\n let main = targetMainList[i];\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n if(isDirectionRow) {\n item.__layoutFlow({\n x,\n y,\n w: main,\n h,\n w3: main, // w3假设固定宽度,忽略原始style中的设置\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n let {\n [ALIGN_SELF]: alignSelf,\n [WIDTH]: width,\n } = item.currentStyle;\n // column的child真布局时,如果是stretch宽度,则可以直接生成animateRecord,否则自适应调整后才进行\n if(!isAbs && !isColumn && !isRow) {\n let needGenAr;\n if(width.u !== AUTO || alignSelf === 'stretch') {\n needGenAr = true;\n }\n else if(alignSelf === 'auto' && alignItems === 'stretch') {\n needGenAr = true;\n }\n if(needGenAr) {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, true, isColumn, isRow);\n item.__layoutFlow({\n x,\n y,\n w,\n w3: item.outerWidth,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n }\n else {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n }\n // 记录主轴是否有margin为auto的情况\n if(!isAbs && !isColumn && !isRow) {\n let currentStyle = item.currentStyle;\n if(isDirectionRow) {\n if(currentStyle[MARGIN_LEFT].u === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_RIGHT].u === AUTO) {\n marginAutoCount++;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP].u === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_BOTTOM].u === AUTO) {\n marginAutoCount++;\n }\n }\n }\n }\n // 文字\n else {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n lbmList.push(lineBoxManager);\n item.__layoutFlow({\n x,\n y,\n w: isDirectionRow ? main : w,\n h: isDirectionRow ? h : main,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n }\n if(isDirectionRow) {\n x += item.outerWidth;\n maxCross = Math.max(maxCross, item.outerHeight);\n }\n else {\n y += item.outerHeight;\n maxCross = Math.max(maxCross, item.outerWidth);\n }\n });\n if(isDirectionRow) {\n y += maxCross;\n }\n else {\n x += maxCross;\n }\n // flex的直接text对齐比较特殊\n if(!isAbs && !isColumn && !isRow && ['center', 'right'].indexOf(textAlign) > -1) {\n lbmList.forEach(item => {\n item.horizonAlign(isUpright? item.height : item.width, textAlign, isUpright);\n })\n }\n return [x, y, maxCross, marginAutoCount, isOverflow ? 0 : Math.max(0, free + lessOne)];\n }\n\n // 每个flexLine的主轴侧轴对齐\n __flexAlign(line, alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCount, free) {\n let baseline = 0;\n line.forEach(item => {\n baseline = Math.max(baseline, item.firstBaseline);\n });\n // 先主轴对齐方式,需要考虑margin,如果有auto则优先于justifyContent\n let len = line.length;\n if(marginAutoCount) {\n // 类似于space-between,空白均分于auto,两边都有就是2份,只有1边是1份\n let count = 0, per = free / marginAutoCount;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n let currentStyle = child.currentStyle;\n if(isDirectionRow) {\n if(currentStyle[MARGIN_LEFT].u === AUTO) {\n count += per;\n child.__offsetX(count, true, null);\n }\n else if(count) {\n child.__offsetX(count, true, null);\n }\n if(currentStyle[MARGIN_RIGHT].u === AUTO) {\n count += per;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP].u === AUTO) {\n count += per;\n child.__offsetY(count, true, null);\n }\n else if(count) {\n child.__offsetY(count, true, null);\n }\n if(currentStyle[MARGIN_BOTTOM].u === AUTO) {\n count += per;\n }\n }\n }\n }\n else {\n if(justifyContent === 'flexEnd') {\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(free, true, null) : child.__offsetY(free, true, null);\n }\n }\n else if(justifyContent === 'center') {\n let center = free * 0.5;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(center, true, null) : child.__offsetY(center, true, null);\n }\n }\n else if(justifyContent === 'spaceBetween') {\n let between = free / (len - 1);\n for(let i = 1; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(between * i, true, null) : child.__offsetY(between * i, true, null);\n }\n }\n else if(justifyContent === 'spaceAround') {\n let around = free * 0.5 / len;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(around * (i * 2 + 1), true, null) : child.__offsetY(around * (i * 2 + 1), true, null);\n }\n }\n else if(justifyContent === 'spaceEvenly') {\n let around = free / (len + 1);\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(around * (i + 1), true, null) : child.__offsetY(around * (i + 1), true, null);\n }\n }\n }\n // 再侧轴\n line.forEach(item => {\n let { currentStyle: { [ALIGN_SELF]: alignSelf } } = item;\n if(isDirectionRow) {\n if(alignSelf === 'flexStart') {}\n else if(alignSelf === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true, null);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [HEIGHT]: height } } = item;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height.u === AUTO) {\n let old = item.height;\n let v = item.__height = computedStyle[HEIGHT] = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__y4 += d;\n item.__y5 += d;\n item.__y6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n else if(alignSelf === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true, null);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [HEIGHT]: height,\n } } = item;\n // row的孩子还是flex且column且不定高时,如果高度<侧轴拉伸高度则重新布局\n if(isDirectionRow && display === 'flex' && flexDirection === 'column' && height.u === AUTO && item.outerHeight < maxCross) {\n item.__layoutFlow(Object.assign(item.__layoutData, { h3: maxCross }));\n }\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height.u === AUTO) {\n let old = item.height;\n let v = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__y4 += d;\n item.__y5 += d;\n item.__y6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n }\n }\n // column\n else {\n if(alignSelf === 'flexStart') {}\n else if(alignSelf === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true, null);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [WIDTH]: width } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width.u === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__x4 += d;\n item.__x5 += d;\n item.__x6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true, null);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [WIDTH]: width,\n } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width.u === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__x4 += d;\n item.__x5 += d;\n item.__x6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n }\n }\n });\n }\n\n /**\n * inline比较特殊,先简单顶部对齐,后续还需根据vertical和lineHeight计算y偏移\n * inlineBlock复用逻辑,可以设置w/h,在混排时表现不同,inlineBlock换行限制在规定的矩形内,\n * 且ib会在没设置width且换行的时候撑满上一行,即便内部尺寸没抵达边界\n * 而inline换行则会从父容器start处开始,且首尾可能占用矩形不同\n * 嵌套inline情况十分复杂,尾部mpb空白可能产生叠加情况,因此endSpace表示自身,\n * 然后根据是否在最后一个元素进行叠加父元素的,多层嵌套则多层尾部叠加,均以最后一个元素为依据判断\n * Text获取这个叠加的endSpace值即可,无需感知是否最后一个,外层(此处)进行逻辑封装\n * @param data\n * @param isAbs\n * @param isColumn\n * @param isRow\n * @param isInline\n * @private\n */\n __layoutInline(data, isAbs, isColumn, isRow, isInline) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n } = computedStyle;\n let lineClampCount = data.lineClampCount || 0;\n let { fixedWidth, fixedHeight, x, y, w, h, lx, ly,\n lineBoxManager, endSpace, selfEndSpace, isUpright } = this.__preLayout(data, isInline);\n // abs虚拟布局需预知width,固定可提前返回\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return lineClampCount;\n }\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n if(isInline && !this.__isRealInline()) {\n isInline = false;\n }\n // inline-block假布局提前结束\n if(!isInline) {\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return lineClampCount;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return lineClampCount;\n }\n }\n // 只有inline的孩子需要考虑换行后从行首开始,而ib不需要,因此重置行首标识lx为x,末尾空白为0\n // 而inline的LineBoxManager复用最近非inline父dom的,ib需要重新生成,末尾空白叠加\n if(isInline) {\n this.__isInline = true;\n this.__lineBoxManager = lineBoxManager;\n let baseline = isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle);\n // 特殊inline调用,有内容的话(如左右mbp),默认生成一个lineBox,即便是空,也要形成占位,只有开头时需要\n if(isUpright\n && (marginTop || marginBottom || paddingTop || paddingBottom || borderTopWidth || borderBottomWidth)\n || !isUpright\n && (marginLeft || marginRight || paddingLeft || paddingRight || borderLeftWidth || borderRightWidth)) {\n if(lineBoxManager.isNewLine) {\n lineBoxManager.genLineBoxByInlineIfNewLine(x, y, lineHeight, baseline);\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseline);\n }\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseline);\n }\n lineClamp = data.lineClamp || 0;\n }\n else {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n lx = x;\n ly = y;\n endSpace = selfEndSpace = lineClampCount = 0;\n }\n // 存LineBox里的内容列表专用,布局过程中由lineBoxManager存入,递归情况每个inline节点都保存contentBox\n if(isInline) {\n this.contentBoxList.splice(0);\n lineBoxManager.pushContentBoxList(this);\n }\n // ib的bp是自己,inline是最近的非inline\n let bp = this;\n while(bp.computedStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n let {\n [OVERFLOW]: overflow,\n } = bp.computedStyle;\n let isIbFull = false, isUprightIbFull = false; // ib时不限定w情况下发生折行则撑满行,即便内容没有撑满边界\n let length = flowChildren.length;\n let ignoreNextLine = false; // lineClamp超过后,后面的均忽略并置none,注意ib内部自己统计类似block\n let ignoreNextWrap = false; // whiteSpace单行超过后,后面的均忽略并置none,注意和block不一样不隔断\n let hasAddEndSpace; // 最后一行生效,只加1次防重复\n flowChildren.forEach((item, i) => {\n // 和block不太一样可以提前判断,因为不可能包含block隔断区域了\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n if(isXom) {\n item.__computeReflow(); // writing-mode可能会造成inline改变为ib\n }\n let isInline2 = isXom && item.computedStyle[DISPLAY] === 'inline';\n let isInlineBlock2 = isXom && item.computedStyle[DISPLAY] === 'inlineBlock';\n let isRealInline = isInline2 && item.__isRealInline();\n // 最后一个元素会产生最后一行,叠加父元素的尾部mpb,注意只执行一次防止重复叠加\n let isEnd = isInline && !hasAddEndSpace\n && (whiteSpace === 'nowrap' || (!isXom && i === length - 1)\n || ((lineClamp && i === length - 1) || lineClampCount === lineClamp - 1));\n if(isEnd) {\n hasAddEndSpace = true;\n endSpace += selfEndSpace;\n }\n let lastLineClampCount = lineClampCount;\n if(isXom) {\n if(!isInline2 && !isInlineBlock2) {\n item.currentStyle[DISPLAY] = item.computedStyle[DISPLAY] = 'inlineBlock';\n isInlineBlock2 = true;\n inject.warn('Inline can not contain block/flex');\n }\n // x开头或者nowrap单行,不用考虑是否放得下直接放,因为有beginSpace所以要多判断i为0\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 同block布局\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineClampCount++;\n }\n if(item.__isIbFull && whiteSpace !== 'nowrap') {\n if(isUpright && h.u === AUTO) {\n isUprightIbFull = true;\n }\n else if(!isUpright && w.u === AUTO) {\n isIbFull = true;\n }\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中,以计算宽度\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n else {\n // 不换行继续排,换行非开头先尝试是否放得下,结尾要考虑mpb因此减去endSpace\n let free = item.__tryLayInline(isUpright ? (h + ly - y - endSpace) : (w + lx - x - endSpace), isUpright ? h : w, isUpright);\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 可能超行了,无需继续,并且进行回溯\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(bp, lineBoxManager, lineBox, w, endSpace, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n lineClampCount++;\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n }\n }\n // inline里的其它只有文本,可能开始紧跟着之前的x,也可能换行后从lx行头开始\n // 紧跟着x可能出现在前面有节点换行后第2行,此时不一定放得下,因此不能作为判断依据,开头仅有lx\n else {\n let n = lineBoxManager.size;\n // i为0时强制不换行\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行,且非定宽\n if(!isInline && (lineBoxManager.size - n) > 1) {\n if(height.u === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width.u === AUTO && !isUpright) {\n isIbFull = true;\n }\n }\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n else {\n // 非开头先尝试是否放得下,如果放得下再看是否end,加end且只有1个字时放不下要换行,否则可以放,换行由text内部做\n let free = item.__tryLayInline(isUpright ? (h + ly - y - endSpace) : (w + lx - x - endSpace));\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // 这里ib放得下一定是要么没换行要么固定宽度,所以无需判断isIbFull\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 可能超行了,无需继续,并且进行回溯\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(bp, lineBoxManager, lineBox, w, endSpace, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行\n if(!isInline && (lineBoxManager.size - n) > 1) {\n if(height.u === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width.u === AUTO && !isUpright) {\n isIbFull = true;\n }\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n }\n }\n });\n // 同block结尾,不过这里一定是lineBox结束,无需判断\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n // 标识ib情况同block一样占满行\n this.__isIbFull = isIbFull;\n this.__isUprightIbFull = isUprightIbFull;\n // 元素的width在固定情况或者ibFull情况已被计算出来,否则为最大延展尺寸,inline没有固定尺寸概念\n let tw, th;\n if(isInline) {\n // inline最后的x要算上右侧mpb,为next行元素提供x坐标基准,同时其尺寸计算比较特殊\n if(selfEndSpace) {\n if(isUpright) {\n lineBoxManager.addY(selfEndSpace);\n }\n else {\n lineBoxManager.addX(selfEndSpace);\n }\n }\n // 如果没有内容,空白还要加上开头即左侧mpb\n if(!flowChildren.length) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n if(isUpright) {\n lineBoxManager.addY(marginTop + paddingTop + borderTopWidth);\n }\n else {\n lineBoxManager.addX(marginLeft + paddingLeft + borderLeftWidth);\n }\n }\n // 结束出栈contentBox,递归情况结束子inline获取contentBox,父inline继续\n lineBoxManager.popContentBoxList();\n // abs非固定w时预计算,本来是最近非inline父层统一计算,但在abs时不算,这里无视textAlign默认left\n if(isAbs) {\n this.__inlineSize(0, 'left', isUpright);\n }\n }\n else {\n // ib在满时很特殊,取最大值,可能w本身很小不足排下1个字符,此时要用max\n let max = lineBoxManager.max - (isUpright ? data.y : data.x);\n if(isUpright) {\n tw = fixedWidth ? w : x - data.x;\n th = fixedHeight ? h : (isIbFull ? Math.max(h, max) : max);\n }\n else {\n tw = fixedWidth ? w : (isIbFull ? Math.max(w, max) : max);\n th = fixedHeight ? h : y - data.y;\n }\n this.__ioSize(tw, th);\n }\n // 非abs提前虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐,inline会被父级调用这里只看ib\n if(!isAbs && !isInline) {\n let spread = lineBoxManager.verticalAlign(isUpright);\n if(spread) {\n if(isUpright && !fixedWidth) {\n this.__resizeX(spread, null);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread, null);\n }\n }\n if(!isColumn && !isRow) {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(isUpright ? th : tw, textAlign, isUpright);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n // block的所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(isUpright ? th : tw, textAlign, isUpright);\n });\n }\n }\n // inlineBlock新开上下文,但父级block遇到要处理换行\n return lineClampCount;\n }\n\n /**\n * inline的尺寸计算非常特殊,并非一个矩形区域,而是由字体行高结合节点下多个LineBox中的内容决定,\n * 且这个尺寸又并非真实LineBox中的内容直接合并计算而来,比如包含了个更大尺寸的ib却不会计入\n * 具体方法为遍历持有的LineBox下的内容,x取两侧极值,同时首尾要考虑mpb,y值取上下极值,同样首尾考虑mpb\n * 首尾行LineBox可能不是不是占满一行,比如前后都有同行inline的情况,非首尾行则肯定占满\n * 绘制内容(如背景色)的区域也很特殊,每行LineBox根据lineHeight对齐baseline得来,并非LineBox全部\n * 当LineBox只有直属Text时如果font没有lineGap则等价于全部,如有则需减去\n * 另外其client/offset/outer的w/h尺寸计算也很特殊,皆因首尾x方向的mpb导致\n * @private\n */\n __inlineSize(size, textAlign, isUpright) {\n let { contentBoxList, computedStyle } = this;\n let {\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // 可能因为Ellipsis回溯变成none\n if(display === 'none') {\n return;\n }\n // x/clientX/offsetX/outerX\n let maxX, maxY, minX, minY, maxCX, maxCY, minCX, minCY, maxFX, maxFY, minFX, minFY, maxOX, maxOY, minOX, minOY;\n let length = contentBoxList.length;\n if(length) {\n // 遍历contentBox,里面存的是LineBox内容,根据父LineBox引用判断是否换行\n contentBoxList.forEach((item, i) => {\n // 非第一个除了minY不用看其它都要,minX是换行导致,而maxX在最后一个要考虑右侧mpb,中间的无需考虑嵌套inline的mpb\n if(i) {\n minX = Math.min(minX, item.x);\n minCX = Math.min(minCX, item.x);\n minFX = Math.min(minFX, item.x);\n minOX = Math.min(minOX, item.x);\n if(i === length - 1) {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n maxY = maxCY = maxFY = maxOY = Math.max(maxY, item.y + item.outerHeight);\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n else {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n }\n }\n // 第一个初始化\n else {\n minX = item.x;\n minY = item.y;\n minCX = minX - paddingLeft;\n minCY = minY - paddingTop;\n minFX = minCX - borderLeftWidth;\n minFY = minCY - borderTopWidth;\n minOX = minFX - marginLeft;\n minOY = minFY - marginTop;\n maxX = maxCX = maxFX = maxOX = item.x + item.outerWidth;\n maxY = maxCY = maxFY = maxOY = item.y + item.outerHeight;\n if(i === length - 1) {\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n }\n });\n this.__x = minOX;\n this.__y = minOY;\n this.__width = computedStyle[WIDTH] = maxX - minX;\n // 防止比自己最小高度lineHeight还小,比如内容是个小字体\n this.__height = computedStyle[HEIGHT] = Math.max(lineHeight, maxY - minY);\n this.__clientWidth = maxCX - minCX;\n this.__clientHeight = maxCY - minCY;\n this.__offsetWidth = maxFX - minFX;\n this.__offsetHeight = maxFY - minFY;\n this.__outerWidth = maxOX - minOX;\n this.__outerHeight = maxOY - minOY;\n this.__x1 = minFX;\n this.__y1 = minFY;\n this.__x2 = minCX;\n this.__y2 = minCY;\n this.__x3 = minX;\n this.__y3 = minY;\n this.__x4 = maxX;\n this.__y4 = maxY;\n this.__x5 = maxCX;\n this.__y5 = maxCY;\n this.__x6 = maxFX;\n this.__y6 = maxFY;\n // inline的text整体设置相同\n if(['center', 'right'].indexOf(textAlign) > -1) {\n this.children.forEach(item => {\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n }\n // 如果没有内容,宽度为0高度为lineHeight,对齐也特殊处理,lineBoxManager不会处理\n else {\n let tw = 0, th = 0;\n if(['center', 'right'].indexOf(textAlign) > -1) {\n let diff = size;\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(diff > 0) {\n if(isUpright) {\n this.__offsetY(diff, true, null);\n }\n else {\n this.__offsetX(diff, true, null);\n }\n }\n }\n if(isUpright) {\n tw = lineHeight;\n this.__ioSize(tw, 0);\n this.__x -= marginLeft + paddingLeft + borderLeftWidth;\n }\n else {\n th = lineHeight;\n this.__ioSize(0, th);\n this.__y -= marginTop + paddingTop + borderTopWidth;\n }\n this.__x1 = this.__x + marginLeft;\n this.__y1 = this.__y + marginTop;\n this.__x2 = this.__x1 + borderLeftWidth;\n this.__y2 = this.__y1 + borderTopWidth;\n this.__x4 = this.__x3 = this.__x2 + paddingLeft;\n this.__y4 = this.__y3 = this.__y2 + paddingTop;\n this.__x5 = this.__x4 + tw + paddingRight;\n this.__y5 = this.__y4 + th + paddingBottom;\n this.__x6 = this.__x5 + borderRightWidth;\n this.__y6 = this.__y5 + borderBottomWidth;\n this.__clientWidth = this.__x5 - this.__x2;\n this.__clientHeight = this.__y5 - this.__y2;\n this.__offsetWidth = this.__x6 - this.__x1;\n this.__offsetHeight = this.__y6 - this.__y1;\n this.__outerWidth = this.__offsetWidth + marginLeft + marginRight;\n this.__outerHeight = this.__offsetHeight + marginTop + marginBottom;\n }\n }\n\n /**\n * 只针对绝对定位children布局\n * @param container\n * @param data\n * @param target 可选,只针对某个abs的child特定布局,在局部更新时用\n * @private\n */\n __layoutAbs(container, data, target) {\n let { __x: x, __y: y,\n __clientWidth: clientWidth, __clientHeight: clientHeight,\n __computedStyle: computedStyle } = container;\n let { __isDestroyed: isDestroyed, children, absChildren } = this;\n let {\n [DISPLAY]: display,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n } = computedStyle;\n if(isDestroyed || display === 'none') {\n this.__layoutNone();\n return;\n }\n x += marginLeft + borderLeftWidth;\n y += marginTop + borderTopWidth;\n // 对absolute的元素进行相对容器布局\n absChildren.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n let { currentStyle, computedStyle } = item;\n if(item.isDestroyed || currentStyle[DISPLAY] === 'none') {\n item.__layoutNone();\n return;\n }\n // 先根据容器宽度计算margin/padding,匿名块对象特殊处理,此时没有computedStyle\n item.__computeReflow();\n item.__mp(currentStyle, computedStyle, clientWidth);\n let {\n [LEFT]: left,\n [TOP]: top,\n [RIGHT]: right,\n [BOTTOM]: bottom,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let x2, y2, w2, h2;\n let onlyRight;\n let onlyBottom;\n let fixedTop;\n let fixedRight;\n let fixedBottom;\n let fixedLeft;\n // 判断何种方式的定位,比如左+宽度,左+右之类\n if(left.u !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = this.__calSize(left, clientWidth, true);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right.u !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = this.__calSize(right, clientWidth, true);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top.u !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = this.__calSize(top, clientHeight, true);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom.u !== AUTO) {\n fixedBottom = true;\n computedStyle[BOTTOM] = this.__calSize(bottom, clientHeight, true);\n }\n else {\n computedStyle[BOTTOM] = 'auto';\n }\n // 优先级最高left+right,其次left+width,再次right+width,再次仅申明单个,最次全部auto\n if(fixedLeft && fixedRight) {\n x2 = x + computedStyle[LEFT];\n w2 = clientWidth - computedStyle[RIGHT] - computedStyle[LEFT];\n }\n else if(fixedLeft) {\n x2 = x + computedStyle[LEFT];\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n else if(fixedRight) {\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n else {\n onlyRight = true;\n }\n x2 = x + clientWidth - computedStyle[RIGHT] - (w2 || 0);\n // 右对齐有尺寸时还需减去margin/border/padding的\n x2 -= computedStyle[MARGIN_LEFT];\n x2 -= computedStyle[MARGIN_RIGHT];\n x2 -= computedStyle[PADDING_LEFT];\n x2 -= computedStyle[PADDING_RIGHT];\n x2 -= computedStyle[BORDER_LEFT_WIDTH];\n x2 -= computedStyle[BORDER_RIGHT_WIDTH];\n }\n else {\n x2 = x + paddingLeft;\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n // top/bottom/height优先级同上\n if(fixedTop && fixedBottom) {\n y2 = y + computedStyle[TOP];\n h2 = clientHeight - computedStyle[TOP] - computedStyle[BOTTOM];\n }\n else if(fixedTop) {\n y2 = y + computedStyle[TOP];\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n else if(fixedBottom) {\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n else {\n onlyBottom = true;\n }\n y2 = y + clientHeight - computedStyle[BOTTOM] - (h2 || 0);\n // 底对齐有尺寸时y值还需减去margin/border/padding的\n y2 -= computedStyle[MARGIN_TOP];\n y2 -= computedStyle[MARGIN_BOTTOM];\n y2 -= computedStyle[PADDING_TOP];\n y2 -= computedStyle[PADDING_BOTTOM];\n y2 -= computedStyle[BORDER_TOP_WIDTH];\n y2 -= computedStyle[BORDER_BOTTOM_WIDTH];\n }\n // 未声明y的找到之前的流布局child,紧随其下\n else {\n y2 = y + paddingTop;\n let prev = item.__prev, mtList = [], mbList = [];\n while(prev) {\n // 以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || (prev instanceof Component && prev.shadowRoot instanceof Text)\n || prev.computedStyle[POSITION] !== 'absolute') {\n // 当prev是空白节点时,还要考虑margin合并的影响\n let cps = prev.computedStyle;\n if(prev.clientHeight <= 0) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n else {\n mbList.push(cps[MARGIN_BOTTOM]);\n let t = reflow.getMergeMargin(mtList, mbList);\n y2 = prev.__y1 + prev.offsetHeight + t.target;\n break;\n }\n }\n prev = prev.__prev;\n }\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n // onlyRight时做的布局其实是以那个点位为left/top布局然后offset,limit要特殊计算,从本点向左侧为边界\n let widthLimit = onlyRight ? x2 - x : clientWidth + x - x2;\n // onlyBottom相同,正常情况是左上到右下的尺寸限制\n let heightLimit = onlyBottom ? y2 - y : clientHeight + y - y2;\n // 未直接或间接定义尺寸,取特殊孩子宽度的最大值,同时不能超限\n if(w2 === undefined) {\n item.__layoutFlow({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n isUpright: data.isUpright, // 父亲的\n container,\n }, true, false);\n widthLimit = item.outerWidth;\n }\n // 这里用包裹方法标明要递归计算computedStyle\n item.__layoutFlow({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n w2, // left+right这种等于有宽度,但不能修改style,继续传入到__preLayout中特殊对待\n h2,\n isUpright: data.isUpright,\n container,\n }, false, false);\n if(onlyRight) {\n item.__offsetX(-item.width, true, null);\n }\n if(onlyBottom) {\n item.__offsetY(-item.height, true, null);\n }\n item.__layoutStyle();\n });\n // 递归进行,遇到absolute/relative/component的设置新容器\n children.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n if(item instanceof Dom) {\n item.__layoutAbs(isRelativeOrAbsolute(item) ? item : container, data, null);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data, null);\n }\n }\n });\n // 根节点自己特殊执行,不在layout统一\n this.__execAr();\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n let ep = this.__ellipsis;\n if(ep) {\n ep.render(renderMode, res.ctx, dx, dy)\n }\n if(renderMode === SVG) {\n this.virtualDom.type = 'dom';\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.children.forEach(child => {\n // 有可能为空,因为diff过程中相同的cp被移到新的vd中,老的防止destroy设null\n if(child) {\n child.__destroy();\n }\n });\n if(this.__ellipsis) {\n this.__ellipsis.__destroy();\n }\n super.__destroy();\n }\n\n __emitEvent(e, pm, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { __isDestroyed, __computedStyle: computedStyle, __mask, __cacheTotal } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __mask) {\n return;\n }\n // 检查perspective嵌套状态,自身有perspective则设置10位,自身有transform的p矩阵则设置01位\n // if(computedStyle[PERSPECTIVE]) {\n // perspectiveNest++;\n // }\n // if(tf.isPerspectiveMatrix(computedStyle[TRANSFORM])) {\n // perspectiveTfNest++;\n // }\n // overflow:hidden时还需要判断是否超出范围外,如果是则无效\n if(computedStyle[OVERFLOW] === 'hidden' && !this.willResponseEvent(e, true)) {\n return;\n }\n // __cacheTotal可提前判断是否在bbox范围内,svg没有bbox防止进入判断\n if(__cacheTotal && __cacheTotal.available && __cacheTotal.bbox) {\n // 不是E的话,因为缓存缘故影响cache的子元素,先左乘可能的父matrix(嵌套cache),再赋值给pm递归传下去\n if(!isE(this.__matrix)) {\n pm = multiply(pm, this.__matrix);\n assignMatrix(this.__matrixEvent, pm);\n }\n else if(this.__perspectiveMatrix) {\n pm = this.__perspectiveMatrix;\n }\n let bbox = __cacheTotal.bbox;\n if(!geom.pointInQuadrilateral(\n e.x, e.y,\n bbox[0], bbox[1],\n bbox[2], bbox[1],\n bbox[2], bbox[3],\n bbox[0], bbox[3], this.__matrixEvent)) {\n return;\n }\n }\n // 递归传下来的pm如果有说明是cache的子元素且需要重新计算matrix\n else if(!mx.isE(pm)) {\n util.assignMatrix(this.__matrixEvent, mx.multiply(pm, this.__matrix));\n }\n // 找到对应的callback\n let { event: { type } } = e;\n let { listener, zIndexChildren } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // child触发则parent一定触发\n for(let i = zIndexChildren.length - 1; i >=0; i--) {\n let child = zIndexChildren[i];\n if(child instanceof Xom\n || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.__emitEvent(e, pm, false)) {\n // 孩子阻止冒泡\n if(e.__stopPropagation) {\n return;\n }\n if(Array.isArray(cb) && !e.__stopImmediatePropagation) {\n cb.forEach(item => {\n if(isFunction(item)) {\n item.call(this, e);\n }\n });\n }\n else if(isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n }\n // child不触发再看自己\n return super.__emitEvent(e, false);\n }\n\n appendChild(child, cb) {\n let { __root: root, __host: host, __children: children } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n // 只设兄弟/parent,children在relation做,离屏则等真实添加时机\n let len = children.length;\n if(len) {\n let last = children[len - 1];\n last.__next = child;\n child.__prev = last;\n }\n child.__parent = this;\n children.push(child);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, host, this, child, {});\n this.__insertStruct(child, zIndexChildren.indexOf(child));\n // 可能为component,不能用__currentStyle\n if(child.currentStyle[DISPLAY] === 'none' || this.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在reflow过程中设置struct,text视为父变更\n if(child instanceof Text) {\n child = this;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n prependChild(child, cb) {\n let { __root: root, __host: host, __children: children } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n // 只设兄弟/parent,children在relation做,离屏则等真实添加时机\n let len = children.length;\n if(len) {\n let first = children[0];\n first.__prev = child;\n child.__next = first;\n }\n child.__parent = this;\n children.unshift(child);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, host, this, child, {});\n this.__insertStruct(child, zIndexChildren.indexOf(child));\n // 可能为component,不能用__currentStyle\n if(child.currentStyle[DISPLAY] === 'none' || this.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow过程中设置struct\n if(child instanceof Text) {\n child = this;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n insertBefore(child, cb) {\n let { __root: root } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n let parent = this.isShadowRoot ? this.__hostRoot.__parent: this.__parent;\n let i;\n // 即便没被添加到dom中,也有可能有父节点,除非是离屏根节点,注意组件\n if(parent) {\n let children = parent.__children;\n let target = this.isShadowRoot ? this.__hostRoot : this;\n i = children.indexOf(target);\n if(i === -1) {\n throw new Error('Index exception of insertBefore()');\n }\n let prev = target.__prev;\n if(prev) {\n prev.__next = child;\n child.__prev = prev;\n }\n child.__next = target;\n target.__prev = child;\n children.splice(i, 0, child);\n parent.__zIndexChildren = genZIndexChildren(parent);\n }\n else {\n throw new Error('InsertBefore() illegal');\n }\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, parent.__host, parent, child, {});\n parent.__insertStruct(child, parent.__zIndexChildren.indexOf(child));\n if(child.currentStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(child instanceof Text) {\n child = parent;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n insertAfter(child, cb) {\n let { __root: root } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n let parent = this.isShadowRoot ? this.__hostRoot.__parent: this.__parent;\n let i;\n // 即便没被添加到dom中,也有可能有父节点,除非是离屏根节点,注意组件\n if(parent) {\n let children = parent.__children;\n let target = this.isShadowRoot ? this.__hostRoot : this;\n i = children.indexOf(target);\n if(i === -1) {\n throw new Error('Index exception of insertBefore()');\n }\n target.__next = child;\n child.__prev = target;\n children.splice(i + 1, 0, child);\n parent.__zIndexChildren = genZIndexChildren(parent);\n }\n else {\n throw new Error('InsertAfter() illegal');\n }\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, parent.__host, parent, child, {});\n parent.__insertStruct(child, parent.__zIndexChildren.indexOf(child));\n if(child.currentStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(child instanceof Text) {\n child = parent;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n removeChild(target, cb) {\n if((target.__parent === this || target.__domParent === this)\n && (target instanceof Node || target instanceof Component)) {\n target.remove(cb);\n }\n else {\n inject.error('Invalid parameter of removeChild()');\n }\n }\n\n get children() {\n return this.__children;\n }\n\n get flowChildren() {\n return this.__children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Text || item.__currentStyle[POSITION] !== 'absolute';\n });\n }\n\n get absChildren() {\n return this.__children.filter(item => {\n if(item instanceof Component) {\n item = item.__shadowRoot;\n }\n return item instanceof Xom && item.__currentStyle[POSITION] === 'absolute';\n });\n }\n\n get zIndexChildren() {\n return this.__zIndexChildren;\n }\n\n get lineBoxManager() {\n return this.__lineBoxManager;\n }\n\n get baseline() {\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n [WRITING_MODE]: writingMode,\n } = this.computedStyle;\n if(!this.lineBoxManager || !this.lineBoxManager.size\n || writingMode.indexOf('vertical') === 0) {\n return this.offsetHeight;\n }\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.baseline;\n }\n\n get firstBaseline() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.firstBaseline;\n }\n\n get verticalBaseline() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return 0;\n }\n let {\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n [WRITING_MODE]: writingMode,\n } = this.computedStyle;\n if(!this.lineBoxManager || !this.lineBoxManager.size\n || writingMode.indexOf('vertical') === -1) {\n return 0;\n }\n return marginLeft + borderLeftWidth + paddingLeft + this.lineBoxManager.verticalBaseline;\n }\n}\n\nexport default Dom;\n","/**\n * canvas和texture合图的基类,和Page类配合,抽象出基础尺寸偏差等信息\n * 派生2个子类\n */\n\nlet uuid = 0;\n\nclass Cache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n this.__uuid = uuid++;\n this.__renderMode = renderMode;\n this.__ctx = ctx;\n this.__rootId = rootId;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n this.__pos = pos;\n let { x, y } = page.getCoords(pos);\n this.__x = x;\n this.__y = y;\n let size = page.__size;\n this.__tx1 = x / size;\n this.__ty1 = (size - y - h) / size;\n this.__tx2 = (x + w) / size;\n this.__ty2 = (size - y) / size;\n this.__enabled = true;\n this.__available = false;\n this.__appendData(x1, y1);\n }\n\n __appendData(x1, y1) {\n this.x1 = x1; // 去除margin的左上角原点坐标\n this.y1 = y1;\n let bbox = this.__bbox;\n this.dx = this.__x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.__y - bbox[1];\n this.dbx = x1 - bbox[0]; // 原始sx1/sy1和box原点的差值\n this.dby = y1 - bbox[1];\n this.update();\n }\n\n update() {\n this.__page.__update = true;\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n this.update();\n return true;\n }\n }\n\n // svg打标用会覆盖此方法\n release() {\n if(this.__enabled) {\n this.clear();\n this.__page.del(this.__pos);\n this.__page = null;\n this.__enabled = false;\n return true;\n }\n }\n\n reset(bbox, x1, y1, klass) {\n // 尺寸没变复用之前的并清空\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = klass.getInstance(this.__renderMode, this.__ctx, this.__rootId, Math.max(w, h), null);\n if(!res) {\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __offsetY(diff) {\n this.y1 += diff;\n let bbox = this.__bbox;\n bbox[1] += diff;\n bbox[3] += diff;\n this.dy -= diff;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n // 是否功能可用,生成离屏canvas及尺寸超限\n get enabled() {\n return this.__enabled;\n }\n\n // 是否有可用缓存内容\n get available() {\n return this.__enabled && this.__available;\n }\n\n get bbox() {\n return this.__bbox;\n }\n\n get page() {\n return this.__page;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get pos() {\n return this.__pos;\n }\n\n get size() {\n return this.__page.__size;\n }\n\n get texture() {\n return this.__page.texture;\n }\n\n get updated() {\n return this.__page.__update;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, x1, y1, cacheKlass, pageKlass, excludePage) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n let res = pageKlass.getInstance(renderMode, ctx, rootId, n, excludePage);\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new cacheKlass(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n}\n\nexport default Cache;\n","/**\n * 默认的动态合图配置,保守低端机8个纹理单元和最大2048px尺寸,一般chrome是16个和16384px\n * webgl初始化会调用获取参数动态进行更改,16px是最小划分基本单位1,后续成2倍增长\n * 并不需要非常紧凑合理,因为特定需求如骨骼动画,合图都是前置做好的,这里应对临时的Dom位图\n * 应该尽可能避免纹理单元切换,因此设计固定的正方形尺寸,以2的幂次方增长,从16px开始到MAX\n * 每个texture从左到右按小到大排列,一列都为相同尺寸的正方形格子,用数组存储表示状态\n * 内容0为空白,1为单位1大小占用,2为2个单位1,如此成2倍增长,可能会形成这种状态:\n * 1 0 2 2 4 4 4 4 ...\n * 其中开头0位置是个单位1的正方形,1位置为空,2、3位置为一个2个单位的正方形,4、5、6、7是4个单位\n * 一张纹理存储时可以按照自己的bbox尺寸计算出正方形大小n,然后循环搜索,每次递增n,不必++遍历\n * 如此可满足不同尺寸分布在一张texture上的需求,碎片情况也较少,避免频繁纹理切换,清空置0\n * canvas模式时固定2048,是个保守值,当webgl第一次初始化,会改变这些值\n */\nconst UNIT = 16;\nlet MAX = 2048;\nlet NUMBER = 128;\nconst HASH = {};\n\nlet uuid = 0;\nlet init = false;\n\nclass Page {\n constructor(renderMode, ctx, size, number) {\n this.__size = size;\n this.__number = number;\n this.__width = this.__height = size;\n // 标识n*n个单元格是否空闲可用,一维数组表示\n let grid = [];\n for(let i = 0, len = number * number; i < len; i++) {\n grid.push(0);\n }\n this.__grid = new Int32Array(grid);\n this.__uuid = uuid++;\n // webgl贴图缓存更新使用,canvas/img等发生变更需刷新重新生成texture,fbo的texture不需要\n this.__update = false;\n this.time = 0;\n }\n\n add(unitSize, pos) {\n let { number, grid } = this;\n for(let i = pos; i < pos + unitSize; i++) {\n grid[i] = unitSize;\n for(let j = 1; j < unitSize; j++) {\n grid[i + j * number] = unitSize;\n }\n }\n }\n\n del(pos) {\n let { number, grid } = this;\n let u = grid[pos];\n if(u) {\n grid[pos] = 0;\n for(let i = pos; i < pos + u; i++) {\n grid[i] = 0;\n for(let j = 1; j < u; j++) {\n grid[i + j * number] = 0;\n }\n }\n }\n }\n\n getCoords(pos) {\n let { number } = this;\n let x = (pos % number) * UNIT;\n let y = Math.floor(pos / number) * UNIT;\n return { x, y };\n }\n\n getFreePos(unitSize) {\n let { number, grid } = this;\n outer:\n for(let i = 0; i < number; i++) {\n let u = grid[i];\n if(u) {\n if(u === unitSize) {\n // 找到同尺寸的列位置,向下查找空白区域确定行位置\n for(let j = unitSize; j < number; j += unitSize) {\n let n = i + j * number;\n if(!grid[n]) {\n return n;\n }\n }\n }\n else {\n i += u - 1;\n }\n }\n else if(i + unitSize <= number) {\n // 空白列检查尺寸是否符合\n for(let j = i + 1, len = i + unitSize; j < len; j++) {\n if(grid[j]) {\n i = j - 1;\n continue outer;\n }\n }\n return i;\n }\n }\n return -1;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get size() {\n return this.__size;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get number() {\n return this.__number;\n }\n\n get grid() {\n return this.__grid;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(renderMode, ctx, rootId, size, klass, excludePage) {\n if(size > MAX) {\n return;\n }\n // 换算为每单位16px占多少单位\n let unitSize = 1;\n while((UNIT * unitSize) < size) {\n unitSize <<= 1;\n }\n let m = MAX, n = NUMBER;\n // 只有超过一定尺寸时用8192最大尺寸,大部分情况4096足够,且8192会轻微卡顿一下\n if(size <= 2048 && MAX === 8192) {\n m = 4096;\n n = Math.ceil(m / UNIT);\n }\n let key = rootId + ',' + renderMode;\n // 每个root复用自己的合图,webgl中为了隔离不同实例\n let list = HASH[key] = HASH[key] || [];\n let page, pos;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(excludePage && item === excludePage || item.__size !== m) {\n continue;\n }\n if((pos = item.getFreePos(unitSize)) > -1) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new klass(renderMode, ctx, m, n);\n pos = 0;\n list.push(page);\n }\n page.add(unitSize, pos);\n return { page, pos };\n }\n\n static get UNIT() {\n return UNIT;\n }\n\n static get MAX() {\n return MAX;\n }\n\n static set MAX(MAX_TEXTURE_SIZE) {\n // 确保MAX_TEXTURE_SIZE是2的幂级数,如果不是向下取整\n let n = 2;\n while(n < MAX_TEXTURE_SIZE) {\n n = n << 1;\n if(n >= MAX_TEXTURE_SIZE) {\n if(n > MAX_TEXTURE_SIZE) {\n n = n << 1;\n }\n break;\n }\n }\n MAX = n;\n NUMBER = Math.ceil(MAX / UNIT);\n }\n\n static get NUMBER() {\n return NUMBER;\n }\n\n static genUuid() {\n return uuid++;\n }\n\n static init(MAX_TEXTURE_SIZE) {\n if(init) {\n return;\n }\n init = true;\n if(MAX_TEXTURE_SIZE !== MAX) {\n // 超过限制会明显卡一下\n Page.MAX = Math.min(MAX_TEXTURE_SIZE, 8192);\n }\n }\n}\n\nexport default Page;\n","import mx from '../math/matrix';\n\nconst { calRectPoint, calPoint } = mx;\n\n/**\n * 初始化 shader\n * @param gl GL context\n * @param vshader vertex shader (string)\n * @param fshader fragment shader (string)\n * @return program, if the program object was created and successfully made current\n */\nfunction initShaders(gl, vshader, fshader) {\n let program = createProgram(gl, vshader, fshader);\n if(!program) {\n throw new Error('Failed to create program');\n }\n\n // 要开启透明度,用以绘制透明的图形\n gl.enable(gl.BLEND);\n // gl.enable(gl.DEPTH_TEST);\n // gl.enable(gl.POLYGON_OFFSET_FILL);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n return program;\n}\n\n/**\n * Create the linked program object\n * @param gl GL context\n * @param vshader a vertex shader program (string)\n * @param fshader a fragment shader program (string)\n * @return created program object, or null if the creation has failed\n */\nfunction createProgram(gl, vshader, fshader) {\n // Create shader object\n let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);\n let fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);\n if(!vertexShader || !fragmentShader) {\n return null;\n }\n\n // Create a program object\n let program = gl.createProgram();\n if(!program) {\n return null;\n }\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n // Attach the shader objects\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n // Link the program object\n gl.linkProgram(program);\n\n // Check the result of linking\n let linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if(!linked) {\n let error = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n gl.deleteShader(fragmentShader);\n gl.deleteShader(vertexShader);\n throw new Error('Failed to link program: ' + error);\n }\n return program;\n}\n\n/**\n * Create a shader object\n * @param gl GL context\n * @param type the type of the shader object to be created\n * @param source shader program (string)\n * @return created shader object, or null if the creation has failed.\n */\nexport function loadShader(gl, type, source) {\n // Create shader object\n let shader = gl.createShader(type);\n if(shader == null) {\n throw new Error('unable to create shader');\n }\n\n // Set the shader program\n gl.shaderSource(shader, source);\n\n // Compile the shader\n gl.compileShader(shader);\n\n // Check the result of compilation\n let compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if(!compiled) {\n let error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n\n return shader;\n}\n\nfunction convertCoords2Gl(x, y, z, w, cx, cy, tz) {\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (cy - y) / cy;\n }\n if(tz) {\n z /= -tz;\n }\n if(w === 1) {\n return { x, y, z, w };\n }\n return { x: x * w, y: y * w, z: z * w, w };\n}\n\nfunction createTexture(gl, tex, n, width, height) {\n let texture = gl.createTexture();\n bindTexture(gl, texture, n);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n // 传入高宽时是绑定fbo,且tex一定为null\n if(width && height) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n }\n // 普通将canvas对象作为纹理\n else {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n return texture;\n}\n\nfunction bindTexture(gl, texture, n) {\n gl.activeTexture(gl['TEXTURE' + n]);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n}\n\nlet lastVtPoint, lastVtTex, lastVtOpacity;\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n */\nfunction drawTextureCache(gl, list, cx, cy, dx, dy) {\n let length = list.length;\n if(!length) {\n return;\n }\n let vtPoint, vtTex, vtOpacity;\n if(lastVtPoint && lastVtPoint.length === length * 24) {\n vtPoint = lastVtPoint;\n }\n else {\n vtPoint = lastVtPoint = new Float32Array(length * 24);\n }\n if(lastVtTex && lastVtTex.length === length * 12) {\n vtTex = lastVtTex;\n }\n else {\n vtTex = lastVtTex = new Float32Array(length * 12);\n }\n if(lastVtOpacity && lastVtOpacity.length === length * 6) {\n vtOpacity = lastVtOpacity;\n }\n else {\n vtOpacity = lastVtOpacity = new Float32Array(length * 6);\n }\n for(let i = 0; i < length; i++) {\n let { cache, opacity, matrix } = list[i];\n let { __width: width, __height: height,\n __tx1: tx1, __ty1: ty1, __tx2: tx2, __ty2: ty2,\n __page: page, __bbox: bbox } = cache;\n if(!i) {\n // canvas需要生成texture,texture则强制不会进来\n if(page.__update) {\n page.genTexture(gl);\n }\n bindTexture(gl, page.texture, 0);\n }\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let xa = bx + dx, ya = by + height + dy;\n let xb = bx + width + dx, yb = by + dy;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 } = calRectPoint(xa, ya, xb, yb, matrix);\n // console.warn(x1,y1,z1,w1,',',x2,y2,z2,w2,',',x3,y3,z3,w3,',',x4,y4,z4,w4);\n // z范围取所有、对角线最大值,只有当非0有值时才求\n let z = Math.max(Math.abs(z1), Math.abs(z2));\n z = Math.max(z, Math.abs(z3));\n z = Math.max(z, Math.abs(z4));\n if(z) {\n z = Math.max(z, Math.sqrt(cx * cx + cy * cy));\n }\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, z);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, z);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, z);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, z);\n x4 = t.x; y4 = t.y; z4 = t.z;\n // console.log(x1,y1,z1,w1,',',x2,y2,z2,w2,',',x3,y3,z3,w3,',',x4,y4,z4,w4);\n let j = i * 24;\n vtPoint[j] = x1;\n vtPoint[j + 1] = y1;\n vtPoint[j + 2] = z1;\n vtPoint[j + 3] = w1;\n vtPoint[j + 4] = x4;\n vtPoint[j + 5] = y4;\n vtPoint[j + 6] = z4;\n vtPoint[j + 7] = w4;\n vtPoint[j + 8] = x2;\n vtPoint[j + 9] = y2;\n vtPoint[j + 10] = z2;\n vtPoint[j + 11] = w2;\n vtPoint[j + 12] = x4;\n vtPoint[j + 13] = y4;\n vtPoint[j + 14] = z4;\n vtPoint[j + 15] = w4;\n vtPoint[j + 16] = x2;\n vtPoint[j + 17] = y2;\n vtPoint[j + 18] = z2;\n vtPoint[j + 19] = w2;\n vtPoint[j + 20] = x3;\n vtPoint[j + 21] = y3;\n vtPoint[j + 22] = z3;\n vtPoint[j + 23] = w3;\n j = i * 12;\n vtTex[j] = tx1;\n vtTex[j + 1] = ty1;\n vtTex[j + 2] = tx1;\n vtTex[j + 3] = ty2;\n vtTex[j + 4] = tx2;\n vtTex[j + 5] = ty1;\n vtTex[j + 6] = tx1;\n vtTex[j + 7] = ty2;\n vtTex[j + 8] = tx2;\n vtTex[j + 9] = ty1;\n vtTex[j + 10] = tx2;\n vtTex[j + 11] = ty2;\n j = i * 6;\n vtOpacity[j] = opacity;\n vtOpacity[j + 1] = opacity;\n vtOpacity[j + 2] = opacity;\n vtOpacity[j + 3] = opacity;\n vtOpacity[j + 4] = opacity;\n vtOpacity[j + 5] = opacity;\n }\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtPoint, gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtTex, gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtOpacity, gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, length * 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核扩大3倍性能慢\n * x/y方向分开执行,加速性能,计算次数由d*d变为d+d,d为卷积核大小\n * spread由d和sigma计算得出,d由sigma计算得出,sigma即css的blur()参数\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * i和j为filter和total的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n */\nfunction drawBlur(gl, program, tex1, width, height) {\n gl.useProgram(program);\n gl.viewport(0, 0, width, height);\n /**\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n * tex1和tex2来回3次,最后是到tex1\n */\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n let max = 100 / Math.max(width, height);\n let ratio = width / height;\n for(let n = 0; n < 3; n++) {\n // tex1到tex2\n let tex2 = createTexture(gl, null, 1, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex2, 0);\n bindTexture(gl, tex1, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // tex2到tex1\n let tex3 = createTexture(gl, null, 0, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n bindTexture(gl, tex2, 1);\n if(width >= height) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n recycle.push(tex2);\n tex1 = tex3;\n }\n // 0/1单元都解绑\n bindTexture(gl, null, 0);\n bindTexture(gl, null, 1);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n recycle.forEach(item => gl.deleteTexture(item));\n return tex1;\n}\n\nfunction drawCm(gl, program, target, source, m, center, size) {\n gl.useProgram(program);\n bindTexture(gl, source.__page.texture, 0);\n gl.viewport(0, 0, size, size);\n let { x: tx1, y: ty1, width: w1, height: h1 } = target;\n let { x: tx2, y: ty2, width: w2, height: h2 } = source;\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = tx2 / size, ya = (size - ty2) / size, xb = (tx2 + w2) / size, yb = (size - ty2 - h2) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n // matrix\n let u_m = gl.getUniformLocation(program, 'u_m');\n gl.uniform1fv(u_m, new Float32Array(m));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n bindTexture(gl, null, 0);\n}\n\n/**\n * 根据total/filter生成overflow\n */\nfunction drawOverflow(gl, program, target, source, center, size) {\n gl.useProgram(program);\n let { x: tx1, y: ty1, width: w1, height: h1, bbox: bbox1 } = target;\n let { x: tx2, y: ty2, bbox: bbox2 } = source;\n let dx = bbox1[0] - bbox2[0], dy = bbox1[1] - bbox2[1];\n gl.viewport(0, 0, size, size);\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = (tx2 + dx) / size, ya = (size - ty2 - dy) / size, xb = (tx2 + w1 + dx) / size, yb = (size - ty2 - h1 - dy) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, source.__page.texture, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawMask(gl, program, target, source, temp, center, size) {\n gl.useProgram(program);\n bindTexture(gl, source.__page.texture, 0);\n bindTexture(gl, temp, 1);\n gl.viewport(0, 0, size, size);\n let { x: tx1, y: ty1, width: w1, height: h1 } = target;\n let { x: tx2, y: ty2, width: w2, height: h2 } = source;\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = tx2 / size, ya = (size - ty2) / size, xb = (tx2 + w2) / size, yb = (size - ty2 - h2) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer1 = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer1);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords1 = gl.getAttribLocation(program, 'a_texCoords1');\n gl.vertexAttribPointer(a_texCoords1, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords1);\n let texBuffer2 = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer2);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords2 = gl.getAttribLocation(program, 'a_texCoords2');\n gl.vertexAttribPointer(a_texCoords2, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords2);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, 0);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer1);\n gl.deleteBuffer(texBuffer2);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords1);\n gl.disableVertexAttribArray(a_texCoords2);\n gl.deleteTexture(temp);\n gl.bindTexture(gl.TEXTURE_2D, null);\n bindTexture(gl, null, 0);\n bindTexture(gl, null, 1);\n}\n\nfunction drawMbm(gl, program, tex1, tex2) {\n bindTexture(gl, tex1, 0);\n bindTexture(gl, tex2, 1);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, 0);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawDropShadow(gl, program, frameBuffer, cache, color, w1, w2, h1, h2) {\n gl.useProgram(program);\n let { x, y, width, height, __page: page } = cache;\n let size = page.size, texture = page.texture;\n let xa = x / size, ya = (size - y) / size, xb = (x + width) / size, yb = (size - y - height) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n let w = w1 / w2, h = h1 / h2;\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -w, -h,\n -w, h,\n w, -h,\n -w, h,\n w, -h,\n w, h,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, yb,\n xa, ya,\n xb, yb,\n xa, ya,\n xb, yb,\n xb, ya,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n bindTexture(gl, texture, 0);\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n // color\n let u_color = gl.getUniformLocation(program, 'u_color');\n gl.uniform1fv(u_color, new Float32Array([color[0] / 255, color[1] / 255, color[2] / 255, color[3]]));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n bindTexture(gl, null, 0);\n}\n\nfunction drawDropShadowMerge(gl, target, size, tex1, dx1, dy1, w, h, tex2, dx2, dy2, width, height) {\n let { x, y } = target;\n let center = size * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(x + dx1, y + h + dy1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(x + w + dx1, y + dy1, 0, 1, center, center);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n bindTexture(gl, tex1, 0);\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n let { x: x3, y: y4 } = convertCoords2Gl(x + dx2, y + height + dy2, 0, 1, center, center);\n let { x: x4, y: y3 } = convertCoords2Gl(x + width + dx2, y + dy2, 0, 1, center, center);\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x3, y3,\n x3, y4,\n x4, y3,\n x3, y4,\n x4, y3,\n x4, y4,\n ]), gl.STATIC_DRAW);\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n bindTexture(gl, tex2, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n bindTexture(gl, null, 0);\n}\n\nfunction drawTex2Cache(gl, program, cache, tex, width, height) {\n gl.useProgram(program);\n let page = cache.__page, size = page.__size;\n gl.viewport(0, 0, size, size);\n let x = cache.x, y = cache.y, center = size * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(x, y + height, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(x + width, y, 0, 1, center, center);\n bindTexture(gl, tex, 0);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 透明度buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, tex, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n gl.bindTexture(gl.TEXTURE_2D, null);\n}\n\nfunction drawCache2Tex(gl, program, cache, width, height, spread) {\n let { x: tx1, y: ty1, width: w1, height: h1, __page: { texture, size } } = cache;\n gl.useProgram(program);\n gl.viewport(0, 0, width, height);\n // 首先将cache的纹理原状绘制到tex1上,为后续3次循环做准备,注意扩充的spread距离\n let cx = width * 0.5, cy = height * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(spread, height - spread, 0, 1, cx, cy);\n let { x: x2, y: y1 } = convertCoords2Gl(width - spread, spread, 0, 1, cx, cy);\n let xa = tx1 / size, ya = (size - ty1) / size, xb = (tx1 + w1) / size, yb = (size - ty1 - h1) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, texture, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n}\n\nfunction drawSameSize(gl, tex, opacity) {\n let program = gl.programSs;\n gl.useProgram(program);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n bindTexture(gl, tex, 0);\n let u_opacity = gl.getUniformLocation(program, 'u_opacity');\n gl.uniform1f(u_opacity, opacity);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.useProgram(gl.program);\n}\n\nfunction drawOitPlane(gl, structs, list, ppt, cx, cy, dx, dy) {\n let pointBuffer = gl.createBuffer();\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n let texBuffer = gl.createBuffer();\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n let opacityBuffer = gl.createBuffer();\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n // 循环所有顺序拼图/平面\n for(let i = 0, len = list.length; i < len; i++) {\n let { isPuzzle, node, target, points } = list[i];\n let { __width: width, __height: height,\n __tx1: tx1, __ty1: ty1, __tx2: tx2, __ty2: ty2,\n __page: page, __bbox: bbox } = target;\n // 固定绑定纹理0号单元\n if(page.__update) {\n page.genTexture(gl);\n }\n bindTexture(gl, page.texture, 0);\n let bx = bbox[0], by = bbox[1];\n let opacity = node.__opacity;\n let matrix = node.__matrixEvent;\n let tw = tx2 - tx1, th = ty2 - ty1;\n // 先按照没有拆分拼图的情况求出节点的四个顶点坐标列表,可能有重复利用hash缓存\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let pHash = [], tHash = [];\n if(isPuzzle) {\n // 拼接三角形,以起点为初始点链接其它所有顶点组成n-2个三角形\n let x0, y0, z0, w0;\n let p = points[0];\n let o = calPoint({\n x: bx + dx + p.px * width,\n y: by + dy + p.py * height,\n z: 0,\n w: 1,\n }, matrix);\n w0 = o.w;\n let t = convertCoords2Gl(o.x, o.y, o.z, w0, cx, cy, ppt);\n x0 = t.x; y0 = t.y; z0 = t.z;\n let tx0 = tx1 + p.px * tw, ty0 = ty1 + p.py * th;\n // 每次循环以第0个点为起点\n for(let j = 1, len = points.length; j < len - 1; j++) {\n vtPoint.push(x0);\n vtPoint.push(y0);\n vtPoint.push(z0);\n vtPoint.push(w0);\n vtTex.push(tx0);\n vtTex.push(ty0);\n vtOpacity.push(opacity);\n // 依次的2个相邻点\n for(let k = j; k < j + 2; k++) {\n let p = points[k];\n let x, y, z, w;\n let hashP = pHash[k];\n if(hashP) {\n x = hashP.x;\n y = hashP.y;\n z = hashP.z;\n w = hashP.w;\n }\n else {\n let o = calPoint({\n x: bx + dx + p.px * width,\n y: by + dy + p.py * height,\n z: 0,\n w: 1,\n }, matrix);\n w = o.w;\n let t = convertCoords2Gl(o.x, o.y, o.z, w, cx, cy, ppt);\n x = t.x; y = t.y; z = t.z;\n pHash[k] = {\n x,\n y,\n z,\n w,\n };\n }\n vtPoint.push(x);\n vtPoint.push(y);\n vtPoint.push(z);\n vtPoint.push(w);\n let tx, ty;\n let hashT = tHash[k];\n if(hashT) {\n tx = hashT.tx;\n ty = hashT.ty;\n }\n else {\n tx = tx1 + p.px * tw;\n ty = ty1 + p.py * th;\n tHash[k] = {\n tx,\n ty,\n };\n }\n vtTex.push(tx);\n vtTex.push(ty);\n vtOpacity.push(opacity);\n }\n }\n }\n else {\n let xa = bx + dx, ya = by + height + dy;\n let xb = bx + width + dx, yb = by + dy;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 } = calRectPoint(xa, ya, xb, yb, matrix);\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, ppt);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, ppt);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, ppt);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, ppt);\n x4 = t.x; y4 = t.y; z4 = t.z;\n vtPoint[0] = x1;\n vtPoint[1] = y1;\n vtPoint[2] = z1;\n vtPoint[3] = w1;\n vtPoint[4] = x4;\n vtPoint[5] = y4;\n vtPoint[6] = z4;\n vtPoint[7] = w4;\n vtPoint[8] = x2;\n vtPoint[9] = y2;\n vtPoint[10] = z2;\n vtPoint[11] = w2;\n vtPoint[12] = x4;\n vtPoint[13] = y4;\n vtPoint[14] = z4;\n vtPoint[15] = w4;\n vtPoint[16] = x2;\n vtPoint[17] = y2;\n vtPoint[18] = z2;\n vtPoint[19] = w2;\n vtPoint[20] = x3;\n vtPoint[21] = y3;\n vtPoint[22] = z3;\n vtPoint[23] = w3;\n vtTex[0] = tx1;\n vtTex[1] = ty1;\n vtTex[2] = tx1;\n vtTex[3] = ty2;\n vtTex[4] = tx2;\n vtTex[5] = ty1;\n vtTex[6] = tx1;\n vtTex[7] = ty2;\n vtTex[8] = tx2;\n vtTex[9] = ty1;\n vtTex[10] = tx2;\n vtTex[11] = ty2;\n vtOpacity[0] = opacity;\n vtOpacity[1] = opacity;\n vtOpacity[2] = opacity;\n vtOpacity[3] = opacity;\n vtOpacity[4] = opacity;\n vtOpacity[5] = opacity;\n }\n // 顶点buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, vtOpacity.length);\n }\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\nexport default {\n initShaders,\n convertCoords2Gl,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n drawDropShadow,\n drawDropShadowMerge,\n drawTex2Cache,\n drawCache2Tex,\n drawSameSize,\n drawOitPlane,\n};\n","import Page from './Page';\nimport webgl from '../gl/webgl';\nimport inject from '../util/inject';\n\nclass CanvasPage extends Page {\n constructor(renderMode, ctx, size, number) {\n super(renderMode, ctx, size, number);\n this.__offscreen = inject.getOffscreenCanvas(size, size, null, number);\n }\n\n genTexture(gl) {\n if(this.__update) {\n this.__update = false;\n let t = this.texture;\n if(t) {\n gl.deleteTexture(t);\n }\n this.texture = webgl.createTexture(gl, this.__offscreen.canvas, 0, null, null); // 默认0单元\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n get offscreen() {\n return this.__offscreen;\n }\n\n get canvas() {\n return this.__offscreen.canvas;\n }\n\n get ctx() {\n return this.__offscreen.ctx;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(renderMode, ctx, rootId, size, excludePage) {\n return super.getInstance(renderMode, ctx, rootId, size, this, excludePage);\n }\n}\n\nexport default CanvasPage;\n","import Cache from './Cache';\nimport CanvasPage from './CanvasPage';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport tf from '../style/transform';\nimport enums from '../util/enums';\nimport css from '../style/css';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n TRANSFORM_ORIGIN,\n TRANSFORM,\n },\n} = enums;\nconst { spreadFilter } = css;\nconst { isE } = mx;\n\nclass CanvasCache extends Cache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n\n clear() {\n if(super.clear()) {\n this.__available = false;\n let page = this.__page, ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(this.__x, this.__y, this.__width, this.__height);\n return true;\n }\n }\n\n reset(bbox, x1, y1) {\n return super.reset(bbox, x1, y1, CanvasPage);\n }\n\n get canvas() {\n return this.__page.canvas;\n }\n\n get ctx() {\n return this.__page.ctx;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, x1, y1, excludePage) {\n return super.getInstance(renderMode, ctx, rootId, bbox, x1, y1, this, CanvasPage, excludePage);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n */\n static genFilter(cache, filter) {\n let { x, y, size, canvas, x1, y1, width, height, bbox } = cache;\n let oldX1 = bbox[0];\n bbox = spreadFilter(bbox, filter);\n let d = oldX1 - bbox[0];\n let widthNew = bbox[2] - bbox[0];\n let heightNew = bbox[3] - bbox[1];\n let offscreen = inject.getOffscreenCanvas(widthNew, heightNew, null, 'filter');\n offscreen.ctx.filter = painter.canvasFilter(filter);\n offscreen.ctx.drawImage(canvas, x, y, width, height, d, d, width, height);\n offscreen.ctx.filter = 'none';\n offscreen.bbox = bbox;\n // 单独的离屏,其dx/dy要重算\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.size = size;\n offscreen.x1 = x1;\n offscreen.y1 = y1;\n offscreen.dx = -bbox[0];\n offscreen.dy = -bbox[1];\n offscreen.dbx = cache.dbx + d;\n offscreen.dby = cache.dby + d;\n offscreen.width = widthNew;\n offscreen.height = heightNew;\n return offscreen;\n }\n\n static genMask(target, node, callback) {\n let cacheMask = genSingle(target, 'mask1');\n let list = [];\n let { [TRANSFORM]: transform, [TRANSFORM_ORIGIN]: tfo } = node.__computedStyle;\n let next = node.next;\n let isClip = next.__clip;\n while(next && next.__mask) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n let inverse = tf.calMatrixByOrigin(transform, tfo[0] + x + dbx, tfo[1] + y + dby);\n if(isE(inverse)) {\n inverse = null;\n }\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身\n list.forEach(item => {\n callback(item, cacheMask, inverse);\n });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = isClip ? 'source-out' : 'source-in';\n CanvasCache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n return cacheMask;\n }\n\n\n static drawCache(source, target) {\n let { x: tx, y: ty, x1, y1, ctx, dbx, dby } = target;\n let { x, y, canvas, x1: x2, y1: y2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + x2 - x1 + dbx - dbx2;\n let oy = ty + y2 - y1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n}\n\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用,可能尺寸会发生变化\nfunction genSingle(cache, message, bboxNew) {\n let { size, x1, y1, bbox } = cache;\n bboxNew = bboxNew || bbox;\n let width = bboxNew[2] - bboxNew[0];\n let height = bboxNew[3] - bboxNew[1];\n let dx = bboxNew[0] - bbox[0];\n let dy = bboxNew[1] - bbox[1];\n let offscreen = inject.getOffscreenCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bboxNew;\n offscreen.size = size;\n offscreen.x1 = x1;\n offscreen.y1 = y1;\n offscreen.dx = -bboxNew[0];\n offscreen.dy = -bboxNew[1];\n offscreen.dbx = cache.dbx - dx;\n offscreen.dby = cache.dby - dy;\n offscreen.width = width;\n offscreen.height = height;\n return offscreen;\n}\n\nexport default CanvasCache;\n","import Cache from '../refresh/Cache';\nimport CanvasCache from '../refresh/CanvasCache';\nimport CanvasPage from '../refresh/CanvasPage';\n\nconst HASH = {};\n\nclass ImgWebglCache extends CanvasCache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n\n release() {\n if(this.__enabled) {\n let key = this.key;\n // 一定有\n let o = HASH[key];\n o.count--;\n if(!o.count) {\n this.clear();\n delete HASH[key];\n this.__page.del(this.__pos);\n this.__page = null;\n }\n this.__enabled = false;\n return true;\n }\n }\n\n get count() {\n return HASH[this.key].count;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, loadImg, x1, y1) {\n let key = rootId + ',' + loadImg.width + ' ' + loadImg.height + ' ' + loadImg.src;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count++;\n let w = bbox[2] - bbox[0], h = bbox[3] - bbox[1];\n let cache = o.cache;\n let res = new ImgWebglCache(renderMode, ctx, rootId, w, h, bbox, cache.page, cache.pos, x1, y1);\n res.key = key;\n return res;\n }\n let cache = Cache.getInstance(renderMode, ctx, rootId, bbox, x1, y1, this, CanvasPage, null);\n // 超限为空\n if(cache) {\n cache.key = key;\n if(cache) {\n HASH[key] = {\n cache,\n count: 1,\n };\n return cache;\n }\n }\n }\n}\n\nexport default ImgWebglCache;\n","import Dom from './Dom';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport enums from '../util/enums';\nimport unit from '../style/unit';\nimport image from '../style/image';\nimport border from '../style/border';\nimport level from '../refresh/level';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport ImgWebglCache from '../gl/ImgWebglCache';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { isFunction } = util;\n\nclass Img extends Dom {\n constructor(tagName, props) {\n super(tagName, props);\n let src = this.props.src;\n let loadImg = this.__loadImg = {\n src,\n };\n // 空url用错误图代替\n if(!src) {\n loadImg.error = true;\n }\n else {\n let ca = inject.IMG[src];\n if(!ca) {\n inject.measureImg(src, null);\n }\n else if(ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = loadImg.__width = ca.width;\n loadImg.height = loadImg.__height = ca.height;\n }\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout()3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n */\n __preLayout(data, isInline) {\n let res = super.__preLayout(data, false);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n let src = loadImg.src;\n if(src) {\n let cache = inject.IMG[src];\n if(!cache || cache.state === inject.LOADING) {\n if(!loadImg.loading) {\n this.__loadAndRefresh(loadImg, null);\n }\n }\n else if(cache && cache.state === inject.LOADED && cache.success) {\n loadImg.source = cache.source;\n loadImg.width = loadImg.__width = cache.width;\n loadImg.height = loadImg.__height = cache.height;\n }\n loadImg.cache = false;\n }\n if(res.fixedWidth && res.fixedHeight) {\n return res;\n }\n if(loadImg.error && !this.props.placeholder) {\n if(res.fixedWidth) {\n res.h = res.w;\n }\n else if(res.fixedHeight) {\n res.w = res.h;\n }\n else {\n res.w = res.h = 32;\n }\n }\n else if(loadImg.source) {\n if(res.fixedWidth) {\n res.h = res.w * loadImg.height / loadImg.width;\n }\n else if(res.fixedHeight) {\n res.w = res.h * loadImg.width / loadImg.height;\n }\n else {\n res.w = loadImg.width;\n res.h = loadImg.height;\n }\n }\n else {\n res.w = res.h = 0;\n }\n res.fixedWidth = true;\n res.fixedHeight = true;\n return res;\n }\n\n __addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.__virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n // img根据加载情况更新__hasContent,同时识别是否仅有图片内容本身,多个相同图片视为同一个资源\n calContent(__currentStyle, __computedStyle) {\n let res = super.calContent(__currentStyle, __computedStyle);\n let {\n __loadImg: loadImg,\n } = this;\n if(!res) {\n loadImg.onlyImg = true;\n if(__computedStyle[VISIBILITY] !== 'hidden' && (__computedStyle[WIDTH] || __computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\n }\n else {\n loadImg.onlyImg = false;\n }\n return res;\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let res = super.render(renderMode, ctx, dx, dy);\n let {\n width, height, __isDestroyed,\n props: {\n placeholder,\n },\n __computedStyle: {\n [DISPLAY]: display,\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [VISIBILITY]: visibility,\n },\n virtualDom,\n __loadImg: loadImg,\n } = this;\n if(__isDestroyed || display === 'none' || visibility === 'hidden' || renderMode === mode.WEBGL) {\n return res;\n }\n let originX, originY;\n originX = res.x3 + dx;\n originY = res.y3 + dy;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n let points = geom.ellipsePoints(cx, cy, r, r);\n painter.canvasPolygon(ctx, points, 0, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n }\n return;\n }\n // 缩放图片,无需考虑原先矩阵,xom里对父层已经变换过了\n let matrix;\n if(width !== loadImg.width || height !== loadImg.height) {\n matrix = image.matrixResize(loadImg.width, loadImg.height, width, height, originX, originY, width, height);\n }\n let props = [\n ['xlink:href', loadImg.error ? placeholder : loadImg.src],\n ['x', originX],\n ['y', originY],\n ['width', loadImg.width],\n ['height', loadImg.height]\n ];\n if(list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF']\n ],\n }\n ],\n };\n let id = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n delete virtualDom.cache;\n }\n if(matrix && !mx.isE(matrix)) {\n props.push(['transform', 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n let vd = {\n type: 'img',\n tagName: 'image',\n props,\n };\n virtualDom.children = [vd];\n loadImg.cache = vd;\n }\n }\n return res;\n }\n\n __isRealInline() {\n return false;\n }\n\n // overwrite\n __tryLayInline(w, total) {\n let { currentStyle: {\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width.u !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height.u === PX) {\n w -= loadImg.width * height.v / loadImg.height;\n }\n else if(height.u === PERCENT) {\n w -= loadImg.width * height.v * total * 0.01 / loadImg.height;\n }\n else if(height.u === REM) {\n w -= loadImg.width * height.v * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height.u === VW) {\n w -= loadImg.width * height.v * this.root.width * 0.01 / loadImg.height;\n }\n else if(height.u === VH) {\n w -= loadImg.width * height.v * this.root.height * 0.01 / loadImg.height;\n }\n else if(height.u === VMAX) {\n w -= height.v * Math.max(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else if(height.u === VMIN) {\n w -= height.v * Math.min(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else {\n w -= loadImg.width;\n }\n }\n }\n // 减去水平mbp\n w -= this.__calSize(marginRight, total, true);\n w -= this.__calSize(paddingRight, total, true);\n w -= borderRightWidth;\n w -= this.__calSize(marginLeft, total, true);\n w -= this.__calSize(paddingLeft, total, true);\n w -= borderLeftWidth;\n return w;\n }\n\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, computedStyle, __loadImg } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n let cross = isDirectionRow ? height : width;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n if(isFixed) {\n b = max = min = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n else if(([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = max = min = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // auto和content固定尺寸比例计算\n else if(__loadImg.source || __loadImg.error) {\n let res = this.__preLayout(data);\n if(cross.u !== AUTO) {\n cross = this.__calSize(cross, isDirectionRow ? h : w, true);\n let ratio = res.w / res.h;\n b = max = min = isDirectionRow ? cross * ratio : cross / ratio;\n }\n else {\n b = max = min = isDirectionRow ? res.w : res.h;\n }\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n __loadAndRefresh(loadImg, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n loadImg.source = null;\n }\n loadImg.loading = true;\n let root = this.__root, ctx = root.ctx;\n let placeholder = this.props.placeholder, computedStyle = this.__computedStyle;\n let width = computedStyle[WIDTH], height = computedStyle[HEIGHT];\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { __currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n if(width.u !== AUTO && height.u !== AUTO) {\n root.__addUpdate(self, null, level.REPAINT, null, null, null, cb);\n }\n else {\n root.__addUpdate(self, null, level.REFLOW, null, null, null, cb);\n }\n }\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n }\n else if(placeholder) {\n loadImg.error = true;\n inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n if(computedStyle[DISPLAY] !== 'none' && !self.__isDestroyed) {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n return;\n }\n else {\n loadImg.error = true;\n }\n // 可见状态进行刷新操作,visibility某些情况需要刷新,可能宽高未定义要重新布局\n if(computedStyle[DISPLAY] !== 'none' && !self.__isDestroyed) {\n reload();\n }\n }\n });\n }\n\n updateSrc(v, cb) {\n let loadImg = this.__loadImg;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || this.__isDestroyed || !v && loadImg.error) {\n loadImg.src = v;\n inject.measureImg(v, null);\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n loadImg.src = v;\n this.__loadAndRefresh(loadImg, cb);\n }\n\n appendChild() {\n inject.error('Img can not appendChild.');\n }\n\n get src() {\n return this.__loadImg.src;\n }\n\n set src(v) {\n this.updateSrc(v, null);\n }\n\n get isReplaced() {\n return true;\n }\n\n static showError = true;\n\n static toWebglCache(gl, root, src, x1, y1, cb) {\n if(!gl || !src) {\n return;\n }\n let loadImg = {\n src,\n };\n let ca = inject.IMG[src];\n if(!ca) {\n inject.measureImg(src, function(ca) {\n loadImg.source = ca.source;\n loadImg.width = loadImg.__width = ca.width;\n loadImg.height = loadImg.__height = ca.height;\n let res = ImgWebglCache.getInstance(mode.CANVAS, gl, root.__uuid, [x1, y1, x1 + loadImg.width, y1 + loadImg.height], loadImg, x1, y1);\n if(isFunction(cb)) {\n cb(res);\n }\n });\n }\n else if(ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = loadImg.__width = ca.width;\n loadImg.height = loadImg.__height = ca.height;\n let res = ImgWebglCache.getInstance(mode.CANVAS, gl, root.__uuid, [x1, y1, x1 + loadImg.width, y1 + loadImg.height], loadImg, x1, y1);\n if(isFunction(cb)) {\n cb(res);\n }\n }\n }\n}\n\nexport default Img;\n","class Defs {\n constructor(uuid) {\n this.id = uuid;\n this.count = 0;\n this.list = [];\n this.cacheHash = {}; // 每次svg渲染前重置,存储前次渲染不变的缓存id\n }\n add(data) {\n let uuid = this.count;\n let hash = this.cacheHash;\n while(hash.hasOwnProperty(uuid)) {\n uuid++;\n }\n this.count = uuid + 1;\n data.id = uuid;\n data.uuid = 'karas-defs-' + this.id + '-' + uuid;\n data.index = this.list.length;\n this.list.push(data);\n return data.uuid;\n }\n addCache(data) {\n data.index = this.list.length;\n this.list.push(data);\n this.cacheHash[data.id] = true;\n return data.uuid;\n }\n clear() {\n this.list = [];\n this.count = 0;\n this.cacheHash = {};\n }\n removeCache(data) {\n let list = this.list;\n let i = data.index;\n // 一般情况index即位置,但每次渲染过程中,可能会删掉一些,此时位置会往前,但index不变,因此遍历\n for(; i >= 0; i--) {\n if(list[i] === data) {\n list.splice(i, 1);\n return;\n }\n }\n }\n\n get value() {\n return this.list;\n }\n\n static getInstance(uuid) {\n return new Defs(uuid);\n }\n}\n\nexport default Defs;\n","import util from './util';\nimport level from '../refresh/level';\n\nconst { joinVd, joinDef } = util;\nconst { NONE, TRANSFORM_ALL, OPACITY, FILTER, MIX_BLEND_MODE } = level;\n\nfunction diff(elem, ovd, nvd) {\n let cns = elem.childNodes;\n diffDefs(cns[0], ovd.defs, nvd.defs);\n // = i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinDef(nd[i]));\n }\n }\n}\n\nfunction diffDef(elem, od, nd) {\n if(od.tagName !== nd.tagName) {\n insertAdjacentHTML(elem, 'beforebegin', joinDef(nd));\n // elem.insertAdjacentHTML('beforebegin', joinDef(nd));\n elem.parentNode.removeChild(elem);\n }\n else {\n if(od.uuid !== nd.uuid) {\n elem.setAttribute('id', nd.uuid);\n }\n let op = {};\n for(let i = 0, len = (od.props || []).length; i < len; i++) {\n let prop = od.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nd.props || []).length; i < len; i++) {\n let prop = nd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n let cns = elem.childNodes;\n let ol = od.children.length;\n let nl = nd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, od.children[i], nd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nd.children[i]));\n }\n }\n }\n}\n\nfunction diffChild(elem, ovd, nvd) {\n if(ovd.type === 'dom') {\n if(nvd.type === 'dom') {\n diffD2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffD2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'text') {\n if(nvd.type === 'text') {\n diffT2T(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'geom') {\n if(nvd.type === 'dom') {\n diffG2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffG2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'img') {\n if(nvd.type === 'img') {\n diffItemSelf(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n // 特殊情况,当有连续2个img,后面1个发生error时,其children内容不是type为img的图片,而是矢量图item,会进入此分支\n else if(ovd.type === 'item' && nvd.type === 'item') {\n diffItemSelf(elem, ovd, nvd);\n }\n}\n\nfunction diffX2X(elem, ovd, nvd) {\n let { transform, opacity, visibility, mask, overflow, filter, mixBlendMode, conClip } = nvd;\n if(ovd.transform !== transform) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(ovd.opacity !== opacity) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(ovd.visibility !== visibility) {\n elem.setAttribute('visibility', visibility);\n }\n if(ovd.mask !== mask) {\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n }\n if(ovd.filter !== filter || ovd.mixBlendMode !== mixBlendMode) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('filter');\n }\n }\n if(ovd.overflow !== overflow) {\n if(overflow) {\n elem.setAttribute('clipPath', overflow);\n }\n else {\n elem.removeAttribute('overflow');\n }\n }\n if(ovd.conClip !== conClip) {\n if(conClip) {\n elem.childNodes[1].setAttribute('clip-path', conClip);\n }\n else {\n elem.childNodes[1].removeAttribute('clip-path');\n }\n }\n}\n\nfunction diffByLessLv(elem, ovd, nvd, lv) {\n let { transform, opacity, mask, filter, mixBlendMode } = nvd;\n if(lv === NONE) {\n return;\n }\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv & TRANSFORM_ALL) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(lv & OPACITY) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if((lv & FILTER) || (lv & MIX_BLEND_MODE)) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('style');\n }\n }\n}\n\nfunction diffD2D(elem, ovd, nvd, root) {\n // cache表明children无变化缓存,一定是REPAINT以下的,只需看自身的lv以及mask\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffD2G(elem, ovd, nvd) {\n diffX2X(elem, ovd, nvd);\n diffBb(elem.firstChild, ovd.bb, nvd.bb);\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n let lastChild = elem.lastChild;\n let cns = lastChild.childNodes;\n for(; i < Math.min(ol, nl); i++) {\n replaceWith(cns[i], nvd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffT2T(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, ovd.children[i], nvd.children[i], true);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffG2D(elem, ovd, nvd) {\n diffD2G(elem, ovd, nvd);\n}\n\nfunction diffG2G(elem, ovd, nvd) {\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n }\n}\n\nfunction diffBb(elem, obb, nbb) {\n let ol = obb.length;\n let nl = nbb.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, obb[i], nbb[i]);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nbb[i]));\n }\n }\n}\n\nfunction diffItem(elem, i, ovd, nvd, isText) {\n let cns = elem.childNodes;\n if(ovd.tagName !== nvd.tagName) {\n replaceWith(cns[i], nvd);\n }\n else {\n diffItemSelf(cns[i], ovd, nvd);\n if(isText && ovd.content !== nvd.content) {\n cns[i].innerHTML = nvd.content;\n }\n }\n}\n\nfunction diffItemSelf(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let op = {};\n for(let i = 0, len = (ovd.props || []).length; i < len; i++) {\n let prop = ovd.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nvd.props || []).length; i < len; i++) {\n let prop = nvd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n}\n\nfunction replaceWith(elem, vd) {\n let res;\n if(Array.isArray(vd)) {\n res = '';\n vd.forEach(item => {\n res += joinVd(item);\n });\n }\n else {\n res = joinVd(vd);\n }\n insertAdjacentHTML(elem, 'beforebegin', res);\n // elem.insertAdjacentHTML('beforebegin', res);\n elem.parentNode.removeChild(elem);\n}\n\nfunction insertAt(elem, cns, index, html) {\n if(index >= cns.length) {\n insertAdjacentHTML(elem, 'beforeend', html);\n // elem.insertAdjacentHTML('beforeend', html);\n }\n else {\n insertAdjacentHTML(cns[index], 'beforebegin', html);\n // cns[index].insertAdjacentHTML('beforebegin', html);\n }\n}\n\nfunction removeAt(elem, cns, index) {\n if(cns[index]) {\n elem.removeChild(cns[index]);\n }\n}\n\nlet svg;\nfunction insertAdjacentHTML(elem, where, content) {\n if(elem.insertAdjacentHTML) {\n elem.insertAdjacentHTML(where, content);\n }\n else {\n switch(where) {\n case 'beforeend':\n elem.innerHTML += content;\n break;\n case 'beforebegin':\n svg = svg || document.createElement('svg');\n svg.innerHTML = content;\n elem.parentNode.insertBefore(svg.childNodes[0], elem);\n break;\n }\n }\n}\n\nexport default diff;\n","import inject from '../util/inject';\nimport painter from '../util/painter';\n\nconst { canvasPolygon } = painter;\n\n// 无cache时应用离屏时的优先级,从小到大,OFFSCREEN_MASK2是个特殊的\nconst OFFSCREEN_OVERFLOW = 0;\nconst OFFSCREEN_FILTER = 1;\nconst OFFSCREEN_MASK = 2;\nconst OFFSCREEN_BLEND = 3;\nconst OFFSCREEN_MASK2 = 4;\n\nfunction applyOffscreen(ctx, list, width, height) {\n list.sort(function(a, b) {\n if(a.lv === b.lv) {\n if(a.idx === b.idx) {\n return a.type - b.type;\n }\n return b.idx - a.idx;\n }\n return b.lv - a.lv;\n });\n list.forEach(item => {\n let { type, offscreen } = item;\n if(type === OFFSCREEN_OVERFLOW) {\n let { matrix, target, ctx: origin, x, y, offsetWidth, offsetHeight, list } = offscreen;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n if(list) {\n canvasPolygon(ctx, list);\n }\n else {\n ctx.rect(x, y, offsetWidth, offsetHeight);\n }\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n }\n else if(type === OFFSCREEN_FILTER) {\n let { target, ctx: origin, filter } = offscreen;\n // 申请一个新的离屏,应用blur并绘制,如没有则降级,默认ctx.filter为'none'\n if(ctx.filter) {\n let apply = inject.getOffscreenCanvas(width, height, null, 'filter2');\n apply.ctx.filter = painter.canvasFilter(filter);\n if(width && height) {\n apply.ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n apply.ctx.filter = 'none';\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n if(width && height) {\n target.ctx.drawImage(apply.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.release();\n }\n // 绘制回主画布,如果不支持则等同无filter原样绘制\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip, target } = offscreen;\n if(isClip) {\n ctx = mask.ctx;\n ctx.globalCompositeOperation = 'source-out';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.release();\n }\n else {\n let target = offscreen.target;\n ctx = target.ctx;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.release();\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n }\n }\n else if(type === OFFSCREEN_BLEND) {\n let target = offscreen.target;\n ctx = offscreen.ctx;\n ctx.globalCompositeOperation = offscreen.mixBlendMode;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n }\n // 特殊的mask节点汇总结束,还原ctx\n else if(type === OFFSCREEN_MASK2) {\n ctx = offscreen.ctx;\n }\n });\n return ctx;\n}\n\nexport default {\n OFFSCREEN_OVERFLOW,\n OFFSCREEN_FILTER,\n OFFSCREEN_MASK,\n OFFSCREEN_BLEND,\n OFFSCREEN_MASK2,\n applyOffscreen,\n};\n","const TOLERANCE = 1e-6;\n\n/**\n * 计算线性方程的根\n * y = ax + b\n * root = -b / a\n * @param {Array} coefs 系数 [b, a] 本文件代码中的系数数组都是从阶次由低到高排列\n */\nfunction getLinearRoot(coefs) {\n let result = [];\n let a = coefs[1];\n\n if (a !== 0) {\n result.push(-coefs[0] / a);\n }\n return result;\n}\n\n/**\n * 计算二次方程的根,一元二次方程求根公式\n * y = ax^2 + bx + c\n * root = (-b ± sqrt(b^2 - 4ac)) / 2a\n * @param {Array} coefs 系数,系数 [c, b, a]\n */\nfunction getQuadraticRoots(coefs) {\n let results = [];\n\n let a = coefs[2];\n let b = coefs[1] / a;\n let c = coefs[0] / a;\n let d = b * b - 4 * c;\n if (d > 0) {\n let e = Math.sqrt(d);\n results.push(0.5 * (-b + e));\n results.push(0.5 * (-b - e));\n } else if (d === 0) {\n // 两个相同的根,只要返回一个\n results.push(0.5 * -b);\n }\n return results;\n}\n\n/**\n * 计算一元三次方程的根\n * y = ax^3 + bx^2 + cx + d\n * 求根公式参见: https://baike.baidu.com/item/%E4%B8%80%E5%85%83%E4%B8%89%E6%AC%A1%E6%96%B9%E7%A8%8B%E6%B1%82%E6%A0%B9%E5%85%AC%E5%BC%8F/10721952?fr=aladdin\n * @param {Array} coefs 系数\n */\nfunction getCubicRoots(coefs) {\n let results = [];\n\n let c3 = coefs[3];\n let c2 = coefs[2] / c3;\n let c1 = coefs[1] / c3;\n let c0 = coefs[0] / c3;\n\n let a = (3 * c1 - c2 * c2) / 3;\n let b = (2 * c2 * c2 * c2 - 9 * c1 * c2 + 27 * c0) / 27;\n let offset = c2 / 3;\n let discrim = b * b / 4 + a * a * a / 27;\n let halfB = b / 2;\n\n if (Math.abs(discrim) <= TOLERANCE) {\n discrim = 0;\n }\n\n if (discrim > 0) {\n let e = Math.sqrt(discrim);\n let tmp;\n let root;\n\n tmp = -halfB + e;\n if (tmp >= 0)\n root = Math.pow(tmp, 1 / 3);\n else\n root = -Math.pow(-tmp, 1 / 3);\n\n tmp = -halfB - e;\n if (tmp >= 0)\n root += Math.pow(tmp, 1 / 3);\n else\n root -= Math.pow(-tmp, 1 / 3);\n\n results.push(root - offset);\n } else if (discrim < 0) {\n let distance = Math.sqrt(-a / 3);\n let angle = Math.atan2(Math.sqrt(-discrim), -halfB) / 3;\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n let sqrt3 = Math.sqrt(3);\n\n results.push(2 * distance * cos - offset);\n results.push(-distance * (cos + sqrt3 * sin) - offset);\n results.push(-distance * (cos - sqrt3 * sin) - offset);\n } else {\n let tmp;\n\n if (halfB >= 0)\n tmp = -Math.pow(halfB, 1 / 3);\n else\n tmp = Math.pow(-halfB, 1 / 3);\n\n results.push(2 * tmp - offset);\n // really should return next root twice, but we return only one\n results.push(-tmp - offset);\n }\n\n\n return results;\n}\n\n/**\n * 计算一元四次方程的根\n * 求根公式: https://baike.baidu.com/item/%E4%B8%80%E5%85%83%E4%B8%89%E6%AC%A1%E6%96%B9%E7%A8%8B%E6%B1%82%E6%A0%B9%E5%85%AC%E5%BC%8F/10721952?fr=aladdin\n * @param {Array} coefs 系数\n */\nfunction getQuarticRoots(coefs) {\n let results = [];\n\n let c4 = coefs[4];\n let c3 = coefs[3] / c4;\n let c2 = coefs[2] / c4;\n let c1 = coefs[1] / c4;\n let c0 = coefs[0] / c4;\n\n let resolveRoots = getCubicRoots([ 1, -c2, c3 * c1 - 4 * c0, -c3 * c3 * c0 + 4 * c2 * c0 - c1 * c1 ].reverse());\n\n let y = resolveRoots[0];\n let discrim = c3 * c3 / 4 - c2 + y;\n\n if (Math.abs(discrim) <= TOLERANCE) discrim = 0;\n\n if (discrim > 0) {\n let e = Math.sqrt(discrim);\n let t1 = 3 * c3 * c3 / 4 - e * e - 2 * c2;\n let t2 = (4 * c3 * c2 - 8 * c1 - c3 * c3 * c3) / (4 * e);\n let plus = t1 + t2;\n let minus = t1 - t2;\n\n if (Math.abs(plus) <= TOLERANCE) plus = 0;\n if (Math.abs(minus) <= TOLERANCE) minus = 0;\n\n if (plus >= 0) {\n let f = Math.sqrt(plus);\n\n results.push(-c3 / 4 + (e + f) / 2);\n results.push(-c3 / 4 + (e - f) / 2);\n }\n if (minus >= 0) {\n let f = Math.sqrt(minus);\n\n results.push(-c3 / 4 + (f - e) / 2);\n results.push(-c3 / 4 - (f + e) / 2);\n }\n } else if (discrim < 0) {\n // no roots\n } else {\n let t2 = y * y - 4 * c0;\n\n if (t2 >= -TOLERANCE) {\n if (t2 < 0) t2 = 0;\n\n t2 = 2 * Math.sqrt(t2);\n let t1 = 3 * c3 * c3 / 4 - 2 * c2;\n if (t1 + t2 >= TOLERANCE) {\n let d = Math.sqrt(t1 + t2);\n\n results.push(-c3 / 4 + d / 2);\n results.push(-c3 / 4 - d / 2);\n }\n if (t1 - t2 >= TOLERANCE) {\n let d = Math.sqrt(t1 - t2);\n\n results.push(-c3 / 4 + d / 2);\n results.push(-c3 / 4 - d / 2);\n }\n }\n }\n\n return results;\n}\n\n/**\n * 计算方程的根\n * @param {Array} coefs 系数按幂次方倒序\n */\nfunction getRoots(coefs) {\n let degree = coefs.length - 1;\n for(let i = degree; i >= 0; i--) {\n if(Math.abs(coefs[i]) < 1e-12) {\n degree--;\n }\n else {\n break;\n }\n }\n let result = [];\n switch (degree) {\n case 1:\n result = getLinearRoot(coefs);\n break;\n case 2:\n result = getQuadraticRoots(coefs);\n break;\n case 3:\n result = getCubicRoots(coefs);\n break;\n case 4:\n result = getQuarticRoots(coefs);\n }\n return result;\n}\n\nexport default {\n getRoots,\n};\n","import equation from './equation';\nimport vector from './vector';\n\nconst getRoots = equation.getRoots;\nconst { unitize3, crossProduct3, dotProduct3, isParallel3, length3 } = vector;\n\n// 两个三次方程组的数值解.9阶的多项式方程,可以最多有9个实根(两个S形曲线的情况)\n// 两个三次方程组无法解析表示,只能数值计算\n// 参考:https://mat.polsl.pl/sjpam/zeszyty/z6/Silesian_J_Pure_Appl_Math_v6_i1_str_155-176.pdf\nconst TOLERANCE = 1e-6;\nconst ACCURACY = 6;\n\n/**\n * 获取求导之后的系数\n * @param coefs\n */\nfunction getDerivativeCoefs(coefs) {\n let derivative = [];\n for(let i = 1; i < coefs.length; i++) {\n derivative.push(i * coefs[i]);\n }\n return derivative;\n}\n\n/**\n * 评估函数\n * @param x\n * @param coefs\n * @return {number}\n */\nfunction evaluate(x, coefs) {\n let result = 0;\n for(let i = coefs.length - 1; i >= 0; i--) {\n result = result * x + coefs[i];\n }\n return result;\n}\n\nfunction bisection(min, max, coefs) {\n let minValue = evaluate(min, coefs);\n let maxValue = evaluate(max, coefs);\n let result;\n if(Math.abs(minValue) <= TOLERANCE) {\n result = min;\n }\n else if(Math.abs(maxValue) <= TOLERANCE) {\n result = max;\n }\n else if(minValue * maxValue <= 0) {\n let tmp1 = Math.log(max - min);\n let tmp2 = Math.LN10 * ACCURACY;\n let iters = Math.ceil((tmp1 + tmp2) / Math.LN2);\n for(let i = 0; i < iters; i++) {\n result = 0.5 * (min + max);\n let value = evaluate(result, coefs);\n\n if(Math.abs(value) <= TOLERANCE) {\n break;\n }\n\n if(value * minValue < 0) {\n max = result;\n maxValue = value;\n }\n else {\n min = result;\n minValue = value;\n }\n }\n\n }\n return result;\n}\n\nfunction getRootsInInterval(min, max, coefs) {\n // console.log('getRootsInInterval', coefs);\n let roots = [];\n let root;\n let degree = coefs.length - 1;\n if(degree === 1) {\n root = bisection(min, max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n else {\n let derivativeCoefs = getDerivativeCoefs(coefs);\n let droots = getRootsInInterval(min, max, derivativeCoefs);\n\n if(droots.length > 0) {\n // find root on [min, droots[0]]\n root = bisection(min, droots[0], coefs);\n if(root != null) {\n roots.push(root);\n }\n // find root on [droots[i],droots[i+1]] for 0 <= i <= count-2\n for(let i = 0; i <= droots.length - 2; i++) {\n root = bisection(droots[i], droots[i + 1], coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n\n // find root on [droots[count-1],xmax]\n root = bisection(droots[droots.length - 1], max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n else {\n // polynomial is monotone on [min,max], has at most one root\n root = bisection(min, max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n }\n return roots;\n}\n\n/**\n * 二阶贝塞尔曲线 与 二阶贝塞尔曲线 交点\n * @return {[]}\n */\nfunction intersectBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2, bx3, by3) {\n let c12, c11, c10;\n let c22, c21, c20;\n\n let result = [];\n\n c12 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n\n c11 = {\n x: 2 * ax2 - 2 * ax1,\n y: 2 * ay2 - 2 * ay1,\n };\n c10 = {x: ax1, y: ay1};\n c22 = {\n x: bx1 - 2 * bx2 + bx3,\n y: by1 - 2 * by2 + by3,\n };\n c21 = {\n x: 2 * bx2 - 2 * bx1,\n y: 2 * by2 - 2 * by1,\n };\n c20 = {x: bx1, y: by1};\n\n let coefs;\n\n if(c12.y === 0) {\n let v0 = c12.x * (c10.y - c20.y);\n let v1 = v0 - c11.x * c11.y;\n let v2 = v0 + v1;\n let v3 = c11.y * c11.y;\n\n coefs = [\n c12.x * c22.y * c22.y,\n 2 * c12.x * c21.y * c22.y,\n c12.x * c21.y * c21.y - c22.x * v3 - c22.y * v0 - c22.y * v1,\n -c21.x * v3 - c21.y * v0 - c21.y * v1,\n (c10.x - c20.x) * v3 + (c10.y - c20.y) * v1\n ].reverse();\n }\n else {\n let v0 = c12.x * c22.y - c12.y * c22.x;\n let v1 = c12.x * c21.y - c21.x * c12.y;\n let v2 = c11.x * c12.y - c11.y * c12.x;\n let v3 = c10.y - c20.y;\n let v4 = c12.y * (c10.x - c20.x) - c12.x * v3;\n let v5 = -c11.y * v2 + c12.y * v4;\n let v6 = v2 * v2;\n coefs = [\n v0 * v0,\n 2 * v0 * v1,\n (-c22.y * v6 + c12.y * v1 * v1 + c12.y * v0 * v4 + v0 * v5) / c12.y,\n (-c21.y * v6 + c12.y * v1 * v4 + v1 * v5) / c12.y,\n (v3 * v6 + v4 * v5) / c12.y\n ].reverse();\n }\n\n let roots = getRoots(coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n\n if(0 <= s && s <= 1) {\n let xRoots = getRoots([c12.x, c11.x, c10.x - c20.x - s * c21.x - s * s * c22.x].reverse());\n\n let yRoots = getRoots([c12.y, c11.y, c10.y - c20.y - s * c21.y - s * s * c22.y].reverse());\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n let x = c22.x * s * s + c21.x * s + c20.x;\n let y = c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n // result.push(c22.multiply(s * s).add(c21.multiply(s).add(c20)));\n break checkRoots;\n }\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let c13, c12, c11, c10; // 三阶系数\n let c23, c22, c21, c20;\n\n let result = [];\n\n c13 = {\n x: -ax1 + 3 * ax2 - 3 * ax3 + ax4,\n y: -ay1 + 3 * ay2 - 3 * ay3 + ay4,\n };\n\n c12 = {\n x: 3 * ax1 - 6 * ax2 + 3 * ax3,\n y: 3 * ay1 - 6 * ay2 + 3 * ay3,\n };\n\n c11 = {\n x: -3 * ax1 + 3 * ax2,\n y: -3 * ay1 + 3 * ay2,\n };\n\n c10 = {x: ax1, y: ay1};\n\n c23 = {\n x: -bx1 + 3 * bx2 - 3 * bx3 + bx4,\n y: -by1 + 3 * by2 - 3 * by3 + by4,\n };\n\n c22 = {\n x: 3 * bx1 - 6 * bx2 + 3 * bx3,\n y: 3 * by1 - 6 * by2 + 3 * by3,\n };\n\n c21 = {\n x: -3 * bx1 + 3 * bx2,\n y: -3 * by1 + 3 * by2,\n };\n\n c20 = {x: bx1, y: by1};\n\n let c10x2 = c10.x * c10.x;\n let c10x3 = c10.x * c10.x * c10.x;\n let c10y2 = c10.y * c10.y;\n let c10y3 = c10.y * c10.y * c10.y;\n let c11x2 = c11.x * c11.x;\n let c11x3 = c11.x * c11.x * c11.x;\n let c11y2 = c11.y * c11.y;\n let c11y3 = c11.y * c11.y * c11.y;\n let c12x2 = c12.x * c12.x;\n let c12x3 = c12.x * c12.x * c12.x;\n let c12y2 = c12.y * c12.y;\n let c12y3 = c12.y * c12.y * c12.y;\n let c13x2 = c13.x * c13.x;\n let c13x3 = c13.x * c13.x * c13.x;\n let c13y2 = c13.y * c13.y;\n let c13y3 = c13.y * c13.y * c13.y;\n let c20x2 = c20.x * c20.x;\n let c20x3 = c20.x * c20.x * c20.x;\n let c20y2 = c20.y * c20.y;\n let c20y3 = c20.y * c20.y * c20.y;\n let c21x2 = c21.x * c21.x;\n let c21x3 = c21.x * c21.x * c21.x;\n let c21y2 = c21.y * c21.y;\n let c22x2 = c22.x * c22.x;\n let c22x3 = c22.x * c22.x * c22.x;\n let c22y2 = c22.y * c22.y;\n let c23x2 = c23.x * c23.x;\n let c23x3 = c23.x * c23.x * c23.x;\n let c23y2 = c23.y * c23.y;\n let c23y3 = c23.y * c23.y * c23.y;\n\n let coefs = [-c13x3 * c23y3 + c13y3 * c23x3 - 3 * c13.x * c13y2 * c23x2 * c23.y +\n 3 * c13x2 * c13.y * c23.x * c23y2,\n -6 * c13.x * c22.x * c13y2 * c23.x * c23.y + 6 * c13x2 * c13.y * c22.y * c23.x * c23.y + 3 * c22.x * c13y3 * c23x2 -\n 3 * c13x3 * c22.y * c23y2 - 3 * c13.x * c13y2 * c22.y * c23x2 + 3 * c13x2 * c22.x * c13.y * c23y2,\n -6 * c21.x * c13.x * c13y2 * c23.x * c23.y - 6 * c13.x * c22.x * c13y2 * c22.y * c23.x + 6 * c13x2 * c22.x * c13.y * c22.y * c23.y +\n 3 * c21.x * c13y3 * c23x2 + 3 * c22x2 * c13y3 * c23.x + 3 * c21.x * c13x2 * c13.y * c23y2 - 3 * c13.x * c21.y * c13y2 * c23x2 -\n 3 * c13.x * c22x2 * c13y2 * c23.y + c13x2 * c13.y * c23.x * (6 * c21.y * c23.y + 3 * c22y2) + c13x3 * (-c21.y * c23y2 -\n 2 * c22y2 * c23.y - c23.y * (2 * c21.y * c23.y + c22y2)),\n c11.x * c12.y * c13.x * c13.y * c23.x * c23.y - c11.y * c12.x * c13.x * c13.y * c23.x * c23.y + 6 * c21.x * c22.x * c13y3 * c23.x +\n 3 * c11.x * c12.x * c13.x * c13.y * c23y2 + 6 * c10.x * c13.x * c13y2 * c23.x * c23.y - 3 * c11.x * c12.x * c13y2 * c23.x * c23.y -\n 3 * c11.y * c12.y * c13.x * c13.y * c23x2 - 6 * c10.y * c13x2 * c13.y * c23.x * c23.y - 6 * c20.x * c13.x * c13y2 * c23.x * c23.y +\n 3 * c11.y * c12.y * c13x2 * c23.x * c23.y - 2 * c12.x * c12y2 * c13.x * c23.x * c23.y - 6 * c21.x * c13.x * c22.x * c13y2 * c23.y -\n 6 * c21.x * c13.x * c13y2 * c22.y * c23.x - 6 * c13.x * c21.y * c22.x * c13y2 * c23.x + 6 * c21.x * c13x2 * c13.y * c22.y * c23.y +\n 2 * c12x2 * c12.y * c13.y * c23.x * c23.y + c22x3 * c13y3 - 3 * c10.x * c13y3 * c23x2 + 3 * c10.y * c13x3 * c23y2 +\n 3 * c20.x * c13y3 * c23x2 + c12y3 * c13.x * c23x2 - c12x3 * c13.y * c23y2 - 3 * c10.x * c13x2 * c13.y * c23y2 +\n 3 * c10.y * c13.x * c13y2 * c23x2 - 2 * c11.x * c12.y * c13x2 * c23y2 + c11.x * c12.y * c13y2 * c23x2 - c11.y * c12.x * c13x2 * c23y2 +\n 2 * c11.y * c12.x * c13y2 * c23x2 + 3 * c20.x * c13x2 * c13.y * c23y2 - c12.x * c12y2 * c13.y * c23x2 -\n 3 * c20.y * c13.x * c13y2 * c23x2 + c12x2 * c12.y * c13.x * c23y2 - 3 * c13.x * c22x2 * c13y2 * c22.y +\n c13x2 * c13.y * c23.x * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c13x2 * c22.x * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c13x3 * (-2 * c21.y * c22.y * c23.y - c20.y * c23y2 - c22.y * (2 * c21.y * c23.y + c22y2) - c23.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n 6 * c11.x * c12.x * c13.x * c13.y * c22.y * c23.y + c11.x * c12.y * c13.x * c22.x * c13.y * c23.y + c11.x * c12.y * c13.x * c13.y * c22.y * c23.x -\n c11.y * c12.x * c13.x * c22.x * c13.y * c23.y - c11.y * c12.x * c13.x * c13.y * c22.y * c23.x - 6 * c11.y * c12.y * c13.x * c22.x * c13.y * c23.x -\n 6 * c10.x * c22.x * c13y3 * c23.x + 6 * c20.x * c22.x * c13y3 * c23.x + 6 * c10.y * c13x3 * c22.y * c23.y + 2 * c12y3 * c13.x * c22.x * c23.x -\n 2 * c12x3 * c13.y * c22.y * c23.y + 6 * c10.x * c13.x * c22.x * c13y2 * c23.y + 6 * c10.x * c13.x * c13y2 * c22.y * c23.x +\n 6 * c10.y * c13.x * c22.x * c13y2 * c23.x - 3 * c11.x * c12.x * c22.x * c13y2 * c23.y - 3 * c11.x * c12.x * c13y2 * c22.y * c23.x +\n 2 * c11.x * c12.y * c22.x * c13y2 * c23.x + 4 * c11.y * c12.x * c22.x * c13y2 * c23.x - 6 * c10.x * c13x2 * c13.y * c22.y * c23.y -\n 6 * c10.y * c13x2 * c22.x * c13.y * c23.y - 6 * c10.y * c13x2 * c13.y * c22.y * c23.x - 4 * c11.x * c12.y * c13x2 * c22.y * c23.y -\n 6 * c20.x * c13.x * c22.x * c13y2 * c23.y - 6 * c20.x * c13.x * c13y2 * c22.y * c23.x - 2 * c11.y * c12.x * c13x2 * c22.y * c23.y +\n 3 * c11.y * c12.y * c13x2 * c22.x * c23.y + 3 * c11.y * c12.y * c13x2 * c22.y * c23.x - 2 * c12.x * c12y2 * c13.x * c22.x * c23.y -\n 2 * c12.x * c12y2 * c13.x * c22.y * c23.x - 2 * c12.x * c12y2 * c22.x * c13.y * c23.x - 6 * c20.y * c13.x * c22.x * c13y2 * c23.x -\n 6 * c21.x * c13.x * c21.y * c13y2 * c23.x - 6 * c21.x * c13.x * c22.x * c13y2 * c22.y + 6 * c20.x * c13x2 * c13.y * c22.y * c23.y +\n 2 * c12x2 * c12.y * c13.x * c22.y * c23.y + 2 * c12x2 * c12.y * c22.x * c13.y * c23.y + 2 * c12x2 * c12.y * c13.y * c22.y * c23.x +\n 3 * c21.x * c22x2 * c13y3 + 3 * c21x2 * c13y3 * c23.x - 3 * c13.x * c21.y * c22x2 * c13y2 - 3 * c21x2 * c13.x * c13y2 * c23.y +\n c13x2 * c22.x * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c13x2 * c13.y * c23.x * (6 * c20.y * c22.y + 3 * c21y2) +\n c21.x * c13x2 * c13.y * (6 * c21.y * c23.y + 3 * c22y2) + c13x3 * (-2 * c20.y * c22.y * c23.y - c23.y * (2 * c20.y * c22.y + c21y2) -\n c21.y * (2 * c21.y * c23.y + c22y2) - c22.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n c11.x * c21.x * c12.y * c13.x * c13.y * c23.y + c11.x * c12.y * c13.x * c21.y * c13.y * c23.x + c11.x * c12.y * c13.x * c22.x * c13.y * c22.y -\n c11.y * c12.x * c21.x * c13.x * c13.y * c23.y - c11.y * c12.x * c13.x * c21.y * c13.y * c23.x - c11.y * c12.x * c13.x * c22.x * c13.y * c22.y -\n 6 * c11.y * c21.x * c12.y * c13.x * c13.y * c23.x - 6 * c10.x * c21.x * c13y3 * c23.x + 6 * c20.x * c21.x * c13y3 * c23.x +\n 2 * c21.x * c12y3 * c13.x * c23.x + 6 * c10.x * c21.x * c13.x * c13y2 * c23.y + 6 * c10.x * c13.x * c21.y * c13y2 * c23.x +\n 6 * c10.x * c13.x * c22.x * c13y2 * c22.y + 6 * c10.y * c21.x * c13.x * c13y2 * c23.x - 3 * c11.x * c12.x * c21.x * c13y2 * c23.y -\n 3 * c11.x * c12.x * c21.y * c13y2 * c23.x - 3 * c11.x * c12.x * c22.x * c13y2 * c22.y + 2 * c11.x * c21.x * c12.y * c13y2 * c23.x +\n 4 * c11.y * c12.x * c21.x * c13y2 * c23.x - 6 * c10.y * c21.x * c13x2 * c13.y * c23.y - 6 * c10.y * c13x2 * c21.y * c13.y * c23.x -\n 6 * c10.y * c13x2 * c22.x * c13.y * c22.y - 6 * c20.x * c21.x * c13.x * c13y2 * c23.y - 6 * c20.x * c13.x * c21.y * c13y2 * c23.x -\n 6 * c20.x * c13.x * c22.x * c13y2 * c22.y + 3 * c11.y * c21.x * c12.y * c13x2 * c23.y - 3 * c11.y * c12.y * c13.x * c22x2 * c13.y +\n 3 * c11.y * c12.y * c13x2 * c21.y * c23.x + 3 * c11.y * c12.y * c13x2 * c22.x * c22.y - 2 * c12.x * c21.x * c12y2 * c13.x * c23.y -\n 2 * c12.x * c21.x * c12y2 * c13.y * c23.x - 2 * c12.x * c12y2 * c13.x * c21.y * c23.x - 2 * c12.x * c12y2 * c13.x * c22.x * c22.y -\n 6 * c20.y * c21.x * c13.x * c13y2 * c23.x - 6 * c21.x * c13.x * c21.y * c22.x * c13y2 + 6 * c20.y * c13x2 * c21.y * c13.y * c23.x +\n 2 * c12x2 * c21.x * c12.y * c13.y * c23.y + 2 * c12x2 * c12.y * c21.y * c13.y * c23.x + 2 * c12x2 * c12.y * c22.x * c13.y * c22.y -\n 3 * c10.x * c22x2 * c13y3 + 3 * c20.x * c22x2 * c13y3 + 3 * c21x2 * c22.x * c13y3 + c12y3 * c13.x * c22x2 +\n 3 * c10.y * c13.x * c22x2 * c13y2 + c11.x * c12.y * c22x2 * c13y2 + 2 * c11.y * c12.x * c22x2 * c13y2 -\n c12.x * c12y2 * c22x2 * c13.y - 3 * c20.y * c13.x * c22x2 * c13y2 - 3 * c21x2 * c13.x * c13y2 * c22.y +\n c12x2 * c12.y * c13.x * (2 * c21.y * c23.y + c22y2) + c11.x * c12.x * c13.x * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c21.x * c13x2 * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c12x3 * c13.y * (-2 * c21.y * c23.y - c22y2) +\n c10.y * c13x3 * (6 * c21.y * c23.y + 3 * c22y2) + c11.y * c12.x * c13x2 * (-2 * c21.y * c23.y - c22y2) +\n c11.x * c12.y * c13x2 * (-4 * c21.y * c23.y - 2 * c22y2) + c10.x * c13x2 * c13.y * (-6 * c21.y * c23.y - 3 * c22y2) +\n c13x2 * c22.x * c13.y * (6 * c20.y * c22.y + 3 * c21y2) + c20.x * c13x2 * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c13x3 * (-2 * c20.y * c21.y * c23.y - c22.y * (2 * c20.y * c22.y + c21y2) - c20.y * (2 * c21.y * c23.y + c22y2) -\n c21.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n -c10.x * c11.x * c12.y * c13.x * c13.y * c23.y + c10.x * c11.y * c12.x * c13.x * c13.y * c23.y + 6 * c10.x * c11.y * c12.y * c13.x * c13.y * c23.x -\n 6 * c10.y * c11.x * c12.x * c13.x * c13.y * c23.y - c10.y * c11.x * c12.y * c13.x * c13.y * c23.x + c10.y * c11.y * c12.x * c13.x * c13.y * c23.x +\n c11.x * c11.y * c12.x * c12.y * c13.x * c23.y - c11.x * c11.y * c12.x * c12.y * c13.y * c23.x + c11.x * c20.x * c12.y * c13.x * c13.y * c23.y +\n c11.x * c20.y * c12.y * c13.x * c13.y * c23.x + c11.x * c21.x * c12.y * c13.x * c13.y * c22.y + c11.x * c12.y * c13.x * c21.y * c22.x * c13.y -\n c20.x * c11.y * c12.x * c13.x * c13.y * c23.y - 6 * c20.x * c11.y * c12.y * c13.x * c13.y * c23.x - c11.y * c12.x * c20.y * c13.x * c13.y * c23.x -\n c11.y * c12.x * c21.x * c13.x * c13.y * c22.y - c11.y * c12.x * c13.x * c21.y * c22.x * c13.y - 6 * c11.y * c21.x * c12.y * c13.x * c22.x * c13.y -\n 6 * c10.x * c20.x * c13y3 * c23.x - 6 * c10.x * c21.x * c22.x * c13y3 - 2 * c10.x * c12y3 * c13.x * c23.x + 6 * c20.x * c21.x * c22.x * c13y3 +\n 2 * c20.x * c12y3 * c13.x * c23.x + 2 * c21.x * c12y3 * c13.x * c22.x + 2 * c10.y * c12x3 * c13.y * c23.y - 6 * c10.x * c10.y * c13.x * c13y2 * c23.x +\n 3 * c10.x * c11.x * c12.x * c13y2 * c23.y - 2 * c10.x * c11.x * c12.y * c13y2 * c23.x - 4 * c10.x * c11.y * c12.x * c13y2 * c23.x +\n 3 * c10.y * c11.x * c12.x * c13y2 * c23.x + 6 * c10.x * c10.y * c13x2 * c13.y * c23.y + 6 * c10.x * c20.x * c13.x * c13y2 * c23.y -\n 3 * c10.x * c11.y * c12.y * c13x2 * c23.y + 2 * c10.x * c12.x * c12y2 * c13.x * c23.y + 2 * c10.x * c12.x * c12y2 * c13.y * c23.x +\n 6 * c10.x * c20.y * c13.x * c13y2 * c23.x + 6 * c10.x * c21.x * c13.x * c13y2 * c22.y + 6 * c10.x * c13.x * c21.y * c22.x * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c23.y + 6 * c10.y * c20.x * c13.x * c13y2 * c23.x + 2 * c10.y * c11.y * c12.x * c13x2 * c23.y -\n 3 * c10.y * c11.y * c12.y * c13x2 * c23.x + 2 * c10.y * c12.x * c12y2 * c13.x * c23.x + 6 * c10.y * c21.x * c13.x * c22.x * c13y2 -\n 3 * c11.x * c20.x * c12.x * c13y2 * c23.y + 2 * c11.x * c20.x * c12.y * c13y2 * c23.x + c11.x * c11.y * c12y2 * c13.x * c23.x -\n 3 * c11.x * c12.x * c20.y * c13y2 * c23.x - 3 * c11.x * c12.x * c21.x * c13y2 * c22.y - 3 * c11.x * c12.x * c21.y * c22.x * c13y2 +\n 2 * c11.x * c21.x * c12.y * c22.x * c13y2 + 4 * c20.x * c11.y * c12.x * c13y2 * c23.x + 4 * c11.y * c12.x * c21.x * c22.x * c13y2 -\n 2 * c10.x * c12x2 * c12.y * c13.y * c23.y - 6 * c10.y * c20.x * c13x2 * c13.y * c23.y - 6 * c10.y * c20.y * c13x2 * c13.y * c23.x -\n 6 * c10.y * c21.x * c13x2 * c13.y * c22.y - 2 * c10.y * c12x2 * c12.y * c13.x * c23.y - 2 * c10.y * c12x2 * c12.y * c13.y * c23.x -\n 6 * c10.y * c13x2 * c21.y * c22.x * c13.y - c11.x * c11.y * c12x2 * c13.y * c23.y - 2 * c11.x * c11y2 * c13.x * c13.y * c23.x +\n 3 * c20.x * c11.y * c12.y * c13x2 * c23.y - 2 * c20.x * c12.x * c12y2 * c13.x * c23.y - 2 * c20.x * c12.x * c12y2 * c13.y * c23.x -\n 6 * c20.x * c20.y * c13.x * c13y2 * c23.x - 6 * c20.x * c21.x * c13.x * c13y2 * c22.y - 6 * c20.x * c13.x * c21.y * c22.x * c13y2 +\n 3 * c11.y * c20.y * c12.y * c13x2 * c23.x + 3 * c11.y * c21.x * c12.y * c13x2 * c22.y + 3 * c11.y * c12.y * c13x2 * c21.y * c22.x -\n 2 * c12.x * c20.y * c12y2 * c13.x * c23.x - 2 * c12.x * c21.x * c12y2 * c13.x * c22.y - 2 * c12.x * c21.x * c12y2 * c22.x * c13.y -\n 2 * c12.x * c12y2 * c13.x * c21.y * c22.x - 6 * c20.y * c21.x * c13.x * c22.x * c13y2 - c11y2 * c12.x * c12.y * c13.x * c23.x +\n 2 * c20.x * c12x2 * c12.y * c13.y * c23.y + 6 * c20.y * c13x2 * c21.y * c22.x * c13.y + 2 * c11x2 * c11.y * c13.x * c13.y * c23.y +\n c11x2 * c12.x * c12.y * c13.y * c23.y + 2 * c12x2 * c20.y * c12.y * c13.y * c23.x + 2 * c12x2 * c21.x * c12.y * c13.y * c22.y +\n 2 * c12x2 * c12.y * c21.y * c22.x * c13.y + c21x3 * c13y3 + 3 * c10x2 * c13y3 * c23.x - 3 * c10y2 * c13x3 * c23.y +\n 3 * c20x2 * c13y3 * c23.x + c11y3 * c13x2 * c23.x - c11x3 * c13y2 * c23.y - c11.x * c11y2 * c13x2 * c23.y +\n c11x2 * c11.y * c13y2 * c23.x - 3 * c10x2 * c13.x * c13y2 * c23.y + 3 * c10y2 * c13x2 * c13.y * c23.x - c11x2 * c12y2 * c13.x * c23.y +\n c11y2 * c12x2 * c13.y * c23.x - 3 * c21x2 * c13.x * c21.y * c13y2 - 3 * c20x2 * c13.x * c13y2 * c23.y + 3 * c20y2 * c13x2 * c13.y * c23.x +\n c11.x * c12.x * c13.x * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c12x3 * c13.y * (-2 * c20.y * c23.y - 2 * c21.y * c22.y) +\n c10.y * c13x3 * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c11.y * c12.x * c13x2 * (-2 * c20.y * c23.y - 2 * c21.y * c22.y) +\n c12x2 * c12.y * c13.x * (2 * c20.y * c23.y + 2 * c21.y * c22.y) + c11.x * c12.y * c13x2 * (-4 * c20.y * c23.y - 4 * c21.y * c22.y) +\n c10.x * c13x2 * c13.y * (-6 * c20.y * c23.y - 6 * c21.y * c22.y) + c20.x * c13x2 * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) +\n c21.x * c13x2 * c13.y * (6 * c20.y * c22.y + 3 * c21y2) + c13x3 * (-2 * c20.y * c21.y * c22.y - c20y2 * c23.y -\n c21.y * (2 * c20.y * c22.y + c21y2) - c20.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n -c10.x * c11.x * c12.y * c13.x * c13.y * c22.y + c10.x * c11.y * c12.x * c13.x * c13.y * c22.y + 6 * c10.x * c11.y * c12.y * c13.x * c22.x * c13.y -\n 6 * c10.y * c11.x * c12.x * c13.x * c13.y * c22.y - c10.y * c11.x * c12.y * c13.x * c22.x * c13.y + c10.y * c11.y * c12.x * c13.x * c22.x * c13.y +\n c11.x * c11.y * c12.x * c12.y * c13.x * c22.y - c11.x * c11.y * c12.x * c12.y * c22.x * c13.y + c11.x * c20.x * c12.y * c13.x * c13.y * c22.y +\n c11.x * c20.y * c12.y * c13.x * c22.x * c13.y + c11.x * c21.x * c12.y * c13.x * c21.y * c13.y - c20.x * c11.y * c12.x * c13.x * c13.y * c22.y -\n 6 * c20.x * c11.y * c12.y * c13.x * c22.x * c13.y - c11.y * c12.x * c20.y * c13.x * c22.x * c13.y - c11.y * c12.x * c21.x * c13.x * c21.y * c13.y -\n 6 * c10.x * c20.x * c22.x * c13y3 - 2 * c10.x * c12y3 * c13.x * c22.x + 2 * c20.x * c12y3 * c13.x * c22.x + 2 * c10.y * c12x3 * c13.y * c22.y -\n 6 * c10.x * c10.y * c13.x * c22.x * c13y2 + 3 * c10.x * c11.x * c12.x * c13y2 * c22.y - 2 * c10.x * c11.x * c12.y * c22.x * c13y2 -\n 4 * c10.x * c11.y * c12.x * c22.x * c13y2 + 3 * c10.y * c11.x * c12.x * c22.x * c13y2 + 6 * c10.x * c10.y * c13x2 * c13.y * c22.y +\n 6 * c10.x * c20.x * c13.x * c13y2 * c22.y - 3 * c10.x * c11.y * c12.y * c13x2 * c22.y + 2 * c10.x * c12.x * c12y2 * c13.x * c22.y +\n 2 * c10.x * c12.x * c12y2 * c22.x * c13.y + 6 * c10.x * c20.y * c13.x * c22.x * c13y2 + 6 * c10.x * c21.x * c13.x * c21.y * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c22.y + 6 * c10.y * c20.x * c13.x * c22.x * c13y2 + 2 * c10.y * c11.y * c12.x * c13x2 * c22.y -\n 3 * c10.y * c11.y * c12.y * c13x2 * c22.x + 2 * c10.y * c12.x * c12y2 * c13.x * c22.x - 3 * c11.x * c20.x * c12.x * c13y2 * c22.y +\n 2 * c11.x * c20.x * c12.y * c22.x * c13y2 + c11.x * c11.y * c12y2 * c13.x * c22.x - 3 * c11.x * c12.x * c20.y * c22.x * c13y2 -\n 3 * c11.x * c12.x * c21.x * c21.y * c13y2 + 4 * c20.x * c11.y * c12.x * c22.x * c13y2 - 2 * c10.x * c12x2 * c12.y * c13.y * c22.y -\n 6 * c10.y * c20.x * c13x2 * c13.y * c22.y - 6 * c10.y * c20.y * c13x2 * c22.x * c13.y - 6 * c10.y * c21.x * c13x2 * c21.y * c13.y -\n 2 * c10.y * c12x2 * c12.y * c13.x * c22.y - 2 * c10.y * c12x2 * c12.y * c22.x * c13.y - c11.x * c11.y * c12x2 * c13.y * c22.y -\n 2 * c11.x * c11y2 * c13.x * c22.x * c13.y + 3 * c20.x * c11.y * c12.y * c13x2 * c22.y - 2 * c20.x * c12.x * c12y2 * c13.x * c22.y -\n 2 * c20.x * c12.x * c12y2 * c22.x * c13.y - 6 * c20.x * c20.y * c13.x * c22.x * c13y2 - 6 * c20.x * c21.x * c13.x * c21.y * c13y2 +\n 3 * c11.y * c20.y * c12.y * c13x2 * c22.x + 3 * c11.y * c21.x * c12.y * c13x2 * c21.y - 2 * c12.x * c20.y * c12y2 * c13.x * c22.x -\n 2 * c12.x * c21.x * c12y2 * c13.x * c21.y - c11y2 * c12.x * c12.y * c13.x * c22.x + 2 * c20.x * c12x2 * c12.y * c13.y * c22.y -\n 3 * c11.y * c21x2 * c12.y * c13.x * c13.y + 6 * c20.y * c21.x * c13x2 * c21.y * c13.y + 2 * c11x2 * c11.y * c13.x * c13.y * c22.y +\n c11x2 * c12.x * c12.y * c13.y * c22.y + 2 * c12x2 * c20.y * c12.y * c22.x * c13.y + 2 * c12x2 * c21.x * c12.y * c21.y * c13.y -\n 3 * c10.x * c21x2 * c13y3 + 3 * c20.x * c21x2 * c13y3 + 3 * c10x2 * c22.x * c13y3 - 3 * c10y2 * c13x3 * c22.y + 3 * c20x2 * c22.x * c13y3 +\n c21x2 * c12y3 * c13.x + c11y3 * c13x2 * c22.x - c11x3 * c13y2 * c22.y + 3 * c10.y * c21x2 * c13.x * c13y2 -\n c11.x * c11y2 * c13x2 * c22.y + c11.x * c21x2 * c12.y * c13y2 + 2 * c11.y * c12.x * c21x2 * c13y2 + c11x2 * c11.y * c22.x * c13y2 -\n c12.x * c21x2 * c12y2 * c13.y - 3 * c20.y * c21x2 * c13.x * c13y2 - 3 * c10x2 * c13.x * c13y2 * c22.y + 3 * c10y2 * c13x2 * c22.x * c13.y -\n c11x2 * c12y2 * c13.x * c22.y + c11y2 * c12x2 * c22.x * c13.y - 3 * c20x2 * c13.x * c13y2 * c22.y + 3 * c20y2 * c13x2 * c22.x * c13.y +\n c12x2 * c12.y * c13.x * (2 * c20.y * c22.y + c21y2) + c11.x * c12.x * c13.x * c13.y * (6 * c20.y * c22.y + 3 * c21y2) +\n c12x3 * c13.y * (-2 * c20.y * c22.y - c21y2) + c10.y * c13x3 * (6 * c20.y * c22.y + 3 * c21y2) +\n c11.y * c12.x * c13x2 * (-2 * c20.y * c22.y - c21y2) + c11.x * c12.y * c13x2 * (-4 * c20.y * c22.y - 2 * c21y2) +\n c10.x * c13x2 * c13.y * (-6 * c20.y * c22.y - 3 * c21y2) + c20.x * c13x2 * c13.y * (6 * c20.y * c22.y + 3 * c21y2) +\n c13x3 * (-2 * c20.y * c21y2 - c20y2 * c22.y - c20.y * (2 * c20.y * c22.y + c21y2)),\n -c10.x * c11.x * c12.y * c13.x * c21.y * c13.y + c10.x * c11.y * c12.x * c13.x * c21.y * c13.y + 6 * c10.x * c11.y * c21.x * c12.y * c13.x * c13.y -\n 6 * c10.y * c11.x * c12.x * c13.x * c21.y * c13.y - c10.y * c11.x * c21.x * c12.y * c13.x * c13.y + c10.y * c11.y * c12.x * c21.x * c13.x * c13.y -\n c11.x * c11.y * c12.x * c21.x * c12.y * c13.y + c11.x * c11.y * c12.x * c12.y * c13.x * c21.y + c11.x * c20.x * c12.y * c13.x * c21.y * c13.y +\n 6 * c11.x * c12.x * c20.y * c13.x * c21.y * c13.y + c11.x * c20.y * c21.x * c12.y * c13.x * c13.y - c20.x * c11.y * c12.x * c13.x * c21.y * c13.y -\n 6 * c20.x * c11.y * c21.x * c12.y * c13.x * c13.y - c11.y * c12.x * c20.y * c21.x * c13.x * c13.y - 6 * c10.x * c20.x * c21.x * c13y3 -\n 2 * c10.x * c21.x * c12y3 * c13.x + 6 * c10.y * c20.y * c13x3 * c21.y + 2 * c20.x * c21.x * c12y3 * c13.x + 2 * c10.y * c12x3 * c21.y * c13.y -\n 2 * c12x3 * c20.y * c21.y * c13.y - 6 * c10.x * c10.y * c21.x * c13.x * c13y2 + 3 * c10.x * c11.x * c12.x * c21.y * c13y2 -\n 2 * c10.x * c11.x * c21.x * c12.y * c13y2 - 4 * c10.x * c11.y * c12.x * c21.x * c13y2 + 3 * c10.y * c11.x * c12.x * c21.x * c13y2 +\n 6 * c10.x * c10.y * c13x2 * c21.y * c13.y + 6 * c10.x * c20.x * c13.x * c21.y * c13y2 - 3 * c10.x * c11.y * c12.y * c13x2 * c21.y +\n 2 * c10.x * c12.x * c21.x * c12y2 * c13.y + 2 * c10.x * c12.x * c12y2 * c13.x * c21.y + 6 * c10.x * c20.y * c21.x * c13.x * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c21.y + 6 * c10.y * c20.x * c21.x * c13.x * c13y2 + 2 * c10.y * c11.y * c12.x * c13x2 * c21.y -\n 3 * c10.y * c11.y * c21.x * c12.y * c13x2 + 2 * c10.y * c12.x * c21.x * c12y2 * c13.x - 3 * c11.x * c20.x * c12.x * c21.y * c13y2 +\n 2 * c11.x * c20.x * c21.x * c12.y * c13y2 + c11.x * c11.y * c21.x * c12y2 * c13.x - 3 * c11.x * c12.x * c20.y * c21.x * c13y2 +\n 4 * c20.x * c11.y * c12.x * c21.x * c13y2 - 6 * c10.x * c20.y * c13x2 * c21.y * c13.y - 2 * c10.x * c12x2 * c12.y * c21.y * c13.y -\n 6 * c10.y * c20.x * c13x2 * c21.y * c13.y - 6 * c10.y * c20.y * c21.x * c13x2 * c13.y - 2 * c10.y * c12x2 * c21.x * c12.y * c13.y -\n 2 * c10.y * c12x2 * c12.y * c13.x * c21.y - c11.x * c11.y * c12x2 * c21.y * c13.y - 4 * c11.x * c20.y * c12.y * c13x2 * c21.y -\n 2 * c11.x * c11y2 * c21.x * c13.x * c13.y + 3 * c20.x * c11.y * c12.y * c13x2 * c21.y - 2 * c20.x * c12.x * c21.x * c12y2 * c13.y -\n 2 * c20.x * c12.x * c12y2 * c13.x * c21.y - 6 * c20.x * c20.y * c21.x * c13.x * c13y2 - 2 * c11.y * c12.x * c20.y * c13x2 * c21.y +\n 3 * c11.y * c20.y * c21.x * c12.y * c13x2 - 2 * c12.x * c20.y * c21.x * c12y2 * c13.x - c11y2 * c12.x * c21.x * c12.y * c13.x +\n 6 * c20.x * c20.y * c13x2 * c21.y * c13.y + 2 * c20.x * c12x2 * c12.y * c21.y * c13.y + 2 * c11x2 * c11.y * c13.x * c21.y * c13.y +\n c11x2 * c12.x * c12.y * c21.y * c13.y + 2 * c12x2 * c20.y * c21.x * c12.y * c13.y + 2 * c12x2 * c20.y * c12.y * c13.x * c21.y +\n 3 * c10x2 * c21.x * c13y3 - 3 * c10y2 * c13x3 * c21.y + 3 * c20x2 * c21.x * c13y3 + c11y3 * c21.x * c13x2 - c11x3 * c21.y * c13y2 -\n 3 * c20y2 * c13x3 * c21.y - c11.x * c11y2 * c13x2 * c21.y + c11x2 * c11.y * c21.x * c13y2 - 3 * c10x2 * c13.x * c21.y * c13y2 +\n 3 * c10y2 * c21.x * c13x2 * c13.y - c11x2 * c12y2 * c13.x * c21.y + c11y2 * c12x2 * c21.x * c13.y - 3 * c20x2 * c13.x * c21.y * c13y2 +\n 3 * c20y2 * c21.x * c13x2 * c13.y,\n c10.x * c10.y * c11.x * c12.y * c13.x * c13.y - c10.x * c10.y * c11.y * c12.x * c13.x * c13.y + c10.x * c11.x * c11.y * c12.x * c12.y * c13.y -\n c10.y * c11.x * c11.y * c12.x * c12.y * c13.x - c10.x * c11.x * c20.y * c12.y * c13.x * c13.y + 6 * c10.x * c20.x * c11.y * c12.y * c13.x * c13.y +\n c10.x * c11.y * c12.x * c20.y * c13.x * c13.y - c10.y * c11.x * c20.x * c12.y * c13.x * c13.y - 6 * c10.y * c11.x * c12.x * c20.y * c13.x * c13.y +\n c10.y * c20.x * c11.y * c12.x * c13.x * c13.y - c11.x * c20.x * c11.y * c12.x * c12.y * c13.y + c11.x * c11.y * c12.x * c20.y * c12.y * c13.x +\n c11.x * c20.x * c20.y * c12.y * c13.x * c13.y - c20.x * c11.y * c12.x * c20.y * c13.x * c13.y - 2 * c10.x * c20.x * c12y3 * c13.x +\n 2 * c10.y * c12x3 * c20.y * c13.y - 3 * c10.x * c10.y * c11.x * c12.x * c13y2 - 6 * c10.x * c10.y * c20.x * c13.x * c13y2 +\n 3 * c10.x * c10.y * c11.y * c12.y * c13x2 - 2 * c10.x * c10.y * c12.x * c12y2 * c13.x - 2 * c10.x * c11.x * c20.x * c12.y * c13y2 -\n c10.x * c11.x * c11.y * c12y2 * c13.x + 3 * c10.x * c11.x * c12.x * c20.y * c13y2 - 4 * c10.x * c20.x * c11.y * c12.x * c13y2 +\n 3 * c10.y * c11.x * c20.x * c12.x * c13y2 + 6 * c10.x * c10.y * c20.y * c13x2 * c13.y + 2 * c10.x * c10.y * c12x2 * c12.y * c13.y +\n 2 * c10.x * c11.x * c11y2 * c13.x * c13.y + 2 * c10.x * c20.x * c12.x * c12y2 * c13.y + 6 * c10.x * c20.x * c20.y * c13.x * c13y2 -\n 3 * c10.x * c11.y * c20.y * c12.y * c13x2 + 2 * c10.x * c12.x * c20.y * c12y2 * c13.x + c10.x * c11y2 * c12.x * c12.y * c13.x +\n c10.y * c11.x * c11.y * c12x2 * c13.y + 4 * c10.y * c11.x * c20.y * c12.y * c13x2 - 3 * c10.y * c20.x * c11.y * c12.y * c13x2 +\n 2 * c10.y * c20.x * c12.x * c12y2 * c13.x + 2 * c10.y * c11.y * c12.x * c20.y * c13x2 + c11.x * c20.x * c11.y * c12y2 * c13.x -\n 3 * c11.x * c20.x * c12.x * c20.y * c13y2 - 2 * c10.x * c12x2 * c20.y * c12.y * c13.y - 6 * c10.y * c20.x * c20.y * c13x2 * c13.y -\n 2 * c10.y * c20.x * c12x2 * c12.y * c13.y - 2 * c10.y * c11x2 * c11.y * c13.x * c13.y - c10.y * c11x2 * c12.x * c12.y * c13.y -\n 2 * c10.y * c12x2 * c20.y * c12.y * c13.x - 2 * c11.x * c20.x * c11y2 * c13.x * c13.y - c11.x * c11.y * c12x2 * c20.y * c13.y +\n 3 * c20.x * c11.y * c20.y * c12.y * c13x2 - 2 * c20.x * c12.x * c20.y * c12y2 * c13.x - c20.x * c11y2 * c12.x * c12.y * c13.x +\n 3 * c10y2 * c11.x * c12.x * c13.x * c13.y + 3 * c11.x * c12.x * c20y2 * c13.x * c13.y + 2 * c20.x * c12x2 * c20.y * c12.y * c13.y -\n 3 * c10x2 * c11.y * c12.y * c13.x * c13.y + 2 * c11x2 * c11.y * c20.y * c13.x * c13.y + c11x2 * c12.x * c20.y * c12.y * c13.y -\n 3 * c20x2 * c11.y * c12.y * c13.x * c13.y - c10x3 * c13y3 + c10y3 * c13x3 + c20x3 * c13y3 - c20y3 * c13x3 -\n 3 * c10.x * c20x2 * c13y3 - c10.x * c11y3 * c13x2 + 3 * c10x2 * c20.x * c13y3 + c10.y * c11x3 * c13y2 +\n 3 * c10.y * c20y2 * c13x3 + c20.x * c11y3 * c13x2 + c10x2 * c12y3 * c13.x - 3 * c10y2 * c20.y * c13x3 - c10y2 * c12x3 * c13.y +\n c20x2 * c12y3 * c13.x - c11x3 * c20.y * c13y2 - c12x3 * c20y2 * c13.y - c10.x * c11x2 * c11.y * c13y2 +\n c10.y * c11.x * c11y2 * c13x2 - 3 * c10.x * c10y2 * c13x2 * c13.y - c10.x * c11y2 * c12x2 * c13.y + c10.y * c11x2 * c12y2 * c13.x -\n c11.x * c11y2 * c20.y * c13x2 + 3 * c10x2 * c10.y * c13.x * c13y2 + c10x2 * c11.x * c12.y * c13y2 +\n 2 * c10x2 * c11.y * c12.x * c13y2 - 2 * c10y2 * c11.x * c12.y * c13x2 - c10y2 * c11.y * c12.x * c13x2 + c11x2 * c20.x * c11.y * c13y2 -\n 3 * c10.x * c20y2 * c13x2 * c13.y + 3 * c10.y * c20x2 * c13.x * c13y2 + c11.x * c20x2 * c12.y * c13y2 - 2 * c11.x * c20y2 * c12.y * c13x2 +\n c20.x * c11y2 * c12x2 * c13.y - c11.y * c12.x * c20y2 * c13x2 - c10x2 * c12.x * c12y2 * c13.y - 3 * c10x2 * c20.y * c13.x * c13y2 +\n 3 * c10y2 * c20.x * c13x2 * c13.y + c10y2 * c12x2 * c12.y * c13.x - c11x2 * c20.y * c12y2 * c13.x + 2 * c20x2 * c11.y * c12.x * c13y2 +\n 3 * c20.x * c20y2 * c13x2 * c13.y - c20x2 * c12.x * c12y2 * c13.y - 3 * c20x2 * c20.y * c13.x * c13y2 + c12x2 * c20y2 * c12.y * c13.x\n ].reverse();\n\n let roots = getRootsInInterval(0, 1, coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n let xRoots = getRoots([c13.x, c12.x, c11.x, c10.x - c20.x - s * c21.x - s * s * c22.x - s * s * s * c23.x].reverse());\n let yRoots = getRoots([c13.y,\n c12.y,\n c11.y,\n c10.y - c20.y - s * c21.y - s * s * c22.y - s * s * s * c23.y].reverse());\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n let x = c23.x * s * s * s + c22.x * s * s + c21.x * s + c20.x;\n let y = c23.y * s * s * s + c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n break checkRoots;\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let c12, c11, c10;\n let c23, c22, c21, c20;\n let result = [];\n\n c12 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n\n c11 = {\n x: 2 * ax2 - 2 * ax1,\n y: 2 * ay2 - 2 * ay1,\n };\n c10 = {x: ax1, y: ay1};\n\n c23 = {\n x: -bx1 + 3 * bx2 - 3 * bx3 + bx4,\n y: -by1 + 3 * by2 - 3 * by3 + by4,\n };\n\n c22 = {\n x: 3 * bx1 - 6 * bx2 + 3 * bx3,\n y: 3 * by1 - 6 * by2 + 3 * by3,\n };\n\n c21 = {\n x: -3 * bx1 + 3 * bx2,\n y: -3 * by1 + 3 * by2,\n };\n\n c20 = {x: bx1, y: by1};\n\n let c10x2 = c10.x * c10.x;\n let c10y2 = c10.y * c10.y;\n let c11x2 = c11.x * c11.x;\n let c11y2 = c11.y * c11.y;\n let c12x2 = c12.x * c12.x;\n let c12y2 = c12.y * c12.y;\n let c20x2 = c20.x * c20.x;\n let c20y2 = c20.y * c20.y;\n let c21x2 = c21.x * c21.x;\n let c21y2 = c21.y * c21.y;\n let c22x2 = c22.x * c22.x;\n let c22y2 = c22.y * c22.y;\n let c23x2 = c23.x * c23.x;\n let c23y2 = c23.y * c23.y;\n\n let coefs = [\n -2 * c12.x * c12.y * c23.x * c23.y + c12x2 * c23y2 + c12y2 * c23x2,\n -2 * c12.x * c12.y * c22.x * c23.y - 2 * c12.x * c12.y * c22.y * c23.x + 2 * c12y2 * c22.x * c23.x +\n 2 * c12x2 * c22.y * c23.y,\n -2 * c12.x * c21.x * c12.y * c23.y - 2 * c12.x * c12.y * c21.y * c23.x - 2 * c12.x * c12.y * c22.x * c22.y +\n 2 * c21.x * c12y2 * c23.x + c12y2 * c22x2 + c12x2 * (2 * c21.y * c23.y + c22y2),\n 2 * c10.x * c12.x * c12.y * c23.y + 2 * c10.y * c12.x * c12.y * c23.x + c11.x * c11.y * c12.x * c23.y +\n c11.x * c11.y * c12.y * c23.x - 2 * c20.x * c12.x * c12.y * c23.y - 2 * c12.x * c20.y * c12.y * c23.x -\n 2 * c12.x * c21.x * c12.y * c22.y - 2 * c12.x * c12.y * c21.y * c22.x - 2 * c10.x * c12y2 * c23.x -\n 2 * c10.y * c12x2 * c23.y + 2 * c20.x * c12y2 * c23.x + 2 * c21.x * c12y2 * c22.x -\n c11y2 * c12.x * c23.x - c11x2 * c12.y * c23.y + c12x2 * (2 * c20.y * c23.y + 2 * c21.y * c22.y),\n 2 * c10.x * c12.x * c12.y * c22.y + 2 * c10.y * c12.x * c12.y * c22.x + c11.x * c11.y * c12.x * c22.y +\n c11.x * c11.y * c12.y * c22.x - 2 * c20.x * c12.x * c12.y * c22.y - 2 * c12.x * c20.y * c12.y * c22.x -\n 2 * c12.x * c21.x * c12.y * c21.y - 2 * c10.x * c12y2 * c22.x - 2 * c10.y * c12x2 * c22.y +\n 2 * c20.x * c12y2 * c22.x - c11y2 * c12.x * c22.x - c11x2 * c12.y * c22.y + c21x2 * c12y2 +\n c12x2 * (2 * c20.y * c22.y + c21y2),\n 2 * c10.x * c12.x * c12.y * c21.y + 2 * c10.y * c12.x * c21.x * c12.y + c11.x * c11.y * c12.x * c21.y +\n c11.x * c11.y * c21.x * c12.y - 2 * c20.x * c12.x * c12.y * c21.y - 2 * c12.x * c20.y * c21.x * c12.y -\n 2 * c10.x * c21.x * c12y2 - 2 * c10.y * c12x2 * c21.y + 2 * c20.x * c21.x * c12y2 -\n c11y2 * c12.x * c21.x - c11x2 * c12.y * c21.y + 2 * c12x2 * c20.y * c21.y,\n -2 * c10.x * c10.y * c12.x * c12.y - c10.x * c11.x * c11.y * c12.y - c10.y * c11.x * c11.y * c12.x +\n 2 * c10.x * c12.x * c20.y * c12.y + 2 * c10.y * c20.x * c12.x * c12.y + c11.x * c20.x * c11.y * c12.y +\n c11.x * c11.y * c12.x * c20.y - 2 * c20.x * c12.x * c20.y * c12.y - 2 * c10.x * c20.x * c12y2 +\n c10.x * c11y2 * c12.x + c10.y * c11x2 * c12.y - 2 * c10.y * c12x2 * c20.y -\n c20.x * c11y2 * c12.x - c11x2 * c20.y * c12.y + c10x2 * c12y2 + c10y2 * c12x2 +\n c20x2 * c12y2 + c12x2 * c20y2].reverse();\n\n let roots = getRootsInInterval(0, 1, coefs);\n // console.log(roots);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n let xRoots = getRoots([c12.x,\n c11.x,\n c10.x - c20.x - s * c21.x - s * s * c22.x - s * s * s * c23.x].reverse());\n let yRoots = getRoots([c12.y,\n c11.y,\n c10.y - c20.y - s * c21.y - s * s * c22.y - s * s * s * c23.y].reverse());\n //\n // console.log('xRoots', xRoots);\n //\n // console.log('yRoots', yRoots);\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n\n let x = c23.x * s * s * s + c22.x * s * s + c21.x * s + c20.x;\n let y = c23.y * s * s * s + c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n break checkRoots;\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2) {\n let c2, c1, c0;\n let cl, n;\n let result = [];\n\n let minbx = Math.min(bx1, bx2);\n let minby = Math.min(by1, by2);\n let maxbx = Math.max(bx1, bx2);\n let maxby = Math.max(by1, by2);\n\n const dot = (a, b) => a.x * b.x + a.y * b.y;\n const lerp = (a, b, t) => ({\n x: a.x - (a.x - b.x) * t,\n y: a.y - (a.y - b.y) * t,\n t,\n });\n\n c2 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n c1 = {\n x: -2 * ax1 + 2 * ax2,\n y: -2 * ay1 + 2 * ay2,\n };\n c0 = {x: ax1, y: ay1};\n\n n = {x: by1 - by2, y: bx2 - bx1};\n cl = bx1 * by2 - bx2 * by1;\n\n // console.log('intersectBezier2Line', n, c0, c1, c2, cl);\n\n let coefs = [dot(n, c2), dot(n, c1), dot(n, c0) + cl].reverse();\n\n // console.log('intersectBezier2Line coefs', coefs);\n\n let roots = getRoots(coefs);\n\n // console.log('intersectBezier2Line roots', roots);\n\n for(let i = 0; i < roots.length; i++) {\n let t = roots[i];\n\n if(0 <= t && t <= 1) {\n let p4 = lerp({x: ax1, y: ay1}, {x: ax2, y: ay2}, t);\n let p5 = lerp({x: ax2, y: ay2}, {x: ax3, y: ay3}, t);\n\n let p6 = lerp(p4, p5, t);\n // console.log('p4, p5, p6', p4, p5, p6);\n\n if(bx1 === bx2) {\n if(minby <= p6.y && p6.y <= maxby) {\n result.push(p6);\n }\n }\n else if(by1 === by2) {\n if(minbx <= p6.x && p6.x <= maxbx) {\n result.push(p6);\n }\n }\n else if(p6.x >= minbx && p6.y >= minby && p6.x <= maxbx && p6.y <= maxby) {\n result.push(p6);\n }\n }\n }\n return result;\n}\n\n\n/**\n *\n * (-P1+3P2-3P3+P4)t^3 + (3P1-6P2+3P3)t^2 + (-3P1+3P2)t + P1\n * /\\ /\\ /\\ /\\\n * || || || ||\n * c3 c2 c1 c0\n */\nfunction intersectBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, bx1, by1, bx2, by2) {\n let c3, c2, c1, c0;\n let cl, n;\n let result = [];\n\n let minbx = Math.min(bx1, bx2);\n let minby = Math.min(by1, by2);\n let maxbx = Math.max(bx1, bx2);\n let maxby = Math.max(by1, by2);\n\n const dot = (a, b) => a.x * b.x + a.y * b.y;\n const lerp = (a, b, t) => ({\n x: a.x - (a.x - b.x) * t,\n y: a.y - (a.y - b.y) * t,\n t,\n });\n\n c3 = {\n x: -ax1 + 3 * ax2 - 3 * ax3 + ax4,\n y: -ay1 + 3 * ay2 - 3 * ay3 + ay4,\n };\n c2 = {\n x: 3 * ax1 - 6 * ax2 + 3 * ax3,\n y: 3 * ay1 - 6 * ay2 + 3 * ay3,\n };\n c1 = {\n x: -3 * ax1 + 3 * ax2,\n y: -3 * ay1 + 3 * ay2,\n };\n c0 = {x: ax1, y: ay1};\n\n n = {x: by1 - by2, y: bx2 - bx1};\n cl = bx1 * by2 - bx2 * by1;\n\n let coefs = [\n cl + dot(n, c0),\n dot(n, c1),\n dot(n, c2),\n dot(n, c3),\n ];\n\n let roots = getRoots(coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let t = roots[i];\n\n if(0 <= t && t <= 1) {\n let p5 = lerp({x: ax1, y: ay1}, {x: ax2, y: ay2}, t);\n let p6 = lerp({x: ax2, y: ay2}, {x: ax3, y: ay3}, t);\n let p7 = lerp({x: ax3, y: ay3}, {x: ax4, y: ay4}, t);\n let p8 = lerp(p5, p6, t);\n let p9 = lerp(p6, p7, t);\n let p10 = lerp(p8, p9, t);\n\n if(bx1 === bx2) {\n if(minby <= p10.y && p10.y <= maxby) {\n result.push(p10);\n }\n }\n else if(by1 === by2) {\n if(minbx <= p10.x && p10.x <= maxbx) {\n result.push(p10);\n }\n }\n else if(p10.x >= minbx && p10.y >= minby && p10.x <= maxbx && p10.y <= maxby) {\n result.push(p10);\n }\n }\n }\n return result;\n}\n\n/**\n * 3d直线交点,允许误差,传入4个顶点坐标\n * limitToFiniteSegment可传0、1、2、3,默认0是不考虑点是否在传入的顶点组成的线段上\n * 1为限制在p1/p2线段,2为限制在p3/p4线段,3为都限制\n */\nfunction intersectLineLine3(p1, p2, p3, p4, limitToFiniteSegment = 0, tolerance = 1e-9) {\n let p13 = subtractPoint(p1, p3);\n let p43 = subtractPoint(p4, p3);\n let p21 = subtractPoint(p2, p1);\n let d1343 = p13.x * p43.x + p13.y * p43.y + p13.z * p43.z;\n let d4321 = p43.x * p21.x + p43.y * p21.y + p43.z * p21.z;\n let d1321 = p13.x * p21.x + p13.y * p21.y + p13.z * p21.z;\n let d4343 = p43.x * p43.x + p43.y * p43.y + p43.z * p43.z;\n let d2121 = p21.x * p21.x + p21.y * p21.y + p21.z * p21.z;\n let denom = d2121 * d4343 - d4321 * d4321;\n if(Math.abs(denom) < tolerance) {\n return;\n }\n let numer = d1343 * d4321 - d1321 * d4343;\n let mua = numer / denom;\n let mub = (d1343 + d4321 * mua) / d4343;\n let pa = {\n x: p1.x + mua * p21.x,\n y: p1.y + mua * p21.y,\n z: p1.z + mua * p21.z,\n };\n let pb = {\n x: p3.x + mub * p43.x,\n y: p3.y + mub * p43.y,\n z: p3.z + mub * p43.z,\n };\n let distance = distanceTo(pa, pb);\n if(distance > tolerance) {\n return;\n }\n let intersectPt = divide(addPoint(pa, pb), 2);\n if(!limitToFiniteSegment) {\n return intersectPt;\n }\n let paramA = closestParam(intersectPt, p1, p2);\n let paramB = closestParam(intersectPt, p3, p4);\n if(paramA < 0 && Math.abs(paramA) < 1e-9) {\n paramA = 0;\n }\n else if(paramA > 1 && paramA - 1 < 1e-9) {\n paramA = 1;\n }\n if(paramB < 0 && Math.abs(paramB) < 1e-9) {\n paramB = 0;\n }\n else if(paramB > 1 && paramB - 1 < 1e-9) {\n paramB = 1;\n }\n intersectPt.pa = paramA;\n intersectPt.pb = paramB;\n if(limitToFiniteSegment === 1 && paramA >= 0 && paramA <= 1) {\n return intersectPt;\n }\n if(limitToFiniteSegment === 2 && paramB >= 0 && paramB <= 1) {\n return intersectPt;\n }\n if(limitToFiniteSegment === 3 && paramA >= 0 && paramA <= 1 && paramB >= 0 && paramB <= 1) {\n return intersectPt;\n }\n}\n\nfunction subtractPoint(p1, p2) {\n return {\n x: p1.x - p2.x,\n y: p1.y - p2.y,\n z: p1.z - p2.z,\n };\n}\n\nfunction distanceTo(a, b) {\n return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2) + Math.pow(a.z - b.z, 2));\n}\n\nfunction addPoint(a, b) {\n return {\n x: a.x + b.x,\n y: a.y + b.y,\n z: a.z + b.z,\n };\n}\n\nfunction divide(p, t) {\n let n = 1 / t;\n return {\n x: p.x * n,\n y: p.y * n,\n z: p.z * n,\n };\n}\n\nfunction closestParam(p, from, to) {\n let startToP = subtractPoint(p, from);\n let startToEnd = subtractPoint(to, from);\n let startEnd2 = dotProduct3(startToEnd, startToEnd);\n let startEnd_startP = dotProduct3(startToEnd, startToP);\n return startEnd_startP / startEnd2;\n}\n\n/**\n * 平面相交线,传入2个平面的各3个顶点,返回2点式\n */\nfunction intersectPlanePlane(p1, p2, p3, p4, p5, p6) {\n let v1 = unitize3(\n p2.x - p1.x,\n p2.y - p1.y,\n p2.z - p1.z,\n ), v2 = unitize3(\n p3.x - p1.x,\n p3.y - p1.y,\n p3.z - p1.z,\n ), v4 = unitize3(\n p5.x - p4.x,\n p5.y - p4.y,\n p5.z - p4.z,\n ), v5 = unitize3(\n p6.x - p4.x,\n p6.y - p4.y,\n p6.z - p4.z,\n );\n let v3 = unitize3(crossProduct3(v1.x, v1.y, v1.z, v2.x, v2.y, v2.z));\n let v6 = unitize3(crossProduct3(v4.x, v4.y, v4.z, v5.x, v5.y, v5.z));\n if(isParallel3(v3, v6)) {\n return null;\n }\n let normal = crossProduct3(v6.x, v6.y, v6.z, v3.x, v3.y, v3.z);\n let p7 = addPoint(v1, v4);\n // planeC\n let v9 = unitize3(normal.x, normal.y, normal.z);\n // 3平面相交\n let a1 = v3.x, b1 = v3.y, c1 = v3.z, d1 = -a1 * p1.x - b1 * p1.y - c1 * p1.z;\n let a2 = v6.x, b2 = v6.y, c2 = v6.z, d2 = -a2 * p4.x - b2 * p4.y - c2 * p4.z;\n let a3 = v9.x, b3 = v9.y, c3 = v9.z, d3 = -a3 * p7.x - b3 * p7.y - c3 * p7.z;\n let mb = [-d1, -d2, -d3];\n let det = a1 * (b2 * c3 - c2 * b3) - b1 * (a2 * c3 - c2 * a3) + c1 * (a2 * b3 - b2 * a3);\n if(Math.abs(det) < 1e-9) {\n return null;\n }\n let invDet = 1 / det;\n let v11 = invDet * (b2 * c3 - c2 * b3);\n let v12 = invDet * (c1 * b3 - b1 * c3);\n let v13 = invDet * (b1 * c2 - c1 * b2);\n let v21 = invDet * (c2 * a3 - a2 * c3);\n let v22 = invDet * (a1 * c3 - c1 * a3);\n let v23 = invDet * (c1 * a2 - a1 * c2);\n let v31 = invDet * (a2 * b3 - b2 * a3);\n let v32 = invDet * (b1 * a3 - a1 * b3);\n let v33 = invDet * (a1 * b2 - b1 * a2);\n let x = v11 * mb[0] + v12 * mb[1] + v13 * mb[2];\n let y = v21 * mb[0] + v22 * mb[1] + v23 * mb[2];\n let z = v31 * mb[0] + v32 * mb[1] + v33 * mb[2];\n let point = { x, y, z };\n return [\n point,\n addPoint(point, v9),\n ];\n}\n\n// 点是否在线段上,注意误差\nfunction pointOnLine3(p, p1, p2) {\n let v1x = p1.x - p.x, v1y = p1.y - p.y, v1z = p1.z - p.z;\n let v2x = p2.x - p.x, v2y = p2.y - p.y, v2z = p2.z - p.z;\n let c = crossProduct3(v1x, v1y, v1z, v2x, v2y, v2z);\n return length3(c.x, c.y, c.z) < 1e-9;\n}\n\nexport default {\n intersectBezier2Line, // 二阶贝塞尔曲线 与 直线\n intersectBezier3Line, // 三阶贝塞尔曲线 与 直线\n intersectBezier2Bezier2, // 二阶贝塞尔曲线 与 二阶贝塞尔曲线\n intersectBezier3Bezier3, // 三阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectBezier2Bezier3, // 二阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectLineLine3,\n intersectPlanePlane,\n pointOnLine3,\n}\n","import isec from '../math/isec';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\n\nconst { intersectPlanePlane, intersectLineLine3, pointOnLine3 } = isec;\nconst { isRectsOverlap, getPlainNormalEquation } = geom;\nconst { isZero3 } = vector;\n\n// 设置新拼图的x/y/z投影数据和bbox数据,原本平面矩形也算一个拼图\nfunction shadow(puzzle) {\n let points = puzzle.points;\n let xShadow = [\n {\n y: points[0].y,\n z: points[0].z,\n },\n ];\n outer:\n for(let i = 1, len = points.length; i < len; i++) {\n let p = points[i];\n for(let j = 0; j < i; j++) {\n let o = points[j];\n if(p.y === o.y && p.z === o.z) {\n continue outer;\n }\n }\n xShadow.push({\n y: p.y,\n z: p.z,\n });\n }\n // 顶点和bbox,每个轴投影都要\n puzzle.xShadow = [];\n puzzle.xBbox = [];\n for(let j = 0, len = xShadow.length; j < len; j++) {\n let a = xShadow[j];\n puzzle.xShadow.push(a);\n if(j === 0) {\n puzzle.xBbox[0] = a.z;\n puzzle.xBbox[1] = a.y;\n puzzle.xBbox[2] = a.z;\n puzzle.xBbox[3] = a.y;\n }\n else {\n puzzle.xBbox[0] = Math.min(puzzle.xBbox[0], a.z);\n puzzle.xBbox[1] = Math.min(puzzle.xBbox[1], a.y);\n puzzle.xBbox[2] = Math.max(puzzle.xBbox[2], a.z);\n puzzle.xBbox[3] = Math.max(puzzle.xBbox[3], a.y);\n }\n }\n // y/z类似\n let yShadow = [\n {\n x: points[0].x,\n z: points[0].z,\n },\n ];\n outer:\n for(let i = 1, len = points.length; i < len; i++) {\n let p = points[i];\n for(let j = 0; j < i; j++) {\n let o = points[j];\n if(p.x === o.x && p.z === o.z) {\n continue outer;\n }\n }\n yShadow.push({\n x: p.x,\n z: p.z,\n });\n }\n puzzle.yShadow = [];\n puzzle.yBbox = [];\n for(let j = 0, len = yShadow.length; j < len; j++) {\n let a = yShadow[j];\n puzzle.yShadow.push(a);\n if(j === 0) {\n puzzle.yBbox[0] = a.x;\n puzzle.yBbox[1] = a.z;\n puzzle.yBbox[2] = a.x;\n puzzle.yBbox[3] = a.z;\n }\n else {\n puzzle.yBbox[0] = Math.min(puzzle.yBbox[0], a.x);\n puzzle.yBbox[1] = Math.min(puzzle.yBbox[1], a.z);\n puzzle.yBbox[2] = Math.max(puzzle.yBbox[2], a.x);\n puzzle.yBbox[3] = Math.max(puzzle.yBbox[3], a.z);\n }\n }\n let zShadow = [\n {\n x: points[0].x,\n y: points[0].y,\n },\n ];\n outer:\n for(let i = 1, len = points.length; i < len; i++) {\n let p = points[i];\n for(let j = 0; j < i; j++) {\n let o = points[j];\n if(p.x === o.x && p.y === o.y) {\n continue outer;\n }\n }\n zShadow.push({\n x: p.x,\n y: p.y,\n });\n }\n puzzle.zShadow = [];\n puzzle.zBbox = [];\n for(let j = 0, len = zShadow.length; j < len; j++) {\n let a = zShadow[j];\n puzzle.zShadow.push(a);\n if(j === 0) {\n puzzle.zBbox[0] = a.x;\n puzzle.zBbox[1] = a.y;\n puzzle.zBbox[2] = a.x;\n puzzle.zBbox[3] = a.y;\n }\n else {\n puzzle.zBbox[0] = Math.min(puzzle.zBbox[0], a.x);\n puzzle.zBbox[1] = Math.min(puzzle.zBbox[1], a.y);\n puzzle.zBbox[2] = Math.max(puzzle.zBbox[2], a.x);\n puzzle.zBbox[3] = Math.max(puzzle.zBbox[3], a.y);\n }\n }\n}\n\n// 多个平面相交切割,每个平面有[3,]个顶点,且有index索引额外信息\nfunction splitQuadrilateralPlane(list) {\n let uuid = 0;\n let length = list.length;\n if(length < 2) {\n return;\n }\n // 先每个四边形计算x/y/z轴上的投影,可能是四边形也可能重合三角形或直线\n let xList = [];\n for(let i = 0; i < length; i++) {\n let item = list[i];\n shadow(item);\n item.uuid = uuid++;\n item.plane = item;\n let xShadow = item.xShadow;\n for(let i = 0, len = xShadow.length; i < len; i++) {\n // 只有2个点防重,x投影特殊需要,线段排序列表\n if(len === 2 && i === 1) {\n break;\n }\n let a = xShadow[i];\n let b = xShadow[(i + 1) % len];\n if(a.z > b.z) {\n [a, b] = [b, a];\n }\n xList.push({\n belong: item,\n y1: a.y,\n z1: a.z,\n y2: b.y,\n z2: b.z,\n });\n }\n }\n /**\n * 从侧面观看投影,即x轴,按照深度z顺序,每个平面可形成2或4条线(y/z坐标),用扫描线算法求交\n * 处在扫描线活动范围下的2个线段,如果属于2个不同平面,继续\n * 再检测面的x/y/z是否bbox重叠,3个都重叠是2个四边面空间重叠的必要条件,以此前提甄选\n * 再用平面相交公式求得相交线,查看双方顶点是否都存在于此条线上且范围内,都有则真正相交,开始拆分\n */\n let eventHash = {};\n for(let i = 0, len = xList.length; i < len; i++) {\n let seg = xList[i];\n let o = eventHash[seg.z1] = eventHash[seg.z1] || [];\n o.push(seg);\n o = eventHash[seg.z2] = eventHash[seg.z2] || [];\n o.push(seg);\n }\n // z排序,不用管y\n let eventList = [];\n for(let i in eventHash) {\n if(eventHash.hasOwnProperty(i)) {\n let o = eventHash[i];\n eventList.push({\n z: i,\n list: o,\n });\n }\n }\n eventList.sort(function(a, b) {\n return a.z - b.z;\n });\n const HISTORY = {}; // 求过的2个平面记录,只求1次防重\n let ael = []; // 当前扫描线活动边\n for(let i = 0, elLen = eventList.length; i < elLen; i++) {\n let { z, list } = eventList[i];\n for(let j = 0, length = list.length; j < length; j++) {\n let seg = list[j];\n // 第1次进是start,第2次是end\n if(seg.isVisited) {\n let j = ael.indexOf(seg);\n if(j > -1) {\n ael.splice(j, 1);\n }\n }\n else {\n if(ael.length) {\n for(let j = 0, len = ael.length; j < len; j++) {\n let item = ael[j];\n let pa = seg.belong, pb = item.belong;\n // 属于不同的平面才能相交\n if(pa.plane === pb.plane) {\n continue;\n }\n // 如果面被拆分过,忽略掉\n if(pa.isDeleted) {\n break;\n }\n if(pb.isDeleted) {\n continue;\n }\n // 无论结果如何,这2个拼图都记录下防止重复检测\n let key = pa.uuid > pb.uuid ? (pb.uuid + ',' + pa.uuid) : (pa.uuid + ',' + pb.uuid);\n if(HISTORY.hasOwnProperty(key)) {\n continue;\n }\n HISTORY[key] = true;\n // 所属的2个面进行x/y/z上的bbox重叠验证,是屏幕真相交的前提必要条件\n if(isRectsOverlap(pa.xBbox, pb.xBbox, false)\n && isRectsOverlap(pa.yBbox, pb.yBbox, false)\n && isRectsOverlap(pa.zBbox, pb.zBbox, false)) {\n let pointsA = pa.points, pointsB = pb.points;\n // 真正求交\n let line = intersectPlanePlane(\n pointsA[0], pointsA[1], pointsA[2],\n pointsB[0], pointsB[1], pointsB[2]\n );\n if(!line || line.length !== 2) {\n continue;\n }\n // 这条线一定和2个四边形有2/4个不同交点,分别用每条边和直线求交点,2个是四边形a内切割b,4个是a和b恰好互相切割\n // 被切割后的puzzle解法相同,只是变成了多边形,n>=3\n let resA = [], resB = [];\n for(let i = 0, len = pointsA.length; i < len; i++) {\n let r = intersectLineLine3(\n pointsA[i], pointsA[(i + 1) % len],\n line[0], line[1], 1\n );\n if(r) {\n r.i = i;\n resA.push(r);\n }\n }\n for(let i = 0, len = pointsB.length; i < len; i++) {\n let r = intersectLineLine3(\n pointsB[i], pointsB[(i + 1) % len],\n line[0], line[1], 1\n );\n if(r) {\n r.i = i;\n resB.push(r);\n }\n }\n // res只可能是2和0,2个res组合只有3种可能,其它则是精度误差忽略,切割的交点在边的索引和下个索引之间的边上\n if(resA.length === 2 && resB.length === 2\n || resA.length === 2 && !resB.length\n || !resA.length && resB.length === 2) {\n let puzzle = [], t1, t2;\n // 2个都需要切割,各自判断\n if(resA.length) {\n t1 = splitPlaneByLine(pa, resA);\n }\n if(resB.length) {\n t2 = splitPlaneByLine(pb, resB);\n }\n // 误差导致切割数量不对,要么一个不被切割另外一个被切为2,要么都被切2,不会出现被切但数量不对\n if(t1 && t2 && t1.length !== t2.length) {\n continue;\n }\n if(t1 && t1.length > 1) {\n pa.puzzle = pa.puzzle || [];\n pa.puzzle = pa.puzzle.concat(t1);\n pa.isDeleted = true;\n puzzle = puzzle.concat(t1);\n }\n if(t2 && t2.length > 1) {\n pb.puzzle = pb.puzzle || [];\n pb.puzzle = pb.puzzle.concat(t2);\n pb.isDeleted = true;\n puzzle = puzzle.concat(t2);\n }\n // 新的拼图需考虑加入到eventList的合适位置,可能是新增的扫描事件\n for(let j = 0, len = puzzle.length; j < len; j++) {\n let item = puzzle[j];\n shadow(item);\n item.uuid = uuid++;\n let xBbox = item.xBbox;\n if(xBbox[2] <= z) {\n continue;\n }\n let xShadow = item.xShadow;\n for(let j = 0, len = xShadow.length; j < len; j++) {\n // 只有2个点防重,x投影特殊需要,线段排序列表\n if(len === 2 && j === 1) {\n break;\n }\n let a = xShadow[j];\n let b = xShadow[(j + 1) % len];\n if(a.z > b.z) {\n [a, b] = [b, a];\n }\n // 和初始化不一样多判断下,最大值比当前还小的是无效的事件,已经扫过了\n if(b.z <= z) {\n continue;\n }\n let seg = {\n belong: item,\n y1: a.y,\n z1: a.z,\n y2: b.y,\n z2: b.z,\n };\n // 最小值比当前z小,被访问过isVisited\n if(seg.z1 <= z) {\n seg.isVisited = true;\n // 等于才加入当前事件列表\n if(seg.z1 === z) {\n list.push(seg);\n length++;\n }\n }\n // 最大值加入事件列表,=z忽略,注意判断可能z所属的扫描坐标不存在\n if(seg.z2 > z) {\n for(let j = i + 1; j < elLen; j++) {\n let item = eventList[j];\n let z = item.z;\n if(seg.z2 === z) {\n item.list.push(seg);\n break;\n }\n else if(seg.z2 > z || j === elLen - 1) {\n eventList.splice(j, 0, {\n z: seg.z2,\n list: [seg],\n });\n elLen++;\n break;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n seg.isVisited = true;\n ael.push(seg);\n }\n }\n }\n}\n\nfunction scan(eventList) {\n let ael = [], hash = {};\n for(let i = 0, len = eventList.length; i < len; i++) {\n let { k, list } = eventList[i];\n // 先一遍循环,把刚进入的puzzle初始化放入ael,这样同时初始化的就不会有遗漏\n for(let i = 0, len = list.length; i < len; i++) {\n let puzzle = list[i].puzzle;\n // 首次进入初始化数据\n if(!puzzle.isStart) {\n puzzle.isStart = true;\n puzzle.count = 2;\n ael.push(puzzle);\n }\n }\n let willEnd = [];\n // 再一遍循环,检查同区域点集合\n for(let i = 0, len = list.length; i < len; i++) {\n let p = list[i], puzzle = p.puzzle;\n // 遍历已存在的puzzle,和当前puzzle视为同区域集合,存数据\n for(let i = 0, len = ael.length; i < len; i++) {\n let item = ael[i];\n if(puzzle === item || puzzle.plane === item.plane) {\n continue;\n }\n let key = puzzle.uuid > item.uuid ? (item.uuid + ',' + puzzle.uuid) : (puzzle.uuid + ',' + item.uuid);\n // 一定是第1次视为start\n let o = hash[key] = hash[key] || [];\n o.push(k);\n }\n // 归零时离开,延迟处理,依然是防止同时离开的puzzle不会有遗漏\n if(!--puzzle.count) {\n willEnd.push(puzzle);\n }\n }\n for(let j = 0, len = willEnd.length; j < len; j++) {\n let p = willEnd[j], uuid = p.uuid;\n p.isStart = false;\n let i = ael.indexOf(p);\n ael.splice(i, 1);\n // 离开检查hash,如有则视为end\n for(let k in hash) {\n if(hash.hasOwnProperty(k)) {\n if(k.indexOf(uuid + ',') === 0 || k.indexOf(',' + uuid) > -1) {\n let o = hash[k];\n if(o.length < 2) {\n o.push(k);\n }\n }\n }\n }\n }\n }\n return hash;\n}\n\nfunction splitPlaneByLine(puzzle, res) {\n if(checkIsec(puzzle.points.length, res)) {\n return;\n }\n let plane = puzzle.plane, points = puzzle.points, i1 = -1, i2 = -1;\n let p0 = plane.points[0], p1 = plane.points[1], p2 = plane.points[2], p3 = plane.points[3];\n // 交点一定在边上,不在边上的不切割\n for(let i = 0, len = points.length; i < len; i++) {\n let p1 = points[i], p2 = points[(i + 1) % len];\n let r1 = pointOnLine3(res[0], p1, p2);\n let r2 = pointOnLine3(res[1], p1, p2);\n if(r1) {\n i1 = i;\n }\n if(r2) {\n i2 = i;\n }\n }\n // 看是否相邻以及是否是原有顶点,不同情况不同拆分,切割也不能在同一条边上\n if(i1 > -1 && i2 > -1 && i1 !== i2) {\n let onVertex1 = isZero3(points[i1], res[0]) ? i1 : -1;\n if(!onVertex1 && points[i1 + 1]) {\n onVertex1 = isZero3(points[i1 + 1], res[0]) ? (i1 + 1) : -1;\n }\n let onVertex2 = isZero3(points[i2], res[1]) ? i2 : -1;\n if(!onVertex2 && points[i2 + 1]) {\n onVertex2 = isZero3(points[i2 + 1], res[1]) ? (i2 + 1) : -1;\n }\n // 如果是相邻顶点,或者只有1个顶点但恰好2点在同边则失效\n if(Math.abs(i1 - i2) <= 1) {\n if(onVertex1 > -1 && onVertex2 > -1) {\n return;\n }\n else if(onVertex1 > -1) {\n if(onVertex1 === i2) {\n return;\n }\n }\n else if(onVertex2 > -1) {\n if(onVertex2 === i2) {\n return;\n }\n }\n }\n // 原本矩形经过任意matrix变换后一定还是个平行四边形(相对所在平面),4个顶点坐标已知\n // 然后交点坐标已知,也一定在这个平面上,求得相对于左上角顶点即原点的百分比坐标,分母为宽或高\n // 其实就是求拆分后的拼图,某个点对应于原本矩形纹理的百分比坐标\n // 先求得平行四边形的2个邻边的向量,然后求交点和向量所在直线与边的交点即可得出\n let va = plane.va, vb = plane.vb;\n if(!va) {\n va = plane.va = {\n x: p0.x - p1.x,\n y: p0.y - p1.y,\n z: p0.z - p1.z,\n };\n }\n if(!vb) {\n vb = plane.vb = {\n x: p1.x - p2.x,\n y: p1.y - p2.y,\n z: p1.z - p2.z,\n };\n }\n let hash = [], r0, r1;\n // n边形(n一定>=3),会被分为a、b两个多边形\n plane.puzzle = plane.puzzle || [];\n let puzzle = [];\n let a = {\n plane,\n node: plane.node,\n target: plane.target,\n isPuzzle: true,\n points: [],\n };\n for(let i = 0; i <= i1; i++) {\n let r = hash[i] = getPercentXY(points[i], va, vb, p0, p1, p3);\n if(r) {\n a.points.push(r);\n }\n }\n // 第1个交点如果在顶点上忽略,前面循环考虑了\n if(onVertex1 === -1) {\n r0 = getPercentXY(res[0], va, vb, p0, p1, p3);\n if(r0) {\n a.points.push(r0);\n }\n }\n // 第2个即便在顶点上也包含,后面循环没考虑\n r1 = getPercentXY(res[1], va, vb, p0, p1, p3);\n if(r1) {\n a.points.push(r1);\n }\n for(let i = i2 + 1, len = points.length; i < len; i++) {\n let r = hash[i] = getPercentXY(points[i], va, vb, p0, p1, p3);\n if(r) {\n a.points.push(r);\n }\n }\n if(a.points.length > 2) {\n puzzle.push(a);\n }\n // b部分同上\n let b = {\n plane,\n node: plane.node,\n target: plane.target,\n isPuzzle: true,\n points: [],\n };\n // 复用数据但不能相同引用\n if(r0) {\n b.points.push(Object.assign({}, r0));\n }\n else {\n r0 = getPercentXY(res[0], va, vb, p0, p1, p3);\n if(r0) {\n b.points.push(r0);\n }\n }\n for(let i = i1 + 1; i <= i2; i++) {\n let r = hash[i] = hash[i] || getPercentXY(points[i], va, vb, p0, p1, p3);\n if(r) {\n b.points.push(r);\n }\n }\n if(onVertex2 === -1) {\n if(r1) {\n b.points.push(Object.assign({}, r1));\n }\n else {\n r1 = getPercentXY(res[1], va, vb, p0, p1, p3);\n if(r1) {\n b.points.push(r1);\n }\n }\n }\n if(b.points.length > 2) {\n puzzle.push(b);\n }\n // 只返回新增的\n return puzzle;\n }\n}\n\n// 已知空间平行四边形顶点和其面上一点,求相对于左上角顶点即原点的百分比坐标,四边形宽高即分母\nfunction getPercentXY(p, va, vb, p0, p1, p3) {\n let pa = {\n x: p.x + va.x,\n y: p.y + va.y,\n z: p.z + va.z,\n }, pb = {\n x: p.x + vb.x,\n y: p.y + vb.y,\n z: p.z + vb.z,\n };\n let ipx = intersectLineLine3(p0, p1, p, pb, 3);\n let ipy = intersectLineLine3(p0, p3, p, pa, 3);\n if(ipx && ipy) {\n return {\n x: p.x,\n y: p.y,\n z: p.z,\n px: (ipx.x - p0.x) / (p1.x - p0.x),\n py: (ipy.y - p0.y) / (p3.y - p1.y),\n };\n }\n}\n\n// 检测相交线是否有效,不能和puzzle的边重合\nfunction checkIsec(len, res) {\n let a = res[0], b = res[1];\n // 共边索引\n if(a.i === b.i) {\n return true;\n }\n if(a.i > b.i) {\n let t = a;\n a = b;\n b = t;\n }\n // 临边如果小的索引为1或大的索引为0\n if(b.i - a.i === 1) {\n if(Math.abs(a.pa - 1) < 1e-9 || b.pa < 1e-9) {\n return true;\n }\n }\n // 刚好隔边则必须同时索引为1和0\n if(b.i - a.i === 2) {\n if(Math.abs(a.pa - 1) < 1e-9 && b.pa < 1e-9) {\n return true;\n }\n }\n // 首尾临边\n if(b.i === len - 1 && a.i === 0) {\n if(Math.abs(b.pa - 1) < 1e-9 || a.pa < 1e-9) {\n return true;\n }\n }\n // 首尾隔边\n if(b.i === len - 1 && a.i === 1 || b.i === len - 2 && a.i === 0) {\n if(Math.abs(b.pa - 1) < 1e-9 && a.pa < 1e-9) {\n return true;\n }\n }\n return false;\n}\n\n// 将拼图按z顺序排好,渲染从z小的开始,拼图已经完全不相交(3d空间)\nfunction sortPuzzleZ(list) {\n if(list.length < 2) {\n return list;\n }\n // 用扫描线遍历一遍正视图,可以找到2个拼图在投影重合部分,有开始和结束,取x/y中间值,\n // 比较此点在2个平面上的z大小可以得出这2个拼图真正的z先后次序,如果相等则特殊处理,和不重合逻辑一样,\n // 不重合的话,取最大最小值z的平均比较即可,平均值可避免起点终点相同无法比较\n let eventHashX = {}, eventHashY = {}, puzzleHash = {};\n for(let i = 0, len = list.length; i < len; i++) {\n let puzzle = list[i], xBbox = puzzle.xBbox, yBbox = puzzle.yBbox;\n puzzleHash[puzzle.uuid] = puzzle;\n let start = xBbox[0], end = xBbox[2];\n let o = eventHashX[start] = eventHashX[start] || [];\n o.push(puzzle);\n o = eventHashX[end] = eventHashX[end] || [];\n o.push(puzzle);\n start = yBbox[0];\n end = yBbox[2];\n o = eventHashY[start] = eventHashY[start] || [];\n o.push(puzzle);\n o = eventHashY[end] = eventHashY[end] || [];\n o.push(puzzle);\n puzzle.cz = (xBbox[0] + xBbox[2]) * 0.5;\n }\n let eventListX = [], eventListY = [];\n for(let i in eventHashX) {\n if(eventHashX.hasOwnProperty(i)) {\n let o = eventHashX[i];\n eventListX.push({\n k: i,\n list: o,\n });\n }\n }\n for(let i in eventHashY) {\n if(eventHashY.hasOwnProperty(i)) {\n let o = eventHashY[i];\n eventListY.push({\n k: i,\n list: o,\n });\n }\n }\n eventListX.sort(function(a, b) {\n return a.k - b.k;\n });\n eventListY.sort(function(a, b) {\n return a.k - b.k;\n });\n // 每个点作为事件,触发时所属拼图count--,首次拼图视为start,当count为0时拼图视为end\n // 这样2个(或多个)拼图同时都在start状态下(count > 0)的点就是重合区域点集合\n let hashX = scan(eventHashX), hashY = scan(eventHashY);\n // 取中值x/y,比较2个puzzle所在平面的值为x/y的点的z坐标大小\n let zHash = {};\n for(let i in hashX) {\n if(hashX.hasOwnProperty(i)) {\n let listX = hashX[i], listY = hashY[i], k = i.splice(',');\n let pa = puzzleHash[k[0]], pb = puzzleHash[k[1]];\n let cx = (listX[0] + listX[1]) * 0.5, cy = (listY[0] + listY[1]) * 0.5;\n let { a: a1, b: b1, c: c1, d: d1 } = getPlainNormalEquation(pa.points);\n let { a: a2, b: b2, c: c2, d: d2 } = getPlainNormalEquation(pb.points);\n let z1 = c1 ? ((-d1 - a1 * cx - b1 * cy) / c1) : 0;\n let z2 = c2 ? ((-d2 - a2 * cx - b2 * cy) / c2) : 0;\n if(Math.abs(z1 - z2) > 1e-9) {\n zHash[i] = z1 - z2;\n }\n }\n }\n list.sort(function(a, b) {\n let key = a.uuid > b.uuid ? (b.uuid + ',' + a.uuid) : (a.uuid + ',' + b.uuid);\n // 有重合的区域,除非相等,否则可以直接得出结果\n if(zHash.hasOwnProperty(key)) {\n return zHash[key];\n }\n // 无重合或者相等的,对比z中点\n return a.cz - b.cz;\n });\n return list;\n}\n\nexport default {\n splitQuadrilateralPlane,\n sortPuzzleZ,\n};\n","import Page from '../refresh/Page';\nimport webgl from './webgl';\n\nclass TexturePage extends Page {\n constructor(renderMode, gl, size, number) {\n super(renderMode, gl, size, number);\n this.gl = gl;\n this.texture = webgl.createTexture(gl, null, 0, size, size); // 默认0单元\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n\n static getInstance(renderMode, gl, rootId, size, excludePage) {\n return super.getInstance(renderMode, gl, rootId, size, this, excludePage);\n }\n}\n\nexport default TexturePage;\n","import Cache from '../refresh/Cache';\nimport TexturePage from './TexturePage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass TextureCache extends Cache {\n constructor(renderMode, gl, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, gl, rootId, w, h, bbox, page, pos, x1, y1);\n this.gl = gl;\n }\n\n update() {\n // 直接生成的texture不需要更新,覆盖掉不调用\n }\n\n clear() {\n if(super.clear()) {\n let page = this.__page, gl = page.gl, size = page.__size;\n // 尺寸必须对上才行\n let data = new Uint8Array(this.__width * this.__height * 4);\n gl.bindTexture(gl.TEXTURE_2D, page.texture);\n // 注意y镜像和原点左下\n gl.texSubImage2D(gl.TEXTURE_2D, 0, this.__x, size - this.__y - this.__height,\n this.__width, this.__height, gl.RGBA, gl.UNSIGNED_BYTE, data);\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n reset(bbox, x1, y1) {\n return super.reset(bbox, x1, y1, TexturePage);\n }\n\n static getInstance(renderMode, gl, rootId, bbox, x1, y1, excludePage) {\n return super.getInstance(renderMode, gl, rootId, bbox, x1, y1, this, TexturePage, excludePage);\n }\n}\n\nexport default TextureCache;\n","import CanvasCache from './CanvasCache';\nimport inject from '../util/inject';\n\nconst HASH = {};\n\n/**\n * 相同的图片且尺寸相同时,复用一个source,如果尺寸和原图相等直接用,否则生成一个离屏canvas\n */\nclass ImgCanvasCache extends CanvasCache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, null, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n // 相等就不生成新的离屏canvas,直接用原始资源比如节点内容\n if(page.width === w && page.height === h) {\n this.__canvas = page.source;\n }\n // 不等则一个url只生成一份OffscreenCanvas\n else {\n let key = this.key = w + ' ' + h + ' ' + page.src;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count++;\n this.__canvas = o.canvas;\n }\n else {\n let offscreenCanvas = inject.getOffscreenCanvas(w, h, null, null);\n let ctx = offscreenCanvas.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(page.source, 0, 0, w, h);\n this.__canvas = offscreenCanvas.canvas;\n HASH[key] = {\n canvas: offscreenCanvas.canvas,\n count: 1,\n };\n }\n }\n this.__x = 0;\n this.__y = 0;\n this.__enabled = true;\n this.__available = true;\n this.__appendData(x1, y1);\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n return true;\n }\n }\n\n release() {\n if(this.__enabled) {\n this.clear();\n let key = this.key;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count--;\n if(!o.count) {\n delete HASH[key];\n }\n }\n this.__enabled = false;\n this.__page = null;\n return true;\n }\n }\n\n reset(bbox, x1, y1) {\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n this.__init(w, h, bbox, this.__page, null, x1, y1);\n }\n\n get canvas() {\n return this.__canvas;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get size() {}\n\n static getInstance(renderMode, ctx, rootId, bbox, loadImg, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n return new ImgCanvasCache(renderMode, ctx, rootId, w, h, bbox, loadImg, x1, y1);\n }\n}\n\nexport default ImgCanvasCache;\n","import CanvasCache from './CanvasCache';\nimport offscreen from './offscreen';\nimport mode from './mode';\nimport Page from './Page';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport Geom from '../node/geom/Geom';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport level from './level';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport tf from '../style/transform';\nimport mbm from '../style/mbm';\nimport enums from '../util/enums';\nimport webgl from '../gl/webgl';\nimport oit from '../gl/oit';\nimport TextureCache from '../gl/TextureCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.frag';\nimport ImgCanvasCache from './ImgCanvasCache';\nimport ImgWebglCache from '../gl/ImgWebglCache';\n\nconst {\n OFFSCREEN_OVERFLOW,\n OFFSCREEN_FILTER,\n OFFSCREEN_MASK,\n OFFSCREEN_BLEND,\n OFFSCREEN_MASK2,\n applyOffscreen,\n} = offscreen;\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n OPACITY,\n VISIBILITY,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n FILL,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n CACHE,\n MASK,\n} = level;\nconst { isE, inverse, multiply, calRectPoint } = mx;\nconst { mbmName } = mbm;\nconst { assignMatrix, transformBbox } = util;\nconst {\n drawTextureCache,\n createTexture,\n bindTexture,\n drawCache2Tex,\n drawTex2Cache,\n} = webgl;\n\nconst DOM_RENDER = Dom.prototype.render;\nconst IMG_RENDER = Img.prototype.render;\nconst GEOM_RENDER = Geom.prototype.render;\n\nfunction getCache(list) {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item && item.available) {\n return item;\n }\n }\n}\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * isPpt为webgl下有perspective的节点,需考虑透视\n */\nfunction genBboxTotal(node, __structs, index, total, lv, isPpt) {\n let { __cache } = node;\n assignMatrix(node.__matrixEvent, mx.identity());\n node.__opacity = 1;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(__cache && __cache.available) {\n bboxTotal = __cache.bbox;\n }\n else {\n bboxTotal = node.bbox;\n }\n bboxTotal = bboxTotal.slice(0);\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n // 分2种情况,普通父ppt和自身有ppt情况,自身不能视为E,被绘入主画布时注意特殊处理\n // 自身ppt需将ppt提炼出来,然后node重新忽略ppt\n let pm;\n if(isPpt) {\n pm = node.__perspectiveMatrix || node.__selfPerspectiveMatrix;\n }\n if(node.__selfPerspective) {\n let bbox = transformBbox(bboxTotal, multiply(pm, node.__matrix), 0, 0);\n mergeBbox(bboxTotal, bbox);\n }\n let top = node;\n for(let i = index + 1, len = index + total + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n if(node.__limitCache) {\n inject.warn('Bbox of Text(' + index + ')' + ' is oversize'\n + node.offsetWidth + ', ' + node.offsetHeight);\n return;\n }\n let bbox = node.bbox, p = node.__domParent, matrix = p.__matrixEvent;\n if((bbox[2] - bbox[0]) && (bbox[3] - bbox[1])) {\n if(!isE(matrix)) {\n bbox = transformBbox(bbox, matrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox);\n }\n continue;\n }\n if(node.__limitCache) {\n inject.warn('Bbox of ' + node.tagName + '(' + index + ')' + ' is oversize'\n + node.offsetWidth + ', ' + node.offsetHeight);\n return;\n }\n let {\n __computedStyle: __computedStyle2,\n __mask,\n } = node;\n // 跳过display:none元素和它的所有子节点和mask,本身是mask除外\n if(__computedStyle2[DISPLAY] === 'none' || i !== index && __mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache: __cache2,\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n } = node;\n let p = node.__domParent;\n node.__opacity = __computedStyle2[OPACITY] * p.__opacity;\n let m = node.__matrix;\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 只有webgl且ppt情况才有pm,直接子节点才考虑预乘\n if(pm && p === top) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(__computedStyle2[BACKFACE_VISIBILITY] === 'hidden') {\n let x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let bbox;\n // 子元素有cacheTotal优先使用\n let target = getCache([__cacheMask2, __cacheFilter2, __cacheTotal2, __cache2]);\n if(target) {\n if(target !== __cache2) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n bbox = target.bbox;\n }\n else {\n bbox = node.bbox; // 不能用filterBbox,子元素继承根节点的,如果有filter会是cacheFilter的bbox\n }\n if((bbox[2] - bbox[0]) && (bbox[3] - bbox[1])) {\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, m, 0, 0);\n mergeBbox(bboxTotal, bbox);\n }\n }\n if((bboxTotal[2] - bboxTotal[0] <= 0) || (bboxTotal[3] - bboxTotal[1] <= 0)) {\n return;\n }\n return bboxTotal;\n}\n\nfunction mergeBbox(bbox, t) {\n bbox[0] = Math.min(bbox[0], t[0]);\n bbox[1] = Math.min(bbox[1], t[1]);\n bbox[2] = Math.max(bbox[2], t[2]);\n bbox[3] = Math.max(bbox[3], t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,超限时除外\n * cache是每个节点自身的缓存,且共享离屏canvas\n * cacheTotal是基础\n * cacheFilter基于total\n * cacheMask基于filter\n * cacheBlend基于mask\n */\nfunction genTotal(renderMode, ctx, root, node, index, lv, total, __structs, width, height) {\n let __cacheTotal = node.__cacheTotal;\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n let { __x1: x1, __y1: y1, __offsetWidth, __offsetHeight } = node;\n let bboxTotal = genBboxTotal(node, __structs, index, total, lv, false);\n if(!bboxTotal) {\n return;\n }\n\n // img节点特殊对待,如果只包含图片内容本身,多个相同引用可复用图片\n if(node instanceof Img && node.__loadImg.onlyImg) {\n __cacheTotal = node.__cacheTotal = ImgCanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, node.__loadImg, x1, y1);\n return __cacheTotal;\n }\n\n // 生成cacheTotal,获取偏移dx/dy,连带考虑overflow:hidden的情况,当hidden尺寸一致无效时可忽略\n // 否则用一个单独临时的离屏获取包含hidden的结果,再绘入total\n let w, h, dx, dy, dbx, dby, tx, ty;\n let overflow = node.__computedStyle[OVERFLOW], isOverflow;\n if((x1 !== bboxTotal[0]\n || y1 !== bboxTotal[1]\n || __offsetWidth !== (bboxTotal[2] - bboxTotal[0])\n || __offsetHeight !== (bboxTotal[3] - bboxTotal[1])) && overflow === 'hidden') {\n // geom可能超限,不能直接用bbox\n bboxTotal = [x1, y1, x1 + __offsetWidth, y1 + __offsetHeight];\n w = __offsetWidth;\n h = __offsetHeight;\n dx = -x1;\n dy = -y1;\n dbx = 0;\n dby = 0;\n tx = 0;\n ty = 0;\n isOverflow = true;\n __cacheTotal = inject.getOffscreenCanvas(w, h, 'overflow', null);\n }\n else {\n w = bboxTotal[2] - bboxTotal[0];\n h = bboxTotal[3] - bboxTotal[1];\n __cacheTotal = node.__cacheTotal = CanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, x1, y1, null);\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n if(w || h) {\n inject.warn('CanvasCache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + w + ', ' + h);\n }\n return;\n }\n __cacheTotal.__available = true;\n dx = __cacheTotal.dx;\n dy = __cacheTotal.dy;\n dbx = __cacheTotal.dbx;\n dby = __cacheTotal.dby;\n tx = __cacheTotal.x;\n ty = __cacheTotal.y;\n\n // 离屏画布的坐标和尺寸信息存储\n root.__env = {\n x: __cacheTotal.x,\n y: __cacheTotal.y,\n width: __cacheTotal.page.width,\n height: __cacheTotal.page.height,\n };\n }\n let ctxTotal = __cacheTotal.ctx;\n\n /**\n * 再次遍历每个节点,以局部根节点左上角为基准原点,将所有节点绘制上去\n * 每个子节点的opacity有父继承计算在上面循环已经做好了,直接获取\n * 但matrixEvent可能需要重算,因为原点不一定是根节点的原点,影响tfo\n * 另外每个节点的refreshLevel需要设置REPAINT\n * 这样cacheTotal取消时子节点需确保重新计算一次matrix/opacity/filter,保证下次和父元素继承正确\n */\n let matrixList = [];\n let parentMatrix = null;\n let lastMatrix = null;\n let lastLv = lv;\n // 和外面没cache的类似,mask生成hash记录\n let maskStartHash = [];\n let offscreenHash = [];\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, ctxTotal, dx, dy);\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n else {\n let __computedStyle2 = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle2[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n } = node;\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [VISIBILITY]: visibility,\n } = __computedStyle2;\n let mh = maskStartHash[i];\n if(mh) {\n let { idx, hasMask, offscreenMask } = mh;\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx: ctxTotal, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctxTotal = target.ctx;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时(不为E)再计算\n let m;\n if(i !== index && (!isE(parentMatrix) || !isE(transform))) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1 + tx, tfo[1] + dby + node.__y1 - y1 + ty);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n // 子元素有cacheTotal优先使用\n let target = i > index && getCache([__cacheMask2, __cacheFilter2, __cacheTotal2]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let opacity = ctxTotal.globalAlpha = node.__opacity;\n if(opacity > 0) {\n if(m) {\n ctxTotal.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctxTotal.setTransform(1, 0, 0, 1, 0, 0);\n }\n let mixBlendMode = __computedStyle2[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n CanvasCache.drawCache(target, __cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n else {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = i > index && node.__calOffscreen(ctxTotal, __computedStyle2);\n if(offscreen) {\n ctxTotal = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n if(visibility === 'visible') {\n let opacity = ctxTotal.globalAlpha = node.__opacity;\n if(opacity > 0) {\n if(m) {\n ctxTotal.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctxTotal.setTransform(1, 0, 0, 1, 0, 0);\n }\n node.render(renderMode, ctxTotal, dx, dy);\n }\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n }\n }\n\n // overflow写回整体离屏\n if(isOverflow) {\n let t = node.__cacheTotal = CanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, x1, y1, null);\n t.__available = true;\n t.ctx.drawImage(__cacheTotal.canvas, t.x, t.y);\n __cacheTotal.release();\n __cacheTotal = t;\n }\n\n root.__env = null;\n return __cacheTotal;\n}\n\n// 从cacheTotal生成overflow、filter和mask,一定有cacheTotal才会进\nfunction genTotalOther(renderMode, __structs, __cacheTotal, node, hasMask, width, height) {\n let {\n __computedStyle,\n __cacheFilter,\n __cacheMask,\n } = node;\n let {\n [FILTER]: filter,\n } = __computedStyle;\n let target = __cacheTotal, needGen;\n if(filter && filter.length) {\n if(!__cacheFilter|| !__cacheFilter.available || needGen) {\n target = node.__cacheFilter = CanvasCache.genFilter(target, filter);\n needGen = true;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = node.__cacheMask = CanvasCache.genMask(target, node, function(item, cacheMask, inverse) {\n // 和外面没cache的类似,mask生成hash记录,这里mask节点一定是个普通无cache的独立节点\n let maskStartHash = {};\n let offscreenHash = {};\n let { dx, dy, dbx, dby, x: tx, y: ty, ctx, x1, y1 } = cacheMask;\n let struct = item.__struct, root = item.__root, structs = root.__structs;\n let index = structs.indexOf(struct);\n let {\n total,\n lv,\n } = struct;\n let matrixList = [];\n let parentMatrix = null;\n let lastMatrix = null;\n let opacityList = [];\n let parentOpacity = 1;\n let lastOpacity = 1;\n let lastLv = lv;\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, ctx, dx, dy);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctx = target.ctx;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastOpacity;\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 计算临时的matrix,先以此节点为局部根节点原点,后面考虑逆矩阵\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [OPACITY]: opacity, // 和genTotal不同,局部根节点opacity生效不为1\n } = __computedStyle;\n if(i !== index) {\n opacity *= parentOpacity;\n }\n node.__opacity = lastOpacity = opacity;\n // 特殊渲染的matrix,局部根节点为原点且考虑根节点自身的transform\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1 + tx, tfo[1] + dby + node.__y1 - y1 + ty);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n if(m) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(m, inverse)) {\n m = mx.identity();\n }\n else if(inverse) {\n inverse = mx.inverse(inverse);\n m = mx.multiply(inverse, m);\n }\n }\n else if(!isE(inverse)) {\n m = mx.inverse(inverse);\n }\n m = m || mx.identity();\n assignMatrix(node.__matrixEvent, m);\n // 特殊渲染的matrix,局部根节点为原点考虑,本节点需inverse反向\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n ctx.globalAlpha = opacity;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n let { x, y, canvas, width, height, x1: x2, y1: y2, dbx: dbx2, dby: dby2 } = target;\n let ox = tx + x2 - x1 + dbx - dbx2;\n let oy = ty + y2 - y1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n ctx.globalCompositeOperation = 'source-over';\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n // 等于将外面bbox计算和渲染合一的过程,但不需要bbox本身的内容\n else {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = node.__calOffscreen(ctx, __computedStyle);\n if(offscreen) {\n ctx = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n ctx.globalAlpha = opacity;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, ctx, dx, dy);\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n }\n }\n });\n }\n return target;\n}\n\n/**\n * canvas/webgl支持任意节点为mask,不像svg仅单节点\n * hasMask的num是指遮罩对象后面的兄弟节点数,需要换算成包含子节点的总数\n * @param __structs\n * @param start\n * @param hasMask\n */\nfunction countMaskNum(__structs, start, hasMask) {\n let count = 0;\n while(hasMask--) {\n let total = __structs[start].total;\n count += total || 0;\n start += total || 0;\n // total不算自身,所以还得+1\n count++;\n start++;\n }\n return count;\n}\n\n// webgl不太一样,使用fbo离屏绘制到一个纹理上进行汇总\nfunction genFrameBufferWithTexture(gl, texture, width, height) {\n let frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n // let check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n // if(check !== gl.FRAMEBUFFER_COMPLETE) {\n // inject.error('Framebuffer object is incomplete: ' + check.toString());\n // }\n // 离屏窗口0开始\n gl.viewport(0, 0, width, height);\n // gl.clearColor(0, 0, 0, 0);\n // gl.clear(gl.COLOR_BUFFER_BIT);\n return frameBuffer;\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * 传入isPpt的时候,说明是有perspective的节点在前置分割处理完毕之后,进行的渲染,需预乘pm透视矩阵\n * 传入pptNode/oitHash的时候,说明是透视节点下某个preserve3d的子节点,其渲染需要考虑其子节点平面拆分,预处理\n */\nfunction genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total,\n __structs, W, H, isPpt, pptNode, oitHash) {\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n\n let top = node;\n let { __x1: x1, __y1: y1, __offsetWidth, __offsetHeight } = node;\n let bboxTotal = genBboxTotal(node, __structs, index, total, lv, isPpt);\n if(!bboxTotal) {\n return;\n }\n\n // overflow:hidden和canvas一样特殊考虑\n let w, h, dx, dy, cx, cy, texture, frameBuffer;\n let overflow = node.__computedStyle[OVERFLOW];\n if(overflow === 'hidden' && (x1 !== bboxTotal[0]\n || y1 !== bboxTotal[1]\n || __offsetWidth !== (bboxTotal[2] - bboxTotal[0])\n || __offsetHeight !== (bboxTotal[3] - bboxTotal[1]))) {\n // geom可能超限,不能直接用bbox\n bboxTotal = [x1, y1, x1 + __offsetWidth, y1 + __offsetHeight];\n w = __offsetWidth;\n h = __offsetHeight;\n }\n else {\n w = bboxTotal[2] - bboxTotal[0];\n h = bboxTotal[3] - bboxTotal[1];\n }\n if(__cacheTotal) {\n __cacheTotal.reset(bboxTotal, x1, y1);\n }\n else {\n __cacheTotal = TextureCache.getInstance(renderMode, gl, root.__uuid, bboxTotal, x1, y1, null);\n }\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n if(w || h) {\n inject.warn('TextureCache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + w + ', ' + h);\n }\n return;\n }\n __cacheTotal.__available = true;\n node.__cacheTotal = __cacheTotal;\n cx = w * 0.5;\n cy = h * 0.5;\n dx = -bboxTotal[0];\n dy = -bboxTotal[1];\n\n // 需要重新计算,因为bbox里是原本位置,这里是新的位置\n let pm, ppt;\n if(isPpt) {\n if(pptNode.__perspectiveMatrix) {\n let {\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n } = pptNode.__computedStyle;\n pm = tf.calPerspectiveMatrix(perspective, x1 + dx + perspectiveOrigin[0], y1 + dy + perspectiveOrigin[1]);\n }\n else {\n let {\n [TRANSFORM_ORIGIN]: perspectiveOrigin,\n } = pptNode.__computedStyle;\n pm = tf.calPerspectiveMatrix(pptNode.__selfPerspective, x1 + dx + perspectiveOrigin[0], y1 + dy + perspectiveOrigin[1]);\n }\n }\n if(oitHash) {\n if(pptNode.__perspectiveMatrix) {\n let {\n [PERSPECTIVE]: perspective,\n } = pptNode.__computedStyle;\n ppt = perspective;\n }\n else {\n ppt = pptNode.__selfPerspective;\n }\n }\n\n let page = __cacheTotal.__page, size = page.__size;\n // 先绘制到一张单独的纹理,防止children中和cacheTotal重复texture不能绘制\n texture = createTexture(gl, null, 0, w, h);\n frameBuffer = genFrameBufferWithTexture(gl, texture, w, h);\n gl.viewport(0, 0, w, h);\n\n // 离屏画布的原点和尺寸信息存储\n root.__env = {\n x: dx,\n y: dy,\n width: w,\n height: h,\n node,\n };\n\n // fbo绘制对象纹理不用绑定单元,剩下的纹理绘制用0号\n let lastPage, list = [];\n let cacheTotal = __cacheTotal;\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __opacity,\n __matrixEvent,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let __computedStyle = node.__computedStyle;\n if(i > index) {\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [MIX_BLEND_MODE]: mixBlendMode,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __domParent: p,\n __selfPerspective: ppt2,\n __opacity: opacity,\n } = node;\n // 特殊渲染的matrix,局部根节点为原点考虑,和bbox以节点自身主画布参考系不同\n let m;\n if(i > index) {\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n }\n if(ppt2) {\n let t = tf.calPerspectiveMatrix(ppt2, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n m = multiply(t, m);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 有透视还得预乘透视\n else if(pm) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n }\n // 有oit平面拆分的优先考虑,其一定没有mbm;否则走普通渲染逻辑\n let oit = oitHash && oitHash[i];\n if(oit) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n // 只求子节点的matrix即可\n for(let j = i + 1, len = i + (total || 0) + 1; j < len; j++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[j];\n if(!(node instanceof Text)) {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n j += (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n continue;\n }\n let p = node.__domParent;\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 有透视还得预乘透视\n else if(pm) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n j += (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n }\n }\n }\n webgl.drawOitPlane(gl, __structs, oit, ppt, cx, cy, dx, dy);\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n }\n }\n else {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = i > index ? getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]) : __cache;\n if(target) {\n if(opacity > 0) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(i > index && mixBlendMode !== 'normal') {\n if(list.length) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n let res = genMbmWebgl(gl, texture, target, mixBlendMode, node.__opacity, m, dx, dy, cx, cy, size, size);\n if(res) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.deleteTexture(texture);\n texture = res.texture;\n frameBuffer = res.frameBuffer;\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n }\n lastPage = null;\n }\n else {\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: target, opacity: node.__opacity, matrix: m });\n }\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if((!target || target === __cache) && opacity > 0) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n }\n }\n }\n }\n }\n\n // 删除fbo恢复\n drawTextureCache(gl, list, cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n // 汇入集合\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, page.texture, 0);\n gl.viewport(0, 0, size, size);\n drawTex2Cache(gl, gl.program, cacheTotal, texture, w, h);\n gl.deleteTexture(texture);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.viewport(0, 0, W, H);\n\n root.__env = null;\n return __cacheTotal;\n}\n\nfunction genPptWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total, __structs, W, H) {\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n\n let top = node;\n let mergeHash = [], mergeList = [];\n let isFlat = top.__computedStyle[TRANSFORM_STYLE] === 'flat', isTopFlat = isFlat;\n // 将产生transformStyle变化的节点记下来,直接子节点如果是flat也记下来,这样除了根节点下一直preserve3d的其它都被记录\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n lv,\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM_STYLE]: transformStyle,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent: p,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n // flat变化的局部子节点,或者flat根的直接子节点,生成局部根,已生成过的不用再生成\n if(total && !target && (transformStyle !== p.__computedStyle[TRANSFORM_STYLE]\n || p === top && transformStyle === 'flat')) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n mergeHash[j] = {\n isFlat,\n };\n isFlat = transformStyle === 'flat';\n // 变化的则生成新的局部子节点汇总,记录flat情况\n mergeList.push({\n i,\n lv,\n total,\n node,\n isFlat,\n });\n }\n // 子cache可以跳过,因为flat肯定先前执行\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n }\n }\n // 排序依旧是子节点先,但同层级不用倒序(没有mask影响)\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return a.i - b.i;\n }\n return b.lv - a.lv;\n });\n // 根节点特殊处理,如果是flat就是flat但直接子节点后续渲染仍需要透视,如果是3d就要切分\n if(!isTopFlat) {\n mergeList.push({\n i: index,\n lv,\n total,\n node,\n isFlat: isTopFlat,\n });\n }\n // 变为preserve3d的子节点需要对其子节点进行平面拆分,记录这个子节点索引和拆分信息\n let oitHash = [];\n for(let i = 0, len = mergeList.length; i < len; i++) {\n let { i: index, lv, total, node, isFlat } = mergeList[i];\n // flat汇集临时cacheTotal\n if(isFlat) {\n genTotalWebgl(renderMode, node.__cacheTotal, gl, root, node, index, lv, total || 0,\n __structs, W, H, null, top, oitHash);\n }\n // preserve3d需要以此节点为局部根E,所有子节点四边形面在3d空间下求交拆分,暂时不绘制,等上层flat调用绘制投影\n else {\n let top = node, x0 = node.__x1, y0 = node.__y1, planeList = [];\n if(node.__hasContent) {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n let o = {\n index,\n node,\n target,\n points: [\n { x: 0, y: 0, z: 0 },\n { x: node.__offsetWidth, y: 0, z: 0 },\n { x: node.__offsetWidth, y: node.__offsetHeight, z: 0 },\n { x: 0, y: node.__offsetHeight, z: 0 },\n ],\n };\n planeList.push(o);\n }\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n } = node.__domParent;\n let { x1: x, y1: y, __width: width, __height: height } = __cache;\n let xa = x - x0, ya = y - y0;\n let xb = x + width - x0, yb = y + height - y0;\n let { x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 } = calRectPoint(xa, ya, xb, yb, __matrixEvent);\n let o = {\n index: i,\n node,\n target: __cache,\n points: [\n { x: x1, y: y1, z: z1 },\n { x: x2, y: y2, z: z2 },\n { x: x3, y: y3, z: z3 },\n { x: x4, y: y4, z: z4 },\n ],\n };\n planeList.push(o);\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent: p,\n __selfPerspective: ppt,\n } = node;\n // 当前局部根为原点坐标系下的matrix,只求交用\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 - x0, tfo[1] + node.__y1 - y0);\n }\n if(ppt) {\n let t = tf.calPerspectiveMatrix(ppt, tfo[0] + node.__x1 - x0, tfo[1] + node.__y1 - y0);\n m = multiply(t, m);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n assignMatrix(node.__matrixEvent, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target) {\n let { x1: x, y1: y, __width: width, __height: height } = target;\n // 坐标计算还是以局部根为原点\n let xa = x - x0, ya = y - y0;\n let xb = x + width - x0, yb = y + height - y0;\n let { x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 } = calRectPoint(xa, ya, xb, yb, m);\n let o = {\n index: i,\n node,\n target,\n points: [\n { x: x1, y: y1, z: z1 },\n { x: x2, y: y2, z: z2 },\n { x: x3, y: y3, z: z3 },\n { x: x4, y: y4, z: z4 },\n ],\n };\n planeList.push(o);\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n }\n }\n // 有2个以上面才会求相交\n if(planeList.length > 1) {\n oit.splitQuadrilateralPlane(planeList);\n }\n // 没拆分的直接存入,拆分的存有效拼图\n let list = [];\n for(let i = 0, len = planeList.length; i < len; i++) {\n let plane = planeList[i];\n let puzzle = plane.puzzle;\n if(puzzle && puzzle.length) {\n for(let i = 0, len = puzzle.length; i < len; i++) {\n let p = puzzle[i];\n if(!p.isDeleted) {\n list.push(p);\n }\n }\n }\n else {\n list.push(plane);\n }\n }\n // 按z排序,远的先绘制\n oitHash[index] = oit.sortPuzzleZ(list);\n }\n }\n // 最后一次循环绘制到局部根节点上,类似genTotalWebgl()逻辑,但要考虑ppt透视\n return genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total,\n __structs, W, H, true, node, oitHash);\n}\n\nfunction genFilterWebgl(renderMode, gl, node, cache, filter, W, H) {\n let { x1, y1, width, height, bbox } = cache;\n let target = cache;\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(renderMode, gl, target, v);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'dropShadow') {\n let res = genDropShadowWebgl(renderMode, gl, target, v);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'hueRotate') {\n let rotation = geom.d2r(v % 360);\n let cosR = Math.cos(rotation);\n let sinR = Math.sin(rotation);\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.213 + cosR * 0.787 - sinR * 0.213, 0.715 - cosR * 0.715 - sinR * 0.715, 0.072 - cosR * 0.072 + sinR * 0.928, 0, 0,\n 0.213 - cosR * 0.213 + sinR * 0.143, 0.715 + cosR * 0.285 + sinR * 0.140, 0.072 - cosR * 0.072 - sinR * 0.283, 0, 0,\n 0.213 - cosR * 0.213 - sinR * 0.787, 0.715 - cosR * 0.715 + sinR * 0.715, 0.072 + cosR * 0.928 + sinR * 0.072, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.213 + 0.787 * amount, 0.715 - 0.715 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 + 0.285 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 - 0.715 * amount, 0.072 + 0.928 * amount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'grayscale' && v > 0) {\n v = Math.min(v, 100);\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.2126 + 0.7874 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 + 0.2848 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 + 0.9278 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'contrast' && v !== 100) {\n let amount = v * 0.01;\n let o = -0.5 * amount + 0.5;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'sepia' && v > 0) {\n v = Math.min(v, 100);\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.393 + 0.607 * oneMinusAmount, 0.769 - 0.769 * oneMinusAmount, 0.189 - 0.189 * oneMinusAmount, 0, 0,\n 0.349 - 0.349 * oneMinusAmount, 0.686 + 0.314 * oneMinusAmount, 0.168 - 0.168 * oneMinusAmount, 0, 0,\n 0.272 - 0.272 * oneMinusAmount, 0.534 - 0.534 * oneMinusAmount, 0.131 + 0.869 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'invert' && v > 0) {\n v = Math.min(v, 100);\n let o = v * 0.01;\n let amount = 1 - 2 * o;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return node.__cacheFilter = target;\n}\n\nfunction genBlurShader(gl, sigma, d) {\n let key = 'programBlur,' + sigma + ',' + d;\n if(gl.hasOwnProperty(key)) {\n return gl[key];\n }\n let weights = blur.gaussianWeight(sigma, d);\n let vert = '';\n let frag = '';\n let r = Math.floor(d * 0.5);\n for(let i = 0; i < r; i++) {\n let c = (r - i) * 0.01;\n vert += `v_texCoordsBlur[${i}] = a_texCoords + vec2(-${c}, -${c}) * u_direction;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i}]) * ${weights[i]};`;\n }\n vert += `v_texCoordsBlur[${r}] = a_texCoords;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${r}]) * ${weights[r]};`;\n for(let i = 0; i < r; i++) {\n let c = (i + 1) * 0.01;\n vert += `v_texCoordsBlur[${i + r + 1}] = a_texCoords + vec2(${c}, ${c}) * u_direction;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i + r + 1}]) * ${weights[i + r + 1]};`;\n }\n vert = vertexBlur.replace('[3]', '[' + d + ']').replace(/}$/, vert + '}');\n frag = fragmentBlur.replace('[3]', '[' + d + ']').replace(/}$/, frag + '}');\n return gl[key] = webgl.initShaders(gl, vert, frag);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核d扩大3倍性能慢\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * 先动态生成gl程序,默认3核源码示例已注释,根据sigma获得d(一定奇数),再计算权重\n * 然后将d尺寸和权重拼接成真正程序并编译成program,再开始绘制\n */\nfunction genBlurWebgl(renderMode, gl, cache, sigma) {\n let { x1, y1, bbox, width, height } = cache;\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n // 防止超限,webgl最大纹理尺寸限制\n if(width > Page.MAX + spread || height > Page.MAX + spread) {\n inject.warn('Filter blur is oversize');\n return;\n }\n let bboxNew = bbox.slice(0);\n bboxNew[0] -= spread;\n bboxNew[1] -= spread;\n bboxNew[2] += spread;\n bboxNew[3] += spread;\n // 写到一个tex中方便后续处理\n let w = width + spread * 2, h = height + spread * 2;\n let tex = createTexture(gl, null, 0, w, h);\n let frameBuffer = genFrameBufferWithTexture(gl, tex, w, h);\n drawCache2Tex(gl, gl.program, cache, w, h, spread);\n // 生成blur,同尺寸复用fbo\n let program = genBlurShader(gl, sigma, d);\n tex = webgl.drawBlur(gl, program, tex, w, h);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 写回一个cache中\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bboxNew, x1, y1, null);\n target.__available = true;\n let page = target.__page, size = page.__size, texture = page.texture;\n frameBuffer = genFrameBufferWithTexture(gl, texture, size, size);\n drawTex2Cache(gl, gl.program, target, tex, w, h);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n return target;\n}\n\nfunction genColorMatrixWebgl(renderMode, gl, cache, m) {\n let { x1, y1, bbox } = cache;\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bbox.slice(0), x1, y1, cache.__page);\n target.__available = true;\n let page = target.__page, size = page.__size;\n let frameBuffer = genFrameBufferWithTexture(gl, target.__page.texture, size, size);\n webgl.drawCm(gl, gl.programCm, target, cache, m, size * 0.5, size);\n // 切回\n gl.useProgram(gl.program);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n return target;\n}\n\nfunction genMaskWebgl(renderMode, gl, root, node, cache, W, H, i, lv, __structs) {\n let { x1, y1, width, height, bbox, dbx, dby } = cache;\n let bboxNew = bbox.slice(0);\n // 结果不能和源同page纹理,一定符合尺寸要求,不会比源大\n let __cacheMask = TextureCache.getInstance(renderMode, gl, root.__uuid, bboxNew, x1, y1, cache.__page);\n __cacheMask.__available = true;\n node.__cacheMask = __cacheMask;\n // 先求得被遮罩的matrix,用作inverse给mask计算,以被遮罩左上角为原点\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = node.__computedStyle;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n inverse = tf.calMatrixByOrigin(transform, tfo[0], tfo[1]);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩相同\n gl.viewport(0, 0, width, height);\n let texture = createTexture(gl, null, 0, width, height);\n let cx = width * 0.5, cy = height * 0.5;\n let frameBuffer = genFrameBufferWithTexture(gl, texture, width, height);\n let next = node.next;\n let isClip = next.__clip;\n let lastPage, list = [];\n let dx = -x1 + dbx, dy = -y1 + dby;\n while(next && next.__mask && next.__clip === isClip) {\n let total = __structs[i].total || 0;\n let matrixList = [];\n let parentMatrix;\n let lastMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastOpacity;\n let lastLv = lv;\n let index = i;\n for(let len = i + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n __opacity,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n else {\n let __limitCache = node.__limitCache;\n let computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none' || __limitCache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [OPACITY]: opacity,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastOpacity;\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 不考虑mbm\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1, tfo[1] + dby + node.__y1 - y1);\n }\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n lastMatrix = m;\n lastOpacity = parentOpacity * opacity;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target && (target !== __cache || visibility === 'visible')) {\n m = mx.multiply(inverse, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: target, opacity: lastOpacity, matrix: m });\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(!target || target === __cache) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n }\n }\n }\n }\n next = next.__next;\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n drawTextureCache(gl, list, cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.bindTexture(gl.TEXTURE_2D, null);\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n let page = __cacheMask.__page, size = page.size, tex = page.texture;\n frameBuffer = genFrameBufferWithTexture(gl, tex, size, size);\n webgl.drawMask(gl, program, __cacheMask, cache, texture, size * 0.5, size);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.viewport(0, 0, W, H);\n return __cacheMask;\n}\n\n/**\n * webgl的dropShadow只生成阴影部分,模糊复用blur,然后进行拼合\n * 复用blur时生成的模糊是临时的,和主程序模糊不一样,需区分\n */\nfunction genDropShadowWebgl(renderMode, gl, cache, v) {\n let { x1, y1, bbox, width, height } = cache;\n // 先根据x/y/color生成单色阴影\n let [x, y, sigma, , color] = v;\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n // 防止超限,webgl最大纹理尺寸限制\n if(width > Page.MAX + spread || height > Page.MAX + spread) {\n inject.warn('Filter dropShadow is oversize');\n return;\n }\n let w = width + spread * 2, h = height + spread * 2;\n let tex1 = createTexture(gl, null, 0, w, h);\n let frameBuffer = genFrameBufferWithTexture(gl, tex1, w, h);\n gl.useProgram(gl.programDs);\n webgl.drawDropShadow(gl, gl.programDs, frameBuffer, cache, color, width, w, height, h);\n // 生成模糊的阴影\n if(sigma) {\n let program = genBlurShader(gl, sigma, d);\n tex1 = webgl.drawBlur(gl, program, tex1, w, h);\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // cache绘制到一个单独的tex上\n let tex2 = createTexture(gl, null, 0, width, height);\n frameBuffer = genFrameBufferWithTexture(gl, tex2, width, height);\n drawCache2Tex(gl, gl.program, cache, width, height, 0);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 原图tex2和模糊阴影tex1合成\n let bboxNew = bbox.slice(0);\n bboxNew[0] += x;\n bboxNew[1] += y;\n bboxNew[2] += x;\n bboxNew[3] += y;\n bboxNew[0] -= spread;\n bboxNew[1] -= spread;\n bboxNew[2] += spread;\n bboxNew[3] += spread;\n let bboxMerge = bbox.slice(0);\n mergeBbox(bboxMerge, bboxNew);\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bboxMerge, x1, y1, null);\n target.__available = true;\n let page = target.__page, size = page.__size;\n frameBuffer = genFrameBufferWithTexture(gl, page.texture, size, size);\n let dx1 = bboxNew[0] - bboxMerge[0], dy1 = bboxNew[1] - bboxMerge[1];\n let dx2 = bbox[0] - bboxMerge[0], dy2 = bbox[1] - bboxMerge[1];\n webgl.drawDropShadowMerge(gl, target, size, tex1, dx1, dy1, w, h, tex2, dx2, dy2, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n bindTexture(gl, null, 0);\n gl.deleteTexture(tex1);\n gl.deleteTexture(tex2);\n return target;\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向画布或一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,之前的绘制都先到B上,再把后续元素绘制到一个同尺寸的fbo纹理上,\n * 两者进行mbm混合,返回到A上\n */\nfunction genMbmWebgl(gl, texture, cache, mbm, opacity, matrix, dx, dy, cx, cy, width, height) {\n // 后续绘制到同尺寸纹理上\n let tex = createTexture(gl, null, 0, width, height);\n let frameBuffer = genFrameBufferWithTexture(gl, tex, width, height);\n drawTextureCache(gl, [{ cache, opacity, matrix }], cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 获取对应的mbm程序\n let program;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n program = gl.programMbmMp;\n }\n else if(mbm === 'screen') {\n program = gl.programMbmSr;\n }\n else if(mbm === 'overlay') {\n program = gl.programMbmOl;\n }\n else if(mbm === 'darken') {\n program = gl.programMbmDk;\n }\n else if(mbm === 'lighten') {\n program = gl.programMbmLt;\n }\n else if(mbm === 'color-dodge') {\n program = gl.programMbmCd;\n }\n else if(mbm === 'color-burn') {\n program = gl.programMbmCb;\n }\n else if(mbm === 'hard-light') {\n program = gl.programMbmHl;\n }\n else if(mbm === 'soft-light') {\n program = gl.programMbmSl;\n }\n else if(mbm === 'difference') {\n program = gl.programMbmDf;\n }\n else if(mbm === 'exclusion') {\n program = gl.programMbmEx;\n }\n else if(mbm === 'hue') {\n program = gl.programMbmHue;\n }\n else if(mbm === 'saturation') {\n program = gl.programMbmSt;\n }\n else if(mbm === 'color') {\n program = gl.programMbmCl;\n }\n else if(mbm === 'luminosity') {\n program = gl.programMbmLm;\n }\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let resTex = createTexture(gl, null, 0, width, height);\n let resFrameBuffer = genFrameBufferWithTexture(gl, resTex, width, height);\n webgl.drawMbm(gl, program, texture, tex);\n gl.useProgram(gl.program);\n return {\n texture: resTex,\n frameBuffer: resFrameBuffer,\n };\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst, rlv) {\n let { __structs, width, height } = root;\n // mask节点很特殊,本身有matrix会影响,本身没改变但对象节点有改变也需要计算逆矩阵应用顶点\n let maskEffectHash = [];\n if(!isFirst) {\n // 先遍历一遍收集完全不变的defs,缓存起来id,随后再执行遍历渲染生成新的,避免掉重复的id\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n let __cacheDefs = node.__cacheDefs;\n let __refreshLevel = node.__refreshLevel;\n // 只要涉及到matrix和opacity就影响mask\n let hasEffectMask = hasMask && (__refreshLevel >= REPAINT || (__refreshLevel & (TRANSFORM_ALL | OP)));\n if(hasEffectMask) {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // mask索引遍历时处理,暂存遮罩对象的刷新lv\n maskEffectHash[end - 1] = __refreshLevel;\n }\n // >=REPAINT重绘生成走render()跳过这里\n if(__refreshLevel < REPAINT) {\n // 特殊的mask判断,遮罩对象影响这个mask了,除去filter、遮罩对象无TRANSFORM变化外都可缓存\n let mh = maskEffectHash[i];\n if(mh) {\n if(!(__refreshLevel & TRANSFORM_ALL) && mh < REPAINT && !(mh & TRANSFORM_ALL)) {\n __cacheDefs.forEach(item => {\n ctx.addCache(item);\n });\n }\n }\n // 去除特殊的filter,普通节点或不影响的mask在 {\n ctx.addCache(item);\n });\n }\n }\n }\n }\n let maskHash = [];\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let vdList = [];\n let parentVd;\n let lastLv = 0;\n let lastRefreshLv = 0;\n let lastNode;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n let computedStyle, __refreshLevel, __cacheDefs, __cacheTotal;\n if(node instanceof Text) {\n computedStyle = node.computedStyle;\n __refreshLevel = lastRefreshLv;\n }\n else {\n computedStyle = node.__computedStyle;\n __cacheDefs = node.__cacheDefs;\n __refreshLevel = node.__refreshLevel;\n __cacheTotal = node.__cacheTotal;\n }\n lastRefreshLv = __refreshLevel;\n node.__refreshLevel = NONE;\n let display = computedStyle[DISPLAY];\n // 将随后的若干个mask节点范围存下来\n if(hasMask && display !== 'none') {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // svg限制了只能Geom单节点,不可能是Dom,所以end只有唯一\n maskHash[end - 1] = {\n index: i,\n start,\n end,\n isClip: __structs[start].node.__clip, // 第一个节点是clip为准\n };\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点第一个特殊处理\n if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n vdList.splice(-diff);\n parentVd = vdList[lv - 1];\n }\n else if(lv > lastLv) {\n matrixList.push(parentMatrix = lastNode.__matrix);\n let vd = lastNode.__virtualDom;\n vdList.push(vd);\n parentVd = vd;\n }\n lastNode = node;\n lastLv = lv;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(__refreshLevel < REPAINT && !(node instanceof Text)) {\n virtualDom = node.__virtualDom;\n // total可以跳过所有孩子节点省略循环\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n virtualDom.cache = true;\n }\n else {\n __cacheTotal && (__cacheTotal.available = true);\n virtualDom = node.__virtualDom = util.extend({}, virtualDom);\n // dom要清除children缓存,geom和img无需\n if(node instanceof Dom && !(node instanceof Img)) {\n virtualDom.children = [];\n }\n // 还得判断,和img加载混在一起时,触发刷新如果display:none,则还有cacheTotal\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n else {\n delete virtualDom.cache;\n }\n }\n if(__refreshLevel & TRANSFORM_ALL) {\n let matrix = node.__matrix;\n if(!matrix || isE(matrix)) {\n delete virtualDom.transform;\n }\n else {\n virtualDom.transform = 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')';\n }\n if(parentMatrix && matrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(node.__matrixEvent, matrix);\n }\n if(__refreshLevel & OP) {\n let opacity = computedStyle[OPACITY];\n if(opacity === 1) {\n delete virtualDom.opacity;\n }\n else {\n virtualDom.opacity = opacity;\n }\n }\n if(__refreshLevel & FT) {\n let filter = computedStyle[FILTER];\n let s = painter.svgFilter(filter);\n if(s) {\n virtualDom.filter = s;\n }\n else {\n delete virtualDom.filter;\n }\n }\n if(__refreshLevel & MBM) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n virtualDom.mixBlendMode = mbmName(mixBlendMode);\n }\n else {\n delete virtualDom.mixBlendMode;\n }\n }\n virtualDom.lv = __refreshLevel;\n }\n else {\n // >=REPAINT会调用render,重新生成defsCache,text没有这个东西\n if(!(node instanceof Text)) {\n node.__cacheDefs.splice(0);\n let matrix = node.__matrix;\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(node.__matrixEvent, matrix);\n }\n node.render(renderMode, ctx, 0, 0);\n virtualDom = node.__virtualDom;\n // svg mock,每次都生成,每个节点都是局部根,更新时自底向上清除\n if(!(node instanceof Text)) {\n node.__cacheTotal = node.__cacheTotal || {\n available: true,\n release() {\n this.available = false;\n delete virtualDom.cache;\n },\n __offsetY() {},\n };\n node.__cacheTotal.available = true;\n }\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += total || 0;\n i += hasMask || 0;\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n let mh = maskHash[i];\n if(mh && (maskEffectHash[i]\n || __refreshLevel >= REPAINT\n || (__refreshLevel & (TRANSFORM_ALL | OP)))) {\n let { index, start, end, isClip } = mh;\n let target = __structs[index];\n let dom = target.node;\n let mChildren = [];\n // clip模式时,先添加兜底整个白色使得全部都可见,mask本身变反色(黑色)\n if(isClip) {\n mChildren.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', `M0,0L${width},0L${width},${height}L0,${height}L0,0`],\n ['fill', 'rgba(255,255,255,1)'],\n ['stroke-width', 0],\n ],\n });\n }\n for(let j = start; j < end; j++) {\n let node = __structs[j].node;\n let { computedStyle: { [DISPLAY]: display, [VISIBILITY]: visibility, [FILL]: fill },\n virtualDom: { children, opacity } } = node;\n if(display !== 'none' && visibility !== 'hidden') {\n // 引用相同无法diff,需要clone\n children = util.clone(children);\n mChildren = mChildren.concat(children);\n for(let k = 0, len = children.length; k < len; k++) {\n let { tagName, props } = children[k];\n if(tagName === 'path') {\n if(isClip) {\n for(let j = 0, len = props.length; j < len; j++) {\n let item = props[j];\n if(item[0] === 'fill') {\n item[1] = util.int2invert(fill[0]);\n }\n }\n }\n let matrix = node.matrix;\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n // path没有transform属性,在vd上,需要弥补\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`]);\n // path没有opacity属性,在vd上,需要弥补\n if(!util.isNil(opacity) && opacity !== 1) {\n props.push(['opacity', opacity]);\n }\n }\n // img可能有matrix属性,需判断\n else if(tagName === 'image') {\n let hasTransform = -1;\n for(let m = 0, len = props.length; m < len; m++) {\n if(props[m][0] === 'transform') {\n hasTransform = m;\n break;\n }\n }\n if(hasTransform === -1) {\n let ivs = inverse(dom.matrix);\n if(!isE(ivs)) {\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(ivs), ',')})`]);\n }\n }\n else {\n let matrix = props[hasTransform][1].match(/[\\d.]+/g).map(i => parseFloat(i));\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n props[hasTransform][1] = `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`;\n }\n }\n }\n }\n }\n // 清掉上次的\n for(let i = __cacheDefs.length - 1; i >= 0; i--) {\n let item = __cacheDefs[i];\n if(item.tagName === 'mask') {\n __cacheDefs.splice(i, 1);\n ctx.removeCache(item);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n __cacheDefs.push(o);\n id = 'url(#' + id + ')';\n dom.virtualDom.mask = id;\n }\n // mask不入children\n if(parentVd && !node.__mask) {\n parentVd.children.push(virtualDom);\n }\n if(i === 0) {\n parentMatrix = node.__matrix;\n parentVd = virtualDom;\n }\n }\n}\n\nfunction renderWebgl(renderMode, gl, root, isFirst, rlv) {\n if(isFirst) {\n Page.init(gl.getParameter(gl.MAX_TEXTURE_SIZE));\n }\n let { __structs, width, height } = root;\n let cx = width * 0.5, cy = height * 0.5;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let lastRefreshLevel = NONE;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT || (rlv & (CACHE | FT | PPT | MASK))) {\n // 记录transformStyle,出现ppt时有用,同时ts为flat后同一ppt上下文影响继承显示\n let flatList = [], flatExtendList = [];\n let parentFlat = false, parentExtendFlat = false;\n let lastFlat = false, lastExtendFlat = false;\n let pptNodeList = [];\n let parentPptNode = null;\n let lastPptNode = null;\n let lastLv = 0;\n // 节点开始有ppt得记录,后续孩子中如果有flat的,得强制生成cacheTotal\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n node.__index = i; // 生成total需要\n // Text特殊处理,webgl中先渲染为bitmap,再作为贴图绘制,缓存交由text内部判断,直接调用渲染纹理方法\n if(node instanceof Text) {\n if(lastRefreshLevel >= REPAINT) {\n let bbox = node.bbox, x = node.__x, y = node.__y;\n let __cache = node.__cache;\n if(__cache) {\n __cache.reset(bbox, x, y);\n }\n else {\n __cache = CanvasCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, x, y, null);\n }\n if(__cache && __cache.enabled) {\n __cache.__bbox = bbox;\n __cache.__available = true;\n node.__cache = __cache;\n node.render(mode.CANVAS, __cache.ctx, __cache.dx, __cache.dy);\n }\n else {\n __cache && __cache.release();\n node.__limitCache = true;\n }\n }\n continue;\n }\n let __computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let perspective = __computedStyle[PERSPECTIVE];\n let isFlat = __computedStyle[TRANSFORM_STYLE] === 'flat';\n // 特殊,新的ppt上下文节点启用新值,否则还是老的\n let isExtendFlat = parentExtendFlat || isFlat;\n let pptNode = perspective ? node : null;\n // root第一个特殊处理\n if(lv === 0) {\n parentFlat = parentExtendFlat = isFlat;\n if(perspective) {\n parentPptNode = node;\n }\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树\n else if(lv > lastLv) {\n parentFlat = lastFlat;\n flatList.push(isFlat);\n parentExtendFlat = lastExtendFlat;\n flatExtendList.push(isFlat);\n parentPptNode = lastPptNode || parentPptNode;\n pptNodeList.push(pptNode || parentPptNode);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n flatList.splice(-diff);\n parentFlat = flatList[lv - 1];\n flatExtendList.splice(-diff);\n parentExtendFlat = flatExtendList[lv - 1];\n pptNodeList.splice(-diff);\n parentPptNode = pptNodeList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 根据refreshLevel优化计算\n let {\n __refreshLevel,\n __currentStyle,\n __cacheTotal,\n } = node;\n node.__refreshLevel = NONE;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(!__refreshLevel) {\n }\n else if(__refreshLevel < REPAINT) {\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n let isMbm = (__refreshLevel & MBM) && mixBlendMode !== 'normal';\n let need = node.__cacheAsBitmap || hasMask;\n if(!need && (__refreshLevel & (FT | CACHE))) {\n let filter = __computedStyle[FILTER];\n if(filter && filter.length) {\n need = true;\n }\n }\n if(!need && (__refreshLevel & (PPT | CACHE))) {\n let __domParent = node.__domParent;\n let isPpt = !isE(__domParent && __domParent.__perspectiveMatrix) || node.__selfPerspectiveMatrix;\n if(isPpt) {\n need = true;\n }\n }\n if(isMbm) {\n hasMbm = true;\n }\n // 这里和canvas不一样,前置cacheAsBitmap条件变成或条件之一,新的ppt层级且画中画需要新的fbo\n if(need) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt: total && perspective || node.__selfPerspectiveMatrix,\n });\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n if(__refreshLevel === NONE && hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let hasContent = node.calContent(__currentStyle, __computedStyle), onlyImg;\n // 有内容先以canvas模式绘制到离屏画布上,自定义渲染设置无内容不实现即可跳过\n if(hasContent) {\n let bbox = node.bbox, __cache = node.__cache, x1 = node.__x1, y1 = node.__y1;\n // 单图特殊对待缓存\n if(node instanceof Img) {\n let loadImg = node.__loadImg;\n if(loadImg.onlyImg && !loadImg.error && loadImg.source) {\n onlyImg = true;\n __cache = node.__cache = ImgWebglCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, loadImg, x1, y1);\n }\n }\n if(!onlyImg) {\n if(__cache) {\n __cache.reset(bbox, x1, y1);\n }\n else {\n __cache = CanvasCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, x1, y1, null);\n }\n }\n if(__cache && __cache.enabled) {\n __cache.__bbox = bbox;\n __cache.__available = true;\n node.__cache = __cache;\n if(!onlyImg || __cache.count === 1) {\n node.render(mode.CANVAS, __cache.ctx, __cache.dx, __cache.dy);\n }\n }\n else {\n __cache && __cache.release();\n node.__limitCache = true;\n return;\n }\n }\n else {\n node.__limitCache = false;\n }\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [PERSPECTIVE]: perspective,\n } = __computedStyle;\n let isMbm = mixBlendMode !== 'normal';\n let isPpt = total && perspective || node.__selfPerspectiveMatrix;\n let isOverflow = overflow === 'hidden' && total;\n let isFilter = filter && filter.length;\n if(isMbm) {\n hasMbm = true;\n }\n if(node.__cacheAsBitmap\n || hasMask\n || isFilter\n || isOverflow\n || isPpt) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt,\n });\n }\n }\n lastRefreshLevel = __refreshLevel;\n lastFlat = isFlat;\n lastExtendFlat = isExtendFlat;\n lastPptNode = pptNode;\n }\n }\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return b.i - a.i;\n }\n return b.lv - a.lv;\n });\n // ppt只有嵌套才需要生成,最下面的孩子节点的ppt无需,因此记录一个hash存index,\n // 同时因为是后序遍历,孩子先存所有父亲的index即可保证父亲才能生成cacheTotal\n for(let ii = 0, len = mergeList.length; ii < len; ii++) {\n let {\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt,\n } = mergeList[ii];\n let {\n __computedStyle,\n } = node;\n let {\n [FILTER]: filter,\n } = __computedStyle;\n // 有ppt的,向上查找所有父亲index记录,可能出现重复记得提前跳出\n let {\n __limitCache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n if(__limitCache) {\n return;\n }\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let res;\n if(isPpt) {\n res = genPptWebgl(renderMode, __cacheTotal, gl, root, node, i, lv, total || 0,\n __structs, width, height);\n }\n else {\n res = genTotalWebgl(renderMode, __cacheTotal, gl, root, node, i, lv, total || 0,\n __structs, width, height, null, null, null);\n }\n if(!res) {\n return;\n }\n __cacheTotal = res;\n needGen = true;\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let res = genFilterWebgl(renderMode, gl, node, target, filter, width, height);\n if(res) {\n target = res;\n needGen = true;\n }\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n genMaskWebgl(renderMode, gl, root, node, target, width, height, i + (total || 0) + 1, lv, __structs);\n }\n }\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的不绘制并给出警告,实现会扰乱逻辑且很少会出现这种情况\n */\n let frameBuffer, texture;\n if(hasMbm) {\n texture = createTexture(gl, null, 0, width, height);\n bindTexture(gl, null, 0);\n frameBuffer = genFrameBufferWithTexture(gl, texture, width, height);\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n }\n let lastPage, list = [];\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n __opacity,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [OPACITY]: opacity,\n [MIX_BLEND_MODE]: mixBlendMode,\n [VISIBILITY]: visibility,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = __computedStyle;\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent,\n __matrix,\n __selfPerspectiveMatrix,\n } = node;\n let m = __matrix;\n if(__selfPerspectiveMatrix) {\n m = multiply(__selfPerspectiveMatrix, m);\n }\n if(__domParent) {\n let op = __domParent.__opacity;\n if(op !== 1) {\n opacity *= __domParent.__opacity;\n }\n let pm = __domParent.__perspectiveMatrix, me = __domParent.__matrixEvent;\n if(pm && pm.length) {\n m = multiply(__domParent.__perspectiveMatrix, m);\n }\n if(me && me.length) {\n m = multiply(__domParent.__matrixEvent, m);\n }\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n // total和自身cache的尝试,visibility不可见时没有cache\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target) {\n if(opacity > 0) {\n // 有mbm则需要混合之前的纹理和新纹理到fbo上面,连续的mbm则依次交替绘制到画布或离屏fbo上\n if(mixBlendMode !== 'normal') {\n if(list.length) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n lastPage = null;\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n let res = genMbmWebgl(gl, texture, target, mixBlendMode, opacity, m, 0, 0, cx, cy, width, height);\n if(res) {\n gl.deleteTexture(texture);\n texture = res.texture;\n frameBuffer = res.frameBuffer;\n }\n }\n else {\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n }\n lastPage = p;\n list.push({ cache: target, opacity, matrix: m });\n }\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if((!target || target === __cache) && opacity > 0) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n lastPage = null;\n node.render(renderMode, gl, 0, 0);\n gl.useProgram(gl.program);\n }\n }\n }\n }\n drawTextureCache(gl, list, cx, cy, 0, 0);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n bindTexture(gl, texture, 0);\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.deleteTexture(texture);\n }\n}\n\nfunction renderCanvas(renderMode, ctx, root, isFirst, rlv) {\n let { __structs, width, height } = root;\n let mergeList = [];\n /**\n * 先一遍先序遍历收集cacheAsBitmap的节点,说明这棵子树需要缓存,可能出现嵌套,深层级优先、后面优先\n * 可能遇到已有缓存没变化的,这时候不要收集忽略掉,没有缓存的走后面遍历普通渲染\n * 第一次强制进入,后续不包含cache变更且= REPAINT || (rlv & (CACHE | FT | MASK))) {\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text,要么根节点直接绘制,要么被局部根节点汇总,自身并不缓存(fillText比位图更快)\n if(node instanceof Text) {\n continue;\n }\n let __computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n // 根据refreshLevel优化计算,处理其样式\n let {\n __refreshLevel,\n __cacheTotal,\n } = node;\n node.__refreshLevel = NONE;\n // filter变化需重新生成,cacheTotal本身就存在要判断下;CACHE取消重新生成则无需判断\n // img在只有自身的情况下自动生成并特殊对待,多个相同引用的img使用同一份资源\n let need = node.__cacheAsBitmap &&\n ((__refreshLevel & (CACHE | FT)) || __refreshLevel >= REPAINT);\n if(!need && node instanceof Img) {\n let hasContent = node.calContent(node.__currentStyle, node.__computedStyle);\n let loadImg = node.__loadImg;\n if(loadImg.onlyImg && hasContent) {\n need = true;\n }\n }\n if(need) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n if(__refreshLevel === NONE && hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n }\n /**\n * 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n * 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n */\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return b.i - a.i;\n }\n return b.lv - a.lv;\n });\n mergeList.forEach(item => {\n let { i, lv, total, node, hasMask } = item;\n let __cacheTotal = genTotal(renderMode, ctx, root, node, i, lv, total || 0, __structs, width, height);\n if(__cacheTotal) {\n genTotalOther(renderMode, __structs, __cacheTotal, node, hasMask, width, height);\n }\n });\n }\n /**\n * 最后先序遍历一次并应用__cacheTotal即可,没有的普通绘制,以及剩下的超尺寸的和Text\n * 特殊离屏和cacheAsBitmap的离屏都已经产生了cacheTotal,除非超限\n * 离屏功能的数据结构和算法逻辑非常复杂,需用到下面2个hash,来完成一些filter、mask等离屏才能完成的绘制\n * 其中overflow、filter、mix-blend-mode是对自身及子节点,mask则是对自身和后续next遮罩节点\n * 一个节点在Xom渲染中申请离屏canvas,是按照一定顺序来的,且多个离屏后面的有前面的ctx引用,第一个则引用最初非离屏的ctx\n * 这个顺序在应用离屏时以反向顺序开始,这样最后ctx被还原到最初的ctx\n * mask是个十分特殊的离屏,因为除了自身外,next节点也需要汇总到另外一个离屏上,为了逻辑一致性\n * 所有离屏应用的索引都以最后一个节点的索引为准,即有mask时以最后一个mask,无mask则以自身节点的最后一个(+total)为索引\n * 由于存在普通非cache绘制,所以依然要用到栈代替递归计算matrix\n */\n let maskStartHash = [];\n let offscreenHash = [];\n let lastOpacity = -1;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n node.render(renderMode, ctx, 0, 0);\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, true);\n lastOpacity = -1;\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent,\n __matrix,\n } = node;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n let msh = maskStartHash[i];\n if(msh) {\n let { idx, hasMask, offscreenMask } = msh;\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctx = target.ctx;\n }\n // 设置opacity/matrix,根节点是没有父节点的不计算继承值\n let opacity = __computedStyle[OPACITY];\n let m = __matrix;\n if(__domParent) {\n let op = __domParent.__opacity;\n if(op !== 1) {\n opacity *= __domParent.__opacity;\n }\n let me = __domParent.__matrixEvent;\n if(me && me.length) {\n m = multiply(me, m);\n }\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n if(lastOpacity !== opacity) {\n ctx.globalAlpha = opacity;\n lastOpacity = opacity;\n }\n if(opacity > 0) {\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n let { x, y, canvas, x1, y1, dbx, dby, width: w, height: h } = target;\n ctx.drawImage(canvas, x, y, w, h, x1 - dbx, y1 - dby, w, h);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n }\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n // 没有cacheTotal是普通节点绘制\n else {\n // 如果有离屏则先申请替换ctx\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = node.__calOffscreen(ctx, __computedStyle);\n if(offscreen) {\n ctx = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n // 节点自身渲染\n if(lastOpacity !== opacity) {\n ctx.globalAlpha = opacity;\n lastOpacity = opacity;\n }\n if(opacity > 0) {\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, ctx, 0, 0);\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n }\n }\n}\n\nexport default {\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n depth: true,\n // stencil: true,\n};\n","import Xom from './Xom';\nimport Dom from './Dom';\nimport Text from './Text';\nimport Component from './Component';\nimport Defs from './Defs';\nimport Geom from './geom/Geom';\nimport builder from './builder';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport unit from '../style/unit';\nimport geom from '../math/geom';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\nimport Event from '../util/Event';\nimport frame from '../animate/frame';\nimport Controller from '../animate/Controller';\nimport mode from '../refresh/mode';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport struct from '../refresh/struct';\nimport reflow from '../refresh/reflow';\nimport webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport vertex from '../gl/main.vert';\nimport fragment from '../gl/main.frag';\nimport vertexMask from '../gl/mask.vert';\nimport fragmentMask from '../gl/mask.frag';\nimport fragmentClip from '../gl/clip.frag';\nimport vertexOverflow from '../gl/overflow.vert';\nimport fragmentOverflow from '../gl/overflow.frag';\nimport vertexCm from '../gl/filter/cm.vert';\nimport fragmentCm from '../gl/filter/cm.frag';\nimport vertexDs from '../gl/filter/drops.vert'\nimport fragmentDs from '../gl/filter/drops.frag';\nimport vertexMbm from '../gl/mbm/mbm.vert';\nimport fragmentMultiply from '../gl/mbm/multiply.frag';\nimport fragmentScreen from '../gl/mbm/screen.frag';\nimport fragmentOverlay from '../gl/mbm/overlay.frag';\nimport fragmentDarken from '../gl/mbm/darken.frag';\nimport fragmentLighten from '../gl/mbm/lighten.frag';\nimport fragmentColorDodge from '../gl/mbm/color-dodge.frag';\nimport fragmentColorBurn from '../gl/mbm/color-burn.frag';\nimport fragmentHardLight from '../gl/mbm/hard-light.frag';\nimport fragmentSoftLight from '../gl/mbm/soft-light.frag';\nimport fragmentDifference from '../gl/mbm/difference.frag';\nimport fragmentExclusion from '../gl/mbm/exclusion.frag';\nimport fragmentHue from '../gl/mbm/hue.frag';\nimport fragmentSaturation from '../gl/mbm/saturation.frag';\nimport fragmentColor from '../gl/mbm/color.frag';\nimport fragmentLuminosity from '../gl/mbm/luminosity.frag';\nimport vertexSs from '../gl/ss.vert';\nimport fragmentSs from '../gl/ss.frag';\n\nconst {\n STYLE_KEY: {\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n VISIBILITY,\n COLOR,\n WIDTH,\n HEIGHT,\n Z_INDEX,\n POINTER_EVENTS,\n WRITING_MODE,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n MATRIX,\n TRANSFORM,\n OPACITY,\n MIX_BLEND_MODE,\n },\n} = enums;\nconst { isNil, isFunction } = util;\nconst { PX, INHERIT } = unit;\nconst {\n getLevel,\n isRepaint,\n NONE,\n FILTER: FT,\n PERSPECTIVE: PPT,\n REPAINT,\n REFLOW,\n REBUILD,\n CACHE,\n TRANSFORM: TF,\n TRANSFORM_ALL,\n OPACITY: OP,\n MIX_BLEND_MODE: MBM,\n MASK,\n} = level;\nconst { isGeom } = change;\nconst { renderCanvas, renderSvg, renderWebgl } = struct;\n\nconst ROOT_DOM_NAME = {\n canvas: 'canvas',\n svg: 'svg',\n webgl: 'canvas',\n};\n\nfunction getDom(dom) {\n if(util.isString(dom) && dom) {\n let o = document.querySelector(dom);\n if(!o) {\n throw new Error('Can not find dom of selector: ' + dom);\n }\n return o;\n }\n if(!dom) {\n throw new Error('Can not find dom: ' + dom);\n }\n return dom;\n}\n\nfunction renderProp(k, v) {\n let s = Array.isArray(v) ? util.joinSourceArray(v) : util.stringify(v);\n if(k === 'className') {\n k = 'class';\n }\n else if(k === 'style') {\n return '';\n }\n return ' ' + k + '=\"' + util.encodeHtml(s, true) + '\"';\n}\n\nconst EVENT_LIST = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n\nfunction initEvent(dom, Root) {\n let list = [];\n EVENT_LIST.forEach(type => {\n function cb(e) {\n let root = dom.__root;\n if(root && root instanceof Root) {\n if(['touchend', 'touchcancel', 'touchmove'].indexOf(type) > -1) {\n let target = root.__touchstartTarget;\n let event = root.__wrapEvent(e);\n event.target = target;\n while(target) {\n target.__emitEvent(event, null, true);\n target = target.__domParent;\n }\n }\n else {\n root.__cb(e);\n }\n }\n }\n dom.addEventListener(type, cb);\n list.push({ type, cb });\n });\n return list;\n}\n\nfunction removeEvent(dom, list) {\n list.forEach(item => {\n dom.removeEventListener(item.type, item.cb);\n });\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props, children);\n this.__dom = null; // 真实DOM引用\n this.__mw = 0; // 记录最大宽高,防止尺寸变化清除不完全\n this.__mh = 0;\n // this.__scx = 1; // 默认缩放,css改变canvas/svg缩放后影响事件坐标,有值手动指定,否则自动计算\n // this.__scy = 1;\n this.__task = [];\n this.__ref = {};\n this.__animateController = new Controller();\n Event.mix(this);\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\n this.__lastUpdateP = null; // 每帧addUpdate都会向上检查,很多时候同级无需继续,第一次检查暂存parent对象\n builder.buildRoot(this, this.__children);\n this.__env = null; // 生成cacheTotal时会覆盖这个信息,得知当前离屏画布信息\n }\n\n __initProps() {\n let w = this.props.width;\n if(!isNil(w)) {\n let value = parseFloat(w) || 0;\n if(value > 0) {\n this.__width = value;\n }\n }\n let h = this.props.height;\n if(!isNil(h)) {\n let value = parseFloat(h) || 0;\n if(value > 0) {\n this.__height = value;\n }\n }\n }\n\n __genHtml(domName) {\n let res = `<${domName}`;\n // 拼接处理属性\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n // 忽略事件\n if(!/^on[a-zA-Z]/.test(k)) {\n res += renderProp(k, v);\n }\n });\n res += `>${domName}>`;\n return res;\n }\n\n __wrapEvent(e) {\n let x, y;\n // 触摸结束取消特殊没有touches\n if(['touchend', 'touchcancel'].indexOf(e.type) === -1) {\n let { dom, __scx, __scy } = this;\n let { x: x2, y: y2, left, top, width, height } = dom.getBoundingClientRect();\n x = x2 || left || 0;\n y = y2 || top || 0;\n let { clientX, clientY } = e.touches ? e.touches[0] : e;\n x = clientX - x;\n y = clientY - y;\n // 外边的scale影响元素事件响应,根据倍数计算真实的坐标,优先手动指定,否则自动计算\n if(!isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.__width / width;\n }\n if(!isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.__height / height;\n }\n }\n return {\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n e.stopPropagation();\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n e.stopImmediatePropagation();\n },\n preventDefault() {\n e.preventDefault();\n },\n x,\n y,\n __hasEmitted: false,\n };\n }\n\n // 类似touchend/touchcancel/touchmove这种无需判断是否发生于元素上,直接响应\n __cb(e) {\n if(e.type === 'touchmove' && !this.__touchstartTarget) {\n return;\n }\n let data = this.__wrapEvent(e);\n this.__emitEvent(data, null, false);\n return data;\n }\n\n /**\n * 添加到真实Dom上,优先已存在的同名canvas/svg节点,没有则dom下生成新的\n * @param dom\n */\n appendTo(dom) {\n dom = getDom(dom);\n this.__isDestroyed = false;\n this.__initProps();\n let tagName = this.tagName;\n let domName = ROOT_DOM_NAME[tagName];\n // OffscreenCanvas兼容,包含worker的\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (dom instanceof window.OffscreenCanvas)\n || typeof self !== 'undefined' && self.OffscreenCanvas && (dom instanceof self.OffscreenCanvas)) {\n this.__dom = dom;\n this.__width = dom.width;\n this.__height = dom.height;\n }\n // 已有root节点\n else if(dom.nodeName.toLowerCase() === domName) {\n this.__dom = dom;\n if(this.__width) {\n dom.setAttribute('width', this.__width);\n }\n if(this.__height) {\n dom.setAttribute('height', this.__height);\n }\n }\n // 没有canvas/svg节点则生成一个新的\n else {\n this.__dom = dom.querySelector(domName);\n if(!this.__dom) {\n dom.innerHTML = this.__genHtml(domName);\n this.__dom = dom.querySelector(domName);\n }\n // 老的销毁\n else {\n let old = this.__dom.__root;\n if(old && old instanceof Root) {\n old.destroy();\n }\n }\n }\n // 没有设置width/height则采用css计算形式\n if(!this.__width || !this.__height) {\n let domCss = window.getComputedStyle(dom, null);\n if(!this.__width) {\n this.__width = parseFloat(domCss.getPropertyValue('width')) || 0;\n dom.setAttribute('width', this.width);\n }\n if(!this.__height) {\n this.__height = parseFloat(domCss.getPropertyValue('height')) || 0;\n dom.setAttribute('height', this.height);\n }\n }\n // 最终无宽高给出警告\n if(!this.__width || !this.__height) {\n inject.warn('Karas render target with a width or height of 0.')\n }\n let params = Object.assign({}, ca, this.props.contextAttributes);\n // 只有canvas有ctx,svg用真实dom\n if(tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d', params);\n this.__renderMode = mode.CANVAS;\n }\n else if(tagName === 'svg') {\n this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\n this.__renderMode = mode.SVG;\n }\n else if(tagName === 'webgl') {\n // 优先手动指定,再自动判断,最后兜底\n let gl, webgl2 = this.props.webgl2;\n if(!isNil(webgl2)) {\n if(webgl2) {\n gl = this.__dom.getContext('webgl2', params);\n }\n if(!gl) {\n gl = this.__dom.getContext('webgl', params);\n }\n this.__ctx = gl;\n }\n else {\n gl = this.__ctx = this.__dom.getContext('webgl2', params)\n || this.__dom.getContext('webgl', params);\n }\n this.__initShader(gl);\n this.__renderMode = mode.WEBGL;\n }\n this.draw(true);\n this.__eventCbList = initEvent(this.__dom, Root);\n this.__dom.__root = this;\n }\n\n __initShader(gl) {\n gl.program = webgl.initShaders(gl, vertex, fragment);\n gl.programMask = webgl.initShaders(gl, vertexMask, fragmentMask);\n gl.programClip = webgl.initShaders(gl, vertexMask, fragmentClip);\n gl.programOverflow = webgl.initShaders(gl, vertexOverflow, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.programDs = webgl.initShaders(gl, vertexDs, fragmentDs);\n gl.programMbmMp = webgl.initShaders(gl, vertexMbm, fragmentMultiply);\n gl.programMbmSr = webgl.initShaders(gl, vertexMbm, fragmentScreen);\n gl.programMbmOl = webgl.initShaders(gl, vertexMbm, fragmentOverlay);\n gl.programMbmDk = webgl.initShaders(gl, vertexMbm, fragmentDarken);\n gl.programMbmLt = webgl.initShaders(gl, vertexMbm, fragmentLighten);\n gl.programMbmCd = webgl.initShaders(gl, vertexMbm, fragmentColorDodge);\n gl.programMbmCb = webgl.initShaders(gl, vertexMbm, fragmentColorBurn);\n gl.programMbmHl = webgl.initShaders(gl, vertexMbm, fragmentHardLight);\n gl.programMbmSl = webgl.initShaders(gl, vertexMbm, fragmentSoftLight);\n gl.programMbmDf = webgl.initShaders(gl, vertexMbm, fragmentDifference);\n gl.programMbmEx = webgl.initShaders(gl, vertexMbm, fragmentExclusion);\n gl.programMbmHue = webgl.initShaders(gl, vertexMbm, fragmentHue);\n gl.programMbmSt = webgl.initShaders(gl, vertexMbm, fragmentSaturation);\n gl.programMbmCl = webgl.initShaders(gl, vertexMbm, fragmentColor);\n gl.programMbmLm = webgl.initShaders(gl, vertexMbm, fragmentLuminosity);\n gl.programSs = webgl.initShaders(gl, vertexSs, fragmentSs);\n gl.useProgram(gl.program);\n }\n\n __reLayout() {\n let {\n renderMode,\n width,\n height,\n } = this;\n this.__checkRoot(renderMode, width, height);\n let wm = this.__currentStyle[WRITING_MODE];\n let isUpright = wm.v && wm.v.indexOf('vertical') === 0;\n // 布局分为两步,普通流和定位流,互相递归\n this.__layout({\n x: 0,\n y: 0,\n w: width,\n h: height,\n isUpright,\n }, false, false, false);\n // 绝对布局需要从根开始保存相对坐标系的容器引用,并根据relative/absolute情况变更\n this.__layoutAbs(this, {\n x: 0,\n y: 0,\n w: width,\n h: height,\n isUpright,\n }, null);\n this.__structs = this.__structure(0, 0);\n }\n\n draw(isFirst) {\n let { isDestroyed, renderMode, ctx, defs } = this;\n if(isDestroyed) {\n return;\n }\n this.__lastUpdateP = null;\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__reLayout();\n }\n if(this.props.noRender) {\n return;\n }\n let rlv = this.__rlv;\n if(renderMode === mode.CANVAS) {\n this.__clearCanvas(ctx);\n renderCanvas(renderMode, ctx, this, isFirst, rlv);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG) {\n defs.clear();\n renderSvg(renderMode, defs, this, isFirst, rlv);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n let dom = this.__dom;\n if(dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(dom, dom.__vd, nvd);\n }\n else {\n dom.innerHTML = util.joinVirtualDom(nvd);\n }\n dom.__vd = nvd;\n dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL) {\n this.__clearWebgl(ctx);\n renderWebgl(renderMode, ctx, this, isFirst, rlv);\n }\n this.emit(Event.REFRESH, rlv);\n this.__rlv = NONE;\n }\n\n destroy() {\n this.__destroy();\n this.__animateController.__destroy();\n let n = this.dom;\n if(n) {\n removeEvent(n, this.__eventCbList || []);\n n.__root = null;\n }\n let gl = this.ctx;\n if(this.renderMode === mode.WEBGL) {\n [\n 'program',\n 'programMask',\n 'programClip',\n 'programOverflow',\n 'programCm',\n 'programDs',\n 'programMbmMp',\n 'programMbmSr',\n 'programMbmOl',\n 'programMbmDk',\n 'programMbmLt',\n 'programMbmCd',\n 'programMbmCb',\n 'programMbmHl',\n 'programMbmSl',\n 'programMbmDf',\n 'programMbmEx',\n 'programMbmHue',\n 'programMbmSt',\n 'programMbmCl',\n 'programMbmLm',\n ].forEach(k => {\n let p = gl[k];\n gl.deleteShader(p.vertexShader);\n gl.deleteShader(p.fragmentShader);\n gl.deleteProgram(p);\n });\n for(let i in gl) {\n if(i.indexOf('programBlur,') === 0) {\n let p = gl[i];\n gl.deleteShader(p.vertexShader);\n gl.deleteShader(p.fragmentShader);\n gl.deleteProgram(p);\n }\n }\n }\n }\n\n scale(x = 1, y = x) {\n this.__scx = x;\n this.__scy = y;\n }\n\n resize(w, h, cb) {\n let self = this;\n if(w !== self.width || h !== self.height) {\n self.__width = w;\n self.__height = h;\n self.updateStyle({\n width: w,\n height: h,\n }, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __x1, __y1, offsetWidth, offsetHeight, matrixEvent, children, zIndexChildren,\n computedStyle: { [DISPLAY]: display, [POINTER_EVENTS]: pointerEvents } } = vd;\n if(!includeIgnore && display === 'none') {\n return;\n }\n if(Array.isArray(zIndexChildren)) {\n for(let i = 0, len = children.length; i < len; i++) {\n children[i].__index__ = i;\n }\n for(let i = zIndexChildren.length - 1; i >= 0; i--) {\n let item = zIndexChildren[i];\n if(item instanceof karas.Text) {\n continue;\n }\n let path2 = path.slice();\n path2.push(item.__index__);\n let zPath2 = zPath.slice();\n zPath2.push(i);\n let res = scan(item, x, y, path2, zPath2);\n if(res) {\n return res;\n }\n }\n }\n if(!includeIgnore && pointerEvents === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __x1, __y1,\n __x1 + offsetWidth, __y1,\n __x1 + offsetWidth, __y1 + offsetHeight,\n __x1, __y1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n return {\n target: vd,\n path,\n zPath,\n };\n }\n }\n return scan(this, x, y, [], []);\n }\n\n /**\n * 每次刷新前检查root节点的样式,有些固定的修改无效,有些继承的作为根初始化\n * @param renderMode\n * @param width\n * @param height\n * @private\n */\n __checkRoot(renderMode, width, height) {\n let { dom, currentStyle, computedStyle } = this;\n // canvas/svg作为根节点一定是block或flex,不会是inline\n if(['flex', 'block'].indexOf(currentStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = currentStyle[DISPLAY] = 'block';\n }\n // 同理position不能为absolute\n if(currentStyle[POSITION] === 'absolute') {\n computedStyle[POSITION] = currentStyle[POSITION] = 'static';\n }\n // 根节点满宽高\n currentStyle[WIDTH] = { v: width, u: PX };\n currentStyle[HEIGHT] = { v: height, u: PX };\n computedStyle[WIDTH] = width;\n computedStyle[HEIGHT] = height;\n // 可能调用resize()导致变更,要重设,canvas无论离屏与否都可使用直接赋值,svg则按dom属性api\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(dom.width !== width) {\n dom.width = width;\n }\n if(dom.height !== height) {\n dom.height = height;\n }\n }\n else if(renderMode === mode.SVG) {\n dom.setAttribute('width', width);\n dom.setAttribute('height', height);\n }\n }\n\n /**\n * 添加更新,分析repaint/reflow和上下影响,异步刷新\n */\n __addUpdate(node, keys, focus, addDom, removeDom, aniParams, cb) {\n if(node instanceof Component) {\n node = node.shadowRoot;\n }\n let {\n __computedStyle: computedStyle,\n __currentStyle: currentStyle,\n __cacheStyle: cacheStyle,\n __cacheProps,\n __mask,\n __domParent,\n } = node;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n // 可能无keys但有aniParams,多防御一下,比如steps动画\n let lv = focus || (aniParams && keys && keys.length ? aniParams.lv : NONE);\n // 清空对应改变的cacheStyle\n if(keys) {\n if(aniParams) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n cacheStyle[k] = undefined;\n }\n hasZ = aniParams.hasZ;\n hasColor = aniParams.hasColor;\n hasTsColor = aniParams.hasTsColor;\n hasTsWidth = aniParams.hasTsWidth;\n hasTsOver = aniParams.hasTsOver;\n }\n else {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n if(node instanceof Geom && isGeom(node.tagName, k)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n }\n else {\n // repaint置空,如果reflow会重新生成空的\n cacheStyle[k] = undefined;\n // TRBL变化只对relative/absolute起作用,其它忽视\n if((k === TOP || k === RIGHT || k === BOTTOM || k === LEFT)\n && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) === -1) {\n continue;\n }\n // 细化等级\n lv |= getLevel(k);\n if(k === DISPLAY) {\n hasDisplay = true;\n }\n else if(k === Z_INDEX) {\n hasZ = node !== this && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) > -1;\n }\n else if(k === VISIBILITY) {\n hasVisibility = true;\n }\n else if(k === COLOR) {\n hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n hasTsOver = true;\n }\n }\n }\n }\n }\n // 没有变化,add/remove强制focus\n // 本身节点为none,变更无效,此时没有display变化,add/remove在操作时已经判断不会进入\n if(lv === NONE || computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n if(cb && isFunction(cb)) {\n cb();\n }\n return;\n }\n // transform变化清空重算,比较特殊,MATRIX的cache需手动清理\n if(lv & TF) {\n cacheStyle[MATRIX] = computedStyle[TRANSFORM] = undefined;\n }\n // mask需清除遮罩对象的缓存\n let hasRelease, hasMask = lv & MASK;\n if(__mask || hasMask) {\n let prev = node.__prev;\n while(prev && (prev.__mask)) {\n prev = prev.__prev;\n }\n if(prev && (prev instanceof Xom || prev instanceof Component && prev.shadowRoot instanceof Xom)) {\n prev.__refreshLevel |= CACHE | MASK;\n prev.__struct.hasMask = prev.__hasMask = __mask;\n if(prev.__cacheMask) {\n hasRelease = prev.__cacheMask.release() || hasRelease;\n }\n }\n }\n // aniParams在动画引擎提前计算好了\n let isRp = aniParams && aniParams.isRepaint || isRepaint(lv);\n if(isRp) {\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT;\n if(need) {\n if(node.__cache) {\n hasRelease = node.__cache.release() || hasRelease;\n }\n node.__calStyle(lv, currentStyle, computedStyle, cacheStyle);\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n // < REPAINT特殊的优化computedStyle计算\n else {\n if(lv & PPT) {\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n if(lv & TRANSFORM_ALL) {\n // 特殊的ppt需清空cacheTotal\n let o = node.__selfPerspectiveMatrix;\n node.__calMatrix(lv, currentStyle, computedStyle, cacheStyle, aniParams && aniParams.optimize);\n let n = node.__selfPerspectiveMatrix;\n if(!util.equalArr(o, n)) {\n need = true;\n }\n }\n if(lv & OP) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n if(lv & FT) {\n node.__calFilter(currentStyle, computedStyle, cacheStyle);\n }\n if(lv & MBM) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n }\n // 影响子继承REPAINT的变化,如果被cache住需要清除\n if(hasVisibility || hasColor || hasTsColor || hasTsWidth || hasTsOver) {\n for(let __structs = this.__structs,\n __struct = node.__struct,\n i = __structs.indexOf(__struct) + 1,\n len = i + (__struct.total || 0); i < len; i++) {\n let {\n node,\n total,\n } = __structs[i];\n // text的style指向parent,不用管\n if(node instanceof Text) {\n continue;\n }\n let currentStyle = node.__currentStyle, cacheStyle = node.__cacheStyle;\n let need;\n if(hasVisibility && currentStyle[VISIBILITY].u === INHERIT) {\n need = true;\n cacheStyle[VISIBILITY] = undefined;\n }\n else if(hasColor && currentStyle[COLOR].u === INHERIT) {\n need = true;\n cacheStyle[COLOR] = undefined;\n }\n else if(hasTsColor && currentStyle[TEXT_STROKE_COLOR].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_COLOR] = undefined;\n }\n else if(hasTsWidth && currentStyle[TEXT_STROKE_WIDTH].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_WIDTH] = undefined;\n }\n else if(hasTsOver && currentStyle[TEXT_STROKE_OVER].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_OVER] = undefined;\n }\n if(need) {\n node.__refreshLevel |= REPAINT;\n node.clearCache();\n node.__calStyle(REPAINT, currentStyle, node.__computedStyle, cacheStyle);\n }\n // 不为inherit此子树可跳过,因为不影响\n else {\n i += total || 0;\n }\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || (lv & PPT)) {\n if(node.__cacheTotal) {\n hasRelease = node.__cacheTotal.release() || hasRelease;\n }\n }\n // mask无论如何都要清除,除非是opacity\n if(node.__hasMask) {\n if(need || (lv ^ OP) || (lv & PPT)) {\n if(node.__cacheMask) {\n hasRelease = node.__cacheMask.release() || hasRelease;\n }\n if(node.__cacheFilter) {\n hasRelease = node.__cacheFilter.release() || hasRelease;\n }\n }\n }\n // 特殊的filter清除cache\n else if((need || (lv & (FT | PPT))) && node.__cacheFilter) {\n hasRelease = node.__cacheFilter.release() || hasRelease;\n }\n // 向上清除cache汇总缓存信息,过程中可能会出现重复,根据refreshLevel判断,reflow已经自己清过了\n if(__domParent !== this.__lastUpdateP) {\n let p = __domParent;\n this.__lastUpdateP = p; // 同层级避免重复进入查找,每次draw()重设\n while(p) {\n if(p.__refreshLevel & (CACHE | REPAINT | REFLOW)) {\n break;\n }\n p.__refreshLevel |= CACHE;\n if(p.__cacheTotal) {\n hasRelease = p.__cacheTotal.release() || hasRelease;\n }\n if(p.__cacheFilter) {\n hasRelease = p.__cacheFilter.release() || hasRelease;\n }\n if(p.__cacheMask) {\n hasRelease = p.__cacheMask.release() || hasRelease;\n }\n p = p.__domParent;\n }\n // 清除parent的zIndexChildren缓存,强制所有孩子重新渲染\n if(hasZ && __domParent) {\n __domParent.__zIndexChildren = null;\n __domParent.__updateStruct();\n if(this.__renderMode === mode.SVG) {\n hasRelease = node.__cacheTotal.release() || hasRelease;\n reflow.clearSvgCache(__domParent);\n }\n }\n }\n }\n else {\n let top = reflow.checkTop(this, node, addDom, removeDom);\n if(top === this) {\n this.__reLayout();\n }\n // 布局影响next的所有节点,重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n else {\n reflow.checkNext(this, top, node, hasZ, addDom, removeDom);\n }\n if(removeDom) {\n let temp = node;\n while(temp.isShadowRoot) {\n temp = temp.__host;\n temp.__destroy();\n }\n node.__destroy();\n }\n }\n node.__refreshLevel |= lv;\n // 有被清除的cache则设置到Root上\n if(hasRelease) {\n lv |= CACHE;\n }\n if(addDom || removeDom) {\n this.__rlv |= REBUILD;\n }\n else {\n this.__rlv |= lv;\n }\n if(cb && !isFunction(cb)) {\n cb = null;\n }\n this.__frameDraw(cb);\n }\n\n // 异步进行root刷新操作,多次调用缓存结果,刷新成功后回调\n __frameDraw(cb) {\n if(!this.__task.length) {\n frame.nextFrame(() => {\n });\n frame.__rootTask.push(() => {\n // 需要先获得累积的刷新回调再刷新,防止refresh触发事件中再次调用刷新\n let list = this.__task.splice(0);\n this.draw(false);\n list.forEach(item => {\n item && item();\n });\n });\n this.__task.push(cb);\n }\n else if(cb) {\n this.__task.push(cb);\n }\n }\n\n __clearCanvas(ctx) {\n // 可能会调整宽高,所以每次清除用最大值\n this.__mw = Math.max(this.__mw, this.width);\n this.__mh = Math.max(this.__mh, this.height);\n // 清除前得恢复默认matrix,防止每次布局改变了属性\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.__mw, this.__mh);\n }\n\n __clearWebgl(ctx) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\n\n get dom() {\n return this.__dom;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get renderMode() {\n return this.__renderMode;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get defs() {\n return this.__defs;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n}\n\nexport default Root;\n","import equation from './equation';\n\n/**\n * 二阶贝塞尔曲线范围框\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @returns {number[]}\n * https://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm\n */\nfunction bboxBezier2(x0, y0, x1, y1, x2, y2) {\n let minX = Math.min(x0, x2);\n let minY = Math.min(y0, y2);\n let maxX = Math.max(x0, x2);\n let maxY = Math.max(y0, y2);\n // 控制点位于边界内部时,边界就是范围框,否则计算导数获取极值\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY) {\n let tx = (x0 - x1) / (x0 - 2 * x1 + x2);\n if(tx < 0) {\n tx = 0;\n }\n else if(tx > 1) {\n tx = 1;\n }\n let ty = (y0 - y1) / (y0 - 2 * y1 + y2);\n if(ty < 0) {\n ty = 0;\n }\n else if(ty > 1) {\n ty = 1;\n }\n let sx = 1 - tx;\n let sy = 1 - ty;\n let qx = sx * sx * x0 + 2 * sx * tx * x1 + tx * tx * x2;\n let qy = sy * sy * y0 + 2 * sy * ty * y1 + ty * ty * y2;\n minX = Math.min(minX, qx);\n minY = Math.min(minY, qy);\n maxX = Math.max(maxX, qx);\n maxY = Math.max(maxY, qy);\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * 同上三阶的\n */\nfunction bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3) {\n let minX = Math.min(x0, x3);\n let minY = Math.min(y0, y3);\n let maxX = Math.max(x0, x3);\n let maxY = Math.max(y0, y3);\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY || x2 < minX || y2 < minY || x2 > maxX || y2 > maxY) {\n let cx = -x0 + x1;\n let cy = -y0 + y1;\n let bx = x0 - 2 * x1 + x2;\n let by = y0 - 2 * y1 + y2;\n let ax = -x0 + 3 * x1 - 3 * x2 + x3;\n let ay = -y0 + 3 * y1 - 3 * y2 + y3;\n let hx = bx * bx - ax * cx;\n let hy = by * by - ay * cy;\n if(hx > 0) {\n hx = Math.sqrt(hx);\n let t = (-bx - hx) / ax;\n // 2次项系数为0注意降级为一元一次方程\n if(ax && t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n t = ax ? ((-bx + hx) / ax) : (-cx * 0.5 / bx);\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n }\n if(hy > 0) {\n hy = Math.sqrt(hy);\n let t = (-by - hy) / ay;\n if(ay && t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n t = ay ? ((-by + hy) / ay) : (-cy * 0.5 / by);\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n }\n }\n return [minX, minY, maxX, maxY];\n}\n\nfunction bboxBezier(x0, y0, x1, y1, x2, y2, x3, y3) {\n let len = arguments.length;\n if(Array.isArray(x0)) {\n let l = x0.length;\n let arr = x0;\n [x0, y0] = arr[0];\n [x1, y1] = arr[1];\n len = 4;\n if(l >= 3) {\n [x2, y2] = arr[2];\n len = 6;\n }\n if(l >= 4) {\n [x3, y3] = arr[3];\n len = 8;\n }\n }\n if(len === 4) {\n let a = Math.min(x0, x1);\n let b = Math.min(y0, y1);\n let c = Math.max(x0, x1);\n let d = Math.max(y0, y1);\n return [a, b, c, d];\n }\n if(len === 6) {\n return bboxBezier2(x0, y0, x1, y1, x2, y2);\n }\n if(len === 8) {\n return bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3);\n }\n}\n\n\n/**\n * 范数 or 模\n */\nfunction norm(v) {\n let order = v.length;\n let sum = v.reduce((a, b) => Math.pow(a, order) + Math.pow(b, order));\n return Math.pow(sum, 1 / order);\n}\n\n// https://zhuanlan.zhihu.com/p/130247362\nfunction simpson38(derivativeFunc, l, r) {\n let f = derivativeFunc;\n let middleL = (2 * l + r) / 3;\n let middleR = (l + 2 * r) / 3;\n return (f(l) + 3 * f(middleL) + 3 * f(middleR) + f(r)) * (r - l) / 8;\n}\n\n/**\n * bezier 曲线的长度\n * @param derivativeFunc 微分函数\n * @param l 左点\n * @param r 右点\n * @param eps 精度\n * @return {*} number\n */\nfunction adaptiveSimpson38(derivativeFunc, l, r, eps = 0.001) {\n let f = derivativeFunc;\n let mid = (l + r) / 2;\n let st = simpson38(f, l, r);\n let sl = simpson38(f, l, mid);\n let sr = simpson38(f, mid, r);\n let ans = sl + sr - st;\n if(Math.abs(ans) <= 15 * eps) {\n return sl + sr + ans / 15;\n }\n return adaptiveSimpson38(f, l, mid, eps / 2) + adaptiveSimpson38(f, mid, r, eps / 2);\n}\n\n/**\n * bezier 曲线的长度\n * @param points 曲线的起止点 和 控制点\n * @param startT 计算长度的起点,满足 0 <= startT <= endT <= 1\n * @param endT 计算长度的终点\n * @return {*} number\n */\nfunction bezierLength(points, startT = 0, endT = 1) {\n if(points.length === 6) {\n points = [\n [points[0], points[1]],\n [points[2], points[3]],\n [points[4], points[5]],\n ];\n }\n else if(points.length === 8) {\n points = [\n [points[0], points[1]],\n [points[2], points[3]],\n [points[4], points[5]],\n [points[6], points[7]],\n ];\n }\n if(points.length === 2) {\n let [x1, y1] = points[0], [x2, y2] = points[1];\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }\n let derivativeFunc = t => norm(at(t, points));\n return adaptiveSimpson38(derivativeFunc, startT, endT);\n}\n\n/**\n * 3 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at3(t, points, order = 1) {\n let [p0, p1, p2, p3] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let [x3, y3] = p3;\n let x = 0;\n let y = 0;\n // 3阶导数就是常数了,大于3阶的都是0\n if(order === 0) {\n x = Math.pow((1 - t), 3) * x0 + 3 * t * Math.pow((1 - t), 2) * x1 + 3 * (1 - t) * Math.pow(t, 2) * x2 + Math.pow(t, 3) * x3;\n y = Math.pow((1 - t), 3) * y0 + 3 * t * Math.pow((1 - t), 2) * y1 + 3 * (1 - t) * Math.pow(t, 2) * y2 + Math.pow(t, 3) * y3;\n }\n else if(order === 1) {\n x = 3 * ((1 - t) * (1 - t) * (x1 - x0) + 2 * (1 - t) * t * (x2 - x1) + t * t * (x3 - x2));\n y = 3 * ((1 - t) * (1 - t) * (y1 - y0) + 2 * (1 - t) * t * (y2 - y1) + t * t * (y3 - y2));\n }\n else if(order === 2) {\n x = 6 * (x2 - 2 * x1 + x0) * (1 - t) + 6 * (x3 - 2 * x2 + x1) * t;\n y = 6 * (y2 - 2 * y1 + y0) * (1 - t) + 6 * (y3 - 2 * y2 + y1) * t;\n }\n else if(order === 3) {\n x = 6 * (x3 - 3 * x2 + 3 * x1 - x0);\n y = 6 * (y3 - 3 * y2 + 3 * y1 - y0);\n }\n return [x, y];\n}\n\n/**\n * 2 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at2(t, points, order = 1) {\n let [p0, p1, p2] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 2) * x0 + 2 * t * (1 - t) * x1 + Math.pow(t, 2) * x2;\n y = Math.pow((1 - t), 2) * y0 + 2 * t * (1 - t) * y1 + Math.pow(t, 2) * y2;\n }\n else if(order === 1) {\n x = 2 * (1 - t) * (x1 - x0) + 2 * t * (x2 - x1);\n y = 2 * (1 - t) * (y1 - y0) + 2 * t * (y2 - y1);\n }\n else if(order === 2) {\n x = 2 * (x2 - 2 * x1 + x0);\n y = 2 * (y2 - 2 * y1 + y0);\n }\n return [x, y];\n}\n\nfunction at(t, points, derivativeOrder = 1) {\n if(points.length === 4) {\n return at3(t, points, derivativeOrder);\n }\n else if(points.length === 3) {\n return at2(t, points, derivativeOrder);\n }\n}\n\nfunction pointAtBezier(points, percent, maxIteration, eps) {\n let length = bezierLength(points, 0, 1);\n return pointAtBezierWithLength(points, length, percent, maxIteration, eps);\n}\n\nfunction pointAtBezierWithLength(points, length, percent = 1, maxIteration = 20, eps = 0.001) {\n let derivativeFunc = t => norm(at(t, points));\n let targetLen = length * percent;\n let approachLen = length;\n let approachT = percent;\n let preApproachT = approachT;\n for(let i = 0; i < maxIteration; i++) {\n approachLen = simpson38(derivativeFunc, 0, approachT);\n let d = approachLen - targetLen;\n if(Math.abs(d) < eps) {\n break;\n }\n // Newton 法\n let derivative1 = norm(at(approachT, points, 1)); // 1 阶导数\n let derivative2 = norm(at(approachT, points, 2)); // 2 阶导数\n let numerator = d * derivative1;\n let denominator = d * derivative2 + derivative1 * derivative1;\n approachT = approachT - numerator / denominator;\n if(Math.abs(approachT - preApproachT) < eps) {\n break;\n }\n else {\n preApproachT = approachT;\n }\n }\n return at(approachT, points, 0);\n}\n\nfunction sliceBezier(points, t) {\n if(!Array.isArray(points) || points.length < 3) {\n return points;\n }\n let x1, y1, x2, y2, x3, y3, x4, y4;\n let pts0 = points[0], pts1 = points[1], pts2 = points[2], pts3 = points[3];\n if(!pts0 || !pts1 || !pts2) {\n return points;\n }\n if(Array.isArray(pts0)) {\n x1 = pts0[0]; y1 = pts0[1];\n }\n else {\n x1 = pts0.x; y1 = pts0.y;\n }\n if(Array.isArray(pts1)) {\n x2 = pts1[0]; y2 = pts1[1];\n }\n else {\n x2 = pts1.x; y2 = pts1.y;\n }\n if(Array.isArray(pts2)) {\n x3 = pts2[0]; y3 = pts2[1];\n }\n else {\n x3 = pts2.x; y3 = pts2.y;\n }\n let x12 = (x2 - x1) * t + x1;\n let y12 = (y2 - y1) * t + y1;\n let x23 = (x3 - x2) * t + x2;\n let y23 = (y3 - y2) * t + y2;\n let x123 = (x23 - x12) * t + x12;\n let y123 = (y23 - y12) * t + y12;\n if(points.length === 4) {\n if(Array.isArray(pts3)) {\n x4 = pts3[0]; y4 = pts3[1];\n }\n else {\n x4 = pts3.x; y4 = pts3.y;\n }\n let x34 = (x4 - x3) * t + x3;\n let y34 = (y4 - y3) * t + y3;\n let x234 = (x34 - x23) * t + x23;\n let y234 = (y34 - y23) * t + y23;\n let x1234 = (x234 - x123) * t + x123;\n let y1234 = (y234 - y123) * t + y123;\n return [[x1, y1], [x12, y12], [x123, y123], [x1234, y1234]];\n }\n else if(points.length === 3) {\n return [[x1, y1], [x12, y12], [x123, y123]];\n }\n}\n\nfunction sliceBezier2Both(points, start = 0, end = 1) {\n if(!Array.isArray(points) || points.length < 3) {\n return;\n }\n start = Math.max(start, 0);\n end = Math.min(end, 1);\n if(start === 0 && end === 1) {\n return points;\n }\n if(end < 1) {\n points = sliceBezier(points, end);\n }\n if(start > 0) {\n if(end < 1) {\n start = start / end;\n }\n points = sliceBezier(points.slice(0).reverse(), (1 - start)).reverse();\n }\n return points;\n}\n\nfunction pointAtByT(points, t = 0) {\n if(points.length === 4) {\n return pointAtByT3(points, t);\n }\n else if(points.length === 3) {\n return pointAtByT2(points, t);\n }\n}\n\nfunction pointAtByT2(points, t) {\n let x = points[0][0] * (1 - t) * (1 - t)\n + 2 * points[1][0] * t * (1 - t)\n + points[2][0] * t * t;\n let y = points[0][1] * (1 - t) * (1 - t)\n + 2 * points[1][1] * t * (1 - t)\n + points[2][1] * t * t;\n return [x, y];\n}\n\nfunction pointAtByT3(points, t) {\n let x = points[0][0] * (1 - t) * (1 - t) * (1 - t)\n + 3 * points[1][0] * t * (1 - t) * (1 - t)\n + 3 * points[2][0] * t * t * (1 - t)\n + points[3][0] * t * t * t;\n let y = points[0][1] * (1 - t) * (1 - t) * (1 - t)\n + 3 * points[1][1] * t * (1 - t) * (1 - t)\n + 3 * points[2][1] * t * t * (1 - t)\n + points[3][1] * t * t * t;\n return [x, y];\n}\n\n// 已知曲线和上面一点获得t\nfunction getPointT(points, x, y) {\n if(points.length === 4) {\n return getPointT3(points, x, y);\n }\n else if(points.length === 3) {\n return getPointT2(points, x, y);\n }\n}\n\nfunction getPointT2(points, x, y) {\n // x/y都需要求,以免其中一个无解,过滤掉[0, 1]之外的\n let tx = equation.getRoots([\n points[0][0] - x,\n 2 * (points[1][0] - points[0][0]),\n points[2][0] + points[0][0] - 2 * points[1][0],\n ]).filter(i => i >= 0 && i <= 1);\n let ty = equation.getRoots([\n points[0][1] - y,\n 2 * (points[1][1] - points[0][1]),\n points[2][1] + points[0][1] - 2 * points[1][1],\n ]).filter(i => i >= 0 && i <= 1);\n // 可能有多个解,x和y要匹配上,这里最多x和y各2个总共4个解\n let t = [];\n for(let i = 0, len = tx.length; i < len; i++) {\n let x = tx[i];\n for(let j = 0, len = ty.length; j < len; j++) {\n let y = ty[j];\n let diff = Math.abs(x - y);\n // 必须小于一定误差\n if(diff < 1e-10) {\n t.push({\n x,\n y,\n diff,\n });\n }\n }\n }\n t.sort(function(a, b) {\n return a.diff - b.diff;\n });\n if(t.length > 2) {\n t.splice(2);\n }\n // 取均数\n t = t.map(item => (item.x + item.y) * 0.5);\n let res = [];\n t.forEach(t => {\n let xt = points[0][0] * Math.pow(1 - t, 2)\n + 2 * points[1][0] * t * (1 - t)\n + points[2][0] * t * t;\n let yt = points[0][1] * Math.pow(1 - t, 2)\n + 2 * points[1][1] * t * (1 - t)\n + points[2][1] * t * t;\n // 计算误差忽略\n if(Math.abs(xt - x) < 1e-10 && Math.abs(yt - y) < 1e-10) {\n res.push(t);\n }\n });\n return res;\n}\n\nfunction getPointT3(points, x, y) {\n let tx = equation.getRoots([\n points[0][0] - x,\n 3 * (points[1][0] - points[0][0]),\n 3 * (points[2][0] + points[0][0] - 2 * points[1][0]),\n points[3][0] - points[0][0] + 3 * points[1][0] - 3 * points[2][0],\n ]).filter(i => i >= 0 && i <= 1);\n let ty = equation.getRoots([\n points[0][1] - y,\n 3 * (points[1][1] - points[0][1]),\n 3 * (points[2][1] + points[0][1] - 2 * points[1][1]),\n points[3][1] - points[0][1] + 3 * points[1][1] - 3 * points[2][1],\n ]).filter(i => i >= 0 && i <= 1);\n // 可能有多个解,x和y要匹配上,这里最多x和y各3个总共9个解\n let t = [];\n for(let i = 0, len = tx.length; i < len; i++) {\n let x = tx[i];\n for(let j = 0, len = ty.length; j < len; j++) {\n let y = ty[j];\n let diff = Math.abs(x - y);\n // 必须小于一定误差\n if(diff < 1e-10) {\n t.push({\n x,\n y,\n diff,\n });\n }\n }\n }\n t.sort(function(a, b) {\n return a.diff - b.diff;\n });\n if(t.length > 3) {\n t.splice(3);\n }\n // 取均数\n t = t.map(item => (item.x + item.y) * 0.5);\n let res = [];\n t.forEach(t => {\n let xt = points[0][0] * Math.pow(1 - t, 3)\n + 3 * points[1][0] * t * Math.pow(1 - t, 2)\n + 3 * points[2][0] * t * t * (1 - t)\n + points[3][0] * Math.pow(t, 3);\n let yt = points[0][1] * Math.pow(1 - t, 3)\n + 3 * points[1][1] * t * Math.pow(1 - t, 2)\n + 3 * points[2][1] * t * t * (1 - t)\n + points[3][1] * Math.pow(t, 3);\n // 计算误差忽略\n if(Math.abs(xt - x) < 1e-10 && Math.abs(yt - y) < 1e-10) {\n res.push(t);\n }\n });\n return res;\n}\n\nfunction bezierSlope(points, t) {\n if(points.length === 2) {\n let [x1, y1] = points[0];\n let [x2, y2] = points[1];\n if(x1 === x2) {\n return Infinity;\n }\n return (y2 - y1) / (x2 - x1);\n }\n if(points.length === 3) {\n return bezier2Slope(points, t);\n }\n if(points.length === 4) {\n return bezier3Slope(points, t);\n }\n}\n\nfunction bezier2Slope(points, t) {\n let [\n [x0, y0],\n [x1, y1],\n [x2, y2],\n ] = points;\n let x = 2 * (x0 - 2 * x1 + x2) * t + 2 * x1 - 2 * x0;\n if(x === 0) {\n return Infinity;\n }\n return (2 * (y0 - 2 * y1 + y2) * t + 2 * y1 - 2 * y0) / x;\n}\n\nfunction bezier3Slope(points, t) {\n let [\n [x0, y0],\n [x1, y1],\n [x2, y2],\n [x3, y3],\n ] = points;\n let x = 3 * (-x0 + 3 * x1 - 3 * x2 + x3) * t * t\n + 2 * (3 * x0 - 6 * x1 + 3 * x2) * t\n + 3 * x1 - 3 * x0;\n if(x === 0) {\n return Infinity;\n }\n return (3 * (-y0 + 3 * y1 - 3 * y2 + y3) * t * t\n + 2 * (3 * y0 - 6 * y1 + 3 * y2) * t\n + 3 * y1 - 3 * y0) / x;\n}\n\nexport default {\n bboxBezier,\n bezierLength,\n pointAtBezier,\n pointAtBezierWithLength,\n sliceBezier,\n sliceBezier2Both,\n pointAtByT,\n getPointT,\n bezierSlope,\n};\n","import Geom from './Geom';\nimport mode from '../../refresh/mode';\nimport painter from '../../util/painter';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport bezier from '../../math/bezier';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction reBuild(target, origin, base, isMulti) {\n if(isMulti) {\n return target.map(item => origin + item * base);\n }\n else {\n return origin + target * base;\n }\n}\n\nfunction reBuildC(target, originX, originY, width, height, isMulti) {\n if(isMulti) {\n if(target) {\n return target.map(item => reBuildC(item, originX, originY, width, height));\n }\n }\n else {\n if(target && target.length >= 2) {\n return [\n originX + target[0] * width,\n originY + target[1] * height,\n ];\n }\n }\n return [];\n}\n\nfunction curveNum(controlA, controlB) {\n let num = 0;\n if(controlA && controlA.length >= 2) {\n num++;\n }\n if(controlB && controlB.length >= 2) {\n num += 2;\n }\n return num;\n}\n\nfunction getNewPoint(xa, ya, xb, yb, controlA, controlB, num, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return [xa, ya, xb, yb, controlA, controlB];\n }\n if(start === end) {\n return [];\n }\n if(start > end) {\n [start, end] = [end, start];\n }\n start = Math.max(0, start);\n end = Math.min(1, end);\n if(num === 3) {\n [[xa, ya], controlA, controlB, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlA, controlB, [xb, yb]], start, end);\n }\n else if(num === 2) {\n [[xa, ya], controlB, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlB, [xb, yb]], start, end);\n }\n else if(num === 1) {\n [[xa, ya], controlA, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlA, [xb, yb]], start, end);\n }\n else {\n let a = xb - xa;\n let b = yb - ya;\n xa += a * start;\n ya += b * start;\n xb += a * (1 - end);\n yb += b * (1 - end);\n }\n return [xa, ya, xb, yb, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // xa,ya和xb,yb表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__xa = [0];\n this.__ya = [0];\n this.__xb = [1];\n this.__yb = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.xa)) {\n this.__xa = props.xa.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.xa)) {\n this.__xa = [parseFloat(props.xa) || 0];\n }\n if(Array.isArray(props.ya)) {\n this.__ya = props.ya.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.ya)) {\n this.__ya = [parseFloat(props.ya) || 0];\n }\n if(Array.isArray(props.xb)) {\n this.__xb = props.xb.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.xb)) {\n this.__xb = [parseFloat(props.xb) || 0];\n }\n if(Array.isArray(props.yb)) {\n this.__yb = props.yb.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.yb)) {\n this.__yb = [parseFloat(props.yb) || 0];\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => parseFloat(i) || 0);\n for(let i = this.__start.length; i < this.__xa.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = parseFloat(props.start) || 0;\n this.__start = this.__xa.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n });\n for(let i = this.__end.length; i < this.__xa.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = this.__xa.map(() => v);\n }\n }\n else {\n this.__xa = this.__ya = this.__start = 0;\n this.__xb = this.__yb = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.xa)) {\n this.__xa = parseFloat(props.xa) || 0;\n }\n if(!isNil(props.ya)) {\n this.__ya = parseFloat(props.ya) || 0;\n }\n if(!isNil(props.xb)) {\n this.__xb = parseFloat(props.xb) || 0;\n }\n if(!isNil(props.yb)) {\n this.__yb = parseFloat(props.yb) || 0;\n }\n if(!isNil(props.start)) {\n this.__start = parseFloat(props.start) || 0;\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = v;\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA;\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB;\n }\n }\n }\n\n __buildCache(originX, originY, focus) {\n let { width, height, __cacheProps, isMulti } = this;\n let rebuild;\n ['xa', 'xb'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['ya', 'yb'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originY, height, isMulti);\n }\n });\n ['controlA', 'controlB'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuildC(this[k], originX, originY, width, height, isMulti);\n }\n });\n ['start', 'end'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = this[k];\n }\n });\n return rebuild;\n }\n\n render(renderMode, ctx, dx2, dy2) {\n let res = super.render(renderMode, ctx, dx2, dy2);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n let {\n x3,\n y3,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps, isMulti } = this;\n let rebuild = this.__buildCache(x3, y3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.xa.forEach((xa, i) => {\n let xb = __cacheProps.xb[i];\n let ya = __cacheProps.ya[i];\n let yb = __cacheProps.yb[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n d += painter.svgLine(xa, ya, xb, yb, ca, cb, curve);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { xa, ya, xb, yb, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, yb, controlA, controlB] = getNewPoint(xa, ya, xb, yb, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(xa, ya, xb, yb, controlA, controlB, curve);\n }\n __cacheProps.d = d;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(strokeWidth > 0 && stroke !== 'none') {\n this.__preSetCanvas(renderMode, ctx, {\n stroke,\n strokeWidth,\n strokeDasharray: strokeDasharrays[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n });\n if(isStrokeRE) {\n ctx.strokeStyle = stroke.v[0];\n }\n ctx.beginPath();\n if(isMulti) {\n __cacheProps.xa.forEach((xa, i) => {\n let xb = __cacheProps.xb[i];\n let ya = __cacheProps.ya[i];\n let yb = __cacheProps.yb[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, ca, cb, curve, dx, dy);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { xa, ya, xb, yb, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, yb, controlA, controlB] = getNewPoint(xa, ya, xb, yb, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, controlA, controlB, curve, dx, dy);\n }\n ctx.stroke();\n ctx.closePath();\n }\n });\n }\n else if(renderMode === mode.SVG) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n let props = [\n ['d', __cacheProps.d],\n ['fill', 'none'],\n ['stroke', isStrokeRE ? stroke.v[0] : (stroke.v || stroke)],\n ['stroke-width', strokeWidth]\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStrs[i], strokeLinecaps[i], strokeLinejoins[i], strokeMiterlimits[i]);\n this.addGeom('path', props);\n });\n }\n return res;\n }\n\n get xa() {\n return this.getProps('xa');\n }\n\n get ya() {\n return this.getProps('ya');\n }\n\n get xb() {\n return this.getProps('xb');\n }\n\n get yb() {\n return this.getProps('yb');\n }\n\n get controlA() {\n return this.getProps('controlA');\n }\n\n get controlB() {\n return this.getProps('controlB');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.__buildCache(originX, originY);\n let { xa, ya, xb, yb, controlA, controlB } = __cacheProps;\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n if(!isMulti) {\n xa = [xa];\n xb = [xb];\n ya = [ya];\n yb = [yb];\n controlA = [controlA];\n controlB = [controlB];\n }\n xa.forEach((xa, i) => {\n let y1 = ya[i];\n let x2 = xb[i];\n let y2 = yb[i];\n let ca = controlA[i];\n let cb = controlB[i];\n if((isNil(ca) || ca.length < 2) && (isNil(cb) || cb.length < 2)) {\n bbox[0] = Math.min(bbox[0], xa - half);\n bbox[0] = Math.min(bbox[0], x2 - half);\n bbox[1] = Math.min(bbox[1], y1 - half);\n bbox[1] = Math.min(bbox[1], y2 - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[2] = Math.max(bbox[2], x2 + half);\n bbox[3] = Math.max(bbox[3], y1 + half);\n bbox[3] = Math.max(bbox[3], y2 + half);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, y1, cb[0], cb[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else if(isNil(cb) || cb.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, y1, ca[0], ca[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else {\n let bezierBox = bezier.bboxBezier(xa, y1, ca[0], ca[1], cb[0], cb[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n });\n return bbox;\n }\n}\n\nexport default Line;\n","class Point {\n constructor(x, y) {\n if(Array.isArray(x)) {\n [x, y] = x;\n }\n this.x = x;\n this.y = y;\n }\n\n toString() {\n // return this.x.toFixed(1).replace('.0', '') + ',' + this.y.toFixed(1).replace('.0', '');\n return this.x + ',' + this.y;\n }\n\n equal(o) {\n return this === o || this.x === o.x && this.y === o.y;\n }\n\n // 排序,要求a在b左即x更小,x相等a在b下,符合返回false,不符合则true\n static compare(a, b) {\n if(a.x > b.x) {\n return true;\n }\n return a.x === b.x && a.y > b.y;\n }\n}\n\nexport default Point;\n","import bezier from '../bezier';\n\nclass Segment {\n constructor(coords, belong) {\n this.coords = coords;\n this.belong = belong; // 属于source多边形还是clip多边形,0和1区别\n this.calBbox();\n this.myFill = [false, false]; // 自己的上下内外性\n this.otherFill = [false, false]; // 对方的上下内外性\n this.myCoincide = 0; // 自己重合次数\n this.otherCoincide = 0; // 对方重合次数\n this.isVisited = false; // 扫描求交时用到\n this.isDeleted = false; // 相交裁剪老的线段会被删除\n }\n\n calBbox() {\n let coords = this.coords, l = coords.length;\n if(l === 2) {\n let a = coords[0], b = coords[1];\n let x1 = Math.min(a.x, b.x);\n let y1 = Math.min(a.y, b.y);\n let x2 = Math.max(a.x, b.x);\n let y2 = Math.max(a.y, b.y);\n this.bbox = [x1, y1, x2, y2];\n }\n else {\n let arr = coords.map(item => [item.x, item.y]);\n this.bbox = bezier.bboxBezier(arr);\n }\n }\n\n // 线段边逆序\n reverse() {\n this.coords.reverse();\n }\n\n equal(o) {\n let ca = this.coords, cb = o.coords;\n if(ca.length !== cb.length) {\n return false;\n }\n for(let i = 0, len = ca.length; i < len; i++) {\n if(!ca[i].equal(cb[i])) {\n return false;\n }\n }\n return true;\n }\n\n toHash() {\n return this.coords.map(item => item.toString()).join(' ');\n }\n\n toString() {\n return this.toHash()\n + ' ' + this.belong\n + ' ' + this.myCoincide\n + '' + this.otherCoincide\n + ' ' + this.myFill.map(i => i ? 1 : 0).join('')\n + this.otherFill.map(i => i ? 1 : 0).join('');\n }\n}\n\nexport default Segment;\n","import Point from './Point';\nimport isec from '../isec';\nimport bezier from '../bezier';\n\nconst EPS = 1e-9;\nconst EPS2 = 1 - (1e-9);\n\nfunction getIntersectionLineLine(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2, d) {\n let toSource = (\n (bx2 - bx1) * (ay1 - by1) - (by2 - by1) * (ax1 - bx1)\n ) / d;\n let toClip = (\n (ax2 - ax1) * (ay1 - by1) - (ay2 - ay1) * (ax1 - bx1)\n ) / d;\n // 非顶点相交才是真相交\n if(toSource > EPS && toSource < EPS2 && toClip > EPS && toClip < EPS2) {\n let ox = ax1 + toSource * (ax2 - ax1);\n let oy = ay1 + toSource * (ay2 - ay1);\n return [{\n point: new Point(ox, oy),\n toSource,\n toClip,\n }];\n }\n}\n\nfunction getIntersectionBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2) {\n let res = isec.intersectBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2);\n if(res.length) {\n res = res.map(item => {\n let toClip;\n // toClip是直线上的距离,可以简化为只看x或y,选择差值比较大的防止精度问题\n if(Math.abs(bx2 - bx1) >= Math.abs(by2 - by1)) {\n toClip = Math.abs((item.x - bx1) / (bx2 - bx1));\n }\n else {\n toClip = Math.abs((item.y - by1) / (by2 - by1));\n }\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([[bx1, by1], [bx2, by2]]);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3) {\n let res = isec.intersectBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n\n let res = isec.intersectBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip: toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2) {\n let res = isec.intersectBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2);\n if(res.length) {\n res = res.map(item => {\n // toClip是直线上的距离,可以简化为只看x或y,选择差值比较大的防止精度问题\n let toClip;\n if(Math.abs(bx2 - bx1) >= Math.abs(by2 - by1)) {\n toClip = Math.abs((item.x - bx1) / (bx2 - bx1));\n }\n else {\n toClip = Math.abs((item.y - by1) / (by2 - by1));\n }\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n [ax4, ay4],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n ]);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let res = isec.intersectBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n [ax4, ay4],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip: toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\n// 两条线可能多个交点,将交点按原本线段的方向顺序排序\nfunction sortIntersection(res, isSource) {\n return res.sort(function(a, b) {\n if(isSource) {\n return a.toSource - b.toSource;\n }\n return a.toClip - b.toClip;\n }).map(item => {\n return {\n point: item.point,\n t: isSource ? item.toSource : item.toClip,\n };\n }).filter(item => item.t > EPS && item.t < EPS2);\n}\n\nexport default {\n getIntersectionLineLine,\n getIntersectionBezier2Line,\n getIntersectionBezier2Bezier2,\n getIntersectionBezier2Bezier3,\n getIntersectionBezier3Line,\n getIntersectionBezier3Bezier3,\n sortIntersection,\n};\n","import geom from '../geom';\nimport vector from '../vector';\nimport bezier from '../bezier';\nimport equation from '../equation';\nimport Point from './Point';\nimport Segment from './Segment';\nimport intersect from './intersect';\n\nconst {\n getIntersectionLineLine,\n getIntersectionBezier2Line,\n getIntersectionBezier2Bezier2,\n getIntersectionBezier2Bezier3,\n getIntersectionBezier3Line,\n getIntersectionBezier3Bezier3,\n sortIntersection,\n} = intersect;\n\nclass Polygon {\n constructor(regions, index) {\n this.index = index; // 属于source多边形还是clip多边形,0和1区别\n let segments = [];\n // 多边形有>=1个区域,一般是1个\n if(!Array.isArray(regions)) {\n return;\n }\n regions.forEach(vertices => {\n // 每个区域有>=2条线段,组成封闭区域,1条肯定不行,2条必须是曲线\n if(!Array.isArray(vertices) || vertices.length < 2) {\n return;\n }\n if(vertices.length === 2 && vertices[1].length <= 2) {\n return;\n }\n let startPoint = new Point(vertices[0]), firstPoint = startPoint;\n // 根据多边形有向边,生成线段,不保持原有向,统一左下作为线段起点,如果翻转则记录个值标明\n for(let i = 1, len = vertices.length; i < len; i++) {\n let curr = vertices[i], l = curr.length;\n // 闭合区域,首尾顶点重复统一\n let endPoint = new Point(curr[l - 2], curr[l - 1]);\n let seg;\n if(l === 2) {\n // 长度为0的直线忽略\n if(startPoint.equal(endPoint)) {\n continue;\n }\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n startPoint,\n ] : [\n startPoint,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n // 曲线需确保x单调性,如果非单调,则切割为单调的多条\n else if(l === 4) {\n // 长度为0的曲线忽略\n if(startPoint.equal(endPoint) && startPoint.x === curr[0] && startPoint.y === curr[1]) {\n continue;\n }\n let cPoint = new Point(curr[0], curr[1]);\n let t = getBezierMonotonicity([startPoint, cPoint, endPoint], true);\n if(t) {\n let points = [\n [startPoint.x, startPoint.y],\n [curr[0], curr[1]],\n [endPoint.x, endPoint.y],\n ];\n let curve1 = bezier.sliceBezier(points, t[0]);\n let curve2 = bezier.sliceBezier2Both(points, t[0], 1);\n let p1 = new Point(curve1[1]), p2 = new Point(curve1[2]), p3 = new Point(curve2[1]);\n let coords = Point.compare(startPoint, p2) ? [\n p2,\n p1,\n startPoint,\n ] : [\n startPoint,\n p1,\n p2,\n ];\n segments.push(new Segment(coords, index));\n coords = Point.compare(p2, endPoint) ? [\n endPoint,\n p3,\n p2,\n ] : [\n p2,\n p3,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n else {\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n cPoint,\n startPoint,\n ] : [\n startPoint,\n cPoint,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n }\n // 3阶可能有2个单调改变t点\n else if(l === 6) {\n // 降级为2阶曲线\n if(curr[0] === curr[2] && curr[1] === curr[3]) {\n curr.splice(2, 2);\n i--;\n continue;\n }\n // 长度为0的曲线忽略\n if(startPoint.equal(endPoint)\n && startPoint.x === curr[0] && startPoint.y === curr[1]\n && startPoint.x === curr[2] && startPoint.y === curr[3]) {\n continue;\n }\n let cPoint1 = new Point(curr[0], curr[1]), cPoint2 = new Point(curr[2], curr[3]);\n let t = getBezierMonotonicity([startPoint, cPoint1, cPoint2, endPoint], true);\n if(t) {\n let points = [\n [startPoint.x, startPoint.y],\n [curr[0], curr[1]],\n [curr[2], curr[3]],\n [endPoint.x, endPoint.y],\n ];\n let lastPoint = startPoint, lastT = 0;\n t.forEach(t => {\n let curve = bezier.sliceBezier2Both(points, lastT, t);\n let p1 = new Point(curve[1]), p2 = new Point(curve[2]), p3 = new Point(curve[3]);\n let coords = Point.compare(lastPoint, p3) ? [\n p3,\n p2,\n p1,\n lastPoint,\n ] : [\n lastPoint,\n p1,\n p2,\n p3,\n ];\n segments.push(new Segment(coords, index));\n lastT = t;\n lastPoint = p3;\n });\n let curve = bezier.sliceBezier2Both(points, lastT, 1);\n let p1 = new Point(curve[1]), p2 = new Point(curve[2]);\n let coords = Point.compare(lastPoint, endPoint) ? [\n endPoint,\n p2,\n p1,\n lastPoint,\n ] : [\n lastPoint,\n p1,\n p2,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n else {\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n cPoint2,\n cPoint1,\n startPoint,\n ] : [\n startPoint,\n cPoint1,\n cPoint2,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n }\n segments.push(seg);\n // 终点是下条边的起点\n startPoint = endPoint;\n }\n // 强制要求闭合,非闭合自动连直线到开始点闭合\n if(!startPoint.equal(firstPoint)) {\n let coords = Point.compare(startPoint, firstPoint) ? [\n firstPoint,\n startPoint,\n ] : [\n startPoint,\n firstPoint,\n ];\n segments.push(new Segment(coords, index));\n }\n });\n this.segments = segments;\n }\n\n // 根据y坐标排序,生成有序线段列表,再扫描求交\n selfIntersect() {\n let list = genHashXList(this.segments);\n this.segments = findIntersection(list, false, false, false);\n }\n\n toString() {\n return this.segments.map(item => item.toString());\n }\n\n reset(index) {\n this.index = index;\n this.segments.forEach(seg => {\n seg.belong = index;\n seg.otherCoincide = 0;\n seg.otherFill[0] = seg.otherFill[1] = false;\n });\n return this;\n }\n\n // 2个非自交的多边形互相判断相交,依旧是扫描线算法,2个多边形统一y排序,但要分别出属于哪个多边形,因为只和对方测试相交\n static intersect2(polyA, polyB, isIntermediateA, isIntermediateB) {\n if(!polyA.segments.length || !polyB.segments.length) {\n return;\n }\n\n let list = genHashXList(polyA.segments.concat(polyB.segments));\n let segments = findIntersection(list, true, isIntermediateA, isIntermediateB);\n polyA.segments = segments.filter(item => item.belong === 0);\n polyB.segments = segments.filter(item => item.belong === 1);\n }\n\n /**\n * 以Bentley-Ottmann算法为原理,为每个顶点设计事件,按x升序、y升序遍历所有顶点的事件\n * 每条线段边有2个顶点即2个事件,左下为start,右上为end\n * 同顶点优先end,start相同则对比线段谁后面的y更小(向量法),其实就是对比非共点部分的y大小\n * 维护一个活跃边列表ael,同样保证x升序、y升序,start事件线段进入ael,end离开\n * ael中相邻的线段说明上下相互接壤,接壤一侧则内外填充性一致\n * 最下面的边(含第一条)可直接得知下方填充性(下面没有了一定是多边形外部),再推测出上方\n * 其余的边根据自己下方相邻即可确定填充性\n */\n static annotate2(polyA, polyB, isIntermediateA, isIntermediateB) {\n let list = genHashXYList(polyA.segments.concat(polyB.segments));\n let aelA = [], aelB = [], hashA = {}, hashB = {};\n // 算法3遍循环,先注释a多边形的边自己内外性,再b的边自己内外性,最后一起注释对方的内外性\n // 因数据结构合在一起,所以2遍循环可以完成,先注释a和b的自己,再一遍对方\n list.forEach(item => {\n let { isStart, seg } = item;\n let belong = seg.belong;\n // 连续操作时,已有的中间结果可以跳过\n if(belong === 0 && isIntermediateA || belong === 1 && isIntermediateB) {\n return;\n }\n let ael = belong === 0 ? aelA : aelB, hash = belong === 0 ? hashA : hashB;\n if(isStart) {\n // 自己重合的线段只考虑第一条,其它剔除\n if(seg.myCoincide) {\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n // console.error(seg.toString(), ael.length)\n // 下面没有线段了,底部边,上方填充下方空白(除非是偶次重复段,上下都空白,奇次和单线相同)\n if(!ael.length) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.push(seg);\n }\n else {\n // 插入到ael正确的位置,按照x升序、y升序\n let len = ael.length, top = ael[len - 1];\n let isAboveLast = segAboveCompare(seg, top);\n // 比ael栈顶还高在最上方\n if(isAboveLast) {\n seg.myFill[1] = top.myFill[0];\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0 ? !seg.myFill[1] : seg.myFill[1];\n }\n else {\n seg.myFill[0] = !seg.myFill[1];\n }\n ael.push(seg);\n }\n // 不高且只有1个则在最下方\n else if(len === 1) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.unshift(seg);\n }\n else {\n // 遍历,尝试对比是否在ael栈中相邻2条线段之间\n for(let i = len - 2; i >= 0; i--) {\n let curr = ael[i];\n let isAbove = segAboveCompare(seg, curr);\n if(isAbove) {\n seg.myFill[1] = curr.myFill[0];\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0 ? !seg.myFill[1] : seg.myFill[1];\n }\n else {\n seg.myFill[0] = !seg.myFill[1];\n }\n ael.splice(i + 1, 0, seg);\n break;\n }\n else if(i === 0) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.unshift(seg);\n }\n }\n }\n }\n // console.warn(seg.toString())\n }\n else {\n let i = ael.indexOf(seg);\n // 一般肯定有,重合线段会剔除不进ael\n if(i > -1) {\n ael.splice(i, 1);\n }\n }\n });\n // 注释对方,除了重合线直接使用双方各自的注释拼接,普通线两边的对方内外性相同,根据是否在里面inside确定结果\n // inside依旧看自己下方的线段上方情况,不同的是要看下方的线和自己belong是否相同,再确定取下方above的值\n let ael = [], hash = {};\n list.forEach(item => {\n let { isStart, seg } = item;\n let belong = seg.belong;\n if(isStart) {\n // 自重合或者它重合统一只保留第一条线\n if(seg.myCoincide || seg.otherCoincide) {\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n // console.error(seg.toString(), ael.length)\n let inside = false;\n if(!ael.length) {\n inside = false;\n ael.push(seg);\n }\n else {\n let len = ael.length, top = ael[len - 1];\n let isAboveLast = segAboveCompare(seg, top);\n if(isAboveLast) {\n if(top.belong === belong) {\n inside = top.otherFill[0];\n }\n else {\n inside = top.myFill[0];\n }\n ael.push(seg);\n }\n else if(len === 1) {\n // inside = false;\n ael.unshift(seg);\n }\n else {\n for(let i = len - 2; i >= 0; i--) {\n let curr = ael[i];\n let isAbove = segAboveCompare(seg, curr);\n if(isAbove) {\n // 如果在自己的下方线和自己同色,则取下方线的另外色上填充\n if(curr.belong === belong) {\n inside = curr.otherFill[0];\n }\n // 否则取下方线的下方色上填充\n else {\n inside = curr.myFill[0];\n }\n ael.splice(i + 1, 0, seg);\n break;\n }\n else if(i === 0) {\n // inside = false;\n ael.unshift(seg);\n }\n }\n }\n }\n // 重合线的otherFill直接引用指向对方myFill,不能普通计算\n if(!seg.otherCoincide) {\n seg.otherFill[0] = inside;\n seg.otherFill[1] = inside;\n }\n // console.warn(seg.toString(), inside)\n }\n else {\n let i = ael.indexOf(seg);\n if(i > -1) {\n ael.splice(i, 1);\n }\n }\n });\n }\n}\n\nfunction findIntersection(list, compareBelong, isIntermediateA, isIntermediateB) {\n // 从左到右扫描,按x坐标排序,相等按y,边会进入和离开扫描线各1次,在扫描线中的边为活跃边,维护1个活跃边列表,新添加的和老的求交\n let ael = [], delList = [], segments = [];\n while(list.length) {\n if(delList.length) {\n delList.splice(0).forEach(seg => {\n let i = ael.indexOf(seg);\n ael.splice(i, 1);\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n });\n }\n\n let { x, arr } = list[0];\n while(arr.length) {\n let seg = arr.shift();\n // 被切割的老线段无效\n if(seg.isDeleted) {\n continue;\n }\n let belong = seg.belong, bboxA = seg.bbox;\n // 第2次访问边是离开活动,考虑删除\n if(seg.isVisited) {\n // console.warn(x, seg.toString());\n // console.log(ael.map(item => item.toString()));\n // 可能是垂线不能立刻删除,所以等到下次活动x再删除,因为会出现极端情况刚进来就出去,和后面同y的重合\n if(bboxA[0] !== bboxA[2] || seg.coords.length !== 2) {\n let i = ael.indexOf(seg);\n ael.splice(i, 1);\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n }\n else {\n delList.push(seg);\n }\n seg.isVisited = false; // 还原以备后面逻辑重复利用\n // console.log(ael.map(item => item.toString()));\n }\n // 第1次访问边一定是进入活动,求交\n else {\n // console.error(x, seg.toString(), ael.length);\n // console.log(ael.map(item => item.toString()));\n // 和asl里的边求交,如果被分割,新生成的存入asl和hash,老的线段无需再进入asl\n if(ael.length) {\n let coordsA = seg.coords, lenA = coordsA.length;\n let { x: ax1, y: ay1 } = coordsA[0];\n let { x: ax2, y: ay2 } = coordsA[1];\n for(let i = 0; i < ael.length; i++) {\n let item = ael[i];\n // 被切割的老线段无效,注意seg切割过程中可能变成删除\n if(item.isDeleted || seg.isDeleted) {\n continue;\n }\n // 互交所属belong不同才进行检测,自交则不检查belong\n if(compareBelong && item.belong === belong) {\n continue;\n }\n // bbox相交才考虑真正计算,加速\n let bboxB = item.bbox, coordsB = item.coords, lenB = coordsB.length;\n let isSourceReverted = false; // 求交可能a、b线主从互换\n if(isRectsOverlap(bboxA, bboxB, lenA, lenB)) {\n // 完全重合简化,同矩形的线myFill共享,对方矩形互换otherFill\n if(lenA === lenB && seg.equal(item)) {\n if(compareBelong) {\n // 因为一定不自交,所以重合线不会被分割\n seg.otherCoincide++;\n item.otherCoincide++;\n seg.otherFill = item.myFill;\n item.otherFill = seg.myFill;\n }\n else {\n seg.myCoincide++;\n item.myCoincide++;\n seg.myFill = item.myFill;\n }\n continue;\n }\n let { x: bx1, y: by1 } = coordsB[0];\n let { x: bx2, y: by2 } = coordsB[1];\n let inters, overs;\n // a是直线\n if(lenA === 2) {\n // b是直线\n if(lenB === 2) {\n let d = (by2 - by1) * (ax2 - ax1) - (bx2 - bx1) * (ay2 - ay1);\n // 平行检查是否重合,否则求交\n if(d === 0) {\n // 垂线特殊,y=kx+b没法求\n if(ax1 === ax2) {\n if(ax1 === bx1 && ax2 === bx2) {\n overs = checkOverlapLine(ax1, ay1, ax2, ay2, seg,\n bx1, by1, bx2, by2, item, true);\n }\n }\n else {\n let b1 = (ay2 - ay1) * ax1 / (ax2 - ax1) + ay1;\n let b2 = (by2 - by1) * bx1 / (bx2 - bx1) + by1;\n if(b1 === b2) {\n overs = checkOverlapLine(ax1, ay1, ax2, ay2, seg,\n bx1, by1, bx2, by2, item, false);\n }\n }\n }\n else {\n inters = getIntersectionLineLine(ax1, ay1, ax2, ay2,\n bx1, by1, bx2, by2, d);\n }\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Line(bx1, by1, bx2, by2, bx3, by3,\n ax1, ay1, ax2, ay2);\n isSourceReverted = true;\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier3Line(bx1, by1, bx2, by2, bx3, by3, bx4, by4,\n ax1, ay1, ax2, ay2);\n isSourceReverted = true;\n }\n }\n }\n // a是曲线\n else {\n let { x: ax3, y: ay3 } = coordsA[2];\n // a是2阶曲线\n if(lenA === 3) {\n // b是直线\n if(lenB === 2) {\n inters = getIntersectionBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2);\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3);\n if(!inters) {\n overs = checkOverlapBezier(seg, item);\n }\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n }\n }\n }\n // a是3阶曲线\n else {\n let { x: ax4, y: ay4 } = coordsA[3];\n // b是直线\n if(lenB === 2) {\n inters = getIntersectionBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2);\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Bezier3(bx1, by1, bx2, by2, bx3, by3,\n ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4);\n isSourceReverted = true;\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(!inters) {\n overs = checkOverlapBezier(seg, item);\n }\n }\n }\n }\n }\n // 有重合的,重合线段已经求好,直接使用\n if(overs) {\n activeNewSeg(segments, list, ael, x, overs.ra);\n activeNewSeg(segments, list, ael, x, overs.rb);\n seg.isDeleted = item.isDeleted = true;\n ael.splice(i, 1);\n break;\n }\n // 有交点,确保原先线段方向顺序(x升序、y升序),各自依次切割,x右侧新线段也要存入list\n else if(inters && inters.length) {\n // console.log('inters', i, inters);\n let pa = sortIntersection(inters, !isSourceReverted);\n // console.log(pa);\n let ra = sliceSegment(seg, pa, isIntermediateA && belong === 0);\n // console.log(ra.map(item => item.toString()));\n let pb = sortIntersection(inters, isSourceReverted);\n // console.log(pb);\n let rb = sliceSegment(item, pb, isIntermediateB && belong === 1);\n // console.log(rb.map(item => item.toString()));\n // 新切割的线段继续按照坐标存入列表以及ael,为后续求交\n activeNewSeg(segments, list, ael, x, ra);\n activeNewSeg(segments, list, ael, x, rb);\n // 老的线段被删除无效了,踢出ael,防止seg没被分割\n if(rb.length) {\n ael.splice(i, 1);\n }\n break;\n }\n }\n }\n }\n // 不相交切割才进入ael\n if(!seg.isDeleted) {\n ael.push(seg);\n seg.isVisited = true;\n }\n // console.log(ael.map(item => item.toString()));\n }\n }\n list.shift();\n }\n // 最后面的线\n delList.forEach(seg => {\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n });\n // 最后再过滤一遍,因为新生成的切割线可能会被再次切割变成删除的无效线段\n return segments.filter(item => !item.isDeleted);\n}\n\n// 给定交点列表分割线段,ps需排好顺序从头到尾,isSelf标明是否自相交阶段,false是和对方交点切割\nfunction sliceSegment(seg, ps, isIntermediate) {\n let res = [];\n if(!ps.length) {\n return res;\n }\n let belong = seg.belong, coords = seg.coords, len = coords.length;\n let startPoint = coords[0];\n let lastT = 0;\n // 多个点可能截取多条,最后一条保留只修改数据,其它新生成\n ps.forEach(item => {\n let point = item.point, t = item.t;\n let ns;\n if(len === 2) {\n ns = new Segment([\n startPoint,\n point,\n ], belong);\n }\n else if(len === 3) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, t);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n point,\n ], belong);\n }\n else if(len === 4) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, t);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n new Point(c[2][0], c[2][1]),\n point,\n ], belong);\n }\n // 连续操作的中间结果已有自己内外性,截取时需继承\n if(isIntermediate) {\n ns.myFill[0] = seg.myFill[0];\n ns.myFill[1] = seg.myFill[1];\n }\n startPoint = point;\n res.push(ns);\n lastT = t;\n });\n // 最后一条\n let ns;\n if(len === 2) {\n ns = new Segment([\n startPoint,\n coords[1],\n ], belong);\n }\n else if(len === 3) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, 1);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n coords[2],\n ], belong);\n }\n else if(len === 4) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, 1);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n new Point(c[2][0], c[2][1]),\n coords[3],\n ], belong);\n }\n if(isIntermediate) {\n ns.myFill[0] = seg.myFill[0];\n ns.myFill[1] = seg.myFill[1];\n }\n res.push(ns);\n // 老的打标失效删除\n seg.isDeleted = true;\n return res;\n}\n\n// 相交的线段slice成多条后,老的删除,新的考虑添加进扫描列表和活动边列表,根据新的是否在范围内\nfunction activeNewSeg(segments, list, ael, x, ns) {\n ns.forEach(seg => {\n let bbox = seg.bbox, x1 = bbox[0], x2 = bbox[2];\n // console.log(seg.toString(), x1, x2, x);\n // 活跃x之前无相交判断意义,除了竖线,出现活跃前只可能一方为竖线截断另一方的左边部分\n if(x2 <= x && x1 !== x2 && seg.coords.length !== 2) {\n segments.push(seg);\n return;\n }\n // 按顺序放在list的正确位置,可能x1已经过去不需要加入了,但要考虑ael\n let i = 0;\n if(x1 < x) {\n seg.isVisited = true;\n ael.push(seg);\n }\n else {\n for(let len = list.length; i < len; i++) {\n let item = list[i];\n let lx = item.x;\n if(x1 === lx) {\n item.arr.push(seg);\n break;\n }\n // 新的插入\n if(x1 < lx) {\n let temp = {\n x: x1,\n arr: [seg],\n };\n list.splice(i, 0, temp);\n break;\n }\n }\n }\n // x2一定会加入\n for(let len = list.length; i < len; i++) {\n let item = list[i];\n let lx = item.x;\n if(x2 === lx) {\n // 访问过的尽可能排在前面早出栈,减少对比次数\n item.arr.unshift(seg);\n break;\n }\n if(x2 < lx) {\n let temp = {\n x: x2,\n arr: [seg],\n };\n list.splice(i, 0, temp);\n break;\n }\n }\n });\n}\n\n// 按x升序将所有线段组成一个垂直扫描线列表,求交用,y方向不用管\nfunction genHashXList(segments) {\n let hashX = {};\n segments.forEach(seg => {\n let bbox = seg.bbox, min = bbox[0], max = bbox[2];\n putHashX(hashX, min, seg);\n putHashX(hashX, max, seg);\n });\n let list = [];\n Object.keys(hashX).forEach(x => list.push({\n x: parseFloat(x),\n arr: hashX[x],\n }));\n return list.sort(function(a, b) {\n return a.x - b.x;\n });\n}\n\n// 每个线段会放2次,开始点和结束点,哪怕x相同,第1次是开始用push,第2次结束unshift,这样离开时排在前面\nfunction putHashX(hashX, x, seg) {\n let list = hashX[x] = hashX[x] || [];\n if(seg.isVisited) {\n list.unshift(seg);\n seg.isVisited = false;\n }\n else {\n list.push(seg);\n seg.isVisited = true;\n }\n}\n\n// 按x升序将所有线段组成一个垂直扫描线列表,y方向也需要判断\nfunction genHashXYList(segments) {\n let hashXY = {};\n segments.forEach(seg => {\n let coords = seg.coords, l = coords.length;\n let start = coords[0], end = coords[l - 1];\n putHashXY(hashXY, start.x, start.y, seg, true);\n putHashXY(hashXY, end.x, end.y, seg, false);\n });\n let listX = [];\n Object.keys(hashXY).forEach(x => {\n let hashY = hashXY[x];\n let listY = [];\n Object.keys(hashY).forEach(y => {\n let arr = hashY[y].sort(function(a, b) {\n // end优先于start先触发\n if(a.isStart !== b.isStart) {\n return a.isStart ? 1 : -1;\n }\n // start点相同看谁在上谁在下,下方在前,比y极大值,因为start相同又不相交,所以上方的y极值更大\n if(a.isStart) {\n return segAboveCompare(a.seg, b.seg) ? 1 : -1;\n }\n // end点相同无所谓,其不参与运算,因为每次end线段先出栈ael\n });\n // console.log(x, y, arr.map(item => item.isStart + ', ' + item.seg.toString()));\n listY.push({\n y: parseFloat(y),\n arr,\n })\n });\n listX.push({\n x: parseFloat(x),\n arr: listY.sort(function(a, b) {\n return a.y - b.y;\n }),\n });\n });\n listX.sort(function(a, b) {\n return a.x - b.x;\n });\n let list = [];\n listX.forEach(item => {\n item.arr.forEach(item => {\n list = list.concat(item.arr);\n });\n });\n return list;\n}\n\nfunction putHashXY(hashXY, x, y, seg, isStart) {\n let hash = hashXY[x] = hashXY[x] || {};\n let list = hash[y] = hash[y] || [];\n list.push({\n isStart,\n seg,\n });\n}\n\n// pt在线段left -> right的上方或线上\nfunction pointAboveOrOnLine(pt, left, right) {\n let { x, y } = pt;\n let { x: x1, y: y1 } = left;\n let { x: x2, y: y2 } = right;\n return vector.crossProduct(x1 - x, y1 - y, x2 - x, y2 - y) >= 0;\n}\n\n// a是否在b的上边,取x相同部分看y大小,只有start点事件时才判断\nfunction segAboveCompare(segA, segB) {\n let ca = segA.coords, cb = segB.coords;\n let la = ca.length, lb = cb.length;\n let a1 = ca[0], b1 = cb[0];\n // 两条直线用向量积判断,注意开始点是否相同即可\n if(la === 2 && lb === 2) {\n let a2 = ca[1], b2 = cb[1];\n if(a1.equal(b1)) {\n return pointAboveOrOnLine(a2, b1, b2);\n }\n else {\n return pointAboveOrOnLine(a1, b1, b2);\n }\n }\n // a是竖线的话看另一条在左还是右,左的话a在下,否则在上,因为此时只可能是左和a尾相连或右和a首相连\n if(la === 2 && a1.x === ca[1].x) {\n return b1.x >= a1.x;\n }\n // 如果有曲线,取二者x共同的区域部分[x1, x3],以及区域中点x2,这3个点不可能都重合,一定会有某点的y比较大小\n let x1 = Math.max(a1.x, b1.x), x3 = Math.min(ca[la - 1].x, cb[lb - 1].x), x2 = x1 + (x3 - x1) * 0.5;\n if(a1 !== b1) {\n let y1 = getYByX(ca, x1), y2 = getYByX(cb, x1);\n if(y1 !== y2) {\n return y1 > y2;\n }\n }\n if(ca[la - 1] !== cb[lb - 1]) {\n let y1 = getYByX(ca, x3), y2 = getYByX(cb, x3);\n if(y1 !== y2) {\n return y1 > y2;\n }\n }\n let y1 = getYByX(ca, x2), y2 = getYByX(cb, x2);\n if(y1 !== y2) {\n return y1 > y2;\n }\n}\n\n// 获取曲线单调性t值,有结果才返回\nfunction getBezierMonotonicity(coords, isX) {\n if(coords.length === 3) {\n let t = isX\n ? (coords[0].x - coords[1].x) / (coords[0].x - 2 * coords[1].x + coords[2].x)\n : (coords[0].y - coords[1].y) / (coords[0].y - 2 * coords[1].y + coords[2].y);\n if(t > 0 && t < 1) {\n return [t];\n }\n }\n else if(coords.length === 4) {\n let t = equation.getRoots([\n isX\n ? 3 * (coords[1].x - coords[0].x)\n : 3 * (coords[1].y - coords[0].y),\n isX\n ? 6 * (coords[2].x + coords[0].x - 2 * coords[1].x)\n : 6 * (coords[2].y + coords[0].y - 2 * coords[1].y),\n isX\n ? 3 * (coords[3].x + 3 * coords[1].x - coords[0].x - 3 * coords[2].x)\n : 3 * (coords[3].y + 3 * coords[1].y - coords[0].y - 3 * coords[2].y)\n ]).filter(i => i > 0 && i < 1);\n if(t.length) {\n return t.sort(function(a, b) {\n return a - b;\n });\n }\n }\n}\n\n// 根据x的值解得t后获取y,由于线段已经x单调,所以解只会有1个而非多个\nfunction getYByX(coords, x) {\n let len = coords.length;\n if(x === coords[0].x) {\n return coords[0].y;\n }\n if(x === coords[len - 1].x) {\n return coords[len - 1].y;\n }\n if(len === 2) {\n if(coords[0].y === coords[1].y) {\n return coords[0].y;\n }\n let p = (x - coords[0].x) / (coords[1].x - coords[0].x);\n return coords[0].y + p * (coords[1].y - coords[0].y);\n }\n else if(len === 3) {\n let t = equation.getRoots([\n coords[0].x - x,\n 2 * (coords[1].x - coords[0].x),\n coords[2].x + coords[0].x - 2 * coords[1].x,\n ]).filter(i => i >= 0 && i <= 1);\n let pts = coords.map(item => [item.x, item.y]);\n return bezier.pointAtByT(pts, t[0])[1];\n }\n else if(len === 4) {\n let t = equation.getRoots([\n coords[0].x - x,\n 3 * (coords[1].x - coords[0].x),\n 3 * (coords[2].x + coords[0].x - 2 * coords[1].x),\n coords[3].x + 3 * coords[1].x - coords[0].x - 3 * coords[2].x\n ]).filter(i => i >= 0 && i <= 1);\n let pts = coords.map(item => [item.x, item.y]);\n return bezier.pointAtByT(pts, t[0])[1];\n }\n}\n\nfunction isRectsOverlap(bboxA, bboxB, lenA, lenB) {\n if(lenA === 2 && lenB === 2) {\n // 2条垂线特殊考虑,此时x范围都是0,只能比较y\n if(bboxA[0] === bboxA[2] && bboxB[0] === bboxB[2] && bboxA[0] === bboxA[2]) {\n if(bboxA[1] >= bboxB[3] || bboxB[1] >= bboxA[3]) {\n return false;\n }\n return true;\n }\n // 2条水平线也是\n if(bboxA[1] === bboxA[3] && bboxB[1] === bboxB[3] && bboxA[1] === bboxA[1]) {\n if(bboxA[0] >= bboxB[2] || bboxB[0] >= bboxA[2]) {\n return false;\n }\n return true;\n }\n }\n return geom.isRectsOverlap(bboxA, bboxB);\n}\n\nfunction checkOverlapLine(ax1, ay1, ax2, ay2, segA,\n bx1, by1, bx2, by2, segB, isY) {\n let ra = [], rb = [];\n let coordsA = segA.coords, coordsB = segB.coords;\n if(ax1 < bx1 && !isY || ay1 < by1 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsB[0],\n ], segA.belong));\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsB[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else if(ax2 === bx2 && !isY || ay2 === by2 && isY) {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n }\n }\n // 不会出现完全重合即ax2 == bx2\n else if(ax1 === bx1 && !isY || ay1 === by1 && isY) {\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n }\n }\n // ax1 > bx1\n else {\n rb.push(new Segment([\n coordsB[0],\n coordsA[0],\n ], segB.belong));\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else if(ax2 === bx2 && !isY || ay2 === by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsA[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsB[1],\n ], segB.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n }\n }\n return {\n ra,\n rb,\n };\n}\n\nfunction checkOverlapBezier(segA, segB) {\n let ca = segA.coords.map(item => [item.x, item.y]), la = ca.length;\n let cb = segB.coords.map(item => [item.x, item.y]), lb = cb.length;\n let firstA = ca[0], firstB = cb[0], lastA = ca[la - 1], lastB = cb[lb - 1];\n let t1 = bezier.getPointT(ca, firstB[0], firstB[1]);\n let t2 = bezier.getPointT(ca, lastB[0], lastB[1]);\n let t3 = bezier.getPointT(cb, firstA[0], firstA[1]);\n let t4 = bezier.getPointT(cb, lastA[0], lastA[1]);\n // console.warn(segA.toString());console.warn(segB.toString());\n // console.log(t1, t2, t3, t4);\n let l1 = t1.length, l2 = t2.length, l3 = t3.length, l4 = t4.length;\n /**\n * 重合有3种情况,对应4个t(每方各2个)的情况不同:\n * a. 一个包含另外一个,这样其中一方t为空,另一方t为2个即两个端点各1\n * b. 一对端点重合另外一侧包含,比上面的t多1个即空的那方t多1\n * c. 普通部分重合,每方各有1个t\n */\n let conditionA = l1 === 1 && l2 === 1 && l3 === 0 && l4 === 0 || l1 === 0 && l2 === 0 && l3 === 1 && l4 === 1;\n let conditionB = l1 === 1 && l2 === 1 && l3 + l4 === 1 || l1 + l2 === 1 && l3 === 1 && l4 === 1;\n let conditionC = l1 + l2 === 1 && l3 + l4 === 1;\n if(conditionA || conditionB || conditionC) {\n let startA = l1 ? t1[0] : 0;\n let endA = l2 ? t2[0] : 1;\n let a = bezier.sliceBezier2Both(ca, startA, endA);\n let startB = l3 ? t3[0] : 0;\n let endB = l4 ? t4[0] : 1;\n let b = bezier.sliceBezier2Both(cb, startB, endB);\n // console.log(startA, endA, startB, endB);\n // 确定重合之后就是截取,重合一定出现在左右的中间部分,这样只要分别判断左右两端是否需要各自裁剪即可\n if(equalBezier(a, b)) {\n let over = a.map(item => new Point(item));\n // console.log(over);\n let ra = [], rb = [];\n if(startA > 0) {\n let s = bezier.sliceBezier2Both(ca, 0, startA);\n let arr = [\n segA.coords[0],\n new Point(s[1]),\n segB.coords[0],\n ];\n if(la === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n ra.push(new Segment(arr, segA.belong));\n }\n ra.push(new Segment(over, segA.belong)); // 重合的部分\n if(endA < 1) {\n let s = bezier.sliceBezier2Both(ca, endA, 1);\n let arr = [\n segB.coords[lb - 1],\n new Point(s[1]),\n segA.coords[la - 1],\n ];\n if(la === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n ra.push(new Segment(arr, segA.belong));\n }\n if(startB > 0) {\n let s = bezier.sliceBezier2Both(cb, 0, startB);\n let arr = [\n segB.coords[0],\n new Point(s[1]),\n segA.coords[0],\n ];\n if(lb === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n rb.push(new Segment(arr, segB.belong));\n }\n rb.push(new Segment(over, segB.belong)); // 重合的部分\n if(endB < 1) {\n let s = bezier.sliceBezier2Both(cb, endB, 1);\n let arr = [\n segA.coords[la - 1],\n new Point(s[1]),\n segB.coords[lb - 1],\n ];\n if(lb === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n rb.push(new Segment(arr, segB.belong));\n }\n // console.log(ra.map(item => item.toString()));\n // console.log(rb.map(item => item.toString()));\n return {\n ra,\n rb,\n };\n }\n }\n}\n\nfunction equalBezier(a, b) {\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i], bi = b[i];\n if(Math.abs(ai[0] - bi[0]) > 1e-9 || Math.abs(ai[1] - bi[1]) > 1e-9) {\n return false;\n }\n }\n return true;\n}\n\nexport default Polygon;\n","import geom from '../geom';\n\n// 新线段添加到某个链上后,要先检查是否能合其它链连起来,再检查闭合情况\nfunction join(res, chains, chain, index, pt, isHead) {\n for(let i = 0, len = chains.length; i < len; i++) {\n let item = chains[i];\n if(item !== chain) {\n let l = item.length;\n let head = item[0], tail = item[l - 1];\n let ptHead = head.coords[0];\n let coords = tail.coords, l2 = coords.length;\n let ptTail = coords[l2 - 1];\n if(pt.equal(ptHead)) {\n if(isHead) {\n item = reverse(chain).concat(item);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n else {\n item = chain.concat(item);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n }\n else if(pt.equal(ptTail)) {\n if(isHead) {\n item = item.concat(chain);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n else {\n item = item.concat(reverse(chain));\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n }\n }\n }\n // 无法和别的链接,也要检查自身闭合\n close(res, chains, chain, index);\n}\n\nfunction close(res, chains, chain, index) {\n let l = chain.length;\n let head = chain[0], tail = chain[l - 1];\n let ptHead = head.coords[0];\n let coords2 = tail.coords, l2 = coords2.length;\n let ptTail = coords2[l2 - 1];\n if(ptHead.equal(ptTail)) {\n chains.splice(index, 1);\n res.push(chain);\n }\n}\n\n// 整条链颠倒,包含每个线段自身颠倒\nfunction reverse(chain) {\n chain.forEach(item => item.reverse());\n return chain.reverse();\n}\n\nexport default function(list) {\n let chains = [], res = [];\n // 在对方内部的排在前面,这样会优先形成包含情况而不是交叉\n list.sort(function(a, b) {\n if(b.otherFill[0] && b.otherFill[1]) {\n return 1;\n }\n return -1;\n });\n outer:\n while(list.length) {\n let seg = list.shift(), coords = seg.coords, len = coords.length;\n let start = coords[0], end = coords[len - 1];\n let temp;\n // 尝试追加到某条链中,互相头尾链接可能有4种情况,其中2种会reverse线段首尾\n for(let i = 0, len = chains.length; i < len; i++) {\n let chain = chains[i], l = chain.length;\n let head = chain[0], tail = chain[l - 1];\n let ptHead = head.coords[0];\n let coords2 = tail.coords, l2 = coords2.length;\n let ptTail = coords2[l2 - 1];\n if(start.equal(ptTail)) {\n if(seg.belong !== tail.belong) {\n chain.push(seg);\n join(res, chains, chain, i, end, false);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 0};\n }\n }\n else if(start.equal(ptHead)) {\n if(seg.belong !== tail.belong) {\n seg.reverse();\n chain.unshift(seg);\n join(res, chains, chain, i, end, true);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 1};\n }\n }\n else if(end.equal(ptTail)) {\n if(seg.belong !== tail.belong) {\n seg.reverse();\n chain.push(seg);\n join(res, chains, chain, i, start, false);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 2};\n }\n }\n else if(end.equal(ptHead)) {\n if(seg.belong !== tail.belong) {\n chain.unshift(seg);\n join(res, chains, chain, i, start, true);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 3};\n }\n }\n }\n // 如果没有优先添加对方的线段形成包含,则到这里检查是否有己方的进行链接\n if(temp) {\n if(temp.t === 0) {\n chains[temp.i].push(seg);\n join(res, chains, chains[temp.i], temp.i, end, false);\n }\n else if(temp.t === 1) {\n seg.reverse();\n chains[temp.i].unshift(seg);\n join(res, chains, chains[temp.i], temp.i, end, true);\n }\n else if(temp.t === 2) {\n seg.reverse();\n chains[temp.i].push(seg);\n join(res, chains, chains[temp.i], temp.i, start, false);\n }\n else if(temp.t === 3) {\n chains[temp.i].unshift(seg);\n join(res, chains, chains[temp.i], temp.i, start, true);\n }\n }\n // 找不到则生成新链\n else {\n chains.push([seg]);\n }\n }\n // 鞋带公式求得每个多边形的时钟序 https://zhuanlan.zhihu.com/p/401010594\n let v = res.map(item => {\n // let isInner = true, isOuter = true;\n let clockwise = true;\n let s = 0, lastX, lastY, minX, minY, maxX, maxY;\n item.forEach((seg, i) => {\n // 内部是指边的两侧都是对方填充说明在内部\n // if(!seg.otherFill[0] || !seg.otherFill[1]) {\n // isInner = false;\n // }\n // // 外部是指边的一侧为空\n // if(!seg.myFill[0] && !seg.otherFill[0] || !seg.myFill[1] && !seg.otherFill[1]) {}\n // else {\n // isOuter = false;\n // }\n let coords = seg.coords, len = coords.length, bbox = seg.bbox;\n if(i) {\n minX = Math.min(minX, bbox[0]);\n minY = Math.min(minY, bbox[1]);\n maxX = Math.max(maxX, bbox[2]);\n maxY = Math.max(maxY, bbox[3]);\n }\n else {\n minX = bbox[0];\n minY = bbox[1];\n maxX = bbox[2];\n maxY = bbox[3];\n }\n if(len === 2) {\n if(i) {\n s += lastX * coords[1].y - lastY * coords[1].x;\n }\n else {\n s += coords[0].x * coords[1].y - coords[0].y * coords[1].x;\n }\n lastX = coords[1].x;\n lastY = coords[1].y;\n }\n else if(len === 3) {\n if(i) {\n s += lastX * coords[2].y - lastY * coords[2].x;\n }\n else {\n s += coords[0].x * coords[1].y - coords[0].y * coords[2].x;\n }\n lastX = coords[2].x;\n lastY = coords[2].y;\n }\n else if(len === 4) {\n if(i) {\n s += lastX * coords[3].y - lastY * coords[3].x;\n }\n else {\n s += coords[0].x * coords[3].y - coords[0].y * coords[3].x;\n }\n lastX = coords[3].x;\n lastY = coords[3].y;\n }\n });\n // 首个顶点重合\n let first = item[0], coords = first.coords;\n s += lastX * coords[0].y - lastY * coords[0].x;\n if(s < 0) {\n clockwise = false;\n }\n return {\n // isInner,\n // isOuter,\n list: item,\n clockwise,\n bbox: [minX, minY, maxX, maxY],\n area: (maxX - minX) * (maxY - minY),\n };\n });\n v.forEach(item => {\n if(item.checked) {\n return;\n }\n let bbox = item.bbox;\n let list = [item];\n for(let i = 0, len = v.length; i < len; i++) {\n let item2 = v[i];\n if(item2 !== item) {\n // 互相包含则存入列表\n if(geom.isRectsInside(bbox, item2.bbox, true) || geom.isRectsInside(item2.bbox, bbox, true)) {\n list.push(item2);\n }\n }\n }\n // 按面积排序,最小的即最里面的在前面\n if(list.length > 1) {\n list.sort(function(a, b) {\n return a.area - b.area;\n });\n // 可能存在已经排过序的,例如外围a包含了内部的b和c,b和c互不相交,a和b已经调整过排序了,a和c再调整则a已经checked\n for(let i = 1, len = list.length;i < len; i++) {\n let item = list[i];\n if(item.checked) {\n let clockwise = item.clockwise;\n for(let j = i - 1; j >= 0; j--) {\n let item2 = list[j];\n item2.checked = true;\n if(item2.clockwise === clockwise) {\n reverse(item2.list);\n item2.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n clockwise = item.clockwise;\n for(let j = i + 1; j < len; j++) {\n let item2 = list[j];\n item2.checked = true;\n if(item2.clockwise === clockwise) {\n reverse(item2.list);\n item2.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n return;\n }\n }\n // 新的依次时钟序互相颠倒\n let clockwise = list[0].clockwise;\n list[0].checked = true;\n for(let i = 1, len = list.length;i < len; i++) {\n let item = list[i];\n item.checked = true;\n if(item.clockwise === clockwise) {\n reverse(item.list);\n item.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n }\n });\n return v.map(item => {\n let list = item.list.map(seg => {\n let coords = seg.coords, len = coords.length;\n if(len === 2) {\n return [coords[1].x, coords[1].y];\n }\n else if(len === 3) {\n return [coords[1].x, coords[1].y, coords[2].x, coords[2].y];\n }\n else if(len === 4) {\n return [coords[1].x, coords[1].y, coords[2].x, coords[2].y, coords[3].x, coords[3].y];\n }\n });\n // 首个顶点重合\n let first = item.list[0], coords = first.coords;\n list.unshift([coords[0].x, coords[0].y]);\n return list;\n });\n}\n","import Polygon from './Polygon';\nimport chain from './chain';\n\n// 多边形都是多个区域,重载支持外部传入1个区域则数组化\nfunction prefix(polygon) {\n if(!polygon || !Array.isArray(polygon) || !Array.isArray(polygon[0])) {\n return [];\n }\n if(Array.isArray(polygon[0][0])) {\n return polygon;\n }\n return [polygon];\n}\n\nfunction trivial(polygonA, polygonB) {\n let isIntermediateA = polygonA instanceof Polygon;\n let isIntermediateB = polygonB instanceof Polygon;\n // 生成多边形对象,相交线段拆分开来,曲线x单调性裁剪,重合线段标记\n let source;\n if(isIntermediateA) {\n source = polygonA.reset(0);\n }\n else {\n source = new Polygon(prefix(polygonA), 0);\n source.selfIntersect();\n }\n // console.log(source.toString());\n let clip;\n if(isIntermediateB) {\n clip = polygonB.reset(1);\n }\n else {\n clip = new Polygon(prefix(polygonB), 1);\n clip.selfIntersect();\n }\n // console.log(clip.toString());\n // console.log('----');\n // 两个多边形之间再次互相判断相交\n Polygon.intersect2(source, clip, isIntermediateA, isIntermediateB);\n // console.log(source.toString());\n // console.log(clip.toString());\n // console.log('====');\n Polygon.annotate2(source, clip, isIntermediateA, isIntermediateB);\n // console.log(source.toString());\n // console.log(clip.toString());\n return [source, clip];\n}\n\nconst INTERSECT = [\n 0, 0, 0, 1,\n 0, 0, 0, 1,\n 0, 0, 0, 1,\n 1, 1, 1, 0,\n], UNION = [\n 0, 1, 1, 1,\n 1, 0, 0, 0,\n 1, 0, 0, 0,\n 1, 0, 0, 0,\n], SUBTRACT = [\n 0, 0, 1, 0,\n 0, 0, 1, 0,\n 1, 1, 0, 1,\n 0, 0, 1, 0,\n], SUBTRACT_REV = [\n 0, 1, 0, 0,\n 1, 0, 1, 1,\n 0, 1, 0, 0,\n 0, 1, 0, 0,\n], XOR = [\n 0, 1, 1, 0,\n 1, 0, 0, 1,\n 1, 0, 0, 1,\n 0, 1, 1, 0,\n];\n\nfunction filter(segments, matrix) {\n let res = [], hash = {};\n segments.forEach(seg => {\n let { belong, myFill, otherFill, otherCoincide } = seg;\n if(otherCoincide) {\n // 对方重合线只出现一次\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n let i;\n if(belong) {\n i = (otherFill[0] ? 8 : 0)\n + (myFill[0] ? 4 : 0)\n + (otherFill[1] ? 2 : 0)\n + (myFill[1] ? 1 : 0);\n }\n else {\n i = (myFill[0] ? 8 : 0)\n + (otherFill[0] ? 4 : 0)\n + (myFill[1] ? 2 : 0)\n + (otherFill[1] ? 1 : 0);\n }\n if(matrix[i]) {\n res.push(seg);\n }\n });\n // console.log(res.map(item => item.toString()));\n return res;\n}\n\nexport default {\n intersect(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), INTERSECT);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n union(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), UNION);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n subtract(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), SUBTRACT);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n subtractRev(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), SUBTRACT_REV);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n xor(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), XOR);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n chain(polygon) {\n if(polygon instanceof Polygon) {\n return chain(polygon.segments);\n }\n return prefix(polygon);\n },\n};\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport bezier from '../../math/bezier';\nimport bo from '../../math/bo/index';\nimport mode from '../../refresh/mode';\n\nlet { intersect, union, subtract, subtract2, xor, chain } = bo;\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nclass Polyline extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 所有点的列表\n if(this.isMulti) {\n this.__points = [[]];\n this.__controls = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => parseFloat(i) || 0);\n for(let i = this.__start.length; i < this.__points.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = parseFloat(props.start) || 0;\n this.__start = this.__points.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n });\n for(let i = this.__end.length; i < this.__points.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = this.__points.map(() => v);\n }\n }\n else {\n this.__points = [];\n // 控制点\n this.__controls = [];\n this.__start = 0;\n this.__end = 1;\n if(!isNil(props.start)) {\n this.__start = parseFloat(props.start) || 0;\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = v;\n }\n }\n if(Array.isArray(props.controls)) {\n this.__controls = props.controls;\n }\n if(Array.isArray(props.points)) {\n this.__points = props.points;\n }\n if(props.booleanOperations) {\n this.__booleanOperations = props.booleanOperations;\n }\n }\n\n calContent(currentStyle, computedStyle) {\n let res = super.calContent(currentStyle, computedStyle);\n // 查看是否有顶点\n if(res && !this.__hasXomContent) {\n let { currentProps: { points }, isMulti } = this;\n if(isMulti) {\n for(let i = 0, len = points.length; i < len; i++) {\n if(points.length) {\n return true;\n }\n }\n }\n else {\n if(points.length) {\n return true;\n }\n }\n }\n return res;\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n return points.map(item => {\n if(!Array.isArray(item)) {\n return;\n }\n let len = item.length;\n if(isControl) {\n if(len !== 0 && len !== 2 && len !== 4) {\n return;\n }\n }\n else {\n if(len !== 0 && len !== 2) {\n return;\n }\n }\n let res = [];\n for(let i = 0; i < len; i++) {\n if(i % 2 === 0) {\n res.push(originX + item[i] * width);\n }\n else {\n res.push(originY + item[i] * height);\n }\n }\n return res;\n });\n }\n\n // 供polygon覆盖,后处理booleanOperations\n __reprocessing(list, isMulti) {\n if(!isMulti || list.length < 2) {\n return list;\n }\n let bo = this.booleanOperations, len = list.length;\n if(!bo) {\n return list;\n }\n if(!Array.isArray(bo)) {\n let old = bo;\n bo = [bo];\n for(let i = 1; i < len - 1; i++) {\n bo.push(old);\n }\n }\n if(Array.isArray(bo) && bo.length) {\n let res = [], temp = list[0];\n for(let i = 1; i < len; i++) {\n let op = (bo[i - 1] || '').toString().toLowerCase();\n let cur = list[i];\n if(['intersect', 'intersection', 'union', 'subtract', 'subtract2', 'diff', 'difference', 'xor'].indexOf(op) === -1) {\n res = res.concat(chain(temp));\n temp = cur || [];\n continue;\n }\n switch(op) {\n case 'intersect':\n case 'intersection':\n temp = intersect(temp, cur, true);\n break;\n case 'union':\n temp = union(temp, cur, true);\n break;\n case 'subtract':\n case 'diff':\n case 'difference':\n temp = subtract(temp, cur, true);\n break;\n case 'subtract2':\n temp = subtract2(temp, cur, true);\n break;\n case 'xor':\n temp = xor(temp, cur, true);\n break;\n }\n }\n return res.concat(chain(temp));\n }\n return list;\n }\n\n // 同polygon覆盖,booleanOperations改变时需刷新缓冲顶点坐标\n __needRebuildSE(__cacheProps) {\n if(util.isNil(__cacheProps.booleanOperations)) {\n __cacheProps.booleanOperations = true;\n return true;\n }\n }\n\n __buildCache(originX, originY) {\n let { width, height, points, controls, start, end, __cacheProps, isMulti } = this;\n let rebuild, rebuildSE;\n if(isNil(__cacheProps.points)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.points = points.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item);\n }\n });\n }\n else {\n __cacheProps.points = this.__getPoints(originX, originY, width, height, points);\n }\n }\n if(isNil(__cacheProps.controls)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.controls = controls.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item, true);\n }\n return item;\n });\n }\n else {\n __cacheProps.controls = this.__getPoints(originX, originY, width, height, controls, true);\n }\n }\n if(isNil(__cacheProps.start)) {\n rebuildSE = true;\n __cacheProps.start = start;\n }\n if(isNil(__cacheProps.end)) {\n rebuildSE = true;\n __cacheProps.end = end;\n }\n // polygon会覆盖检查booleanOperations缓存\n if(this.__needRebuildSE(__cacheProps)) {\n rebuildSE = true;\n }\n // points/controls有变化就需要重建顶点\n if(rebuild) {\n let { points, controls } = __cacheProps;\n if(isMulti) {\n __cacheProps.list2 = points.map((item, i) => {\n let cl = controls[i];\n if(Array.isArray(item)) {\n return item.map((point, j) => {\n if(j) {\n return this.__concatPointAndControl(point, cl && cl[j - 1]);\n }\n return point;\n });\n }\n });\n __cacheProps.len = this.__getLength(__cacheProps.list2, isMulti);\n }\n else {\n __cacheProps.list2 = points.map((point, i) => {\n if(i) {\n return this.__concatPointAndControl(point, controls[i - 1]);\n }\n return point;\n });\n __cacheProps.len = this.__getLength(__cacheProps.list2, isMulti);\n }\n }\n if(rebuild || rebuildSE) {\n if(isMulti) {\n __cacheProps.list = __cacheProps.list2.map((item, i) => {\n if(Array.isArray(item)) {\n let len = __cacheProps.len;\n return this.__getNewList(item, {\n list: len.list[i],\n total: len.total[i],\n increase: len.increase[i],\n }, __cacheProps.start[i], __cacheProps.end[i]);\n }\n });\n }\n else {\n __cacheProps.list = this.__getNewList(__cacheProps.list2, __cacheProps.len, __cacheProps.start, __cacheProps.end);\n }\n // 后处理一次,让polygon支持布尔运算\n __cacheProps.list = this.__reprocessing(__cacheProps.list, isMulti);\n }\n return rebuild || rebuildSE;\n }\n\n __getNewList(list, len, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return list;\n }\n if(start === end) {\n return [];\n }\n if(start > end) {\n [start, end] = [end, start];\n }\n // start和end只能相差<=1,如果>1则校正\n while(end - start > 1) {\n end--;\n }\n // 将start和end统一至最接近0的正值\n while(end < 0 || start < 0) {\n end++;\n start++;\n }\n while(end >= 1 && start >= 1) {\n end--;\n start--;\n }\n // clone出原本顶点列表,防止干扰\n let length = list.length;\n list = util.clone(list);\n let res = [];\n let start2 = start > 1 ? (start - 1) : start;\n let end2 = end > 1 ? (end - 1) : end;\n let i = this.__getIndex(len.increase, start2 * len.total, 0, length - 1);\n let j = this.__getIndex(len.increase, end2 * len.total, 0, length - 1);\n // start<0或者end>1或者普通情况,一共3种,start和end不可能同时超限\n let isStartLt0 = start < 0;\n let isEndGt1 = end > 1;\n end2 *= len.total;\n let prePercent = 1;\n let endPoint;\n if(end2 > len.increase[j]) {\n let prev = list[j].slice(list[j].length - 2); // 最后2个点是x,y,前面是control\n let current = list[j + 1];\n let l = len.list[j];\n let diff = end2 - len.increase[j];\n let t = diff / l;\n prePercent = t;\n if(current.length === 2) {\n let a = current[0] - prev[0];\n let b = current[1] - prev[1];\n if(isEndGt1) {\n endPoint = [prev[0] + t * a, prev[1] + t * b];\n }\n else {\n t = 1 - t;\n endPoint = [current[0] - t * a, current[1] - t * b];\n }\n }\n else if(current.length === 4) {\n let r = bezier.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]]], t);\n endPoint = [r[1][0], r[1][1], r[2][0], r[2][1]];\n }\n else if(current.length === 6) {\n let r = bezier.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]], [current[4], current[5]]], t);\n endPoint = [r[1][0], r[1][1], r[2][0], r[2][1], r[3][0], r[3][1]];\n }\n }\n start2 *= len.total;\n if(start2 > len.increase[i]) {\n let current;\n let prev = list[i].slice(list[i].length - 2);\n let l = len.list[i];\n // 同一条线段时如果有end裁剪,会影响start长度,这里还要防止头尾绕了一圈的情况\n if(i === j && !isStartLt0 && !isEndGt1 && prePercent !== 1) {\n l *= prePercent;\n if(endPoint) {\n current = endPoint;\n }\n }\n if(!current) {\n current = list[i + 1];\n }\n let diff = start2 - len.increase[i];\n let t = diff / l;\n if(current.length === 2) {\n let a = current[0] - prev[0];\n let b = current[1] - prev[1];\n if(isStartLt0) {\n t = 1 - t;\n res.push([current[0] - t * a, current[1] - t * b]);\n }\n else {\n res.push([prev[0] + t * a, prev[1] + t * b]);\n }\n res.push(current);\n }\n else if(current.length === 4) {\n let r = bezier.sliceBezier([[current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n res.push(r[0]);\n res.push([r[1][0], r[1][1], r[2][0], r[2][1]]);\n // 同一条线段上去除end冲突\n if(i === j && !isStartLt0 && !isEndGt1) {\n endPoint = null;\n }\n }\n else if(current.length === 6) {\n let r = bezier.sliceBezier([[current[4], current[5]], [current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n res.push(r[0])\n res.push([r[1][0], r[1][1], r[2][0], r[2][1], current[4], current[5]]);\n if(i === j && !isStartLt0 && !isEndGt1) {\n endPoint = null;\n }\n }\n }\n // start和end之间的线段,注意头尾饶了一圈的情况,以及起始点被上方考虑过了\n for(let k = i + 2; k <= j + (!isStartLt0 && !isEndGt1 ? 0 : length); k++) {\n res.push(list[k % length]);\n }\n if(endPoint) {\n res.push(endPoint);\n }\n return res;\n }\n\n __getIndex(list, t, i, j) {\n if(i === j) {\n if(list[i] > t) {\n return i - 1;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n if(list[middle] === t) {\n return middle;\n }\n else if(list[middle] > t) {\n return this.__getIndex(list, t, i, Math.max(middle - 1, i));\n }\n else {\n return this.__getIndex(list, t, Math.min(middle + 1, j), j);\n }\n }\n\n __getLength(list, isMulti) {\n let res = [];\n let total = 0;\n let increase = [];\n if(isMulti) {\n total = [];\n list.forEach(list => {\n let temp = this.__getLength(list);\n res.push(temp.list);\n total.push(temp.total);\n increase.push([0].concat(temp.increase));\n });\n }\n else if(Array.isArray(list)) {\n total = 0;\n increase.push(0);\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let prev = list[start];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n let a = Math.abs(item[0] - prev[0]);\n let b = Math.abs(item[1] - prev[1]);\n let c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n res.push(c);\n total += c;\n increase.push(total);\n prev = item;\n }\n else if(item.length === 4) {\n let c = bezier.bezierLength([prev, [item[0], item[1]], [item[2], item[3]]]);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[2], item[3]];\n }\n else if(item.length === 6) {\n let c = bezier.bezierLength([prev, [item[0], item[1]], [item[2], item[3]], [item[4], item[5]]]);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[4], item[5]];\n }\n }\n }\n return {\n list: res,\n total,\n increase,\n };\n }\n\n __concatPointAndControl(point, control) {\n if(Array.isArray(control) && (control.length === 2 || control.length === 4)\n && Array.isArray(point) && point.length === 2) {\n return control.concat(point);\n }\n return point;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.x3, res.y3);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get points() {\n return this.getProps('points');\n }\n\n get controls() {\n return this.getProps('controls');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.__buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let { points, controls } = __cacheProps;\n if(!isMulti) {\n points = [points];\n controls = [controls];\n }\n points.forEach((pointList, i) => {\n if(!pointList || pointList.length < 2 || !pointList[0] || !pointList[1]\n || pointList[0].length < 2 || pointList[1].length < 2) {\n return;\n }\n let controlList = controls[i] || [];\n let [xa, ya] = pointList[0];\n for(let i = 1, len = pointList.length; i < len; i++) {\n let item = pointList[i];\n if(!item || item.length < 2) {\n continue;\n }\n let [xb, yb] = pointList[i];\n let c = controlList[i - 1];\n if(c && c.length === 4) {\n let bezierBox = bezier.bboxBezier(xa, ya, c[0], c[1], c[2], c[3], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else if(c && c.length === 2) {\n let bezierBox = bezier.bboxBezier(xa, ya, c[0], c[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else {\n bbox[0] = Math.min(bbox[0], xa - half);\n bbox[1] = Math.min(bbox[1], ya - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[3] = Math.max(bbox[3], ya + half);\n }\n xa = xb;\n ya = yb;\n }\n });\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n\n get booleanOperations() {\n return this.getProps('booleanOperations');\n }\n}\n\nexport default Polyline;\n","import Polyline from './Polyline';\n\nclass Polygon extends Polyline {\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n let res = super.__getPoints(originX, originY, width, height, points, isControl);\n if(!isControl) {\n res.push(res[0]);\n }\n return res;\n }\n}\n\nexport default Polygon;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport inject from '../../util/inject';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\nconst { sectorPoints } = geom;\n\nfunction getR(v, dft) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = dft;\n }\n return v;\n}\n\nclass Sector extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 角度\n if(this.isMulti) {\n this.__begin = [0];\n this.__end = [0];\n this.__r = [1];\n if(Array.isArray(props.begin)) {\n this.__begin = props.begin.map(i => getR(i, 0));\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => getR(i, 0));\n }\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i, 1));\n }\n if(Array.isArray(props.edge)) {\n this.__edge = props.edge.map(i => !!i);\n }\n if(Array.isArray(props.closure)) {\n this.__closure = props.closure.map(i => !!i);\n }\n }\n else {\n this.__begin = this.__end = 0;\n // 半径[0, ∞),默认1\n this.__r = 1;\n // 扇形两侧是否有边\n this.__edge = false;\n // 扇形大于180°时,是否闭合两端\n this.__closure = false;\n if(!isNil(props.begin)) {\n this.__begin = getR(props.begin, 0);\n }\n if(!isNil(props.end)) {\n this.__end = getR(props.end, 0);\n }\n if(!isNil(props.r)) {\n this.__r = getR(props.r, 1);\n }\n if(!isNil(props.edge)) {\n this.__edge = !!props.edge;\n }\n if(!isNil(props.closure)) {\n this.__closure = !!props.closure;\n }\n }\n }\n\n __buildCache(cx, cy, focus) {\n let { width, begin, end, r, edge, closure, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.begin) || focus) {\n rebuild = true;\n __cacheProps.begin = (begin || 0) % 360;\n }\n if(isNil(__cacheProps.end) || focus) {\n rebuild = true;\n __cacheProps.end = (end || 0) % 360;\n }\n if(isNil(__cacheProps.r) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.r = r.map(r => r * width * 0.5);\n }\n else {\n __cacheProps.r = r * width * 0.5;\n }\n }\n r = __cacheProps.r;\n if(isNil(__cacheProps.edge) || focus) {\n rebuild = true;\n __cacheProps.edge = edge;\n }\n if(isNil(__cacheProps.closure) || focus) {\n rebuild = true;\n __cacheProps.closure = closure;\n }\n if(rebuild) {\n if(isMulti) {\n __cacheProps.list = [];\n __cacheProps.sList = [];\n begin.forEach((begin, i) => {\n let r2 = isNil(r[i]) ? width * 0.5 : r[i];\n let list = sectorPoints(cx, cy, r2, parseFloat(begin || 0) % 360, parseFloat(end[i] || 0) % 360);\n let sList = list.slice(0);\n if(closure[i]) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list.push(list);\n __cacheProps.sList.push(sList);\n });\n }\n else {\n let list = sectorPoints(cx, cy, r, parseFloat(begin || 0), parseFloat(end || 0));\n let sList = list.slice(0);\n if(closure) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list = list;\n __cacheProps.sList = sList;\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx2, dy2) {\n let res = super.render(renderMode, ctx, dx2, dy2);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.cx, res.cy);\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list, sList }, isMulti } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n }\n return res;\n }\n\n __renderOneSector(renderMode, ctx, isMulti, list, sList, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill.k === 'conic';\n let isStrokeCE = stroke.k === 'conic';\n let isFillRE = fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else {\n if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, false);\n }\n if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n }\n\n __genSector(edge, d, fill, stroke, strokeWidth, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(edge) {\n let props = [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n else {\n this.addGeom('path', [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ]);\n if(strokeWidth > 0) {\n let props = [\n ['d', d[1]],\n ['fill', 'none'],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n }\n }\n\n get begin() {\n return this.getProps('begin');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get edge() {\n return this.getProps('edge');\n }\n\n // >180°时是否链接端点\n get closure() {\n return this.getProps('closure');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.__buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - r - half;\n let xb = cx + r - half;\n let ya = cy - r + half;\n let yb = cy + r + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Sector;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction genVertex(x, y, width, height, rx = 0, ry = 0) {\n if(rx === 0 || ry === 0) {\n return [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y],\n ];\n }\n let ox = rx * geom.H;\n let oy = ry * geom.H;\n return [\n [x + rx, y],\n [x + width - rx, y],\n [x + width + ox - rx, y, x + width, y + ry - oy, x + width, y + ry],\n [x + width, y + height - ry],\n [x + width, y + height + oy - ry, x + width + ox - rx, y + height, x + width - rx, y + height],\n [x + rx, y + height],\n [x + rx - ox, y + height, x, y + height + oy - ry, x, y + height - ry],\n [x, y + ry],\n [x, y + ry - oy, x + rx - ox, y, x + rx, y]\n ];\n}\n\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 0;\n }\n return v;\n}\n\nclass Rect extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 圆角\n if(this.isMulti) {\n this.__rx = [0];\n this.__ry = [0];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n }\n else {\n this.__rx = this.__ry = 0;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n __buildCache(originX, originY, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(rx => Math.min(rx, 0.5) * width);\n }\n else {\n __cacheProps.rx = Math.min(rx, 0.5) * width;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = rx.map(ry => Math.min(ry, 0.5) * height);\n }\n else {\n __cacheProps.ry = Math.min(ry, 0.5) * height;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => genVertex(originX, originY, width, height, rx, ry[i]));\n }\n else {\n __cacheProps.list = genVertex(originX, originY, width, height, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.x3, res.y3);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n this.__buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n bbox[0] = Math.min(bbox[0], originX - half);\n bbox[1] = Math.min(bbox[1], originY - half);\n bbox[2] = Math.max(bbox[2], originX + width + half);\n bbox[3] = Math.max(bbox[3], originY + height + half);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Rect;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Circle extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__r = [1];\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i));\n }\n else if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n else {\n this.__r = 1;\n if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n }\n\n __buildCache(cx, cy, focus) {\n let { width, r, __cacheProps, isMulti } = this;\n if(isNil(__cacheProps.r) || focus) {\n if(isMulti) {\n __cacheProps.r = r.map(i => i * width * 0.5);\n __cacheProps.list = __cacheProps.r.map(r => geom.ellipsePoints(cx, cy, r, r));\n }\n else {\n __cacheProps.r = r * width * 0.5;\n __cacheProps.list = geom.ellipsePoints(cx, cy, __cacheProps.r, __cacheProps.r);\n }\n }\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.cx, res.cy);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.__buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - r - half;\n let ya = cy - r - half;\n let xb = cx + r + half;\n let yb = cy + r + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Circle;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Ellipse extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__rx = [1];\n this.__ry = [1];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n else if(!isNil(props.rx)) {\n this.__rx = [getR(props.rx)];\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n else if(!isNil(props.ry)) {\n this.__ry = [getR(props.ry)];\n }\n }\n else {\n this.__rx = 1;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n this.__ry = 1;\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n __buildCache(cx, cy, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(i => i * width * 0.5);\n }\n else {\n __cacheProps.rx = rx * width * 0.5;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = ry.map(i => i * height * 0.5);\n }\n else {\n __cacheProps.ry = ry * height * 0.5;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => geom.ellipsePoints(cx, cy, rx, ry[i]));\n }\n else {\n __cacheProps.list = geom.ellipsePoints(cx, cy, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.cx, res.cy);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.__buildCache(cx, cy);\n let rx = 0, ry = 0;\n if(isMulti) {\n let mx = 0, my = 0;\n __cacheProps.rx.forEach((rx, i) => {\n mx = Math.max(rx, mx);\n my = Math.max(ry, __cacheProps.ry[i]);\n });\n rx = mx;\n ry = my;\n }\n else {\n rx = __cacheProps.rx;\n ry = __cacheProps.ry;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - rx - half;\n let xb = cx + rx + half;\n let ya = cy - ry - half;\n let yb = cy + ry + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Ellipse;\n","import Node from '../node/Node';\nimport Component from '../node/Component';\nimport util from '../util/util';\n\nlet { isPrimitive, isNil } = util;\n\n/**\n * 入口方法,animateRecords记录所有的动画结果等初始化后分配开始动画\n * offsetTime默认0,递归传下去为右libraryId引用的元素增加偏移时间,为了库元素动画复用而开始时间不同\n * @param karas\n * @param json\n * @param animateRecords\n * @param areaStart 为了和AE功能对应,播放一段动画,特增加这2个参数,递归相加起效\n * @param areaDuration 最外层优先\n * @returns {Node|Component|*}\n */\nfunction parse(karas, json, animateRecords, areaStart, areaDuration) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => {\n return parse(karas, item, animateRecords, areaStart, areaDuration);\n });\n }\n areaStart += parseInt(json.areaStart) || 0;\n if(areaDuration === null) {\n if(!isNil(json.areaDuration)) {\n let n = parseInt(json.areaDuration);\n if(!isNaN(n) && n > 0) {\n areaDuration = n;\n }\n }\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n if(!Array.isArray(children)) {\n throw new Error('children must be an array');\n }\n let vd;\n if(tagName.charAt(0) === '$') {\n vd = karas.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n let cp = Component.getRegister(tagName);\n vd = karas.createCp(cp, props, children.map(item => {\n return parse(karas, item, animateRecords, areaStart, areaDuration);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n return parse(karas, item, animateRecords, areaStart, areaDuration);\n }));\n }\n if(animate) {\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n let has;\n animate.forEach(item => {\n let { value } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n has = true;\n }\n });\n // 产生实际动画运行才存入列表供root调用执行\n if(has) {\n animateRecords.push({\n animate,\n target: vd,\n areaStart,\n areaDuration,\n });\n }\n }\n return vd;\n}\n\nexport default parse;\n","import reset from '../style/reset';\n\nlet fullCssProperty = {\n skewX: 'kx',\n skewY: 'ky',\n transform: 'tf',\n fontSize: 'fz',\n offset: 'os',\n easing: 'e',\n filter: 'ft',\n boxShadow: 'bd',\n overflow: 'of',\n backgroundClip: 'bp',\n textOverflow: 'tof',\n flexWrap: 'fp',\n perspective: 'ppt',\n rotate3d: 'r3',\n};\n\nlet abbrCssProperty = {\n os: 'offset', // 非css属性不会被下面反向遍历插入,手动\n e: 'easing',\n};\n\nlet fullAnimate = {\n value: 'v',\n options: 'o',\n};\n\nlet abbrAnimate = {};\n\nlet fullAnimateOption = {\n duration: 'dt',\n delay: 'd',\n endDelay: 'ed',\n iterations: 'i',\n direction: 'dc',\n fill: 'f',\n fps: 'fp',\n playbackRate: 'p',\n spfLimit: 'sl',\n};\n\nlet abbrAnimateOption = {};\n\nreset.DOM_KEY_SET.concat(reset.GEOM_KEY_SET).forEach(k => {\n if(fullCssProperty.hasOwnProperty(k)) {\n abbrCssProperty[fullCssProperty[k]] = k;\n return;\n }\n let v = k.charAt(0) + k.replace(/[a-z]/g, '').toLowerCase();\n fullCssProperty[k] = v;\n abbrCssProperty[v] = k;\n});\n\nObject.keys(fullAnimate).forEach(k => {\n abbrAnimate[fullAnimate[k]] = k;\n});\n\nObject.keys(fullAnimateOption).forEach(k => {\n abbrAnimateOption[fullAnimateOption[k]] = k;\n});\n\nexport default {\n fullCssProperty,\n abbrCssProperty,\n fullAnimate,\n abbrAnimate,\n fullAnimateOption,\n abbrAnimateOption,\n};\n","import abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport Node from '../node/Node';\nimport Component from '../node/Component';\n\nlet { isNil, isFunction, isPrimitive, clone, extend } = util;\nlet { abbrCssProperty, abbrAnimateOption, abbrAnimate } = abbr;\n\n/**\n * 还原缩写到全称,涉及样式和动画属性,已过时\n * @param target 还原的对象\n * @param hash 缩写映射\n */\nfunction abbr2full(target, hash) {\n // 也许节点没写样式\n if(target) {\n Object.keys(target).forEach(k => {\n // var-attr格式特殊考虑,仅映射attr部分,var-还要保留\n if(k.indexOf('var-') === 0) {\n let k2 = k.slice(4);\n if(hash.hasOwnProperty(k2)) {\n let fk = hash[k2];\n target['var-' + fk] = target[k];\n // delete target[k];\n }\n }\n // 普通样式缩写还原\n else if(hash.hasOwnProperty(k)) {\n let fk = hash[k];\n target[fk] = target[k];\n // 删除以免二次解析\n delete target[k];\n }\n });\n }\n}\n\n/**\n * 链接json中的某个child到library文件,\n * props需要是clone的,因为防止多个child使用同一个库文件\n * children则直接引用,无需担心多个使用同一个\n * library也需要带上,在library直接子元素还包含library时会用到\n * @param child\n * @param libraryItem\n */\nfunction linkLibrary(child, libraryItem) {\n // 规定图层child只有init和动画,属性和子图层来自库\n child.tagName = libraryItem.tagName;\n child.props = clone(libraryItem.props) || {};\n child.children = libraryItem.children || [];\n if(libraryItem.vars && !child.vars) {\n child.vars = libraryItem.vars;\n }\n if(libraryItem.library) {\n child.library = libraryItem.library;\n }\n // library的var-也要继承过来,本身的var-优先级更高,目前只有children会出现优先级情况\n Object.keys(libraryItem).forEach(k => {\n if(k.indexOf('var-') === 0 && !child.hasOwnProperty(k)) {\n child[k] = libraryItem[k];\n }\n });\n // 删除以免二次解析\n delete child.libraryId;\n let init = child.init;\n if(init) {\n let props = child.props;\n let style = props.style;\n extend(props, init);\n // style特殊处理,防止被上面覆盖丢失原始值\n if(style) {\n extend(style, init.style);\n props.style = style;\n }\n // 删除以免二次解析\n delete child.init;\n }\n}\n\n/**\n * 遍历一遍library的一级,将一级的id存到hash上,无需递归二级,\n * 因为顺序前提要求排好且无循环依赖,所以被用到的一定在前面出现,\n * 一般是无children的元件在前,包含children的div在后\n * 即便library中的元素有children或library,在linkChild时将其link过去,parse递归会继续处理\n * @param item:library的一级孩子\n * @param hash:存放library的key/value引用\n */\nfunction initLibrary(item, hash) {\n let id = item.id;\n // library中一定有id,因为是一级,二级+特殊需求才会出现放开\n if(isNil(id)) {\n throw new Error('Library item miss id: ' + JSON.stringify(item));\n }\n else {\n hash[id] = item;\n }\n}\n\n// 有library的json一级初始化library供链接前,可以替换library里的内容\nfunction replaceLibraryVars(json, hash, vars) {\n // 新版同级vars语法,增加可以修改library子元素中递归子属性\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n delete json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // library.xxx,需要>=2的长度,开头必须是library\n if(Array.isArray(member) && member.length > 1 && vars && vars.hasOwnProperty(id)) {\n if(member[0] === 'library') {\n let target = hash;\n for(let i = 1, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n let old = target[k];\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(old);\n }\n // 直接替换library的子对象,需补充id和tagName\n if(i === 1) {\n target[k] = Object.assign({ id: old.id, tagName: old.tagName }, v);\n }\n // 替换library中子对象的一个属性直接赋值\n else {\n target[k] = v;\n }\n }\n // 子属性继续下去\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Library slot miss ' + k);\n return;\n }\n }\n }\n }\n });\n }\n // 兼容老版var-,只支持一级library元素\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-library.') === 0) {\n let v = json[k];\n delete json[k];\n if(!v || !vars) {\n return;\n }\n let k2 = k.slice(12);\n // 有id且变量里面传入了替换的值\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n if(isFunction(value)) {\n value = value(v);\n }\n // library对象也要加上id,与正常的library保持一致\n hash[k2] = Object.assign({ id: k2 }, value);\n }\n }\n });\n }\n}\n\nfunction replaceVars(json, vars) {\n if(json) {\n // 新版vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n delete json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // 排除特殊的library\n if(Array.isArray(member) && member.length && member[0] !== 'library' && vars && vars.hasOwnProperty(id)) {\n let target = json;\n for(let i = 0, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // undefined和null意义不同\n if(v === undefined) {\n return;\n }\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target[k]);\n }\n target[k] = v;\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Slot miss ' + k);\n return;\n }\n }\n }\n });\n }\n }\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-') === 0) {\n let v = json[k];\n delete json[k];\n if(!v || !vars) {\n return;\n }\n let k2 = k.slice(4);\n // 有id且变量里面传入了替换的值,值可为null,因为某些情况下空为自动\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n // undefined和null意义不同\n if(value === undefined) {\n return;\n }\n let target = json;\n // 如果有.则特殊处理子属性\n if(k2.indexOf('.') > -1) {\n let list = k2.split('.');\n let len = list.length;\n for(let i = 0; i < len - 1; i++) {\n k2 = list[i];\n // 避免异常\n if(target[k2]) {\n target = target[k2];\n }\n else {\n inject.warn('parseJson vars is not exist: ' + v.id + ', ' + k + ', ' + list.slice(0, i).join('.'));\n return;\n }\n }\n k2 = list[len - 1];\n }\n // 支持函数模式和值模式\n if(isFunction(value)) {\n value = value(v);\n }\n target[k2] = value;\n }\n }\n });\n }\n }\n}\n\n// parse的options可以传总的duration等\nfunction replaceAnimateOptions(options, opt) {\n ['iterations', 'fill', 'duration', 'direction', 'easing', 'fps', 'delay', 'endDelay', 'playbackRate', 'spfLimit'].forEach(k => {\n if(opt.hasOwnProperty(k)) {\n options[k] = opt[k];\n }\n });\n}\n\nfunction apply(json, opt, hash) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => apply(item, opt, hash));\n }\n // 先判断是否是个链接到库的节点,是则进行链接操作\n let libraryId = json.libraryId;\n if(!isNil(libraryId)) {\n let libraryItem = hash[libraryId];\n // 规定图层child只有init和动画,tagName和属性和子图层来自库\n if(libraryItem) {\n linkLibrary(json, libraryItem);\n }\n else {\n throw new Error('Link library miss id: ' + libraryId);\n }\n }\n // 再判断是否有library形成一个新的作用域,会出现library下的library使得一个链接节点链接后出现library的情况\n let library = json.library;\n if(Array.isArray(library)) {\n hash = {};\n library.forEach(item => initLibrary(item, hash));\n // 替换library插槽\n replaceLibraryVars(json, hash, opt.vars);\n delete json.library;\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n // 缩写src和font\n let src = props.src;\n if(/^#\\d+$/.test(src)) {\n let imgs = opt.imgs, i = parseInt(src.slice(1));\n if(Array.isArray(imgs)) {\n props.src = imgs[i];\n }\n }\n let style = props.style;\n if(style) {\n let fontFamily = style.fontFamily;\n if(/^#\\d+$/.test(fontFamily)) {\n let fonts = opt.fonts, i = parseInt(fontFamily.slice(1));\n if(Array.isArray(fonts)) {\n style.fontFamily = fonts[i];\n }\n }\n (opt.abbr !== false) && abbr2full(style, abbrCssProperty);\n // 先替换style的\n replaceVars(style, opt.vars);\n }\n // 再替换静态属性,style也作为属性的一种\n replaceVars(props, opt.vars);\n // 替换children里的内容,如文字,无法直接替换tagName/props/children/animate本身,因为下方用的还是原引用\n replaceVars(json, opt.vars);\n json.children = apply(children, opt, hash);\n if(animate) {\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n animate.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrAnimate);\n let { value, options } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n replaceAnimateOptions(options, opt);\n }\n });\n }\n return json;\n}\n\n// 将library、vars应用于json,转换json为一个普通的原始json数据\nexport default function(json, options = {}) {\n // json中定义无abbr\n if(json.abbr === false) {\n options.abbr = false;\n }\n if(options.abbr !== false) {\n inject.warn('Abbr in json is deprecated');\n }\n // 特殊单例声明无需clone加速解析\n if(!options.singleton && !json.singleton) {\n json = util.clone(json);\n }\n return apply(json, options, {});\n}\n","import parse from './parse';\nimport abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport font from '../style/font';\nimport Controller from '../animate/Controller';\nimport apply from './apply';\n\nlet o = {\n apply,\n parse(karas, json, dom, options) {\n if(!json) {\n return;\n }\n // 根节点的fonts字段定义字体信息\n let fonts = json.fonts;\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let { fontFamily, url, data } = item;\n if(fontFamily && (url || data)) {\n font.register(fontFamily, url, data);\n }\n });\n }\n // 重载,在确定dom传入选择器字符串或html节点对象时作为渲染功能,否则仅创建vd返回\n if(!inject.isDom(dom)) {\n options = options || dom || {};\n dom = null;\n }\n else {\n options = options || {};\n }\n json = apply(json, options);\n // 暂存所有动画声明,等root的生成后开始执行\n let animateRecords = [];\n let vd = parse(karas, json, animateRecords, 0, null);\n // 有dom时parse作为根方法渲染\n if(dom) {\n let { tagName } = json;\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) === -1) {\n throw new Error('Parse dom must be canvas/svg/webgl');\n }\n // parse直接(非递归)的动画记录\n let ac = options.controller instanceof Controller ? options.controller : vd.animateController;\n // 第一次render,收集递归json里面的animateRecords,它在xom的__layout最后生成\n karas.render(vd, dom);\n // 直接的json里的animateRecords,再加上递归的parse的json的(第一次render布局时处理)动画一并播放\n if(options.autoPlay !== false) {\n ac.__records = ac.__records.concat(animateRecords);\n ac.__playAuto();\n }\n // 不自动播放进入记录列表,初始化并等待手动调用\n else {\n ac.__records2 = ac.__records2.concat(animateRecords);\n ac.init(ac.__records2, ac.list2);\n }\n }\n // 递归的parse,如果有动画,此时还没root,先暂存下来,等上面的root的render第一次布局时收集\n else {\n if(animateRecords.length) {\n vd.__animateRecords = {\n options,\n list: animateRecords,\n controller: options.controller instanceof Controller ? options.controller : null,\n };\n }\n }\n return vd;\n },\n loadAndParse(karas, json, dom, options) {\n let { fonts, components, imgs } = json;\n let list1 = [];\n let list2 = [];\n let list3 = [];\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let url = item.url;\n if(url) {\n list1.push(item);\n }\n });\n }\n if(components) {\n if(!Array.isArray(components)) {\n components = [components];\n }\n components.forEach(item => {\n let { tagName, url, reload } = item;\n // 如果没申明reload且已经被注册,则无需重复加载\n if(tagName && karas.Component.hasRegister(tagName) && !reload) {\n return;\n }\n // 即便没有tagName也要加载,可能组件内部执行了注册逻辑\n if(url) {\n list2.push(item);\n }\n });\n }\n if(imgs) {\n if(!Array.isArray(imgs)) {\n imgs = [imgs];\n }\n imgs.forEach(item => {\n let url = item.url;\n if(url) {\n list3.push(url);\n }\n });\n }\n let a = list1.length, b = list2.length, c = list3.length;\n let count = 0;\n let cb = function() {\n if(count === a + b + c) {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n }\n };\n if(a || b || c) {\n karas.inject.loadFont(list1, function() {\n count += a;\n cb();\n });\n karas.inject.loadComponent(list2.map(item => item.url), function() {\n count += b;\n // 默认约定加载的js组件会在全局变量申明同名tagName,已有不覆盖,防止组件代码内部本身有register\n list2.forEach(item => {\n let tagName = item.tagName;\n if(tagName && window[tagName] && !karas.Component.hasRegister(tagName)) {\n karas.Component.register(tagName, window[tagName]);\n }\n });\n cb();\n });\n karas.inject.measureImg(list3, function() {\n count += c;\n cb();\n });\n }\n else {\n cb();\n }\n },\n abbr,\n};\n\nexport default o;\n","import css from './css';\nimport reset from './reset';\nimport unit from './unit';\nimport font from './font';\nimport abbr from './abbr';\nimport transform from './transform';\n\nexport default {\n css,\n reset,\n unit,\n font,\n abbr,\n transform,\n};\n","import Animation from './Animation';\nimport Controller from './Controller';\nimport easing from './easing';\nimport frame from './frame';\n\nexport default {\n Animation,\n Controller,\n easing,\n frame,\n};\n","import matrix from './matrix';\nimport geom from './geom';\n\n// 一条边相对于自己开始点的x向量角度,即从x到此边旋转,0~180和-180~0,需要判断象限\nfunction calDeg(x1, y1, x2, y2) {\n let dx = x2 - x1;\n let dy = y2 - y1;\n let atan = Math.atan(Math.abs(dy) / Math.abs(dx));\n // 2象限\n if(dx < 0 && dy >= 0) {\n return Math.PI - atan;\n }\n // 3象限\n if(dx < 0 && dy < 0) {\n return atan - Math.PI;\n }\n // 1象限\n if(dx >= 0 && dy >= 0) {\n return atan;\n }\n // 4象限,顺时针正好\n return -atan;\n}\n\nfunction rotate(theta) {\n let sin = Math.sin(theta);\n let cos = Math.cos(theta);\n let t = matrix.identity();\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param points\n */\nfunction pointIndex(points) {\n let [x1, y1, x2, y2, x3, y3] = points;\n let index = [0, 1, 2];\n // 将a点放入最左\n if(x2 < x1 && x2 < x3) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n index[0] = 1;\n index[1] = 0;\n }\n else if(x3 < x2 && x3 < x1) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n index[0] = 2;\n index[2] = 0;\n }\n // 有可能出现2个并列的情况,判断取上面那个\n if(x1 === x2) {\n if(y1 > y2) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n let t = index[0];\n index[0] = index[1];\n index[1] = t;\n }\n }\n else if(x1 === x3) {\n if(y1 > y3) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n let t = index[0];\n index[0] = index[2];\n index[2] = t;\n }\n }\n // ab到ac要顺时针旋转,即2个向量夹角为正,用向量叉乘判断正负\n let cross = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n if(cross < 0) {\n [x2, y2, x3, y3] = [x3, y3, x2, y2];\n let t = index[1];\n index[1] = index[2];\n index[2] = t;\n }\n return [x1, y1, x2, y2, x3, y3, index];\n}\n\n/**\n * 第2个点根据第一个点的交换顺序交换\n * @param points\n * @param index\n * @returns {[]}\n */\nfunction pointByIndex(points, index) {\n let res = [];\n for(let i = 0, len = index.length; i < len; i++) {\n let j = index[i];\n res.push(points[j * 2]);\n res.push(points[j * 2 + 1]);\n }\n return res;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param source 源3个点\n * @param target 目标3个点\n * @returns 交换顺序后的点坐标\n */\nfunction exchangeOrder(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3, index] = pointIndex(source);\n let [tx1, ty1, tx2, ty2, tx3, ty3] = pointByIndex(target, index);\n return [\n [sx1, sy1, sx2, sy2, sx3, sy3],\n [tx1, ty1, tx2, ty2, tx3, ty3]\n ];\n}\n\n/**\n * 存在一种情况,变换结果使得三角形镜像相反了,即顶点a越过bc线,判断是否溢出\n * @param source\n * @param target\n * @returns {boolean}是否溢出\n */\nfunction isOverflow(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n let cross1 = (sx2 - sx1) * (sy3 - sy1) - (sx3 - sx1) * (sy2 - sy1);\n let cross2 = (tx2 - tx1) * (ty3 - ty1) - (tx3 - tx1) * (ty2 - ty1);\n return cross1 > 0 && cross2 < 0 || cross1 < 0 && cross2 > 0;\n}\n\nfunction transform(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n // 记录翻转\n let overflow = isOverflow(source, target);\n // 第0步,将源三角第1个a点移到原点\n let m = matrix.identity();\n m[12] = -sx1;\n m[13] = -sy1;\n let t;\n // 第1步,以第1条边ab为基准,将其贴合x轴上,为后续倾斜不干扰做准备\n let theta = calDeg(sx1, sy1, sx2, sy2);\n if(theta !== 0) {\n t = rotate(-theta);\n m = matrix.multiply(t, m);\n }\n // 第2步,以第1条边AB为基准,缩放x轴ab至目标相同长度,可与4步合并\n let ls = geom.pointsDistance(sx1, sy1, sx2, sy2);\n let lt = geom.pointsDistance(tx1, ty1, tx2, ty2);\n // if(ls !== lt) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[0] = scale;\n // m = matrix.multiply(t, m);\n // }\n // 第3步,缩放y,先将目标三角形旋转到x轴平行,再变换坐标计算\n let n = matrix.identity();\n n[12] = -tx1;\n n[13] = -ty1;\n theta = calDeg(tx1, ty1, tx2, ty2);\n // 记录下这个旋转角度,后面源三角形要反向旋转\n let alpha = theta;\n if(theta !== 0) {\n t = rotate(-theta);\n n = matrix.multiply(t, n);\n }\n // 目标三角反向旋转至x轴后的坐标\n // 源三角目前的第3点坐标y值即为长度,因为a点在原点0无需减去\n let ls2 = Math.abs(matrix.calPoint({ x: sx3, y: sy3 }, m).y);\n let lt2 = Math.abs(matrix.calPoint({ x: tx3, y: ty3 }, n).y);\n // 缩放y\n // if(ls2 !== lt2) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[3] = scale;\n // m = matrix.multiply(t, m);\n // }\n if(ls !== lt || ls2 !== lt2) {\n t = matrix.identity();\n if(ls !== lt) {\n t[0] = lt / ls;\n }\n if(ls2 !== lt2) {\n t[5] = lt2 / ls2;\n }\n m = matrix.multiply(t, m);\n }\n // 第4步,x轴倾斜,用余弦定理求目前a和A的夹角\n n = m;\n let { x: ax1, y: ay1 } = matrix.calPoint({ x: sx1, y: sy1 }, n);\n let { x: ax2, y: ay2 } = matrix.calPoint({ x: sx2, y: sy2 }, n);\n let { x: ax3, y: ay3 } = matrix.calPoint({ x: sx3, y: sy3 }, n);\n let ab = geom.pointsDistance(ax1, ay1, ax2, ay2);\n let ac = geom.pointsDistance(ax1, ay1, ax3, ay3);\n let bc = geom.pointsDistance(ax3, ay3, ax2, ay2);\n let AB = geom.pointsDistance(tx1, ty1, tx2, ty2);\n let AC = geom.pointsDistance(tx1, ty1, tx3, ty3);\n let BC = geom.pointsDistance(tx3, ty3, tx2, ty2);\n let a = geom.angleBySide(bc, ab, ac);\n let A = geom.angleBySide(BC, AB, AC);\n // 先至90°,再旋转至目标角,可以合并成tan相加,不知道为什么不能直接tan倾斜差值角度\n if(a !== A) {\n t = matrix.identity();\n t[4] = Math.tan(a - Math.PI * 0.5) + Math.tan(Math.PI * 0.5 - A);\n m = matrix.multiply(t, m);\n }\n // 发生翻转时特殊处理按x轴垂直翻转\n if(overflow) {\n m[1] = -m[1];\n m[5] = -m[5];\n m[13] = -m[13];\n }\n // 第5步,再次旋转,角度为目标旋转到x轴的负值,可与下步合并\n if(alpha !== 0) {\n t = rotate(alpha);\n // m = matrix.multiply(t, m);\n }\n else {\n t = matrix.identity();\n }\n // 第6步,移动第一个点的差值\n // t = matrix.identity();\n t[12] = tx1;\n t[13] = ty1;\n return matrix.multiply(t, m);\n}\n\nexport default {\n exchangeOrder,\n isOverflow,\n transform,\n};\n","import matrix from './matrix';\nimport tar from './tar';\nimport vector from './vector';\nimport equation from './equation';\nimport geom from './geom';\nimport bezier from './bezier';\nimport isec from './isec';\n// import { union, diff, intersection, xor } from './martinez';\nimport bo from './bo/index';\n\nexport default {\n matrix,\n tar,\n vector,\n equation,\n geom,\n bezier,\n isec,\n booleanOperations: bo,\n};\n","import level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\nimport CanvasPage from './CanvasPage';\nimport CanvasCache from './CanvasCache';\nimport webgl from '../gl/webgl';\n\nexport default {\n level,\n change,\n Page,\n Cache,\n CanvasPage,\n CanvasCache,\n webgl,\n};\n","import Node from './node/Node';\nimport Text from './node/Text';\nimport Xom from './node/Xom';\nimport Dom from './node/Dom';\nimport Img from './node/Img';\nimport Root from './node/Root';\nimport tag from './node/tag';\nimport mode from './refresh/mode';\nimport Geom from './node/geom/Geom';\nimport Line from './node/geom/Line';\nimport Polyline from './node/geom/Polyline';\nimport Polygon from './node/geom/Polygon';\nimport Sector from './node/geom/Sector';\nimport Rect from './node/geom/Rect';\nimport Circle from './node/geom/Circle';\nimport Ellipse from './node/geom/Ellipse';\nimport Component from './node/Component';\nimport Event from './util/Event';\nimport util from './util/util';\nimport inject from './util/inject';\nimport enums from './util/enums';\nimport debug from './util/debug';\nimport parser from './parser/index';\nimport style from './style/index';\nimport animate from './animate/index';\nimport math from './math/index';\nimport refresh from './refresh/index';\nimport { version } from '../package.json';\nimport ca from './gl/ca';\n\nGeom.register('$line', Line);\nGeom.register('$polyline', Polyline);\nGeom.register('$polygon', Polygon);\nGeom.register('$sector', Sector);\nGeom.register('$rect', Rect);\nGeom.register('$circle', Circle);\nGeom.register('$ellipse', Ellipse);\n\nlet karas = {\n version,\n render(root, dom) {\n if(!(root instanceof Root)) {\n throw new Error('Render dom must be canvas/svg/webgl');\n }\n if(dom) {\n root.appendTo(dom);\n }\n return root;\n },\n createElement(tagName, props) {\n props = props || {};\n let children = [];\n for(let i = 2, len = arguments.length; i < len; i++) {\n children.push(arguments[i]);\n }\n if(util.isString(tagName)) {\n if(tagName.charAt(0) === '$') {\n return this.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n return this.createCp(tagName, props, children);\n }\n else {\n return this.createVd(tagName, props, children);\n }\n }\n else if(tagName) {\n // 特殊的$匿名类\n if(tagName instanceof Geom || tagName.prototype && tagName.prototype instanceof Geom) {\n return this.createGm(tagName, props);\n }\n return this.createCp(tagName, props, children);\n }\n },\n createVd(tagName, props, children = []) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n if(tag.TAG_NAME.hasOwnProperty(tagName)) {\n if(tagName === 'img') {\n return new Img(tagName, props);\n }\n else {\n return new Dom(tagName, props, children);\n }\n }\n throw new Error(`Can not use <${tagName}>`);\n },\n createGm(tagName, props) {\n let klass = Geom.getRegister(tagName);\n if(!util.isString(tagName)) {\n let s = /^function ([\\w$]+)/.exec(tagName.toString());\n if(s && s.length > 1) {\n tagName = s[1];\n }\n }\n return new klass(tagName, props);\n },\n createCp(tagName, props, children = []) {\n let klass = Component.getRegister(tagName);\n props.children = children; // 特例,cp的children通过props传入\n return new klass(props);\n },\n parse(json, dom, options) {\n return parser.parse(this, json, dom, options);\n },\n loadAndParse(json, dom, options) {\n return parser.loadAndParse(this, json, dom, options);\n },\n mode,\n Component,\n Node,\n Text,\n Geom,\n Xom,\n Dom,\n Img,\n Root,\n Event,\n util,\n inject,\n style,\n parser,\n animate,\n math,\n refresh,\n enums,\n ca,\n get debug() {\n return debug.flag;\n },\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nif(typeof window !== 'undefined') {\n window.karas = karas;\n}\nelse if(typeof self !== 'undefined') {\n self.karas = karas;\n}\n\nexport default karas;\n"],"names":["Node","__x","__y","__width","__height","__baseline","__verticalBaseline","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","__bbox","__filterBbox","__isDestroyed","lv","j","__struct","node","childIndex","diff","CANVAS","SVG","WEBGL","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","VMAX","VMIN","GRADIENT","o","calUnit","v","n","parseFloat","test","u","identity","multiply","a","b","isE","c","i","a0","a1","a2","a3","multiplyTfo","m","x","y","tfoMultiply","d","h","l","p","multiplyTranslateX","multiplyTranslateY","multiplyTranslateZ","multiplyRotateX","sin","Math","cos","e","f","g","k","multiplyRotateY","multiplyRotateZ","multiplySkewX","tan","multiplySkewY","multiplyScaleX","multiplyScaleY","multiplyScaleZ","multiplyPerspective","max","calPoint","point","z","w","undefined","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","inverse","length","inverse4","divisor","s","inv","det","m2m6","point2d","slice","calRectPoint","xa","ya","xb","yb","matrix","x1","y1","z1","w1","x3","y3","z3","w3","x2","y2","z2","w2","x4","y4","z4","w4","t","toString","isType","type","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","Object","isNil","joinSourceArray","arr","res","len","item","Array","isArray","stringify","encodeHtml","prop","replace","joinVirtualDom","vd","defs","forEach","joinDef","bb","joinVd","conClip","children","props","tagName","content","opacity","transform","visibility","mask","overflow","filter","mixBlendMode","def","uuid","joinItem","rgba2int","color","charAt","push","parseInt","match","int2rgba","floor","int2invert","joinArr","arr2hash","hash","list","keys","hash2arr","clone","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","transformBbox","bbox","dx","dy","mx","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","prefixHex","replaceRgba2Hex","$0","$1","$2","$3","$4","isPrimitive","isAuto","flag","SPF","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","offscreenCanvas","key","width","height","message","debug","document","createElement","style","setAttribute","body","appendChild","ctx","canvas","enabled","available","release","globalAlpha","setTransform","clearRect","removeChild","IMG","INIT","LOADING","LOADED","FONT","COMPONENT","div","SUPPORT_FONT","defaultFontFamilyData","createDiv","position","left","top","whiteSpace","inject","measureTextSync","str","ff","fs","fw","isUpright","fontFamily","fontSize","fontWeight","writingMode","innerHTML","window","getComputedStyle","measureTextListMax","cns","childNodes","measureImg","url","cb","count","cache","error","state","success","task","img","Image","onload","splice","onerror","substr","host","exec","location","hostname","crossOrigin","src","warn","console","requestAnimationFrame","bind","setTimeout","cancelAnimationFrame","id","clearTimeout","now","performance","hasOffscreenCanvas","getOffscreenCanvas","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","defaultFontFamily","getFontCanvas","checkSupportFontFamily","toLowerCase","context","textAlign","fillStyle","textBaseline","font","fillText","getImageData","data","loadFont","ab","FontFace","load","then","fonts","add","ArrayBuffer","request","XMLHttpRequest","open","responseType","response","send","loadComponent","script","async","head","TINF_OK","TINF_DATA_ERROR","Tree","table","Uint16Array","trans","Data","dest","sourceIndex","tag","bitcount","destLen","ltree","dtree","sltree","sdtree","length_bits","Uint8Array","length_base","dist_bits","dist_base","clcidx","code_tree","lengths","tinf_build_bits_base","bits","base","delta","first","sum","tinf_build_fixed_trees","lt","dt","offs","tinf_build_tree","off","num","tinf_getbit","bit","tinf_read_bits","val","tinf_decode_symbol","cur","tinf_decode_trees","hlit","hdist","hclen","clen","sym","prev","tinf_inflate_block_data","dist","tinf_inflate_uncompressed_block","invlength","tinf_uncompress","bfinal","btype","Error","subarray","getTag","dataView","offset","String","fromCharCode","getInt8","getUShort","getUint16","getULong","getUint32","getFixed","decimal","getInt16","fraction","parseOpenTypeTableEntries","numTables","tableEntries","checksum","compression","parseWOFFTableEntries","compLength","origLength","compressedLength","uncompressTable","tableEntry","inBuffer","buffer","outBuffer","inflate","byteLength","view","DataView","Parser","relativeOffset","minorBase","major","minor","parse","arrayBuffer","signature","flavor","emSquare","ascent","descent","lineGap","parseVersion","parseFixed","parseULong","parseUShort","abs","parseShort","CALLBACK","info","arial","lhr","blr","lgr","helvetica","verdana","tahoma","georgia","simsun","support","checked","register","name","fontInfo","r","opentype","setData","pop","__emitFontRegister","assign","hasRegister","hasLoaded","onRegister","offRegister","indexOf","DOM","display","boxSizing","right","bottom","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","lineHeight","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundClip","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","order","justifyContent","alignItems","alignSelf","alignContent","letterSpacing","transformOrigin","zIndex","translateX","translateY","translateZ","scaleX","scaleY","scaleZ","skewX","skewY","rotateX","rotateY","rotateZ","rotate3d","perspective","perspectiveOrigin","transformStyle","backfaceVisibility","boxShadow","pointerEvents","textOverflow","lineClamp","textStrokeWidth","textStrokeColor","textStrokeOver","fontSizeShrink","GEOM","fill","stroke","strokeWidth","strokeDasharray","strokeLinecap","strokeLinejoin","strokeMiterlimit","fillRule","DOM_ENTRY_SET","DOM_KEY_SET","GEOM_ENTRY_SET","GEOM_KEY_SET","INHERIT_KEY_SET","VALID_STRING_VALUE","isValid","gradient","dotProduct","dotProduct3","crossProduct","crossProduct3","unitize","unitize3","length3","isParallel","isZero","ag","angle","PI","isParallel3","isZero3","angle3","acos","sqrt","pow","getPerpendicularVector3","STYLE_KEY","POSITION","DISPLAY","TOP","RIGHT","BOTTOM","LEFT","MARGIN_TOP","MARGIN_RIGHT","MARGIN_BOTTOM","MARGIN_LEFT","PADDING_TOP","PADDING_RIGHT","PADDING_BOTTOM","PADDING_LEFT","FONT_SIZE","FONT_FAMILY","COLOR","FONT_STYLE","FONT_WEIGHT","LINE_HEIGHT","BACKGROUND_IMAGE","BACKGROUND_COLOR","BACKGROUND_SIZE","BACKGROUND_REPEAT","BACKGROUND_POSITION_X","BACKGROUND_POSITION_Y","BORDER_TOP_WIDTH","BORDER_RIGHT_WIDTH","BORDER_BOTTOM_WIDTH","BORDER_LEFT_WIDTH","BORDER_TOP_COLOR","BORDER_RIGHT_COLOR","BORDER_BOTTOM_COLOR","BORDER_LEFT_COLOR","BORDER_TOP_STYLE","BORDER_RIGHT_STYLE","BORDER_BOTTOM_STYLE","BORDER_LEFT_STYLE","BORDER_TOP_LEFT_RADIUS","BORDER_TOP_RIGHT_RADIUS","BORDER_BOTTOM_RIGHT_RADIUS","BORDER_BOTTOM_LEFT_RADIUS","WIDTH","HEIGHT","FLEX_GROW","FLEX_SHRINK","FLEX_BASIS","FLEX_DIRECTION","JUSTIFY_CONTENT","ALIGN_ITEMS","ALIGN_SELF","TEXT_ALIGN","TRANSFORM_ORIGIN","VISIBILITY","OPACITY","Z_INDEX","TRANSFORM","TRANSLATE_X","TRANSLATE_Y","TRANSLATE_Z","SCALE_X","SCALE_Y","SCALE_Z","SKEW_X","SKEW_Y","ROTATE_X","ROTATE_Y","ROTATE_Z","ROTATE_3D","PERSPECTIVE","PERSPECTIVE_ORIGIN","FILTER","BOX_SHADOW","POINTER_EVENTS","OVERFLOW","MIX_BLEND_MODE","BACKGROUND_CLIP","WHITE_SPACE","TEXT_OVERFLOW","LETTER_SPACING","LINE_CLAMP","ORDER","FLEX_WRAP","ALIGN_CONTENT","TEXT_STROKE_WIDTH","TEXT_STROKE_COLOR","TEXT_STROKE_OVER","WRITING_MODE","TRANSFORM_STYLE","BACKFACE_VISIBILITY","BOX_SIZING","FONT_SIZE_SHRINK","FILL","STROKE","STROKE_WIDTH","STROKE_DASHARRAY","STROKE_DASHARRAY_STR","STROKE_LINECAP","STROKE_LINEJOIN","STROKE_MITERLIMIT","FILL_RULE","MATRIX","BORDER_TOP","BORDER_RIGHT","BORDER_BOTTOM","BORDER_LEFT","TRANSLATE_PATH","STYLE2LOWER_MAP","style2Lower","toUpperCase","STYLE2UPPER_MAP","style2Upper","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","k2","ELLIPSIS","H","vector","enums","deg","pointInConvexPolygon","vertexes","xmax","ymax","xmin","ymin","pointInQuadrilateral","angleBySide","theta","sideByAngle","alpha","pointsDistance","triangleIncentre","ellipsePoints","ox","oy","sectorPoints","begin","end","h2","d2r","atan","rx","ry","p1","p2","p4","p3","concat","temp","getRectsIntersection","isRectsOverlap","ax1","ay1","ax4","ay4","bx1","by1","bx4","by4","includeIntersect","isRectsInside","calCoordsInNode","px","py","computedStyle","calPercentInNode","ds","Infinity","r2d","pointOnCircle","getPlainNormalEquation","points","getConicGradientImage","originX","originY","stop","getAngle","increasingList","map","start","factor","idx","canvasPolygon","moveTo","lineTo","quadraticCurveTo","bezierCurveTo","svgPolygon","canvasLine","controlA","controlB","svgLine","canvasFilter","svgFilter","geom","unit","painter","calFitDashed","total","bs","be","smin","smax","dmin","dmax","ps","pd","outer","per","free","mo","calDashed","m1","m2","m3","m4","bw","calPoints","borderWidth","borderStyle","deg1","deg2","direction","beginRadius","endRadius","isLast","main1","main2","cross1","cross2","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","ca","calBezierTopLeft","controls1","controls2","limit","endLength","oyr","calBezierTopRight","sx","isStart","crossDx","p1x","p1y","p2x","p2y","dx1","dsx1","dx2","dsx2","cpx2","cpy2","cpx1","cpy1","crossDsx","beta","tanBetaDiv2Sqrt","tanAlphaHalf","degTg","degTg1","cdx1","cdy1","cx1","cy1","degTg2","cdx2","cdy2","cx2","cy2","isEnd","oyt","oyb","oxt","calBezierRightTop","oxb","calBezierRightBottom","calBezierBottomLeft","calBezierBottomRight","calBezierLeftTop","calBezierLeftBottom","calRadius","btlr","btrr","bbrr","bblr","need","btlx","btly","btrx","btry","bbrx","bbry","bblx","bbly","BR_KS","calBorderRadius","currentStyle","root","noRadius","next","half","calBorderRadiusInline","contentBoxList","last","isEllipsis","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","closePath","virtualDom","getLinearDeg","getRadialPosition","center","getColorStop","firstColor","dr","dg","db","da","unshift","calLinearCoords","cx","cy","x0","y0","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","tx","ty","asin","ratio","parseGradient","reg","i5","i6","i7","percent","getLinear","coords","l1","l2","l3","l4","r1","getRadial","scx","scy","getConic","calConicRadius","renderConic","isInline","border","offscreen","imgData","putImageData","save","clip","drawImage","restore","parseFlex","grow","shrink","basis","parseMarginPadding","parseOneBorder","margin","padding","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","background","backgroundPosition","flex","translate","translate3d","scale","scale3d","rotate","skew","textStroke","toFull","bgc","bgi","bgr","bgp","gd","repeat","join","isEmpty","v2","isColorKey","isLengthKey","isExpandKey","isGradientKey","isRadiusKey","RESET_DOM","reset","RESET_GEOM","addGeom","ks","isIgnore","isGeom","isRepaint","kernelSize","sigma","outerSize","outerSizeByD","gaussianWeight","E","change","isGradient","TRANSFORM_HASH","compatibleTransform","camel","convertStringValue","normalize","resetList","abbr","flexFlow","k1","arr1","arr2","k3","arr3","isNaN","item2","setFontStyle","specialFontSize","getBaseline","calFontFamily","normal","calNormalLineHeight","getVerticalBaseline","calRelativePercent","parent","domParent","calRelative","isWidth","isRelativeOrAbsolute","equalStyle","oa","ob","av","bv","avj","bvj","aa","ad","bd","isArrayD1","isArrayD2","ap","bp","aj","bj","ac","bc","isMulti","cloneStyle","vv","spreadBoxShadow","yt","xr","spread","inset","blur","spreadFilter","calRotateX","calRotateY","calRotateZ","calRotate3d","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calSingleValue","calMatrixByOrigin","calMatrixWithOrigin","__computedStyle","calPerspectiveMatrix","ppt","isPerspectiveMatrix","TuOrU","TextBox","index","__index","__content","__parentLineBox","__isVertical","cacheStyle","dom","css","__endX","__endY","me","matrixEvent","dev1","dev2","overFill","cjk","strokeText","measureText","nowCjk","__gradient","__bx1","__by1","__bx2","__by2","baseline","verticalBaseline","CHAR","Ellipsis","text","__x1","__y1","__text","__ellipsis","__fitFontSize","TX","TY","TZ","OP","FT","PPT","SX","SY","SZ","RZ","TF","NONE","CACHE","TRANSLATE","SCALE","TRANSFORM_ALL","MASK","REPAINT","REFLOW","REBUILD","ENUM","isTransforms","contain","value","exclude","getLevel","isReflow","measureLineWidth","ew","perW","hypotheticalNum","rw","newLine","measure","fitFontSize","mw","round","reduce","getFontKey","ls","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__limitCache","__hasContent","__cache","lx","ly","lineBoxManager","endSpace","lineClampCount","textBoxes","maxW","beginSpace","lineCount","mainCoords","isTextOverflow","textWidth","containerSize","__lineBack","textBox","addItem","verticalLineHeight","ew2","lineBox","isNewLine","tb","__layoutNone","__resetLb","ep","tbs","mbp","isLayout","__offsetX","__offsetY","firstCharWidth","lineWidth","strokeStyle","render","__addUpdate","level","isShadowRoot","hostRoot","__children","__zIndexChildren","__deleteStruct","__destroy","updateContent","fontKey","charWidth","__currentStyle","__style","__cacheStyle","__matrix","__matrixEvent","__perspectiveMatrix","Event","__eHash","handle","on","apply","__karasEventCb","once","emit","event","fns","fn","REGISTER","Component","__tagName","__ref","__isMounted","__taskList","sr","__shadowRoot","listener","componentDidMount","REFRESH","ref","componentWillUnmount","__shadow","force","shadowRoot","__emitEvent","defineProperty","get","arguments","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","bx2","by2","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","__cacheDefs","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","ceil","image","needResize","copy","traversalBefore","__before","traversalAfter","__after","isPause","Frame","__rootTask","__task","__now","__init","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","Float32Array","A","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","bezier","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","guessForT","initialSlope","BezierEasing","easing","linear","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","v1","v3","timingFunction","Controller","__records","__records2","__list","__list2","__onList","__lastTime","args","records","animate","areaStart","areaDuration","isDestroyed","options","autoPlay","onList","list2","time","timestamp","init","__action","__mergeAuto","__on","__set","genBeforeRefresh","aniParams","allInFn","framing","duration","es","translatePath","transition","fixed","lastPercent","calByUnit","container","calDiff","cl","st","pm","nm","has","pv","nv","pvv","nvv","clientHeight","clientWidth","pi","ni","offsetHeight","offsetWidth","pp","nn","parentComputedStyle","calDiffGradient","len2","pv2","nv2","len3","pv3","nv3","eq","isArrP","isArrN","pz","nz","np","calFrame","hasTp","ts","cs","CAL_HASH","hasZ","hasColor","hasTsColor","hasTsWidth","hasTsOver","optimize","ea","steps","stepsD","calTransform","calFilter","calOrigin","calPosition","calBoxShadow","calBgSize","calNumber","calPath","calLength","calGradient","calColor","frame","clv","cv","st2","cli","calLastStyle","currentProps","__currentProps","gotoOverload","animation","frameCb","FRAME","__isChange","__firstPlay","PLAY","__playCb","Animation","__id","nl","__options","op","__begin","__playState","__target","__firstEnter","iterations","frames","framesR","originStyle","__frames","__framesR","__keys","__originStyle","__isDelay","__outBeginDelay","__playCount","fps","spfLimit","delay","endDelay","playbackRate","__currentFrames","reverse","alternateReverse","controller","addControl","__timestamp","unify","inherit","calTransition","isFinish","__cancelTask","__nextTime","__currentTime","__delay","__duration","__iterations","__endDelay","playState","__hasFin","__hasCancel","__enterFrame","__direction","__fpsTime","__startTime","__end","__fps","currentFrames","stayBegin","__stayBegin","stayEnd","__stayEnd","__areaStart","__areaDuration","__playbackRate","__spfLimit","currentTime","lastFrame","__currentFrame","dur","__inFps","currentFrame","playCount","isEven","isLastCount","frameTime","binarySearch","isLastFrame","inEndDelay","notSameFrame","needClean","__nextEnd","__finished","calIntermediateStyle","playCb","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","spf","alternate","animateController","__animateController","remove","removeControl","__checkModify","__fill","backwards","both","forwards","__easing","current","getProps","__outerWidth","__outerHeight","tf","middle","modify","calIncrease","o2","n2","renderBoxShadow","box","spreadBox","cross","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","mbmName","isValidMbm","mbm","getFirstEmptyInlineWidth","flowChildren","child","Xom","__isInline","getLastEmptyInlineWidth","__listener","addEventListener","__animationList","__loadBgi","isClip","__clip","__mask","__refreshLevel","__opacity","__frameAnimateList","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__cacheTotal","__cacheFilter","__cacheMask","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","hasMask","__calSize","includePercent","isRoot","ph","crs","fontRegister","__clientWidth","__offsetWidth","__clientHeight","__offsetHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__layoutFlow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__x2","__x3","__x4","__x5","__x6","__y2","__y3","__y4","__y5","__y6","__oy","__execAr","__calStyle","__calPerspective","ar","__animateRecords","__playAuto","__reset0","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","matrixCache","sy","__calMatrix","__selfPerspective","__selfPerspectiveMatrix","ct","tfo","__calFilter","bgI","kw","rebuild","po","offscreenBlend","offscreenMask","offscreenFilter","offscreenOverflow","origin","borderList","x5","x6","y5","y6","isRealInline","hasBgi","some","svgBgSymbol","inline","bg","isFirst","lastContentBox","lastLineBox","parentLineBox","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","onlyTotal","clearTopCache","formatStyle","updateFormatStyle","cancel","enter","includeBbox","__env","LineBox","__lineHeight","__isUpright","__bOffset","increase","isAlign","__ox","LineBoxManager","__lastX","__lastY","__max","__domList","__domStack","__isNewLine","__isEnd","__spreadList","nextNewLine","genLineBox","spreadList","verticalAlign","__setLB","endX","endY","bOffset","TAG_NAME","INLINE","BOLD","Geom","__isMulti","multi","__cacheProps","isDirectChild","main","isFixed","__addMBP","__layoutStyle","__preLayout","tw","th","__ioSize","__marginAuto","__hasXomContent","empty","strokeDasharrayStr","lineCap","lineJoin","miterLimit","getLineDash","setLineDash","preData","__preSet","fills","fillRules","strokes","strokeWidths","strokeDasharrays","strokeDasharrayStrs","strokeLinecaps","strokeLinejoins","strokeMiterlimits","__renderOnePolygon","isFillCE","isStrokeCE","isFillRE","isStrokeRE","__conicGradient","__drawPolygon","__radialEllipse","isFill","isStroke","__preSetCanvas","__propsStrokeStyle","__inversePtList","getTransform","clearSvgCache","getMergeMargin","topList","bottomList","isFixedWidthOrHeight","isFixedSize","includeParentFlex","getPrevMergeMargin","mtList","mbList","getNextMergeMargin","offsetNext","parentFixed","absList","checkTop","addDom","removeDom","isSiblingBlock","checkNext","cps","isLastAbs","isNowAbs","isLastNone","isNowNone","isLast0","oldH","svg","t1","t2","hasFlowPrev","isText","__updateStruct","__layoutAbs","ld","__layout","isNow0","t3","t4","nowH","isRemoveSelf","__resizeY","buildChildren","flatten","relation","hoc","buildRoot","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","sort","genOrderChildren","__order","backtrack","__backtrack","Dom","block","inlineBlock","none","builder","__flexLine","zIndexChildren","__structure","struct","__structs","nss","structs","needSort","__tryLayInline","isContent","fixedSize","countMin","countMax","isR","__calBasis","min2","max2","__lineBoxManager","maxSize","countSize","mergeMarginEndList","mergeMarginStartList","ignoreNextLine","ignoreNextWrap","isXom","isInlineBlock","__isRealInline","lastLineClampCount","reflow","setNotEnd","lastX","lastY","setNewLine","isNone","isEmptyBlock","__resizeX","isLastBlock","hasStart","isBlock","horizonAlign","__inlineSize","domList","growList","shrinkList","basisList","maxList","minList","orderChildren","cw","isMultiLine","line","hypotheticalList","hypothetical","maxCrossList","marginAutoCountList","freeList","__layoutFlexLine","maxCross","marginAutoCount","crossSum","crossSumList","between","around","__flexAlign","flexLine","hypotheticalSum","isOverflow","targetMainList","lessOne","factorSum","factorList","needReset","factorSum2","count1","count2","lbmList","needGenAr","firstBaseline","old","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isUprightIbFull","hasAddEndSpace","isInline2","isInlineBlock2","addY","addX","popContentBoxList","maxX","maxY","minX","minY","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","widthLimit","heightLimit","__insertStruct","Cache","rootId","page","pos","__uuid","__renderMode","__ctx","__rootId","__page","__pos","getCoords","__size","__tx1","__ty1","__tx2","__ty2","__enabled","__available","__appendData","dbx","dby","update","__update","clear","del","klass","getInstance","texture","cacheKlass","pageKlass","excludePage","UNIT","MAX","HASH","Page","number","__number","grid","__grid","Int32Array","unitSize","getFreePos","MAX_TEXTURE_SIZE","initShaders","gl","vshader","fshader","program","createProgram","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","tz","createTexture","tex","bindTexture","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","TEXTURE_2D","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","activeTexture","lastVtPoint","lastVtTex","lastVtOpacity","drawTextureCache","vtPoint","vtTex","vtOpacity","tx1","ty1","tx2","ty2","genTexture","bx","by","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","tex1","useProgram","viewport","u_direction","recycle","tex2","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","uniform2f","tex3","deleteTexture","drawCm","h1","u_m","uniform1fv","drawOverflow","bbox1","bbox2","drawMask","texBuffer1","a_texCoords1","texBuffer2","a_texCoords2","u_texture1","u_texture2","drawMbm","drawDropShadow","frameBuffer","u_color","drawDropShadowMerge","dy1","dy2","drawTex2Cache","drawCache2Tex","drawSameSize","programSs","u_opacity","uniform1f","drawOitPlane","isPuzzle","pHash","tHash","z0","w0","tx0","ty0","hashP","hashT","CanvasPage","__offscreen","webgl","CanvasCache","oldX1","widthNew","heightNew","callback","cacheMask","genSingle","globalCompositeOperation","drawCache","dbx2","dby2","bboxNew","ImgWebglCache","loadImg","Img","__loadImg","loading","__loadAndRefresh","placeholder","onlyImg","showError","pts","__addGeom","reload","updateSrc","Defs","cacheHash","elem","ovd","nvd","diffDefs","diffBb","diffD2D","od","nd","ol","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffChild","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","html","where","insertBefore","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","rect","TOLERANCE","getLinearRoot","coefs","result","getQuadraticRoots","results","getCubicRoots","c0","discrim","halfB","tmp","distance","atan2","sqrt3","getQuarticRoots","resolveRoots","plus","minus","getRoots","degree","equation","ACCURACY","getDerivativeCoefs","derivative","evaluate","bisection","minValue","maxValue","tmp1","log","tmp2","LN10","iters","LN2","getRootsInInterval","roots","derivativeCoefs","droots","intersectBezier2Bezier2","ax2","ay2","ax3","ay3","bx3","by3","c12","c11","c10","c22","c21","c20","v0","v4","v5","v6","xRoots","yRoots","checkRoots","xRoot","intersectBezier3Bezier3","c13","c23","c10x2","c10x3","c10y2","c10y3","c11x2","c11x3","c11y2","c11y3","c12x2","c12x3","c12y2","c12y3","c13x2","c13x3","c13y2","c13y3","c20x2","c20x3","c20y2","c20y3","c21x2","c21x3","c21y2","c22x2","c22x3","c22y2","c23x2","c23x3","c23y2","c23y3","intersectBezier2Bezier3","intersectBezier2Line","minbx","minby","maxbx","maxby","dot","lerp","p5","p6","intersectBezier3Line","p7","p8","p9","p10","intersectLineLine3","limitToFiniteSegment","tolerance","p13","subtractPoint","p43","p21","d1343","d4321","d1321","d4343","d2121","denom","numer","mua","mub","pa","pb","distanceTo","intersectPt","divide","addPoint","paramA","closestParam","paramB","from","to","startToP","startToEnd","startEnd2","startEnd_startP","intersectPlanePlane","v9","mb","invDet","v11","v12","v13","v21","v22","v23","v31","v32","v33","pointOnLine3","v1x","v1y","v1z","v2x","v2y","v2z","isec","shadow","puzzle","xShadow","xBbox","yShadow","yBbox","zShadow","zBbox","splitQuadrilateralPlane","xList","plane","belong","eventHash","seg","eventList","HISTORY","ael","elLen","isVisited","isDeleted","pointsA","pointsB","resA","resB","splitPlaneByLine","scan","willEnd","checkIsec","i1","i2","p0","r2","onVertex1","onVertex2","va","vb","r0","getPercentXY","ipx","ipy","sortPuzzleZ","eventHashX","eventHashY","puzzleHash","cz","eventListX","eventListY","hashX","hashY","zHash","listX","listY","TexturePage","TextureCache","texSubImage2D","ImgCanvasCache","__canvas","MBM","DOM_RENDER","IMG_RENDER","GEOM_RENDER","getCache","genBboxTotal","isPpt","bboxTotal","mergeBbox","__computedStyle2","countMaskNum","__cache2","__cacheTotal2","__cacheFilter2","__cacheMask2","genTotal","ctxTotal","matrixList","parentMatrix","lastMatrix","lastLv","maskStartHash","offscreenHash","mh","__calOffscreen","genTotalOther","needGen","genFilter","genMask","opacityList","parentOpacity","lastOpacity","genFrameBufferWithTexture","createFramebuffer","bindFramebuffer","genTotalWebgl","W","pptNode","oitHash","lastPage","cacheTotal","ppt2","oit","genMbmWebgl","deleteFramebuffer","genPptWebgl","mergeHash","mergeList","isFlat","isTopFlat","planeList","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","genBlurShader","weights","vert","frag","vertexBlur","fragmentBlur","getParameter","MAX_VARYING_VECTORS","programCm","genMaskWebgl","programClip","programMask","programDs","bboxMerge","programMbmMp","programMbmSr","programMbmOl","programMbmDk","programMbmLt","programMbmCd","programMbmCb","programMbmHl","programMbmSl","programMbmDf","programMbmEx","programMbmHue","programMbmSt","programMbmCl","programMbmLm","resTex","resFrameBuffer","renderSvg","rlv","maskEffectHash","hasEffectMask","addCache","maskHash","vdList","parentVd","lastRefreshLv","lastNode","mChildren","ivs","hasTransform","removeCache","renderWebgl","lastRefreshLevel","hasMbm","flatList","flatExtendList","pptNodeList","parentPptNode","lastPptNode","parentFlat","parentExtendFlat","isMbm","hasContent","calContent","isFilter","ii","renderCanvas","msh","antialias","premultipliedAlpha","preserveDrawingBuffer","depth","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","removeEvent","removeEventListener","__dom","__mw","__mh","mix","__rlv","__lastUpdateP","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","destroy","domCss","getPropertyValue","params","contextAttributes","__defs","webgl2","__initShader","draw","__eventCbList","vertex","fragment","vertexMask","fragmentMask","fragmentClip","programOverflow","vertexOverflow","fragmentOverflow","vertexCm","fragmentCm","vertexDs","fragmentDs","vertexMbm","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexSs","fragmentSs","__checkRoot","wm","__reLayout","noRender","__clearCanvas","__vd","domDiff","__clearWebgl","updateStyle","includeIgnore","path","zPath","__index__","karas","path2","zPath2","focus","hasVisibility","hasDisplay","hasRelease","isRp","__frameDraw","nextFrame","clearColor","COLOR_BUFFER_BIT","bboxBezier2","qx","qy","bboxBezier3","ax","ay","hx","hy","q","bboxBezier","norm","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","sl","ans","bezierLength","startT","endT","at","at3","at2","derivativeOrder","pointAtBezier","maxIteration","pointAtBezierWithLength","targetLen","approachLen","approachT","preApproachT","derivative1","derivative2","numerator","denominator","sliceBezier","pts0","pts1","pts2","pts3","x12","y12","x23","y23","x123","y123","x34","y34","x234","y234","x1234","y1234","sliceBezier2Both","pointAtByT","pointAtByT3","pointAtByT2","getPointT","getPointT3","getPointT2","xt","bezierSlope","bezier2Slope","bezier3Slope","reBuild","reBuildC","curveNum","getNewPoint","Line","__xa","__ya","__xb","__yb","__controlA","__controlB","__start","__buildCache","curve","bezierBox","Point","Segment","calBbox","myFill","otherFill","myCoincide","otherCoincide","toHash","EPS","EPS2","getIntersectionLineLine","toSource","toClip","getIntersectionBezier2Line","getIntersectionBezier2Bezier2","getIntersectionBezier2Bezier3","getIntersectionBezier3Line","getIntersectionBezier3Bezier3","sortIntersection","isSource","intersect","Polygon","regions","segments","vertices","startPoint","firstPoint","curr","endPoint","compare","cPoint","getBezierMonotonicity","curve1","curve2","cPoint1","cPoint2","lastPoint","lastT","genHashXList","findIntersection","polyA","polyB","isIntermediateA","isIntermediateB","genHashXYList","aelA","aelB","hashA","hashB","hc","isAboveLast","segAboveCompare","isAbove","inside","compareBelong","delList","shift","bboxA","coordsA","lenA","bboxB","coordsB","lenB","isSourceReverted","inters","overs","checkOverlapLine","checkOverlapBezier","activeNewSeg","ra","rb","sliceSegment","isIntermediate","ns","putHashX","hashXY","putHashXY","pointAboveOrOnLine","pt","segA","segB","la","lb","getYByX","isX","isY","firstA","firstB","lastA","lastB","conditionA","conditionB","conditionC","startA","endA","startB","endB","equalBezier","over","chains","chain","isHead","tail","ptHead","ptTail","close","coords2","clockwise","area","prefix","polygon","trivial","polygonA","polygonB","selfIntersect","intersect2","annotate2","INTERSECT","UNION","SUBTRACT","SUBTRACT_REV","XOR","intermediate","union","subtract","subtractRev","xor","bo","subtract2","Polyline","__points","__controls","controls","booleanOperations","__booleanOperations","isControl","rebuildSE","__getPoints","__needRebuildSE","__concatPointAndControl","__getLength","__getNewList","__reprocessing","start2","end2","__getIndex","isStartLt0","isEndGt1","prePercent","control","__renderPolygon","pointList","controlList","getR","dft","Sector","__r","edge","__edge","closure","__closure","sList","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","json","animateRecords","JSON","createGm","cp","getRegister","createCp","createVd","fullCssProperty","abbrCssProperty","os","fullAnimate","abbrAnimate","fullAnimateOption","abbrAnimateOption","abbr2full","fk","linkLibrary","libraryItem","vars","library","libraryId","initLibrary","replaceLibraryVars","slot","member","replaceVars","replaceAnimateOptions","opt","imgs","singleton","loadAndParse","components","list1","list3","calDeg","pointIndex","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","ls2","lt2","AB","AC","BC","tar","version","appendTo","parser","math","refresh"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAMA;EACJ,SAAc,IAAA,GAAA;IACZ,IAAKC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,EAAAA,IAAI,EAAJA,IA/EU;AAgFVr0C,EAAAA,KAAK,EAALA,KAhFU;AAiFVljC,EAAAA,IAAI,EAAJA,IAjFU;AAkFV2E,EAAAA,MAAM,EAANA,MAlFU;AAmFV3B,EAAAA,KAAK,EAALA,KAnFU;AAoFVitF,EAAAA,MAAM,EAANA,CApFU;AAqFVvkD,EAAAA,OAAO,EAAPA,OArFU;AAsFVwkD,EAAAA,IAAI,EAAJA,IAtFU;AAuFVC,EAAAA,OAAO,EAAPA,OAvFU;AAwFVlvE,EAAAA,KAAK,EAALA,KAxFU;AAyFVyI,EAAAA,EAAE,EAAFA,EAzFU;;AA0FV,EAAA,IAAI7mB,KAAJ,GAAY;IACV,OAAOA,KAAK,CAACX,IAAb,CAAA;GA3FQ;;EA6FV,IAAIW,KAAJ,CAAUhN,CAAV,EAAa;AACXgN,IAAAA,KAAK,CAACX,IAAN,GAAa,CAAC,CAACrM,CAAf,CAAA;AACD,GAAA;;AA/FS,EAAZ;;AAkGA,IAAG,OAAO0P,MAAP,KAAkB,WAArB,EAAkC;EAChCA,MAAM,CAAC82E,KAAP,GAAeA,OAAf,CAAA;AACD,CAFD,MAGK,IAAG,OAAOt0E,IAAP,KAAgB,WAAnB,EAAgC;EACnCA,IAAI,CAACs0E,KAAL,GAAaA,OAAb,CAAA;AACD;;;;"}
\ No newline at end of file
+{"version":3,"file":"index.es.js","sources":["src/node/Node.js","src/refresh/mode.js","src/style/unit.js","src/math/matrix.js","src/util/util.js","src/util/debug.js","src/util/inject.js","src/util/inflate.js","src/util/opentype.js","src/style/font.js","src/style/reset.js","src/style/reg.js","src/math/vector.js","src/util/enums.js","src/math/geom.js","src/math/gradient.js","src/util/painter.js","src/style/border.js","src/style/gradient.js","src/style/abbr.js","src/animate/key.js","src/refresh/change.js","src/math/blur.js","src/style/css.js","src/style/transform.js","src/node/TextBox.js","src/node/Ellipsis.js","src/refresh/level.js","src/node/Text.js","src/util/Event.js","src/node/Component.js","src/node/inline.js","src/style/image.js","src/style/bg.js","src/animate/frame.js","src/animate/easing.js","src/animate/Controller.js","src/animate/Animation.js","src/style/bs.js","src/style/mbm.js","src/node/Xom.js","src/node/LineBox.js","src/node/LineBoxManager.js","src/node/tag.js","src/node/geom/Geom.js","src/refresh/reflow.js","src/node/builder.js","src/node/Dom.js","src/refresh/Cache.js","src/refresh/Page.js","src/gl/webgl.js","src/refresh/CanvasPage.js","src/refresh/CanvasCache.js","src/gl/ImgWebglCache.js","src/node/Img.js","src/node/Defs.js","src/util/diff.js","src/refresh/offscreen.js","src/math/equation.js","src/math/isec.js","src/gl/oit.js","src/gl/TexturePage.js","src/gl/TextureCache.js","src/refresh/ImgCanvasCache.js","src/refresh/struct.js","src/gl/ca.js","src/node/Root.js","src/math/bezier.js","src/node/geom/Line.js","src/math/bo/Point.js","src/math/bo/Segment.js","src/math/bo/intersect.js","src/math/bo/Polygon.js","src/math/bo/chain.js","src/math/bo/index.js","src/node/geom/Polyline.js","src/node/geom/Polygon.js","src/node/geom/Sector.js","src/node/geom/Rect.js","src/node/geom/Circle.js","src/node/geom/Ellipse.js","src/parser/parse.js","src/parser/abbr.js","src/parser/apply.js","src/parser/index.js","src/style/index.js","src/animate/index.js","src/math/tar.js","src/math/index.js","src/refresh/index.js","src/index.js"],"sourcesContent":["class Node {\n constructor() {\n this.__x = 0;\n this.__y = 0;\n this.__width = 0;\n this.__height = 0;\n this.__baseline = 0;\n this.__verticalBaseline = 0;\n this.__prev = null;\n this.__next = null;\n this.__parent = null;\n this.__domParent = null;\n this.__root = null;\n this.__host = null;\n this.__hostRoot = null;\n this.__virtualDom = null;\n this.__bbox = null;\n this.__filterBbox = null;\n this.__isDestroyed = true;\n }\n\n __structure(lv, j) {\n return this.__struct = {\n node: this,\n childIndex: j,\n lv,\n };\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n __destroy() {\n this.__isDestroyed = true;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n // canvas/svg根节点\n get root() {\n return this.__root;\n }\n\n // component根节点\n get host() {\n return this.__host;\n }\n\n // 考虑高阶组件在内的component根节点\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get baseline() {\n return this.__baseline;\n }\n\n get verticalBaseline() {\n return this.__verticalBaseline;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n get isReplaced() {\n return false;\n }\n}\n\nexport default Node;\n","export default {\n CANVAS: 0,\n SVG: 1,\n WEBGL: 2,\n};\n","const AUTO = 0;\nconst PX = 1;\nconst PERCENT = 2;\nconst NUMBER = 3;\nconst INHERIT = 4;\nconst DEG = 5;\nconst STRING = 6;\nconst RGBA = 7;\nconst REM = 8;\nconst EM = 9;\nconst VW = 10;\nconst VH = 11;\nconst VMAX = 12;\nconst VMIN = 13;\nconst GRADIENT = 14;\n\nlet o = {\n AUTO,\n PX,\n PERCENT,\n NUMBER,\n INHERIT,\n DEG,\n STRING,\n RGBA,\n REM,\n EM,\n VW,\n VH,\n VMAX,\n VMIN,\n GRADIENT, // 特殊格式,color/fill/stroke用给ctx传值\n /**\n * 通用的格式化计算数值单位的方法,百分比/像素/REM/VW/auto和纯数字\n * @param v value\n * @returns 格式化好的[number, unit]\n */\n calUnit(v) {\n let n = parseFloat(v) || 0;\n if(/%$/.test(v)) {\n return {\n v: n,\n u: PERCENT,\n };\n }\n else if(/px$/i.test(v)) {\n return {\n v: n,\n u: PX,\n };\n }\n else if(/deg$/i.test(v)) {\n return {\n v: n,\n u: DEG,\n };\n }\n else if(/rem$/i.test(v)) {\n return {\n v: n,\n u: REM,\n };\n }\n else if(/vw$/i.test(v)) {\n return {\n v: n,\n u: VW,\n };\n }\n else if(/vh$/i.test(v)) {\n return {\n v: n,\n u: VH,\n };\n }\n else if(/em$/i.test(v)) {\n return {\n v: n,\n u: EM,\n };\n }\n else if(/vw$/i.test(v)) {\n return {\n v: n,\n u: VW,\n };\n }\n else if(/vh$/i.test(v)) {\n return {\n v: n,\n u: VH,\n };\n }\n else if(/vmax$/i.test(v)) {\n return {\n v: n,\n u: VMAX,\n };\n }\n else if(/vmin$/i.test(v)) {\n return {\n v: n,\n u: VMIN,\n };\n }\n return {\n v: n,\n u: NUMBER,\n };\n },\n};\n\nexport default o;\n","// 生成4*4单位矩阵\nfunction identity() {\n return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n}\n\n// 矩阵a*b,固定两个matrix都是长度16\nfunction multiply(a, b) {\n if(!a && !b) {\n return identity();\n }\n if(isE(a)) {\n return b;\n }\n if(isE(b)) {\n return a;\n }\n let c = [];\n for(let i = 0; i < 4; i++) {\n let a0 = a[i] || 0;\n let a1 = a[i + 4] || 0;\n let a2 = a[i + 8] || 0;\n let a3 = a[i + 12] || 0;\n c[i] = a0 * b[0] + a1 * b[1] + a2 * b[2] + a3 * b[3];\n c[i + 4] = a0 * b[4] + a1 * b[5] + a2 * b[6] + a3 * b[7];\n c[i + 8] = a0 * b[8] + a1 * b[9] + a2 * b[10] + a3 * b[11];\n c[i + 12] = a0 * b[12] + a1 * b[13] + a2 * b[14] + a3 * b[15];\n }\n return c;\n}\n\n// 特殊优化,b为tfo,因此既只有12/13/14有值\nfunction multiplyTfo(m, x, y) {\n if(!x && !y) {\n return m;\n }\n m[12] += m[0] * x + m[4] * y;\n m[13] += m[1] * x + m[5] * y;\n m[14] += m[2] * x + m[6] * y;\n m[15] += m[3] * x + m[7] * y;\n return m;\n}\n\nfunction tfoMultiply(x, y, m) {\n if(!x && !y) {\n return m;\n }\n let d = m[3], h = m[7], l = m[11], p = m[15];\n m[0] += d * x;\n m[1] += d * y;\n m[4] += h * x;\n m[5] += h * y;\n m[8] += l * x;\n m[9] += l * y;\n m[12] += p * x;\n m[13] += p * y;\n return m;\n}\n\n// 几种特殊的transform变换优化\nfunction multiplyTranslateX(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[0] * v;\n m[13] += m[1] * v;\n m[14] += m[2] * v;\n m[15] += m[3] * v;\n return m;\n}\n\nfunction multiplyTranslateY(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[4] * v;\n m[13] += m[5] * v;\n m[14] += m[6] * v;\n m[15] += m[7] * v;\n return m;\n}\n\nfunction multiplyTranslateZ(m, v) {\n if(!v) {\n return m;\n }\n m[12] += m[8] * v;\n m[13] += m[9] * v;\n m[14] += m[10] * v;\n m[15] += m[11] * v;\n return m;\n}\n\nfunction multiplyRotateX(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let e = m[4], f = m[5], g = m[6], h = m[7], i = m[8], k = m[10], l = m[11];\n m[4] = e * cos + i * sin;\n m[5] = f * cos + g * sin;\n m[6] = g * cos + k * sin;\n m[7] = h * cos + l * sin;\n m[8] = e * -sin + i * cos;\n m[9] = f * -sin + g * cos;\n m[10] = g * -sin + k * cos;\n m[11] = h * -sin + l * cos;\n return m;\n}\n\nfunction multiplyRotateY(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let a = m[0], b = m[1], c = m[2], d = m[3], i = m[8], j = m[9], k = m[10], l = m[11];\n m[0] = a * cos + i * -sin;\n m[1] = b * cos + j * -sin;\n m[2] = c * cos + k * -sin;\n m[3] = d * cos + l * -sin;\n m[8] = a * sin + i * cos;\n m[9] = b * sin + j * cos;\n m[10] = c * sin + k * cos;\n m[11] = d * sin + l * cos;\n return m;\n}\n\nfunction multiplyRotateZ(m, v) {\n if(!v) {\n return m;\n }\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n let a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5], g = m[6], h = m[7];\n m[0] = a * cos + e * sin;\n m[1] = b * cos + f * sin;\n m[2] = c * cos + g * sin;\n m[3] = d * cos + h * sin;\n m[4] = a * -sin + e * cos;\n m[5] = b * -sin + f * cos;\n m[6] = c * -sin + g * cos;\n m[7] = d * -sin + h * cos;\n return m;\n}\n\nfunction multiplySkewX(m, v) {\n if(!v) {\n return m;\n }\n let tan = Math.tan(v);\n m[4] += m[0] * tan;\n m[5] += m[1] * tan;\n m[6] += m[2] * tan;\n m[7] += m[3] * tan;\n return m;\n}\n\nfunction multiplySkewY(m, v) {\n if(!v) {\n return m;\n }\n let tan = Math.tan(v);\n m[0] += m[4] * tan;\n m[1] += m[5] * tan;\n m[2] += m[6] * tan;\n m[3] += m[7] * tan;\n return m;\n}\n\nfunction multiplyScaleX(m, v) {\n if(v === 1) {\n return m;\n }\n m[0] *= v;\n m[1] *= v;\n m[2] *= v;\n m[3] *= v;\n return m;\n}\n\nfunction multiplyScaleY(m, v) {\n if(v === 1) {\n return m;\n }\n m[4] *= v;\n m[5] *= v;\n m[6] *= v;\n m[7] *= v;\n return m;\n}\n\nfunction multiplyScaleZ(m, v) {\n if(v === 1) {\n return m;\n }\n m[8] *= v;\n m[9] *= v;\n m[10] *= v;\n m[11] *= v;\n return m;\n}\n\nfunction multiplyPerspective(m, v) {\n if(!v || v <= 0) {\n return m;\n }\n v = Math.max(v, 1);\n v = -1 / v;\n m[8] += m[12] * v;\n m[9] += m[13] * v;\n m[10] += m[14] * v;\n m[11] += m[15] * v;\n return m;\n}\n\nfunction calPoint(point, m) {\n if(m && !isE(m)) {\n let { x, y, z, w } = point;\n z = z || 0;\n if(w === undefined || w === null) {\n w = 1;\n }\n let a1 = m[0], b1 = m[1], c1 = m[2], d1 = m[3];\n let a2 = m[4], b2 = m[5], c2 = m[6], d2 = m[7];\n let a3 = m[8], b3 = m[9], c3 = m[10], d3 = m[11];\n let a4 = m[12], b4 = m[13], c4 = m[14], d4 = m[15];\n let o = {\n x: ((a1 === 1) ? x : (x * a1)) + (a2 ? (y * a2) : 0) + ((w === 1) ? a4 : a4 * w),\n y: ((b1 === 1) ? x : (x * b1)) + (b2 ? (y * b2) : 0) + ((w === 1) ? b4 : b4 * w),\n z: 0,\n w,\n };\n if(d1 || d2 || d3) {\n o.w = x * d1 + y * d2 + z * d3 + d4 * w;\n }\n else if(d4 !== 1) {\n o.w *= d4;\n }\n if(z) {\n o.x += z * a3;\n o.y += z * b3;\n o.z = x * c1 + y * c2 + c4 + z * c3;\n }\n else if(c1 || c2 || c4) {\n o.z = x * c1 + y * c2 + c4;\n }\n return o;\n }\n return point;\n}\n\n/**\n * 初等行变换求3*3特定css的matrix方阵,一维6长度\n * https://blog.csdn.net/iloveas2014/article/details/82930946\n */\nfunction inverse(m) {\n if(m.length === 16) {\n return inverse4(m);\n }\n let a = m[0], b = m[1], c = m[2], d = m[3], e = m[4], f = m[5];\n if(a === 1 && b === 0 && c === 0 && d === 1 && e === 0 && f === 0) {\n return m;\n }\n let divisor = a * d - b * c;\n if(divisor === 0) {\n return m;\n }\n return [d / divisor, -b / divisor, -c / divisor, a / divisor,\n (c * f - d * e) / divisor, (b * e - a * f) / divisor];\n}\n\n// 16位或者6位单位矩阵判断,空也认为是\nfunction isE(m) {\n if(!m || !m.length) {\n return true;\n }\n if(m.length === 16) {\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 0\n && m[4] === 0 && m[5] === 1 && m[6] === 0 && m[7] === 0\n && m[8] === 0 && m[9] === 0 && m[10] === 1 && m[11] === 0\n && m[12] === 0 && m[13] === 0 && m[14] === 0 && m[15] === 1;\n }\n return m[0] === 1 && m[1] === 0 && m[2] === 0 && m[3] === 1 && m[4] === 0 && m[5] === 0;\n}\n\n/**\n * 求任意4*4矩阵的逆矩阵,行列式为 0 则返回单位矩阵兜底\n * 格式:matrix3d(a1, b1, c1, d1, a2, b2, c2, d2, a3, b3, c3, d3, a4, b4, c4, d4)\n * 参见: https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/matrix3d()\n * 对应:\n * [\n * a1,a2,a3,a4,\n * b1,b2,b3,b4,\n * c1,c2,c3,c4,\n * d1,d2,d3,d4,\n * ]\n *\n * 根据公式 A* = |A|A^-1 来计算\n * A* 表示矩阵 A 的伴随矩阵,A^-1 表示矩阵 A 的逆矩阵,|A| 表示行列式的值\n *\n * @returns {number[]}\n */\n\nfunction inverse4(s) {\n let inv = [];\n\n inv[0] = s[5] * s[10] * s[15] - s[5] * s[11] * s[14] - s[9] * s[6] * s[15]\n + s[9] * s[7] * s[14] + s[13] * s[6] * s[11] - s[13] * s[7] * s[10];\n inv[4] = -s[4] * s[10] * s[15] + s[4] * s[11] * s[14] + s[8] * s[6] * s[15]\n - s[8] * s[7] * s[14] - s[12] * s[6] * s[11] + s[12] * s[7] * s[10];\n inv[8] = s[4] * s[9] * s[15] - s[4] * s[11] * s[13] - s[8] * s[5] * s[15]\n + s[8] * s[7] * s[13] + s[12] * s[5] * s[11] - s[12] * s[7] * s[9];\n inv[12] = -s[4] * s[9] * s[14] + s[4] * s[10] * s[13] + s[8] * s[5] * s[14]\n - s[8] * s[6] * s[13] - s[12] * s[5] * s[10] + s[12] * s[6] * s[9];\n\n inv[1] = -s[1] * s[10] * s[15] + s[1] * s[11] * s[14] + s[9] * s[2] * s[15]\n - s[9] * s[3] * s[14] - s[13] * s[2] * s[11] + s[13] * s[3] * s[10];\n inv[5] = s[0] * s[10] * s[15] - s[0] * s[11] * s[14] - s[8] * s[2] * s[15]\n + s[8] * s[3] * s[14] + s[12] * s[2] * s[11] - s[12] * s[3] * s[10];\n inv[9] = -s[0] * s[9] * s[15] + s[0] * s[11] * s[13] + s[8] * s[1] * s[15]\n - s[8] * s[3] * s[13] - s[12] * s[1] * s[11] + s[12] * s[3] * s[9];\n inv[13] = s[0] * s[9] * s[14] - s[0] * s[10] * s[13] - s[8] * s[1] * s[14]\n + s[8] * s[2] * s[13] + s[12] * s[1] * s[10] - s[12] * s[2] * s[9];\n\n inv[2] = s[1] * s[6] * s[15] - s[1] * s[7] * s[14] - s[5] * s[2] * s[15]\n + s[5] * s[3] * s[14] + s[13] * s[2] * s[7] - s[13] * s[3] * s[6];\n inv[6] = -s[0] * s[6] * s[15] + s[0] * s[7] * s[14] + s[4] * s[2] * s[15]\n - s[4] * s[3] * s[14] - s[12] * s[2] * s[7] + s[12] * s[3] * s[6];\n inv[10] = s[0] * s[5] * s[15] - s[0] * s[7] * s[13] - s[4] * s[1] * s[15]\n + s[4] * s[3] * s[13] + s[12] * s[1] * s[7] - s[12] * s[3] * s[5];\n inv[14] = -s[0] * s[5] * s[14] + s[0] * s[6] * s[13] + s[4] * s[1] * s[14]\n - s[4] * s[2] * s[13] - s[12] * s[1] * s[6] + s[12] * s[2] * s[5];\n\n inv[3] = -s[1] * s[6] * s[11] + s[1] * s[7] * s[10] + s[5] * s[2] * s[11]\n - s[5] * s[3] * s[10] - s[9] * s[2] * s[7] + s[9] * s[3] * s[6];\n inv[7] = s[0] * s[6] * s[11] - s[0] * s[7] * s[10] - s[4] * s[2] * s[11]\n + s[4] * s[3] * s[10] + s[8] * s[2] * s[7] - s[8] * s[3] * s[6];\n inv[11] = -s[0] * s[5] * s[11] + s[0] * s[7] * s[9] + s[4] * s[1] * s[11]\n - s[4] * s[3] * s[9] - s[8] * s[1] * s[7] + s[8] * s[3] * s[5];\n inv[15] = s[0] * s[5] * s[10] - s[0] * s[6] * s[9] - s[4] * s[1] * s[10]\n + s[4] * s[2] * s[9] + s[8] * s[1] * s[6] - s[8] * s[2] * s[5];\n\n let det = s[0] * inv[0] + s[1] * inv[4] + s[2] * inv[8] + s[3] * inv[12];\n if (det === 0) {\n return identity();\n }\n\n det = 1 / det;\n let d = [];\n for (let i = 0; i < 16; i++) {\n d[i] = inv[i] * det;\n }\n return d;\n}\n\n// 将4*4的16长度矩阵转成css/canvas的6位标准使用,忽略transform3d\nfunction m2m6(m) {\n return [\n m[0],\n m[1],\n m[4],\n m[5],\n m[12],\n m[13],\n ];\n}\n\nfunction point2d(point) {\n let w = point[3];\n if(w && w !== 1) {\n point = point.slice(0, 2);\n point[0] /= w;\n point[1] /= w;\n }\n return point;\n}\n\nfunction calRectPoint(xa, ya, xb, yb, matrix) {\n let { x: x1, y: y1, z: z1, w: w1 } = calPoint({ x: xa, y: ya, z: 0, w: 1 }, matrix);\n let { x: x3, y: y3, z: z3, w: w3 } = calPoint({ x: xb, y: yb, z: 0, w: 1 }, matrix);\n let x2, y2, z2, w2, x4, y4, z4, w4;\n // 无旋转的时候可以少算2个点\n if(w1 === 1 && w3 === 1\n && (!matrix || !matrix.length\n || !matrix[1] && !matrix[2] && !matrix[4] && !matrix[6] && !matrix[7] && !matrix[8])) {\n x2 = x3;\n y2 = y1;\n z2 = z3;\n x4 = x1;\n y4 = y3;\n z2 = z4 = z1;\n w2 = w4 = 1;\n }\n else {\n let t = calPoint({ x: xb, y: ya, z: 0, w: 1 }, matrix);\n x2 = t.x; y2 = t.y; z2 = t.z; w2 = t.w;\n t = calPoint({ x: xa, y: yb, z: 0, w: 1 }, matrix);\n x4 = t.x; y4 = t.y; z4 = t.z; w4 = t.w;\n }\n return { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 };\n}\n\nexport default {\n identity,\n multiply,\n multiplyTfo,\n tfoMultiply,\n multiplyTranslateX,\n multiplyTranslateY,\n multiplyTranslateZ,\n multiplyRotateX,\n multiplyRotateY,\n multiplyRotateZ,\n multiplySkewX,\n multiplySkewY,\n multiplyScaleX,\n multiplyScaleY,\n multiplyScaleZ,\n multiplyPerspective,\n calPoint,\n calRectPoint,\n point2d,\n inverse,\n isE,\n m2m6,\n};\n","import mx from '../math/matrix';\n\nlet toString = {}.toString;\nfunction isType(type) {\n return function(obj) {\n return toString.call(obj) === '[object ' + type + ']';\n }\n}\n\nlet isObject = isType('Object');\nlet isString = isType('String');\nlet isFunction = isType('Function');\nlet isNumber = isType('Number');\nlet isBoolean = isType('Boolean');\nlet isDate = isType('Date');\n\nlet hasOwn = {}.hasOwnProperty;\nlet fnToString = hasOwn.toString;\nlet ObjectFunctionString = fnToString.call(Object);\n\nfunction isNil(v) {\n return v === undefined || v === null;\n}\n\nfunction joinSourceArray(arr) {\n let res = '';\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n res += joinSourceArray(item);\n }\n else {\n res += stringify(item);\n }\n }\n return res;\n}\n\nfunction stringify(s) {\n if(isNil(s)) {\n return '';\n }\n return s.toString();\n}\n\nfunction encodeHtml(s, prop) {\n if(prop) {\n return s.replace(/\"/g, '"');\n }\n return s.replace(/&/g, '&').replace(/';\n vd.defs.forEach(item => {\n s += joinDef(item);\n });\n s += '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += '';\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n s += '';\n return s;\n}\n\n// 普通元素\nfunction joinVd(vd) {\n if(vd.type === 'item' || vd.type === 'img') {\n let s = '';\n (vd.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n if(vd.tagName === 'text') {\n return '' + vd.content + '';\n }\n return '<' + vd.tagName + s + '/>';\n }\n else if(vd.type === 'text') {\n let s = '';\n // text有许多lineBox\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n return '' + s + '';\n }\n else if(vd.type === 'dom' || vd.type === 'geom') {\n let s = '';\n vd.bb.forEach(item => {\n s += joinVd(item);\n });\n s += '';\n (vd.children || []).forEach(item => {\n s += joinVd(item);\n });\n s += '';\n let { opacity, transform, visibility, mask, overflow, filter, mixBlendMode } = vd;\n return '' + s + '';\n }\n}\n\nfunction joinDef(def) {\n let s = '<' + def.tagName + ' id=\"' + def.uuid + '\"';\n if(def.tagName === 'mask' || def.tagName === 'clipPath') {\n // s += ' maskUnits=\"userSpaceOnUse\"';\n }\n else if(def.tagName === 'filter') {\n // s += ' filterUnits=\"userSpaceOnUse\"';\n }\n else {\n s += ' gradientUnits=\"userSpaceOnUse\"';\n }\n (def.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>';\n (def.children || []).forEach(item => {\n s += joinItem(item);\n });\n s += '' + def.tagName + '>';\n return s;\n}\n\nfunction joinItem(item) {\n let s = '<' + item.tagName;\n (item.props || []).forEach(item => {\n s += ' ' + item[0] + '=\"' + item[1] + '\"';\n });\n s += '>' + item.tagName + '>';\n return s;\n}\n\nfunction rgba2int(color) {\n if(Array.isArray(color)) {\n return color;\n }\n let res = [];\n if(!color || color === 'transparent') {\n res = [0, 0, 0, 0];\n }\n else if(color.charAt(0) === '#') {\n color = color.slice(1);\n if(color.length === 3) {\n res.push(parseInt(color.charAt(0) + color.charAt(0), 16));\n res.push(parseInt(color.charAt(1) + color.charAt(1), 16));\n res.push(parseInt(color.charAt(2) + color.charAt(2), 16));\n res[3] = 1;\n }\n else if(color.length === 6) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4), 16));\n res[3] = 1;\n }\n else if(color.length === 8) {\n res.push(parseInt(color.slice(0, 2), 16));\n res.push(parseInt(color.slice(2, 4), 16));\n res.push(parseInt(color.slice(4, 6), 16));\n res.push(parseInt(color.slice(6), 16) / 255);\n }\n else {\n res[0] = res[1] = res[2] = 0;\n res[3] = 1;\n }\n }\n else {\n let c = color.match(/rgba?\\s*\\(\\s*([\\d.]+)\\s*,\\s*([\\d.]+)\\s*,\\s*([\\d.]+)(?:\\s*,\\s*([\\d.]+))?\\s*\\)/i);\n if(c) {\n res = [parseInt(c[1]), parseInt(c[2]), parseInt(c[3])];\n if(!isNil(c[4])) {\n res[3] = parseFloat(c[4]);\n }\n else {\n res[3] = 1;\n }\n }\n else {\n res = [0, 0, 0, 0];\n }\n }\n return res;\n}\n\nfunction int2rgba(color) {\n if(Array.isArray(color)) {\n if(color.length === 3 || color.length === 4) {\n color[0] = Math.floor(Math.max(color[0], 0));\n color[1] = Math.floor(Math.max(color[1], 0));\n color[2] = Math.floor(Math.max(color[2], 0));\n if(color.length === 4) {\n color[3] = Math.max(color[3], 0);\n return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',' + color[3] + ')';\n }\n return 'rgba(' + color[0] + ',' + color[1] + ',' + color[2] + ',1)';\n }\n // if(color.length === 4) {\n // color = color.map((c, i) => i === 3 ? c : Math.floor(Math.max(0, c)));\n // return 'rgba(' + joinArr(color, ',') + ')';\n // }\n // else if(color.length === 3) {\n // color = color.map(c => Math.floor(c));\n // return 'rgba(' + joinArr(color, ',') + ',1)';\n // }\n }\n return color || 'rgba(0,0,0,0)';\n}\n\nfunction int2invert(color) {\n if(Array.isArray(color)) {\n color = color.slice(0);\n color[0] = 255 - color[0];\n color[1] = 255 - color[1];\n color[2] = 255 - color[2];\n if(color.length === 4) {\n return 'rgba(' + joinArr(color, ',') + ')';\n }\n else if(color.length === 3) {\n return 'rgba(' + joinArr(color, ',') + ',1)';\n }\n }\n return 'rgba(0,0,0,0)';\n}\n\nfunction arr2hash(arr) {\n let hash = {};\n for(let i = 0, len = arr.length; i < len; i++) {\n let item = arr[i];\n if(Array.isArray(item)) {\n hash[item[0]] = item[1];\n }\n else {\n for(let list = Object.keys(item), j = list.length - 1; j >= 0; j--) {\n let k = list[j];\n hash[k] = item[k];\n }\n }\n }\n return hash;\n}\n\nfunction hash2arr(hash) {\n if(Array.isArray(hash)) {\n return hash;\n }\n let arr = [];\n for(let list = Object.keys(hash), i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n arr.push([k, hash[k]]);\n }\n return arr;\n}\n\nfunction clone(obj) {\n if(isNil(obj) || typeof obj !== 'object') {\n return obj;\n }\n if(util.isDate(obj)) {\n return new Date(obj);\n }\n if(!isPlainObject(obj) && !Array.isArray(obj)) {\n return obj;\n }\n let n = Array.isArray(obj) ? [] : {};\n Object.keys(obj).forEach(i => {\n n[i] = clone(obj[i]);\n });\n return n;\n}\n\n/**\n * 简化的arr对比,arr中只有arr和其它类型,其它类型对比值或引用,arr递归\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equalArr(a, b) {\n if(!a || !b) {\n return a === b;\n }\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i];\n let bi = b[i];\n let isArrayA = Array.isArray(ai);\n let isArrayB = Array.isArray(bi);\n if(isArrayA && isArrayB) {\n if(!equalArr(ai, bi)) {\n return false;\n }\n }\n else if(isArrayA || isArrayB) {\n return false;\n }\n else if(ai !== bi) {\n return false;\n }\n }\n return true;\n}\n\n/**\n * 深度对比对象\n * @param a\n * @param b\n * @returns {boolean}\n */\nfunction equal(a, b) {\n if(a === b) {\n return true;\n }\n if(isObject(a) && isObject(b)) {\n let hash = {};\n for(let i = 0, arr = Object.keys(a), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!b.hasOwnProperty(k) || !equal(a[k], b[k])) {\n return false;\n }\n hash[k] = true;\n }\n // a没有b有则false\n for(let i = 0, arr = Object.keys(b), len = arr.length; i < len; i++) {\n let k = arr[i];\n if(!hash.hasOwnProperty(k)) {\n return false;\n }\n }\n }\n else if(isDate(a) && isDate(b)) {\n return a.getTime() === b.getTime();\n }\n else if(Array.isArray(a) && Array.isArray(b)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n if(!equal(a[i], b[i])) {\n return false;\n }\n }\n }\n else {\n return a === b;\n }\n return true;\n}\n\nfunction extend(target, source, keys) {\n if(source === null || typeof source !== 'object') {\n return target;\n }\n if(!keys) {\n keys = Object.keys(source);\n }\n let i = 0;\n let len = keys.length;\n while(i < len) {\n let k = keys[i];\n target[k] = source[k];\n i++;\n }\n return target;\n}\n\nfunction joinArr(arr, split) {\n let s = arr.length ? arr[0] : '';\n for(let i = 1, len = arr.length; i < len; i++) {\n s += split + arr[i];\n }\n return s;\n}\n\nfunction transformBbox(bbox, matrix, dx = 0, dy = 0) {\n if(!mx.isE(matrix)) {\n let [x1, y1, x2, y2] = bbox;\n // 可能因filter的原因扩展范围\n if(dx) {\n x1 -= dx;\n x2 += dx;\n }\n if(dy) {\n y1 -= dy;\n y2 += dy;\n }\n let list = [x2, y1, x1, y2, x2, y2];\n let w;\n let t = mx.calPoint({ x: x1, y: y1, z: 0, w: 1 }, matrix);\n x1 = t.x; y1 = t.y; w = t.w;\n if(w && w !== 1) {\n x1 /= w;\n y1 /= w;\n }\n let xa = x1, ya = y1, xb = x1, yb = y1;\n for(let i = 0; i < 6; i += 2) {\n let x = list[i], y = list[i + 1];\n let t = mx.calPoint({ x, y, z: 0, w: 1 }, matrix);\n x = t.x; y = t.y; w = t.w;\n if(w && w !== 1) {\n x /= w;\n y /= w;\n }\n xa = Math.min(xa, x);\n xb = Math.max(xb, x);\n ya = Math.min(ya, y);\n yb = Math.max(yb, y);\n }\n return [xa, ya, xb, yb];\n }\n else {\n bbox = bbox.slice(0);\n if(dx || dy) {\n bbox = bbox.slice(0);\n bbox[0] -= dx;\n bbox[1] -= dy;\n bbox[2] += dx;\n bbox[3] += dy;\n }\n }\n return bbox;\n}\n\nfunction isPlainObject(obj) {\n if(!obj || toString.call(obj) !== '[object Object]') {\n return false;\n }\n let proto = Object.getPrototypeOf(obj);\n if(!proto) {\n return true;\n }\n let Ctor = hasOwn.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor === 'function' && fnToString.call(Ctor) === ObjectFunctionString;\n}\n\nfunction assignMatrix(t, v) {\n if(t && v) {\n t[0] = v[0];\n t[1] = v[1];\n t[2] = v[2];\n t[3] = v[3];\n t[4] = v[4];\n t[5] = v[5];\n t[6] = v[6];\n t[7] = v[7];\n t[8] = v[8];\n t[9] = v[9];\n t[10] = v[10];\n t[11] = v[11];\n t[12] = v[12];\n t[13] = v[13];\n t[14] = v[14];\n t[15] = v[15];\n }\n return t;\n}\n\nfunction prefixHex(s) {\n if(s.length === 1) {\n return '0' + s;\n }\n return s;\n}\n\nfunction replaceRgba2Hex(s) {\n return (s || '').replace(/rgba?\\s*\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*([\\d.]+)\\s*)?\\)/ig, function($0, $1, $2, $3, $4) {\n let res = '#'\n + prefixHex(parseInt($1).toString(16))\n + prefixHex(parseInt($2).toString(16))\n + prefixHex(parseInt($3).toString(16));\n if($4) {\n res += prefixHex(Math.floor(parseFloat($4) * 255).toString(16));\n }\n return res;\n });\n}\n\nlet util = {\n isObject,\n isString,\n isFunction,\n isNumber,\n isBoolean,\n isDate,\n isNil,\n isPrimitive(v) {\n return util.isNil(v) || util.isBoolean(v) || util.isString(v) || util.isNumber(v);\n },\n // css中常用undefined/null表示auto本身\n isAuto(v) {\n return isNil(v) || v === 'auto';\n },\n isPlainObject,\n stringify,\n joinSourceArray(arr) {\n return joinSourceArray(arr);\n },\n encodeHtml,\n joinVirtualDom,\n joinVd,\n joinDef,\n rgba2int,\n int2rgba,\n int2invert,\n arr2hash,\n hash2arr,\n clone,\n equalArr,\n equal,\n extend,\n joinArr,\n transformBbox,\n assignMatrix,\n prefixHex,\n replaceRgba2Hex,\n};\n\nexport default util;\n","export default {\n flag: false,\n};\n","import util from './util';\nimport debug from './debug';\n\nconst SPF = 1000 / 60;\n\nconst CANVAS = {};\nconst SUPPORT_OFFSCREEN_CANVAS = typeof OffscreenCanvas === 'function' && OffscreenCanvas.prototype.getContext;\n\nfunction offscreenCanvas(key, width, height, message) {\n let o;\n if(!key) {\n o = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else if(!CANVAS[key]) {\n o = CANVAS[key] = !debug.flag && SUPPORT_OFFSCREEN_CANVAS ? new OffscreenCanvas(width, height) : document.createElement('canvas');\n }\n else {\n o = CANVAS[key];\n }\n o.width = width;\n o.height = height;\n if(debug.flag) {\n o.style.width = width + 'px';\n o.style.height = height + 'px';\n if(key) {\n o.setAttribute('key', key);\n }\n if(message) {\n o.setAttribute('message', message);\n }\n document.body.appendChild(o);\n }\n let ctx = o.getContext('2d');\n return {\n canvas: o,\n ctx,\n enabled: true,\n available: true,\n release() {\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, width, height);\n this.available = false;\n if(debug.flag && o) {\n document.body.removeChild(o);\n }\n o = null;\n },\n };\n}\n\nconst IMG = {};\nconst INIT = 0;\nconst LOADING = 1;\nconst LOADED = 2;\nconst FONT = {};\nconst COMPONENT = {};\nlet div;\n\nconst SUPPORT_FONT = {};\nlet defaultFontFamilyData;\n\nfunction createDiv() {\n div = document.createElement('div');\n div.style.position = 'absolute';\n div.style.left = '99999px';\n div.style.top = '-99999px';\n div.style.visibility = 'hidden';\n div.style.whiteSpace = 'nowrap';\n document.body.appendChild(div);\n}\n\nlet inject = {\n measureTextSync(str, ff, fs, fw, isUpright) {\n if(!div) {\n createDiv();\n }\n div.style.fontFamily = ff;\n div.style.fontSize = fs + 'px';\n div.style.fontWeight = fw;\n if(isUpright) {\n div.style.writingMode = 'vertical-lr';\n }\n else {\n div.style.writingMode = 'horizontal-tb';\n }\n div.innerHTML = str.replace(/' + str.charAt(i).replace('<', '<').replace(/[ \\n]/, ' ') + '';\n }\n div.innerHTML = s;\n let max = 0;\n let cns = div.childNodes;\n for(let i = 0, len = cns.length; i < len; i++) {\n let node = cns[i];\n // clientWidth只返回ceil整数,精度必须用getComputedStyle\n max = Math.max(max, parseFloat(window.getComputedStyle(node, null).width));\n }\n return max;\n },\n IMG,\n INIT,\n LOADED,\n LOADING,\n measureImg(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb && cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.measureImg(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb && cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Measure img invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = IMG[url] = IMG[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let img = new Image();\n img.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.width = img.width;\n cache.height = img.height;\n cache.source = img;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n img.onerror = function(e) {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n };\n if(url.substr(0, 5) !== 'data:') {\n let host = /^(?:\\w+:)?\\/\\/([^/:]+)/.exec(url);\n if(host) {\n if(typeof location === 'undefined' || location.hostname !== host[1]) {\n img.crossOrigin = 'anonymous';\n }\n }\n }\n img.src = url;\n if(debug.flag && typeof document !== 'undefined') {\n document.body.appendChild(img);\n }\n }\n },\n warn(s) {\n console.warn(s);\n },\n error(s) {\n console.error(s);\n },\n requestAnimationFrame(cb) {\n if(!cb) {\n return;\n }\n let res;\n if(typeof requestAnimationFrame !== 'undefined') {\n inject.requestAnimationFrame = requestAnimationFrame.bind(null);\n res = requestAnimationFrame(cb);\n }\n else {\n res = setTimeout(cb, SPF);\n inject.requestAnimationFrame = function(cb) {\n return setTimeout(cb, SPF);\n };\n }\n return res;\n },\n cancelAnimationFrame(id) {\n let res;\n if(typeof cancelAnimationFrame !== 'undefined') {\n inject.cancelAnimationFrame = cancelAnimationFrame.bind(null);\n res = cancelAnimationFrame(id);\n }\n else {\n res = clearTimeout(id);\n inject.cancelAnimationFrame = function(id) {\n return clearTimeout(id);\n };\n }\n return res;\n },\n now() {\n if(typeof performance !== 'undefined') {\n inject.now = function() {\n return Math.floor(performance.now());\n };\n return Math.floor(performance.now());\n }\n inject.now = Date.now.bind(Date);\n return Date.now();\n },\n hasOffscreenCanvas(key) {\n return key && CANVAS.hasOwnProperty(key);\n },\n getOffscreenCanvas(width, height, key, message) {\n return offscreenCanvas(key, width, height, message);\n },\n isDom(o) {\n if(o) {\n if(util.isString(o)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.Element && (o instanceof window.Element)) {\n return true;\n }\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (o instanceof window.OffscreenCanvas)) {\n return true;\n }\n // worker\n if(typeof self !== 'undefined' && self.OffscreenCanvas && (o instanceof self.OffscreenCanvas)) {\n return true;\n }\n if(util.isFunction(o.getElementsByTagName)) {\n return true;\n }\n }\n return false;\n },\n isWebGLTexture(o) {\n if(o && typeof WebGLTexture !== 'undefined') {\n return o instanceof WebGLTexture;\n }\n },\n defaultFontFamily: 'arial',\n getFontCanvas() {\n return inject.getOffscreenCanvas(16, 16, '__$$CHECK_SUPPORT_FONT_FAMILY$$__', null);\n },\n checkSupportFontFamily(ff) {\n ff = ff.toLowerCase();\n // 强制arial兜底\n if(ff === this.defaultFontFamily) {\n return true;\n }\n if(SUPPORT_FONT.hasOwnProperty(ff)) {\n return SUPPORT_FONT[ff];\n }\n let canvas = inject.getFontCanvas();\n let context = canvas.ctx;\n context.textAlign = 'center';\n context.fillStyle = '#000';\n context.textBaseline = 'middle';\n if(!defaultFontFamilyData) {\n context.clearRect(0, 0, 16, 16);\n context.font = '16px ' + this.defaultFontFamily;\n context.fillText('a', 8, 8);\n defaultFontFamilyData = context.getImageData(0, 0, 16, 16).data;\n }\n context.clearRect(0, 0, 16, 16);\n if(/\\s/.test(ff)) {\n ff = '\"' + ff.replace(/\"/g, '\\\\\"') + '\"';\n }\n context.font = '16px ' + ff + ',' + this.defaultFontFamily;\n context.fillText('a', 8, 8);\n let data = context.getImageData(0, 0, 16, 16).data;\n for(let i = 0, len = data.length; i < len; i++) {\n if(defaultFontFamilyData[i] !== data[i]) {\n return SUPPORT_FONT[ff] = true;\n }\n }\n return SUPPORT_FONT[ff] = false;\n },\n FONT,\n loadFont(fontFamily, url, cb) {\n if(util.isFunction(url)) {\n cb = url;\n url = fontFamily;\n }\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadFont(item.fontFamily, item.url, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load font invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n if(!fontFamily) {\n fontFamily = url;\n }\n let cache = FONT[url] = FONT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n if(url instanceof ArrayBuffer) {\n success(url);\n }\n else {\n let request = new XMLHttpRequest();\n request.open('get', url, true);\n request.responseType = 'arraybuffer';\n request.onload = function() {\n if(request.response) {\n success(request.response);\n }\n else {\n error();\n }\n };\n request.onerror = error;\n request.send();\n }\n function success(ab) {\n let f = new FontFace(fontFamily, ab);\n f.load().then(function() {\n if(typeof document !== 'undefined') {\n document.fonts.add(f);\n }\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache, ab));\n }).catch(error);\n }\n function error() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n }\n }\n },\n loadComponent(url, cb) {\n if(Array.isArray(url)) {\n if(!url.length) {\n return cb();\n }\n let count = 0;\n let len = url.length;\n let list = [];\n url.forEach((item, i) => {\n inject.loadComponent(item, function(cache) {\n list[i] = cache;\n if(++count === len) {\n cb(list);\n }\n });\n });\n return;\n }\n else if(!url || !util.isString(url)) {\n inject.error('Load component invalid: ' + url);\n cb && cb({\n state: LOADED,\n success: false,\n url,\n });\n return;\n }\n let cache = COMPONENT[url] = COMPONENT[url] || {\n state: INIT,\n task: [],\n };\n if(cache.state === LOADED) {\n cb && cb(cache);\n }\n else if(cache.state === LOADING) {\n cb && cache.task.push(cb);\n }\n else {\n cache.state = LOADING;\n cb && cache.task.push(cb);\n let script = document.createElement('script');\n script.src = url;\n script.async = true;\n script.onload = function() {\n cache.state = LOADED;\n cache.success = true;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n script.onerror = function() {\n cache.state = LOADED;\n cache.success = false;\n cache.url = url;\n let list = cache.task.splice(0);\n list.forEach(cb => cb(cache));\n document.head.removeChild(script);\n };\n document.head.appendChild(script);\n }\n },\n};\n\nexport default inject;\n","let TINF_OK = 0;\nlet TINF_DATA_ERROR = -3;\n\nfunction Tree() {\n this.table = new Uint16Array(16); /* table of code length counts */\n this.trans = new Uint16Array(288); /* code -> symbol translation table */\n}\n\nfunction Data(source, dest) {\n this.source = source;\n this.sourceIndex = 0;\n this.tag = 0;\n this.bitcount = 0;\n\n this.dest = dest;\n this.destLen = 0;\n\n this.ltree = new Tree(); /* dynamic length/symbol tree */\n this.dtree = new Tree(); /* dynamic distance tree */\n}\n\n/* --------------------------------------------------- *\n * -- uninitialized global data (static structures) -- *\n * --------------------------------------------------- */\n\nlet sltree = new Tree();\nlet sdtree = new Tree();\n\n/* extra bits and base tables for length codes */\nlet length_bits = new Uint8Array(30);\nlet length_base = new Uint16Array(30);\n\n/* extra bits and base tables for distance codes */\nlet dist_bits = new Uint8Array(30);\nlet dist_base = new Uint16Array(30);\n\n/* special ordering of code length codes */\nlet clcidx = new Uint8Array([\n 16, 17, 18, 0, 8, 7, 9, 6,\n 10, 5, 11, 4, 12, 3, 13, 2,\n 14, 1, 15\n]);\n\n/* used by tinf_decode_trees, avoids allocations every call */\nlet code_tree = new Tree();\nlet lengths = new Uint8Array(288 + 32);\n\n/* ----------------------- *\n * -- utility functions -- *\n * ----------------------- */\n\n/* build extra bits and base tables */\nfunction tinf_build_bits_base(bits, base, delta, first) {\n let i, sum;\n\n /* build bits table */\n for (i = 0; i < delta; ++i) bits[i] = 0;\n for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;\n\n /* build base table */\n for (sum = first, i = 0; i < 30; ++i) {\n base[i] = sum;\n sum += 1 << bits[i];\n }\n}\n\n/* build the fixed huffman trees */\nfunction tinf_build_fixed_trees(lt, dt) {\n let i;\n\n /* build fixed length tree */\n for (i = 0; i < 7; ++i) lt.table[i] = 0;\n\n lt.table[7] = 24;\n lt.table[8] = 152;\n lt.table[9] = 112;\n\n for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i;\n for (i = 0; i < 144; ++i) lt.trans[24 + i] = i;\n for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i;\n for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i;\n\n /* build fixed distance tree */\n for (i = 0; i < 5; ++i) dt.table[i] = 0;\n\n dt.table[5] = 32;\n\n for (i = 0; i < 32; ++i) dt.trans[i] = i;\n}\n\n/* given an array of code lengths, build a tree */\nlet offs = new Uint16Array(16);\n\nfunction tinf_build_tree(t, lengths, off, num) {\n let i, sum;\n\n /* clear code length count table */\n for (i = 0; i < 16; ++i) t.table[i] = 0;\n\n /* scan symbol lengths, and sum code length counts */\n for (i = 0; i < num; ++i) t.table[lengths[off + i]]++;\n\n t.table[0] = 0;\n\n /* compute offset table for distribution sort */\n for (sum = 0, i = 0; i < 16; ++i) {\n offs[i] = sum;\n sum += t.table[i];\n }\n\n /* create code->symbol translation table (symbols sorted by code) */\n for (i = 0; i < num; ++i) {\n if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i;\n }\n}\n\n/* ---------------------- *\n * -- decode functions -- *\n * ---------------------- */\n\n/* get one bit from source stream */\nfunction tinf_getbit(d) {\n /* check if tag is empty */\n if (!d.bitcount--) {\n /* load next tag */\n d.tag = d.source[d.sourceIndex++];\n d.bitcount = 7;\n }\n\n /* shift bit out of tag */\n let bit = d.tag & 1;\n d.tag >>>= 1;\n\n return bit;\n}\n\n/* read a num bit value from a stream and add base */\nfunction tinf_read_bits(d, num, base) {\n if (!num)\n return base;\n\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n let val = d.tag & (0xffff >>> (16 - num));\n d.tag >>>= num;\n d.bitcount -= num;\n return val + base;\n}\n\n/* given a data stream and a tree, decode a symbol */\nfunction tinf_decode_symbol(d, t) {\n while (d.bitcount < 24) {\n d.tag |= d.source[d.sourceIndex++] << d.bitcount;\n d.bitcount += 8;\n }\n\n let sum = 0, cur = 0, len = 0;\n let tag = d.tag;\n\n /* get more bits while code value is above sum */\n do {\n cur = 2 * cur + (tag & 1);\n tag >>>= 1;\n ++len;\n\n sum += t.table[len];\n cur -= t.table[len];\n } while (cur >= 0);\n\n d.tag = tag;\n d.bitcount -= len;\n\n return t.trans[sum + cur];\n}\n\n/* given a data stream, decode dynamic trees from it */\nfunction tinf_decode_trees(d, lt, dt) {\n let hlit, hdist, hclen;\n let i, num, length;\n\n /* get 5 bits HLIT (257-286) */\n hlit = tinf_read_bits(d, 5, 257);\n\n /* get 5 bits HDIST (1-32) */\n hdist = tinf_read_bits(d, 5, 1);\n\n /* get 4 bits HCLEN (4-19) */\n hclen = tinf_read_bits(d, 4, 4);\n\n for (i = 0; i < 19; ++i) lengths[i] = 0;\n\n /* read code lengths for code length alphabet */\n for (i = 0; i < hclen; ++i) {\n /* get 3 bits code length (0-7) */\n let clen = tinf_read_bits(d, 3, 0);\n lengths[clcidx[i]] = clen;\n }\n\n /* build code length tree */\n tinf_build_tree(code_tree, lengths, 0, 19);\n\n /* decode code lengths for the dynamic trees */\n for (num = 0; num < hlit + hdist;) {\n let sym = tinf_decode_symbol(d, code_tree);\n\n switch (sym) {\n case 16:\n /* copy previous code length 3-6 times (read 2 bits) */\n let prev = lengths[num - 1];\n for (length = tinf_read_bits(d, 2, 3); length; --length) {\n lengths[num++] = prev;\n }\n break;\n case 17:\n /* repeat code length 0 for 3-10 times (read 3 bits) */\n for (length = tinf_read_bits(d, 3, 3); length; --length) {\n lengths[num++] = 0;\n }\n break;\n case 18:\n /* repeat code length 0 for 11-138 times (read 7 bits) */\n for (length = tinf_read_bits(d, 7, 11); length; --length) {\n lengths[num++] = 0;\n }\n break;\n default:\n /* values 0-15 represent the actual code lengths */\n lengths[num++] = sym;\n break;\n }\n }\n\n /* build dynamic trees */\n tinf_build_tree(lt, lengths, 0, hlit);\n tinf_build_tree(dt, lengths, hlit, hdist);\n}\n\n/* ----------------------------- *\n * -- block inflate functions -- *\n * ----------------------------- */\n\n/* given a stream and two trees, inflate a block of data */\nfunction tinf_inflate_block_data(d, lt, dt) {\n while (1) {\n let sym = tinf_decode_symbol(d, lt);\n\n /* check for end of block */\n if (sym === 256) {\n return TINF_OK;\n }\n\n if (sym < 256) {\n d.dest[d.destLen++] = sym;\n } else {\n let length, dist, offs;\n let i;\n\n sym -= 257;\n\n /* possibly get more bits from length code */\n length = tinf_read_bits(d, length_bits[sym], length_base[sym]);\n\n dist = tinf_decode_symbol(d, dt);\n\n /* possibly get more bits from distance code */\n offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);\n\n /* copy match */\n for (i = offs; i < offs + length; ++i) {\n d.dest[d.destLen++] = d.dest[i];\n }\n }\n }\n}\n\n/* inflate an uncompressed block of data */\nfunction tinf_inflate_uncompressed_block(d) {\n let length, invlength;\n let i;\n\n /* unread from bitbuffer */\n while (d.bitcount > 8) {\n d.sourceIndex--;\n d.bitcount -= 8;\n }\n\n /* get length */\n length = d.source[d.sourceIndex + 1];\n length = 256 * length + d.source[d.sourceIndex];\n\n /* get one's complement of length */\n invlength = d.source[d.sourceIndex + 3];\n invlength = 256 * invlength + d.source[d.sourceIndex + 2];\n\n /* check length */\n if (length !== (~invlength & 0x0000ffff))\n return TINF_DATA_ERROR;\n\n d.sourceIndex += 4;\n\n /* copy block */\n for (i = length; i; --i)\n d.dest[d.destLen++] = d.source[d.sourceIndex++];\n\n /* make sure we start next block on a byte boundary */\n d.bitcount = 0;\n\n return TINF_OK;\n}\n\n/* inflate stream from source to dest */\nfunction tinf_uncompress(source, dest) {\n let d = new Data(source, dest);\n let bfinal, btype, res;\n\n do {\n /* read final block flag */\n bfinal = tinf_getbit(d);\n\n /* read block type (2 bits) */\n btype = tinf_read_bits(d, 2, 0);\n\n /* decompress block */\n switch (btype) {\n case 0:\n /* decompress uncompressed block */\n res = tinf_inflate_uncompressed_block(d);\n break;\n case 1:\n /* decompress block with fixed huffman trees */\n res = tinf_inflate_block_data(d, sltree, sdtree);\n break;\n case 2:\n /* decompress block with dynamic huffman trees */\n tinf_decode_trees(d, d.ltree, d.dtree);\n res = tinf_inflate_block_data(d, d.ltree, d.dtree);\n break;\n default:\n res = TINF_DATA_ERROR;\n }\n\n if (res !== TINF_OK)\n throw new Error('Data error');\n\n } while (!bfinal);\n\n if (d.destLen < d.dest.length) {\n if (typeof d.dest.slice === 'function')\n return d.dest.slice(0, d.destLen);\n else\n return d.dest.subarray(0, d.destLen);\n }\n\n return d.dest;\n}\n\n/* -------------------- *\n * -- initialization -- *\n * -------------------- */\n\n/* build fixed huffman trees */\ntinf_build_fixed_trees(sltree, sdtree);\n\n/* build extra bits and base tables */\ntinf_build_bits_base(length_bits, length_base, 4, 3);\ntinf_build_bits_base(dist_bits, dist_base, 2, 1);\n\n/* fix a special case */\nlength_bits[28] = 0;\nlength_base[28] = 258;\n\nexport default tinf_uncompress;\n","import inject from './inject';\nimport inflate from './inflate';\n\nfunction getTag(dataView, offset) {\n let tag = '';\n for (let i = offset; i < offset + 4; i++) {\n tag += String.fromCharCode(dataView.getInt8(i));\n }\n return tag;\n}\n\nfunction getUShort(dataView, offset) {\n return dataView.getUint16(offset, false);\n}\n\nfunction getULong(dataView, offset) {\n return dataView.getUint32(offset, false);\n}\n\nfunction getFixed(dataView, offset) {\n let decimal = dataView.getInt16(offset, false);\n let fraction = dataView.getUint16(offset + 2, false);\n return decimal + fraction / 65535;\n}\n\nfunction parseOpenTypeTableEntries(data, numTables) {\n let tableEntries = [];\n let p = 12;\n for (let i = 0; i < numTables; i += 1) {\n let tag = getTag(data, p);\n let checksum = getULong(data, p + 4);\n let offset = getULong(data, p + 8);\n let length = getULong(data, p + 12);\n tableEntries.push({ tag: tag, checksum: checksum,\n offset: offset, length: length, compression: false });\n p += 16;\n }\n return tableEntries;\n}\n\nfunction parseWOFFTableEntries(data, numTables) {\n let tableEntries = [];\n let p = 44; // offset to the first table directory entry.\n for (let i = 0; i < numTables; i += 1) {\n let tag = getTag(data, p);\n let offset = getULong(data, p + 4);\n let compLength = getULong(data, p + 8);\n let origLength = getULong(data, p + 12);\n let compression;\n if (compLength < origLength) {\n compression = 'WOFF';\n }\n else {\n compression = false;\n }\n tableEntries.push({ tag: tag, offset: offset, compression: compression,\n compressedLength: compLength, length: origLength });\n p += 20;\n }\n return tableEntries;\n}\n\nfunction uncompressTable(data, tableEntry) {\n if (tableEntry.compression === 'WOFF') {\n let inBuffer = new Uint8Array(data.buffer, tableEntry.offset + 2, tableEntry.compressedLength - 2);\n let outBuffer = new Uint8Array(tableEntry.length);\n inflate(inBuffer, outBuffer);\n if(outBuffer.byteLength !== tableEntry.length) {\n inject.error('Decompression error: ' + tableEntry.tag + ' decompressed length doesn\\'t match recorded length');\n }\n let view = new DataView(outBuffer.buffer, 0);\n return { data: view, offset: 0 };\n }\n else {\n return { data: data, offset: tableEntry.offset };\n }\n}\n\nclass Parser {\n constructor(data, offset) {\n this.data = data;\n this.offset = offset;\n this.relativeOffset = 0;\n }\n\n parseUShort() {\n let v = this.data.getUint16(this.offset + this.relativeOffset);\n this.relativeOffset += 2;\n return v;\n }\n\n parseULong() {\n let v = getULong(this.data, this.offset + this.relativeOffset);\n this.relativeOffset += 4;\n return v;\n }\n\n parseShort() {\n let v = this.data.getInt16(this.offset + this.relativeOffset);\n this.relativeOffset += 2;\n return v;\n }\n\n parseFixed() {\n let v = getFixed(this.data, this.offset + this.relativeOffset);\n this.relativeOffset += 4;\n return v;\n }\n\n parseVersion(minorBase) {\n let major = getUShort(this.data, this.offset + this.relativeOffset);\n let minor = getUShort(this.data, this.offset + this.relativeOffset + 2);\n this.relativeOffset += 4;\n if(minorBase === undefined) {\n minorBase = 0x1000;\n }\n return major + minor / minorBase / 10;\n };\n}\n\nexport default {\n parse(arrayBuffer) {\n let data = new DataView(arrayBuffer, 0);\n let signature = getTag(data, 0);\n let numTables, tableEntries;\n if(signature === String.fromCharCode(0, 1, 0, 0) || signature === 'true' || signature === 'typ1') {\n numTables = getUShort(data, 4);\n tableEntries = parseOpenTypeTableEntries(data, numTables);\n }\n else if(signature === 'OTTO') {\n numTables = getUShort(data, 4);\n tableEntries = parseOpenTypeTableEntries(data, numTables);\n }\n else if(signature === 'wOFF') {\n let flavor = getTag(data, 4);\n if(flavor !== String.fromCharCode(0, 1, 0, 0) && flavor !== 'OTTO') {\n inject.error('Unsupported OpenType flavor ' + signature);\n return;\n }\n numTables = getUShort(data, 12);\n tableEntries = parseWOFFTableEntries(data, numTables);\n }\n else {\n inject.error('Unsupported OpenType signature ' + signature);\n }\n let emSquare = 2048, ascent, descent, lineGap = 0;\n for(let i = 0; i < numTables; i++) {\n let tableEntry = tableEntries[i];\n if(tableEntry.tag === 'head') {\n let table = uncompressTable(data, tableEntry);\n let p = new Parser(table.data, table.offset);\n p.parseVersion();\n p.parseFixed();\n p.parseULong();\n p.parseULong();\n p.parseUShort();\n emSquare = p.parseUShort();\n }\n else if(tableEntry.tag === 'hhea') {\n let table = uncompressTable(data, tableEntry);\n let p = new Parser(table.data, table.offset);\n p.parseVersion();\n ascent = Math.abs(p.parseShort());\n descent = Math.abs(p.parseShort());\n lineGap = Math.abs(p.parseShort() || 0);\n }\n }\n return {\n emSquare,\n ascent,\n descent,\n lineGap,\n };\n },\n};\n","import util from '../util/util';\nimport inject from '../util/inject';\nimport opentype from '../util/opentype';\n\nconst { isString } = util;\n\nconst CALLBACK = {};\n\nlet o = {\n info: {\n arial: {\n lhr: 1.14990234375, // 默认line-height ratio,(67+1854+434)/2048\n // car: 1.1171875, // content-area ratio,(1854+434)/2048\n blr: 0.9052734375, // base-line ratio,1854/2048\n // mdr: 0.64599609375, // middle ratio,(1854-1062/2)/2048\n lgr: 0.03271484375, // line-gap ratio,67/2048,默认0\n },\n helvetica: {\n lhr: 1.14990234375, // (8+1900+447)/2048\n blr: 0.927734375, // 1900/2048\n lgr: 0.00390625, // 8/2048\n },\n verdana: {\n lhr: 1.21533203125, // (0+2059+430)/2048\n blr: 1.00537109375, // 2059/2048\n },\n tahoma: {\n lhr: 1.20703125, // (0+2049+423)/2048\n blr: 1.00048828125, // 2049/2048\n },\n georgia: {\n lhr: 1.13623046875, // (0+1878+449)/2048\n blr: 0.9169921875, // 1878/2048\n },\n 'courier new': {\n lhr: 1.1328125, // (0+1705+615)/2048\n blr: 0.83251953125, // 1705/2048\n },\n 'pingfang sc': {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06, // 1060/1000\n },\n simsun: {\n lhr: 1.4, // (0+1060+340)/1000\n blr: 1.06,\n },\n },\n support(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].checked;\n },\n register(name, url, data) { // url和data同时需要,也可以先data后url,不能先url后data\n name = name.toLowerCase();\n if(!isString(url) && !(url instanceof ArrayBuffer)) {\n data = url;\n url = null;\n }\n let info = this.info;\n let fontInfo = info[name] = info[name] || {};\n if(url && !fontInfo.url) { // 不能覆盖\n fontInfo.url = url;\n inject.loadFont(name, url, function(res, ab) {\n fontInfo.success = res.success;\n if(res.success) {\n // 手动指定更高优先级,不解析\n if(!fontInfo.lhr && ab) {\n let r = opentype.parse(ab);\n setData(r);\n }\n // 回调\n let list = CALLBACK[name] || [];\n while(list.length) {\n let node = list.pop();\n node.__emitFontRegister(name);\n }\n }\n });\n }\n // 防止先没url只注册,再调用只传url的情况\n if(!data || fontInfo.lhr) {\n return;\n }\n setData(data);\n function setData(data) {\n let { emSquare = 2048, ascent, descent, lineGap = 0 } = data;\n if(!ascent || !descent) {\n return;\n }\n Object.assign(fontInfo, {\n lhr: (ascent + descent + lineGap) / emSquare,\n blr: ascent / emSquare,\n });\n }\n },\n hasRegister(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].hasOwnProperty('lhr');\n },\n hasLoaded(fontFamily) {\n return this.info.hasOwnProperty(fontFamily) && this.info[fontFamily].success;\n },\n onRegister(fontFamily, node) {\n let list = CALLBACK[fontFamily] = CALLBACK[fontFamily] || [];\n list.push(node);\n },\n offRegister(fontFamily, node) {\n let list = CALLBACK[fontFamily] = CALLBACK[fontFamily] || [];\n let i = list.indexOf(node);\n if(i > -1) {\n list.splice(i, 1);\n }\n }\n};\n\no.info['宋体'] = o.info.simsun;\no.info['pingfang'] = o.info['pingfang sc'];\n\nexport default o;\n","import inject from '../util/inject';\n\nconst DOM = {\n position: 'static',\n display: 'block',\n boxSizing: 'contentBox',\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto',\n marginTop: 0,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n paddingTop: 0,\n paddingRight: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n fontSize: 'inherit',\n fontFamily: 'inherit',\n color: 'inherit',\n fontStyle: 'inherit',\n fontWeight: 'inherit',\n lineHeight: 'inherit',\n backgroundImage: null,\n backgroundColor: 'transparent',\n backgroundSize: 'auto',\n backgroundRepeat: 'repeat',\n backgroundPositionX: 0,\n backgroundPositionY: 0,\n backgroundClip: 'borderBox',\n borderTopWidth: 0,\n borderRightWidth: 0,\n borderBottomWidth: 0,\n borderLeftWidth: 0,\n borderTopColor: 'transparent',\n borderRightColor: 'transparent',\n borderBottomColor: 'transparent',\n borderLeftColor: 'transparent',\n borderTopStyle: 'none',\n borderRightStyle: 'none',\n borderBottomStyle: 'none',\n borderLeftStyle: 'none',\n borderTopLeftRadius: 0,\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n borderBottomLeftRadius: 0,\n width: 'auto',\n height: 'auto',\n flexGrow: 0,\n flexShrink: 1,\n flexBasis: 'auto',\n flexDirection: 'row',\n flexWrap: 'nowrap',\n order: 0,\n justifyContent: 'flexStart',\n alignItems: 'stretch',\n alignSelf: 'auto',\n alignContent: 'stretch',\n textAlign: 'inherit',\n letterSpacing: 'inherit',\n transformOrigin: 'center',\n visibility: 'inherit',\n opacity: 1,\n zIndex: 0,\n transform: null,\n translateX: 0,\n translateY: 0,\n translateZ: 0,\n scaleX: 1,\n scaleY: 1,\n scaleZ: 1,\n skewX: 0,\n skewY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n rotate3d: '0, 0, 0, 0',\n perspective: 0,\n perspectiveOrigin: 'center',\n transformStyle: 'flat',\n backfaceVisibility: 'visible',\n filter: null,\n boxShadow: null,\n pointerEvents: 'inherit',\n overflow: 'visible',\n mixBlendMode: 'normal',\n whiteSpace: 'inherit',\n textOverflow: 'clip',\n lineClamp: 0,\n textStrokeWidth: 'inherit',\n textStrokeColor: 'inherit',\n textStrokeOver: 'inherit',\n writingMode: 'inherit',\n fontSizeShrink: 0,\n};\n\nconst GEOM = {\n fill: 'transparent',\n stroke: '#000',\n strokeWidth: 1,\n strokeDasharray: '',\n strokeLinecap: 'butt',\n strokeLinejoin: 'miter',\n strokeMiterlimit: 4,\n fillRule: 'nonzero',\n};\n\nconst DOM_ENTRY_SET = [];\nconst DOM_KEY_SET = [];\nObject.keys(DOM).forEach(k => {\n DOM_KEY_SET.push(k);\n let v = DOM[k];\n DOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nconst GEOM_ENTRY_SET = [];\nconst GEOM_KEY_SET = [];\nObject.keys(GEOM).forEach(k => {\n GEOM_KEY_SET.push(k);\n let v = GEOM[k];\n GEOM_ENTRY_SET.push({\n k,\n v,\n });\n});\n\nconst INHERIT = {\n get fontFamily() {\n return inject.defaultFontFamily;\n },\n fontSize: 16,\n fontWeight: 400,\n fontStyle: 'normal',\n color: '#000',\n textAlign: 'left',\n visibility: 'visible',\n pointerEvents: 'auto',\n textStrokeColor: '#000',\n textStrokeWidth: 0,\n textStrokeOver: 'none',\n writingMode: 'horizontalTb',\n};\n\nconst INHERIT_KEY_SET = [];\nObject.keys(INHERIT).forEach(k => {\n INHERIT_KEY_SET.push(k);\n});\n\n// 默认值放第一个\nconst VALID_STRING_VALUE = {\n position: ['static', 'relative', 'absolute'],\n display: ['block', 'inlineBlock', 'inline', 'flex', 'none'],\n flexDirection: ['row', 'column', 'rowReverse', 'columnReverse'],\n flexWrap: ['wrap', 'wrapReverse', 'nowrap'],\n justifyContent: ['flexStart', 'center', 'flexEnd', 'spaceBetween', 'spaceAround', 'spaceEvenly'],\n alignItems: ['stretch', 'flexStart', 'center', 'flexEnd', 'baseline'],\n alignSelf: ['auto', 'stretch', 'flexStart', 'center', 'flexEnd', 'baseline'],\n overflow: ['visible', 'hidden'],\n mixBlendMode: ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten',\n 'colorDodge', 'colorBurn', 'hardLight', 'softLight', 'difference', 'exclusion',\n 'hue', 'saturation', 'color', 'luminosity'],\n borderTopStyle: ['solid', 'dashed', 'dotted'],\n borderRightStyle: ['solid', 'dashed', 'dotted'],\n borderBottomStyle: ['solid', 'dashed', 'dotted'],\n borderLeftStyle: ['solid', 'dashed', 'dotted'],\n backgroundClip: ['borderBox', 'paddingBox', 'contentBox'],\n textOverflow: ['clip', 'ellipsis'],\n alignContent: ['stretch', 'flexStart', 'center', 'flexEnd', 'spaceBetween', 'spaceAround'],\n transformStyle: ['flat', 'preserve3d'],\n backfaceVisibility: ['visible', 'hidden'],\n boxSizing: ['contentBox', 'borderBox'],\n}\n\nexport default {\n DOM,\n GEOM,\n isValid(i) {\n return DOM.hasOwnProperty(i) || GEOM.hasOwnProperty(i);\n },\n DOM_KEY_SET,\n GEOM_KEY_SET,\n DOM_ENTRY_SET,\n GEOM_ENTRY_SET,\n INHERIT,\n INHERIT_KEY_SET,\n VALID_STRING_VALUE,\n};\n","export default {\n position: /(([-+]?[\\d.]+[pxremvwhina%]*)|(left|top|right|bottom|center)){1,2}/ig,\n gradient: /\\b(\\w+)-?gradient\\((.+)\\)/i,\n img: /(?:\\burl\\((['\"]?)(.*?)\\1\\))|(?:\\b((data:)))/i,\n};\n","// 向量点乘积\nfunction dotProduct(x1, y1, x2, y2) {\n return x1 * x2 + y1 * y2;\n}\n\nfunction dotProduct3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return x1 * x2 + y1 * y2 + z1 * z2;\n}\n\n// 向量叉乘积\nfunction crossProduct(x1, y1, x2, y2) {\n return x1 * y2 - x2 * y1;\n}\n\nfunction crossProduct3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return {\n x: y1 * z2 - y2 * z1,\n y: z1 * x2 - z2 * x1,\n z: x1 * y2 - x2 * y1,\n };\n}\n\n// 归一化\nfunction unitize(x, y) {\n let n = length(x, y);\n return {\n x: x / n,\n y: y / n,\n };\n}\n\nfunction unitize3(x, y, z) {\n if(y === undefined && z === undefined) {\n y = x.y;\n z = x.z;\n x = x.x;\n }\n let n = length3(x, y, z);\n return {\n x: x / n,\n y: y / n,\n z: z / n,\n };\n}\n\n// 是否平行\nfunction isParallel(x1, y1, x2, y2) {\n if(isZero(x1, y1, x2, y2)) {\n return true;\n }\n let ag = angle(x1, y1, x2, y2);\n if(Math.abs(ag) < 1e-9) {\n return true;\n }\n if(Math.PI - Math.abs(ag) < 1e-9) {\n return true;\n }\n return false;\n}\n\nfunction isParallel3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n if(isZero3(x1, y1, z1, x2, y2, z2)) {\n return true;\n }\n let ag = angle3(x1, y1, z1, x2, y2, z2);\n if(Math.abs(ag) < 1e-9) {\n return true;\n }\n if(Math.PI - Math.abs(ag) < 1e-9) {\n return true;\n }\n return false;\n}\n\n// 是否是零,考虑误差\nfunction isZero(x1, y1, x2, y2) {\n return Math.abs(x1) < 1e-9 && Math.abs(y1) < 1e-9\n && Math.abs(x2) < 1e-9 && Math.abs(y2) < 1e-9;\n}\n\nfunction isZero3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n return Math.abs(x1) < 1e-9 && Math.abs(y1) < 1e-9 && Math.abs(z1) < 1e-9\n && Math.abs(x2) < 1e-9 && Math.abs(y2) < 1e-9 && Math.abs(z2) < 1e-9;\n}\n\n// 向量夹角\nfunction angle(x1, y1, x2, y2) {\n let cos = dotProduct(x1, y1, x2, y2) / (length(x1, y1) * length(x2, y2));\n if(cos < -1) {\n cos = -1;\n }\n else if(cos > 1) {\n cos = 1;\n }\n return Math.acos(cos);\n}\n\nfunction angle3(x1, y1, z1, x2, y2, z2) {\n if(z1 === undefined && x2 === undefined && y2 === undefined && z2 === undefined) {\n x2 = y1.x;\n z2 = y1.z;\n y2 = y1.y;\n y1 = x1.y;\n z1 = x1.z;\n x1 = x1.x;\n }\n let cos = dotProduct3(x1, y1, z1, x2, y2, z2) / (length3(x1, y1, z1) * length3(x2, y2, z2));\n if(cos < -1) {\n cos = -1;\n }\n else if(cos > 1) {\n cos = 1;\n }\n return Math.acos(cos);\n}\n\n// 向量长度\nfunction length(x, y) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));\n}\n\nfunction length3(x, y, z) {\n return Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2) + Math.pow(z, 2));\n}\n\n// 获取任意一个垂直于目标的向量\nfunction getPerpendicularVector3(x, y, z) {\n let i, j, k, a, b;\n if(Math.abs(y) > Math.abs(x)) {\n if(Math.abs(z) > Math.abs(y)) {\n i = 2;\n j = 1;\n k = 0;\n a = z;\n b = -y;\n }\n else if(Math.abs(z) > Math.abs(x)) {\n i = 1;\n j = 2;\n k = 0;\n a = y;\n b = -z;\n }\n else {\n i = 1;\n j = 0;\n k = 2;\n a = y;\n b = -x;\n }\n }\n else if(Math.abs(z) > Math.abs(x)) {\n i = 2;\n j = 0;\n k = 1;\n a = z;\n b = -x;\n }\n else if(Math.abs(z) > Math.abs(y)) {\n i = 0;\n j = 2;\n k = 1;\n a = x;\n b = -z;\n }\n else {\n i = 0;\n j = 1;\n k = 2;\n a = x;\n b = -y;\n }\n let arr = [0, 0, 0];\n arr[i] = b;\n arr[j] = a;\n arr[k] = 0;\n return unitize3(arr[0], arr[1], arr[2]);\n}\n\nexport default {\n dotProduct,\n dotProduct3,\n crossProduct,\n crossProduct3,\n unitize,\n unitize3,\n isParallel,\n isParallel3,\n isZero,\n isZero3,\n angle,\n angle3,\n length,\n length3,\n getPerpendicularVector3,\n};\n","const STYLE_KEY = {\n POSITION: 0,\n DISPLAY: 1,\n TOP: 2,\n RIGHT: 3,\n BOTTOM: 4,\n LEFT: 5,\n MARGIN_TOP: 6,\n MARGIN_RIGHT: 7,\n MARGIN_BOTTOM: 8,\n MARGIN_LEFT: 9,\n PADDING_TOP: 10,\n PADDING_RIGHT: 11,\n PADDING_BOTTOM: 12,\n PADDING_LEFT: 13,\n FONT_SIZE: 14,\n FONT_FAMILY: 15,\n COLOR: 16,\n FONT_STYLE: 17,\n FONT_WEIGHT: 18,\n LINE_HEIGHT: 19,\n BACKGROUND_IMAGE: 20,\n BACKGROUND_COLOR: 21,\n BACKGROUND_SIZE: 22,\n BACKGROUND_REPEAT: 23,\n BACKGROUND_POSITION_X: 24,\n BACKGROUND_POSITION_Y: 25,\n BORDER_TOP_WIDTH: 26,\n BORDER_RIGHT_WIDTH: 27,\n BORDER_BOTTOM_WIDTH: 28,\n BORDER_LEFT_WIDTH: 29,\n BORDER_TOP_COLOR: 30,\n BORDER_RIGHT_COLOR: 31,\n BORDER_BOTTOM_COLOR: 32,\n BORDER_LEFT_COLOR: 33,\n BORDER_TOP_STYLE: 34,\n BORDER_RIGHT_STYLE: 35,\n BORDER_BOTTOM_STYLE: 36,\n BORDER_LEFT_STYLE: 37,\n BORDER_TOP_LEFT_RADIUS: 38,\n BORDER_TOP_RIGHT_RADIUS: 39,\n BORDER_BOTTOM_RIGHT_RADIUS: 40,\n BORDER_BOTTOM_LEFT_RADIUS: 41,\n WIDTH: 42,\n HEIGHT: 43,\n FLEX_GROW: 44,\n FLEX_SHRINK: 45,\n FLEX_BASIS: 46,\n FLEX_DIRECTION: 47,\n JUSTIFY_CONTENT: 48,\n ALIGN_ITEMS: 49,\n ALIGN_SELF: 50,\n TEXT_ALIGN: 51,\n TRANSFORM_ORIGIN: 52,\n VISIBILITY: 53,\n OPACITY: 54,\n Z_INDEX: 55,\n TRANSFORM: 56,\n TRANSLATE_X: 57,\n TRANSLATE_Y: 58,\n TRANSLATE_Z: 59,\n SCALE_X: 60,\n SCALE_Y: 61,\n SCALE_Z: 62,\n SKEW_X: 63,\n SKEW_Y: 64,\n ROTATE_X: 65,\n ROTATE_Y: 66,\n ROTATE_Z: 67,\n ROTATE_3D: 68,\n PERSPECTIVE: 69,\n PERSPECTIVE_ORIGIN: 70,\n FILTER: 71,\n BOX_SHADOW: 72,\n POINTER_EVENTS: 73,\n OVERFLOW: 74,\n MIX_BLEND_MODE: 75,\n BACKGROUND_CLIP: 76,\n WHITE_SPACE: 77,\n TEXT_OVERFLOW: 78,\n LETTER_SPACING: 79,\n LINE_CLAMP: 80,\n ORDER: 81,\n FLEX_WRAP: 82,\n ALIGN_CONTENT: 83,\n TEXT_STROKE_WIDTH: 84,\n TEXT_STROKE_COLOR: 85,\n TEXT_STROKE_OVER: 86,\n WRITING_MODE: 87,\n TRANSFORM_STYLE: 88,\n BACKFACE_VISIBILITY: 89,\n BOX_SIZING: 90,\n FONT_SIZE_SHRINK: 91,\n // GEOM\n FILL: 92,\n STROKE: 93,\n STROKE_WIDTH: 94,\n STROKE_DASHARRAY: 95,\n STROKE_DASHARRAY_STR: 96,\n STROKE_LINECAP: 97,\n STROKE_LINEJOIN: 98,\n STROKE_MITERLIMIT: 99,\n FILL_RULE: 100,\n // 无此样式,仅cache或特殊情况需要\n MATRIX: 101,\n BORDER_TOP: 102,\n BORDER_RIGHT: 103,\n BORDER_BOTTOM: 104,\n BORDER_LEFT: 105,\n TRANSLATE_PATH: 106,\n};\n\nconst STYLE2LOWER_MAP = {};\nfunction style2Lower(s) {\n let res = STYLE2LOWER_MAP[s];\n if(!res) {\n res = STYLE2LOWER_MAP[s] = s.toLowerCase().replace(/_([a-z])/g, function($0, $1) {\n return $1.toUpperCase();\n });\n }\n return res;\n}\n\nconst STYLE2UPPER_MAP = {};\nfunction style2Upper(s) {\n let res = STYLE2UPPER_MAP[s];\n if(!res) {\n res = STYLE2UPPER_MAP[s] = s.replace(/([a-z\\d_])([A-Z])/g, function($0, $1, $2) {\n return $1 + '_' + $2;\n }).toUpperCase();\n }\n return res;\n}\n\nconst STYLE_R_KEY = {};\nconst STYLE_RV_KEY = {};\nconst STYLE_V_KEY = {};\nObject.keys(STYLE_KEY).forEach(k => {\n let k2 = STYLE_KEY[k];\n STYLE_R_KEY[k2] = k;\n let l = style2Lower(k);\n STYLE_RV_KEY[k2] = l;\n STYLE_V_KEY[l] = k2;\n});\n\nexport default {\n STYLE_KEY, // 大写常量为k,数字为值\n STYLE_R_KEY, // 数字为k,大写常量为值\n STYLE_RV_KEY, // 数字为k,小写为值\n STYLE_V_KEY, // 小写为k,数字为值\n style2Lower,\n style2Upper,\n ELLIPSIS: '…',\n};\n","import mx from './matrix';\nimport vector from './vector';\nimport enums from '../util/enums';\n\nconst H = 4 * (Math.sqrt(2) - 1) / 3;\nconst { crossProduct } = vector;\nconst { calPoint, isE } = mx;\nconst { STYLE_KEY: {\n WIDTH,\n HEIGHT,\n TRANSFORM_ORIGIN,\n} } = enums;\n\n/**\n * 圆弧拟合公式,根据角度求得3阶贝塞尔控制点比例长度,一般<=90,超过拆分\n * @param deg\n * @returns {number}\n */\nfunction h(deg) {\n deg *= 0.5;\n return 4 * ((1 - Math.cos(deg)) / Math.sin(deg)) / 3;\n}\n\n/**\n * 判断点是否在多边形内\n * @param x 点坐标\n * @param y\n * @param vertexes 多边形顶点坐标\n * @returns {boolean}\n */\nfunction pointInConvexPolygon(x, y, vertexes) {\n // 先取最大最小值得一个外围矩形,在外边可快速判断false\n let { x: xmax, y: ymax } = vertexes[0];\n let { x: xmin, y: ymin } = vertexes[0];\n let len = vertexes.length;\n for(let i = 1; i < len; i++) {\n let { x, y } = vertexes[i];\n xmax = Math.max(xmax, x);\n ymax = Math.max(ymax, y);\n xmin = Math.min(xmin, x);\n ymin = Math.min(ymin, y);\n }\n if(x < xmin || y < ymin || x > xmax || y > ymax) {\n return false;\n }\n let first;\n // 所有向量积均为非负数(逆时针,反过来顺时针是非正)说明在多边形内或边上\n for(let i = 0, len = vertexes.length; i < len; i++) {\n let { x: x1, y: y1 } = vertexes[i];\n let { x: x2, y: y2 } = vertexes[(i + 1) % len];\n let n = crossProduct(x2 - x1, y2 - y1, x - x1, y - y1);\n if(n !== 0) {\n n = n > 0 ? 1 : 0;\n // 第一个赋值,后面检查是否正负一致性,不一致是反例就跳出\n if(first === undefined) {\n first = n;\n }\n else if(first ^ n) {\n return false;\n }\n }\n }\n return true;\n}\n\n// 判断点是否在一个4边形内,比如事件发生是否在节点上\nfunction pointInQuadrilateral(x, y, x1, y1, x2, y2, x4, y4, x3, y3, matrix) {\n if(matrix && !isE(matrix)) {\n let w1, w2, w3, w4;\n let t = calPoint({ x: x1, y: y1 }, matrix);\n x1 = t.x; y1 = t.y; w1 = t.w;\n t = calPoint({ x: x2, y: y2 }, matrix);\n x2 = t.x; y2 = t.y; w2 = t.w;\n t = calPoint({ x: x3, y: y3 }, matrix);\n x3 = t.x; y3 = t.y; w3 = t.w;\n t = calPoint({ x: x4, y: y4 }, matrix);\n x4 = t.x; y4 = t.y; w4 = t.w;\n if(w1 && w1 !== 1) {\n x1 /= w1;\n y1 /= w1;\n }\n if(w2 && w2 !== 1) {\n x2 /= w2;\n y2 /= w2;\n }\n if(w3 && w3 !== 1) {\n x3 /= w3;\n y3 /= w3;\n }\n if(w4 && w4 !== 1) {\n x4 /= w4;\n y4 /= w4;\n }\n return pointInConvexPolygon(x, y, [\n { x: x1, y: y1 },\n { x: x2, y: y2 },\n { x: x4, y: y4 },\n { x: x3, y: y3 },\n ]);\n }\n else {\n return x >= x1 && y >= y1 && x <= x4 && y <= y4;\n }\n}\n\n/**\n * 余弦定理3边长求夹角\n * @param a\n * @param b\n * @param c\n */\nfunction angleBySide(a, b, c) {\n let theta = (Math.pow(b, 2) + Math.pow(c, 2) - Math.pow(a, 2)) / (2 * b * c);\n return Math.acos(theta);\n}\n\n/**\n * 余弦定理2边长和夹角求3边\n * @param alpha 弧度\n * @param a\n * @param b\n */\nfunction sideByAngle(alpha, a, b) {\n let cos = Math.cos(alpha);\n return Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2) - 2 * a * b * cos);\n}\n\n/**\n * 两点距离\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n */\nfunction pointsDistance(x1, y1, x2, y2) {\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n}\n\n/**\n * 三角形内心\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @param x3\n * @param y3\n */\nfunction triangleIncentre(x1, y1, x2, y2, x3, y3) {\n let a = pointsDistance(x2, y2, x3, y3);\n let b = pointsDistance(x1, y1, x3, y3);\n let c = pointsDistance(x1, y1, x2, y2);\n return {\n x: (a * x1 + b * x2 + c * x3) / (a + b + c),\n y: (a * y1 + b * y2 + c * y3) / (a + b + c),\n };\n}\n\n/**\n * 椭圆圆心和长短轴生成4个端点和控制点\n */\nfunction ellipsePoints(x, y, a, b = a) {\n let ox = a * H;\n let oy = b === a ? ox : b * H;\n return [\n [x - a, y],\n [x - a, y - oy, x - ox, y - b, x, y - b],\n [x + ox, y - b, x + a, y - oy, x + a, y],\n [x + a, y + oy, x + ox, y + b, x, y + b],\n [x - ox, y + b, x - a, y + oy, x - a, y],\n ];\n}\n\n/**\n * 扇形圆心和半径起始角度生成4个端点和控制点\n * 分为4个象限进行拟合,0、1、2、3\n */\nfunction sectorPoints(x, y, r, begin, end) {\n if(begin > end) {\n [begin, end] = [end, begin];\n }\n if(begin === end) {\n return [];\n }\n let list = [];\n let b = Math.floor(begin / 90);\n let e = Math.floor(end / 90);\n // 同象限直接算\n if(b === e || (e - b) === 1 && end % 90 === 0) {\n let h2 = h(d2r(Math.abs(begin - end)));\n let d = h2 * r;\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let alpha = Math.atan(d / r);\n if(b < 90) {\n // 第1个交点\n let rx = Math.sin(d2r(begin)) * r;\n let ry = Math.cos(d2r(begin)) * r;\n let p1 = [x + rx, y - ry];\n // 第1个控制点\n let deg = alpha + d2r(begin);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x + rx, y - ry];\n // 第2个交点\n rx = Math.sin(d2r(end)) * r;\n ry = Math.cos(d2r(end)) * r;\n let p4 = [x + rx, y - ry];\n // 第2个控制点\n deg = d2r(end) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x + rx, y - ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 180) {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 90)) * r;\n let ry = Math.sin(d2r(begin - 90)) * r;\n let p1 = [x + rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 90);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x + rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 90)) * r;\n ry = Math.sin(d2r(end - 90)) * r;\n let p4 = [x + rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 90) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x + rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else if(b < 270) {\n // 第1个交点\n let rx = Math.sin(d2r(begin - 180)) * r;\n let ry = Math.cos(d2r(begin - 180)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 180);\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.sin(d2r(end - 180)) * r;\n ry = Math.cos(d2r(end - 180)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 180) - alpha;\n rx = Math.sin(deg) * c;\n ry = Math.cos(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n else {\n // 第1个交点\n let rx = Math.cos(d2r(begin - 270)) * r;\n let ry = Math.sin(d2r(begin - 270)) * r;\n let p1 = [x - rx, y + ry];\n // 第1个控制点\n let deg = alpha + d2r(begin - 270);\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p2 = [x - rx, y + ry];\n // 第2个交点\n rx = Math.cos(d2r(end - 270)) * r;\n ry = Math.sin(d2r(end - 270)) * r;\n let p4 = [x - rx, y + ry];\n // 第2个控制点\n deg = d2r(end - 270) - alpha;\n rx = Math.cos(deg) * c;\n ry = Math.sin(deg) * c;\n let p3 = [x - rx, y + ry];\n list.push(p1);\n list.push(p2.concat(p3).concat(p4));\n }\n }\n // 跨象限循环算\n else {\n let i = b;\n let temp = [];\n for(; i <= e; i++) {\n if(i === 0) {\n let res = sectorPoints(x, y, r, begin, 90);\n temp.push(res);\n }\n else if(i === 1) {\n // 防止90~90这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 90) {\n let res = sectorPoints(x, y, r, begin < 90 ? 90 : begin, end > 180 ? 180 : end);\n temp.push(res);\n }\n }\n else if(i === 2) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 180) {\n let res = sectorPoints(x, y, r, begin < 180 ? 180 : begin, end > 270 ? 270 : end);\n temp.push(res);\n }\n }\n else if(i === 3) {\n // 防止180~180这种情况,但如果begin和end都是90时又要显示\n if(b === i || end > 270) {\n let res = sectorPoints(x, y, r, begin < 270 ? 270 : begin, end);\n temp.push(res);\n }\n }\n }\n // 去掉重复的首尾扇弧点\n list = temp[0];\n for(let i = 1, len = temp.length; i < len; i++) {\n list.push(temp[i][1]);\n }\n }\n return list;\n}\n\n/**\n * 获取2个矩形重叠区域,如不重叠返回null\n * @param a\n * @param b\n */\nfunction getRectsIntersection(a, b) {\n if(!isRectsOverlap(a, b)) {\n return null;\n }\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n return [\n Math.max(ax1, bx1),\n Math.max(ay1, by1),\n Math.min(ax4, bx4),\n Math.min(ay4, by4),\n ];\n}\n\n/**\n * 2个矩形是否重叠\n */\nfunction isRectsOverlap(a, b, includeIntersect) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(includeIntersect) {\n if(ax1 > bx4 || ay1 > by4 || bx1 > ax4 || by1 > ay4) {\n return false;\n }\n }\n else if(ax1 >= bx4 || ay1 >= by4 || bx1 >= ax4 || by1 >= ay4) {\n return false;\n }\n return true;\n}\n\n/**\n * 2个矩形是否包含,a包含b\n */\nfunction isRectsInside(a, b, includeIntersect) {\n let [ax1, ay1, ax4, ay4] = a;\n let [bx1, by1, bx4, by4] = b;\n if(includeIntersect) {\n if(ax1 <= bx1 && ay1 <= by1 && ax4 >= bx4 && ay4 >= by4) {\n return true;\n }\n }\n else if(ax1 < bx1 && ay1 < by1 && ax4 > bx4 && ay4 > by4) {\n return true;\n }\n return false;\n}\n\nfunction calCoordsInNode(px, py, node) {\n let { matrix = [1, 0, 0, 1, 0, 0], computedStyle = [] } = node;\n let { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] = [width * 0.5, height * 0.5] } = computedStyle;\n let t = calPoint({ x: px * width - ox, y: py * height - oy }, matrix);\n return { x: t.x + ox, y: t.y + oy };\n}\n\nfunction calPercentInNode(x, y, node) {\n let { computedStyle: { [WIDTH]: width, [HEIGHT]: height, [TRANSFORM_ORIGIN]: [ox, oy] } } = node;\n // 先求无旋转时右下角相对于原点的角度ds\n let ds = Math.atan((height - oy) / (width - ox));\n let { x: x1, y: y1 } = calCoordsInNode(1, 1, node);\n let d1;\n let deg;\n // 根据旋转后的坐标,分4个象限,求旋转后的右下角相对于原点的角度d1,得出偏移角度deg,分顺逆时针[-180, 180]\n if(x1 >= ox && y1 >= oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n }\n deg = d1 - ds;\n }\n else if(x1 >= ox && y1 < oy) {\n if(ox === x1) {\n d1 = -Math.atan(Infinity);\n }\n else {\n d1 = Math.atan((oy - y1) / (x1 - ox));\n }\n deg = d1 + ds;\n }\n else if(x1 < ox && y1 >= oy) {\n d1 = Math.atan((y1 - oy) / (ox - x1));\n deg = d1 - ds;\n }\n else if(x1 < ox && y1 < oy) {\n d1 = Math.atan((y1 - oy) / (x1 - ox));\n if(ds >= d1) {\n deg = d1 + Math.PI - ds;\n }\n else {\n deg = Math.PI - d1 + ds;\n deg = -deg;\n }\n }\n else {\n deg = 0;\n }\n // 目标点到原点的边长不会变\n let dt = Math.sqrt(Math.pow(x - ox, 2) + Math.pow(y - oy, 2));\n // 分4个象限,先求目标点到原点的角度d2,再偏移deg后求得原始坐标\n let d2;\n if(x >= ox && y >= oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox));\n }\n }\n else if(x >= ox && y < oy) {\n if(ox === x) {\n d2 = -Math.atan(Infinity);\n }\n else {\n d2 = -Math.atan((y - oy) / (ox - x));\n }\n }\n else if(x < ox && y >= oy) {\n d2 = Math.PI - Math.atan((y - oy) / (ox - x));\n }\n else {\n d2 = Math.atan((y - oy) / (x - ox)) - Math.PI;\n }\n d2 -= deg;\n if(d2 > Math.PI) {\n d2 -= Math.PI;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy - dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 > Math.PI * 0.5) {\n d2 = Math.PI - d2;\n return [\n (ox - dt * Math.cos(d2)) / width,\n (oy + dt * Math.sin(d2)) / height,\n ];\n }\n if(d2 >= 0) {\n return {\n x: (ox + dt * Math.cos(d2)) / width,\n y: (oy + dt * Math.sin(d2)) / height,\n };\n }\n if(d2 >= -Math.PI * 0.5) {\n d2 = -d2;\n return {\n x: (ox + dt * Math.cos(d2)) / width,\n y: (oy - dt * Math.sin(d2)) / height,\n };\n }\n if(d2 >= -Math.PI) {\n d2 = Math.PI + d2;\n return {\n x: (ox - dt * Math.cos(d2)) / width,\n y: (oy - dt * Math.sin(d2)) / height,\n };\n }\n d2 = -Math.PI - d2;\n return {\n x: (ox - dt * Math.cos(d2)) / width,\n y: (oy + dt * Math.sin(d2)) / height,\n };\n}\n\nfunction d2r(n) {\n return n * Math.PI / 180;\n}\n\nfunction r2d(n) {\n return n * 180 / Math.PI;\n}\n\nfunction pointOnCircle(x, y, r, deg) {\n if(deg >= 270) {\n deg -= 270;\n deg = d2r(deg);\n return {\n x: x - Math.cos(deg) * r,\n y: y - Math.sin(deg) * r,\n };\n }\n else if(deg >= 180) {\n deg -= 180;\n deg = d2r(deg);\n return {\n x: x - Math.sin(deg) * r,\n y: y + Math.cos(deg) * r,\n };\n }\n else if(deg >= 90) {\n deg -= 90;\n deg = d2r(deg);\n return {\n x: x + Math.cos(deg) * r,\n y: y + Math.sin(deg) * r,\n };\n }\n else {\n deg = d2r(deg);\n return {\n x: x + Math.sin(deg) * r,\n y: y - Math.cos(deg) * r,\n };\n }\n}\n\n// 3个点确定平面标准方程\nfunction getPlainNormalEquation(points) {\n let { x: x1, y: y1, z: z1 } = points[0];\n let { x: x2, y: y2, z: z2 } = points[1];\n let { x: x3, y: y3, z: z3 } = points[2];\n let a = (y2 - y1) * (z3 - z1) - (z2 - z1) * (y3 - y1);\n let b = (x3 - x1) * (z2 - z1) - (x2 - x1) * (z3 - z1);\n let c = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n let d = -(a * x1 + b * y1 + c * z1);\n return { a, b, c, d };\n}\n\nexport default {\n pointInConvexPolygon,\n pointInQuadrilateral,\n d2r,\n r2d,\n // 贝塞尔曲线模拟1/4圆弧比例\n H,\n // <90任意角度贝塞尔曲线拟合圆弧的比例公式\n h,\n angleBySide,\n sideByAngle,\n pointsDistance,\n triangleIncentre,\n ellipsePoints,\n sectorPoints,\n getRectsIntersection,\n isRectsOverlap,\n isRectsInside,\n calCoordsInNode,\n calPercentInNode,\n pointOnCircle,\n getPlainNormalEquation,\n};\n","/**\n * @typedef {Object} gradientStatement\n * @property {Array} color - 颜色rgba,0~255,如 [0, 255, 0, 255]\n * @property {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n\n/**\n * 获取渐变图像像素数组\n * @param {number} originX - 渐变中心x坐标(相对图片左上角(0,0)的值,可在图片外,下同)\n * @param {number} originY - 渐变中心y坐标\n * @param {number} width - 图片宽度\n * @param {number} height - 图片高度\n * @param {Array} stop - 渐变声明列表\n * @param data - canvas的imgData.data\n * @returns {Array} 图像像素数组,每4个元素(rgba)构成一个像素点\n * @example\n // 矩形宽度为200*200,此时坐标为0~199,渐变中心为中点时,应传入99.5,可消除零点问题\n // 若渐变中心在某一整数轴上,就会引入零点问题,此时零点取y轴正半轴的色值,要消除这个问题,可以对渐变中心增加一个偏移量,使其不为整数\n let w = 200;\n let h = 200;\n let ctx = document.getElementById('example').getContext('2d');\n let imgData = ctx.getImageData(0,0, w, h);\n let data = getConicGradientImage(99.5, 99.5, w, h, [{\n color: [0,0,0,255],\n angle: 0,\n } ,{\n color: [255,0,0,255],\n angle: 2 * Math.PI,\n }]);\n for (let i = 0; i < imgData.data.length; i++) {\n imgData.data[i] = data[i];\n }\n ctx.putImageData(imgData, 0, 0);\n */\nfunction getConicGradientImage(\n originX,\n originY,\n width,\n height,\n stop,\n data\n) {\n if(stop.length < 2) {\n throw new Error(\n 'Conic gradient should recieve at least 2 gradient statements (start line and end line).'\n );\n }\n\n width = Math.floor(width);\n height = Math.floor(height);\n\n /**\n * 根据坐标获取角度\n * @param {number} x - x坐标,左上角为原点\n * @param {number} y - y坐标,左上角为原点\n * @returns {number} angle - 角度,0~2 * Math.PI,(originX, originY) 为原点,垂直向上为0\n */\n let getAngle = (x, y) => {\n // 此函数注释内的x、y轴基于 (originX, originY)\n // 计算相对 (originX, originY) 的坐标(dx, dy)\n let dx = x - originX;\n let dy = originY - y;\n // 在y轴上\n if(dx === 0) {\n return dy < 0\n ? // y轴负半轴,\n 1 * Math.PI\n : // y轴正半轴,因此,(originX, originY) 的angle视作0\n 0;\n }\n // 在x轴上\n if(dy === 0) {\n return dx < 0\n ? // x轴负半轴\n 1.5 * Math.PI\n : // x轴正半轴\n 0.5 * Math.PI;\n }\n let atan = Math.atan(dy / dx);\n /**\n * 2 | 1\n * -----|-----\n * 3 | 4\n */\n // 第一象限,atan > 0\n // 第四象限,atan < 0\n if(dx > 0) {\n return 0.5 * Math.PI - atan;\n }\n // 第二象限,atan < 0\n // 第三象限,atan > 0\n if(dx < 0) {\n return 1.5 * Math.PI - atan;\n }\n };\n\n let increasingList = stop.map(item => ({\n color: item[0],\n angle: item[1] * Math.PI * 2,\n }));\n\n for(let y = 0; y < height; y++) {\n for(let x = 0; x < width; x++) {\n // step 1. 找到当前点坐标相对 (originX, originY) 的角度\n let angle = getAngle(x, y);\n // step 2. 找到当前点坐标对应的渐变区间\n let j;\n for(j = 0; j < increasingList.length && increasingList[j].angle <= angle; j++) {\n }\n let start = increasingList[j - 1];\n let end = increasingList[j];\n if(!(start && end)) {\n // step 2-1. 不在渐变区间里\n continue;\n }\n // step 3. 计算色值并填充\n let factor = (angle - start.angle) / (end.angle - start.angle);\n let color = end.color.map(\n (v, idx) => factor * (v - start.color[idx]) + start.color[idx]\n );\n let i = (x + y * width) * 4;\n data[i] = color[0];\n data[i+1] = color[1];\n data[i+2] = color[2];\n data[i+3] = Math.min(255, color[3] * 255);\n }\n }\n return data;\n}\n\nexport default {\n getConicGradientImage,\n};\n","import util from './util';\n\nconst { int2rgba } = util;\n\nfunction canvasPolygon(ctx, list, dx = 0, dy = 0) {\n if(!list || !list.length) {\n return;\n }\n let start = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item) && item.length) {\n start = i;\n break;\n }\n }\n if(start === -1) {\n return;\n }\n let first = list[start];\n ctx.moveTo(first[0] + dx, first[1] + dy);\n // 特殊的情况,布尔运算数学库会打乱原有顺序,致使第一个点可能有冗余的贝塞尔值,move到正确的索引坐标\n if(first.length === 4) {\n ctx.moveTo(first[2] + dx, first[3] + dy);\n }\n else if(first.length === 6) {\n ctx.moveTo(first[4] + dx, first[5] + dy);\n }\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n ctx.lineTo(item[0] + dx, item[1] + dy);\n }\n else if(item.length === 4) {\n ctx.quadraticCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy);\n }\n else if(item.length === 6) {\n ctx.bezierCurveTo(item[0] + dx, item[1] + dy, item[2] + dx, item[3] + dy, item[4] + dx, item[5] + dy);\n }\n }\n}\n\nfunction svgPolygon(list) {\n if(!list || !list.length) {\n return '';\n }\n let start = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item) && item.length) {\n start = i;\n break;\n }\n }\n if(start === -1) {\n return '';\n }\n let first = list[start];\n let s = 'M' + first[0] + ',' + first[1];\n if(first.length === 4) {\n s = 'M' + first[2] + ',' + first[3];\n }\n else if(first.length === 6) {\n s = 'M' + first[4] + ',' + first[5];\n }\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n s += 'L' + item[0] + ',' + item[1];\n }\n else if(item.length === 4) {\n s += 'Q' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3];\n }\n else if(item.length === 6) {\n s += 'C' + item[0] + ',' + item[1] + ' ' + item[2] + ',' + item[3] + ' ' + item[4] + ',' + item[5];\n }\n }\n return s;\n}\n\nfunction canvasLine(ctx, x1, y1, x2, y2, controlA, controlB, num, dx = 0, dy = 0) {\n ctx.moveTo(x1 + dx, y1 + dy);\n if(num === 3) {\n ctx.bezierCurveTo(controlA[0] + dx, controlA[1] + dy, controlB[0] + dx, controlB[1], x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 2) {\n ctx.quadraticCurveTo(controlB[0] + dx, controlB[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else if(num === 1) {\n ctx.quadraticCurveTo(controlA[0] + dx, controlA[1] + dy, x2 + dx, y2 + dy);\n return 2;\n }\n else {\n ctx.lineTo(x2 + dx, y2 + dy);\n return 1;\n }\n}\n\nfunction svgLine(x1, y1, x2, y2, controlA, controlB, num) {\n if(num === 3) {\n return 'M' + x1 + ',' + y1\n + 'C' + controlA[0] + ',' + controlA[1] + ' ' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 2) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlB[0] + ',' + controlB[1]\n + ' ' + x2 + ',' + y2;\n }\n else if(num === 1) {\n return 'M' + x1 + ',' + y1\n + 'Q' + controlA[0] + ',' + controlA[1]\n + ' ' + x2 + ',' + y2;\n }\n else {\n return 'M' + x1 + ',' + y1 + 'L' + x2 + ',' + y2;\n }\n}\n\nfunction canvasFilter(filter) {\n let s = '';\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur') {\n s += `blur(${v}px)`;\n }\n else if(k === 'dropShadow') {\n // 浏览器暂未支持spread,去掉v[3]\n s += `drop-shadow(${v[0]}px ${v[1]}px ${v[2]}px ${int2rgba(v[4])})`;\n }\n else if(k === 'hueRotate') {\n s += `hue-rotate(${v}deg)`;\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n s += `${k}(${v}%)`;\n }\n });\n return s;\n}\n\nexport default {\n canvasPolygon,\n svgPolygon,\n canvasLine,\n svgLine,\n canvasFilter,\n svgFilter: canvasFilter,\n};\n","import geom from '../math/geom';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport unit from './unit';\n\nconst { H } = geom;\nconst { PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst {\n STYLE_KEY: {\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_TOP,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n FONT_SIZE,\n },\n} = enums;\n\n/* 获取合适的虚线实体空白宽度ps/pd和数量n\n * 总长total,start边长bs,end边长be,内容长w,\n * 实体长范围[smin,smax],空白长范围[dmin,dmax]\n */\nfunction calFitDashed(total, bs, be, w, smin, smax, dmin, dmax) {\n let n = 1;\n let ps = 1;\n let pd = 1;\n // 从最大实体空白长开始尝试\n outer:\n for(let i = smax; i >= smin; i--) {\n for(let j = dmax; j >= dmin; j--) {\n // 已知实体空白长度,n实体和n-1空白组成total,计算获取n数量\n let per = i + j;\n let num = Math.floor((total + j) / per);\n let k = j;\n // 可能除不尽,此时扩展空白长\n if(num * per < j + total) {\n let free = total - num * i;\n k = free / (num - 1);\n if(k > dmax) {\n continue;\n }\n }\n per = i + k;\n // bs比实体大才有效,因为小的话必定和第一个实体完整相连\n if(bs > 1 && bs > i) {\n let mo = bs % per;\n if(mo > i) {\n continue;\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n }\n if(be > 1) {\n let mo = (bs + w) % per;\n if(mo > i) {\n continue;\n }\n }\n if(num > 0) {\n n = num;\n ps = i;\n pd = k;\n }\n break outer;\n }\n }\n return {\n n,\n ps,\n pd,\n };\n}\n\n// dashed时n个实线和n-1虚线默认以3:1宽度组成,dotted则是n和n以1:1组成\nfunction calDashed(style, m1, m2, m3, m4, bw) {\n let total = m4 - m1;\n let w = m3 - m2;\n let bs = m2 - m1;\n let be = m4 - m3;\n if(style === 'dotted') {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n else {\n let { n, ps, pd } = calFitDashed(total, bs, be, w, bw, bw * 3, Math.max(1, bw * 0.25), bw * 2);\n if(n === 1) {\n return calFitDashed(total, bs, be, w, bw, bw, Math.max(1, bw * 0.25), bw * 2);\n }\n // 降级为dotted\n return { n, ps, pd };\n }\n}\n\n// 获取边框分割为几块的坐标,虚线分割为若干四边形、三边型、五边形\n// 三边形重复内外边交点形成四边形,五边形进行切割形成2个四边形\n// direction为上右下左0123\nfunction calPoints(borderWidth, borderStyle, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, direction, beginRadius, endRadius) {\n let points = [];\n if(borderStyle === 'none') {\n return points;\n }\n if(['dashed', 'dotted'].indexOf(borderStyle) > -1) {\n // 寻找一个合适的虚线线段长度和之间空白边距长度\n let { n, ps, pd } = (direction === 0 || direction === 2)\n ? calDashed(borderStyle, x1, x2, x3, x4, borderWidth)\n : calDashed(borderStyle, y1, y2, y3, y4, borderWidth);\n if(n > 1) {\n for(let i = 0; i < n; i++) {\n // 最后一个可能没有到底,延长之\n let isLast = i === n - 1;\n let main1;\n let main2;\n let cross1;\n let cross2;\n if(direction === 0 || direction === 2) {\n main1 = i ? (x1 + ps * i + pd * i) : x1;\n }\n else {\n main1 = i ? (y1 + ps * i + pd * i) : y1;\n }\n main2 = main1 + ps;\n if(direction === 0) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x4, y1],\n [x3, y2],\n [x2, y2]\n ]);\n }\n else {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n cross2 = y1 + (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y1 + (x4 - main1) * Math.tan(deg2);\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x4, y1],\n [main1, cross1]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, cross2],\n [main1, cross1]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross1]\n ]);\n if(isLast) {\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x2, y2]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y1 + (x4 - main2) * Math.tan(deg2);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross2],\n [x3, y2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y1],\n [main2, y1],\n [main2, y2],\n [x2, y2]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y1 + (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y1 + (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, y1],\n [x2, y1],\n [x2, y2],\n [main1, cross2]\n ]);\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y1],\n [x3, y1],\n [x3, y2],\n [main1, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n else {\n points.push([\n [x3, y1],\n [main2, y1],\n [main2, cross1],\n [x3, y2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y1],\n [x4, y1],\n [x3, y2],\n [main1, y2]\n ]);\n }\n else {\n points.push([\n [main1, y1],\n [main2, y1],\n [main2, y2],\n [main1, y2]\n ]);\n }\n }\n }\n }\n else if(direction === 1) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n cross1 = x4 - (main1 - y1) * Math.tan(deg1);\n cross2 = x4 - (main2 - y1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2],\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x3 + (main1 - y3) * Math.tan(deg2);\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross1, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n if(isLast) {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x3 + (main2 - y3) * Math.tan(deg2);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross2, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x3 + (main2 - y3) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x3 + (y2 - main1) * Math.tan(deg1);\n points.push([\n [cross2, main1],\n [x4, main1],\n [x4, y2],\n [x3, y2]\n ]);\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, x4],\n [x4, x4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y3],\n [x3, y3]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, main2],\n [cross1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, y4],\n [x3, y3]\n ]);\n }\n else {\n points.push([\n [x3, main1],\n [x4, main1],\n [x4, main2],\n [x3, main2]\n ]);\n }\n }\n }\n }\n else if(direction === 2) {\n // 整个和borderLeft重叠\n if(main2 <= x2) {\n if(isLast) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x3, y3],\n [x4, y4]\n ]);\n }\n else {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n cross2 = y4 - (main2 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 整个和borderRight重叠\n else if(main1 >= x3) {\n cross1 = y4 - (x4 - main1) * Math.tan(deg2);\n cross2 = y4 - (x4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [main1, cross1],\n [x4, y4],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, cross1],\n [main2, cross2],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross1 = y4 - (main1 - x1) * Math.tan(deg1);\n points.push([\n [main1, cross1],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n // 下部分和borderRight重叠\n if(main2 > x3) {\n cross2 = y4 - (main2 - x3) * Math.tan(deg2);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n points.push([\n [x3, y3],\n [main2, cross2],\n [main2, y4],\n [x3, y4]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x2, y3],\n [main2, y3],\n [main2, y4],\n [x2, y4]\n ]);\n }\n }\n }\n // 下部分和borderRight重叠\n else if(main2 > x3) {\n cross1 = y4 - (x4 - main2) * Math.tan(deg2);\n // 上部分和borderLeft重叠\n if(main1 < x2) {\n cross2 = y4 - (main1 - x3) * Math.tan(deg1);\n points.push([\n [main1, cross2],\n [x2, y3],\n [x2, y4],\n [main1, y4]\n ]);\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [main1, y3],\n [x3, y3],\n [x3, y4],\n [main1, y4]\n ]);\n if(isLast) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n else {\n points.push([\n [x3, y3],\n [main2, cross1],\n [main2, y4],\n [x3, y4]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [main1, y3],\n [x3, y3],\n [x4, y4],\n [main1, y4]\n ]);\n }\n else {\n points.push([\n [main1, y3],\n [main2, y3],\n [main2, y4],\n [main1, y4]\n ]);\n }\n }\n }\n }\n else if(direction === 3) {\n // 整个和borderTop重叠\n if(main2 <= y2) {\n if(isLast) {\n points.push([\n [x1, y1],\n [x2, y2],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n cross2 = x1 + (main2 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 整个和borderBottom重叠\n else if(main1 >= y3) {\n cross1 = x1 + (y4 - main1) * Math.tan(deg2);\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n if(isLast) {\n points.push([\n [x1, main1],\n [cross1, main1],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [cross1, main1],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n }\n // 不被整个重叠的情况再细分\n else {\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross1 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross1, main1],\n [x2, y2],\n [x1, y2]\n ]);\n if(isLast) {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4],\n ]);\n }\n else {\n // 下部分和borderBottom重叠\n if(main2 > y3) {\n cross2 = x1 + (y4 - main2) * Math.tan(deg2);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n points.push([\n [x1, y3],\n [x2, y3],\n [cross2, main2],\n [x1, main2]\n ]);\n }\n // 下部独立\n else {\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 下部分和borderBottom重叠\n else if(main2 > y3) {\n cross1 = x1 + (y4 - main2) * Math.tan(deg2);\n // 上部分和borderTop重叠\n if(main1 < y2) {\n cross2 = x1 + (main1 - y1) * Math.tan(deg1);\n points.push([\n [x1, main1],\n [cross2, main1],\n [x2, y2],\n [x1, y1]\n ]);\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n // 上部独立\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y3]\n ]);\n if(isLast) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, y3],\n [x2, y3],\n [cross1, main2],\n [x1, main2]\n ]);\n }\n }\n }\n // 完全独立\n else {\n if(isLast) {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, y3],\n [x1, y4]\n ]);\n }\n else {\n points.push([\n [x1, main1],\n [x2, main1],\n [x2, main2],\n [x1, main2]\n ]);\n }\n }\n }\n }\n }\n if(direction === 0) {\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n }\n }\n // 兜底返回实线\n if(direction === 0) {\n if(x2 > x1) {\n points.push([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y1]\n ]);\n }\n points.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y1],\n [x4, y1],\n [x4, y1],\n [x3, y2]\n ]);\n }\n return calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 1) {\n if(y2 > y1) {\n points.push([\n [x4, y1],\n [x4, y1],\n [x4, y2],\n [x3, y2]\n ]);\n }\n points.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x3, y3],\n [x4, y3],\n [x4, y4],\n [x4, y4]\n ]);\n }\n return calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 2) {\n if(x2 > x1) {\n points.push([\n [x1, y4],\n [x2, y3],\n [x2, y4],\n [x1, y4]\n ]);\n }\n points.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4]\n ]);\n if(x4 > x3) {\n points.push([\n [x3, y3],\n [x4, y4],\n [x4, y4],\n [x3, y4]\n ]);\n }\n return calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n else if(direction === 3) {\n if(y2 > y1) {\n points.push([\n [x1, y1],\n [x1, y1],\n [x2, y2],\n [x1, y2]\n ]);\n }\n points.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3]\n ]);\n if(y4 > y3) {\n points.push([\n [x1, y3],\n [x2, y3],\n [x1, y4],\n [x1, y4]\n ]);\n }\n return calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, points, beginRadius, endRadius);\n }\n}\n\nfunction calTopRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[1][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[0][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[1][0] > oxr && points[0][0] < oxl) {\n let ya = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, ya],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y1],\n [oxr, y1],\n [oxr, y2],\n [oxl, y2],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y1],\n [x3, y1],\n [x3, y2],\n [oxl, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [oxr, y1],\n [oxr, y2],\n [x2, y2],\n ]);\n }\n else {\n centerList.push([\n [oxl, y1],\n [x2, y1],\n [x2, y2],\n [oxl, ya]\n ]);\n centerList.push([\n [x2, y1],\n [x3, y1],\n [x3, y2],\n [x2, y2],\n ]);\n centerList.push([\n [x3, y1],\n [oxr, y1],\n [oxr, yb],\n [x3, y2]\n ]);\n }\n }\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, yb]\n ]);\n }\n // 跨越右圆角\n else if(points[1][0] > oxr) {\n let y = oxr > x3 ? (y1 + Math.tan(deg2) * (x4 - oxr)) : y2;\n centerList.push([\n points[0],\n [oxr, y1],\n [oxr, y],\n points[3]\n ]);\n endList.push([\n [oxr, y1],\n points[1],\n points[2],\n [oxr, y]\n ]);\n }\n // 跨越左圆角\n else if(points[0][0] < oxl) {\n let y = oxl < x2 ? (y1 + Math.tan(deg1) * (oxl - x1)) : y2;\n beginList.push([\n points[0],\n [oxl, y1],\n [oxl, y],\n points[3]\n ]);\n centerList.push([\n [oxl, y1],\n points[1],\n points[2],\n [oxl, y],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y1 + bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierTopLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopLeft(points[0], points[1], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopLeft(points[3], points[2], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 0);\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 0);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y1 + ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierTopRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierTopRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierTopRight(points[0], points[1], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierTopRight(points[3], points[2], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 1);\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 1);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierTopLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(p1x, p1y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(p2x, p2y, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierTopRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (oy - p1y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy - Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy - Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (oy - p2y));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy - Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calRightRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[2][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[1][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[2][1] > oyb && points[1][1] < oyt) {\n let xa = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n let xb = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [xa, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x3, oyt],\n [x4, oyt],\n [x4, oyb],\n [x3, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, oyb],\n [x3, oyb],\n ]);\n }\n else {\n centerList.push([\n [xa, oyt],\n [x4, oyt],\n [x4, y2],\n [x3, y2],\n ]);\n centerList.push([\n [x3, y2],\n [x4, y2],\n [x4, y3],\n [x3, y3],\n ]);\n centerList.push([\n [x3, y3],\n [x4, y3],\n [x4, oyb],\n [xb, oyb],\n ]);\n }\n }\n endList.push([\n [xb, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[2][1] > oyb) {\n let x = oyb > y3 ? (x3 + Math.tan(deg1) * (oyb - y3)) : x3;\n centerList.push([\n points[0],\n points[1],\n [x4, oyb],\n [x, oyb]\n ]);\n endList.push([\n [x, oyb],\n [x4, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x3 + Math.tan(deg2) * (y2 - oyt)) : x3;\n beginList.push([\n points[0],\n points[1],\n [x4, oyt],\n [x, oyt]\n ]);\n centerList.push([\n [x, oyt],\n [x4, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x4 - x3) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x4 - brx;\n let rx2 = brx - (x4 - x3);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightTop(beginList[0][1], beginList[0][2], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierRightTop(beginList[0][0], beginList[0][3], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightTop(points[1], points[2], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightTop(points[0], points[3], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 2);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 2);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x4 - erx;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierRightBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierRightBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierRightBottom(points[1], points[2], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierRightBottom(points[0], points[3], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 3);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 3);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[2] = points[3];\n points[3] = points[0];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierRightTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox + Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox + Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox + Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierRightBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBottomRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,左圆角、右圆角、中间矩形,3个区域2个坐标;当左右圆角相接时中间矩形为0即中间2个坐标相等\n let oxl = x2 + brx - (x2 - x1);\n let oxr = x3 - erx + (x4 - x3);\n // 先拆分,当一块四边形跨越左右圆角和中间非圆角时被拆为3份,只跨一边圆角拆2份,不跨不处理\n // 也有可能左右圆角相接,跨越的只分为左右2份\n // 最终左圆角内的存入begin,右圆角内的存入end,中间center\n let beginList = [];\n let centerList = [];\n let endList = [];\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在左圆角\n if(points[2][0] < oxl) {\n beginList.push(points);\n }\n // 全在右圆角\n else if(points[3][0] > oxr) {\n endList.push(points);\n }\n // 跨越左右圆角\n else if(points[2][0] > oxr && points[3][0] < oxl) {\n let ya = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y2;\n let yb = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n beginList.push([\n points[0],\n [oxl, ya],\n [oxl, y4],\n points[3]\n ]);\n if(oxl < oxr) {\n if(oxl > x2 && oxr < x3) {\n centerList.push([\n [oxl, y3],\n [oxr, y3],\n [oxr, y4],\n [oxl, y4],\n ]);\n }\n else if(oxl > x2) {\n centerList.push([\n [oxl, y3],\n [x3, y3],\n [x3, y4],\n [oxl, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n else if(oxr < x3) {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [oxr, y3],\n [oxr, y4],\n [x2, y4],\n ]);\n }\n else {\n centerList.push([\n [oxl, ya],\n [x2, y3],\n [x2, y4],\n [oxl, y4]\n ]);\n centerList.push([\n [x2, y3],\n [x3, y3],\n [x3, y4],\n [x2, y4],\n ]);\n centerList.push([\n [x3, y3],\n [oxr, yb],\n [oxr, y4],\n [x3, y4]\n ]);\n }\n }\n endList.push([\n [oxr, yb],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越右圆角\n else if(points[2][0] > oxr) {\n let y = oxr > x3 ? (y4 - Math.tan(deg2) * (x4 - oxr)) : y3;\n centerList.push([\n points[0],\n [oxr, y],\n [oxr, y4],\n points[3]\n ]);\n endList.push([\n [oxr, y],\n points[1],\n points[2],\n [oxr, y4]\n ]);\n }\n // 跨越左圆角\n else if(points[3][0] < oxl) {\n let y = oxl < x2 ? (y4 - Math.tan(deg1) * (oxl - x1)) : y3;\n beginList.push([\n points[0],\n [oxl, y],\n [oxl, y4],\n points[3]\n ]);\n centerList.push([\n [oxl, y],\n points[1],\n points[2],\n [oxl, y4],\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = brx > (x2 - x1) && borderWidth < bry;\n // 算这个角度是为了头部和上条边相交线的延长线\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oyl = y4 - bry;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomLeft(beginList[0][3], beginList[0][2], oxl, oyl, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierBottomLeft(beginList[0][0], beginList[0][1], oxl, oyl, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomLeft(points[3], points[2], oxl, oyl, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomLeft(points[0], points[1], oxl, oyl, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 4);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 4);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n });\n }\n let endLength = endList.length;\n if(endLength) {\n // 边宽可能大于圆角尺寸,边的里面无需圆弧化\n let needInner = erx > (x4 - x3) && borderWidth < ery;\n // 算这个角度是为了最后和下条边相交线的延长线\n let crossDeg = Math.atan((x4 - x3) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oyr = y4 - ery;\n let rx2 = erx - (x4 - x3);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierBottomRight(endList[endLength - 1][3], endList[endLength - 1][2], oxr, oyr, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierBottomRight(endList[endLength - 1][0], endList[endLength - 1][1], oxr, oyr, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierBottomRight(points[3], points[2], oxr, oyr, sx1, ry1);\n if(needInner) {\n controls2 = calBezierBottomRight(points[0], points[1], oxr, oyr, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 5);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 5);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[3];\n points[3] = controls2[2].concat(controls2[1]).concat(controls2[0]);\n }\n }\n else {\n points[2] = points[1];\n points[3] = points[0];\n }\n points[0] = controls1[0];\n if(controls1[1]) {\n points[1] = controls1[1].concat(controls1[2]).concat(controls1[3]);\n }\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierBottomLeft(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = -p1x + ox;\n let dsx1 = dx1 * sx;\n let dx2 = -p2x + ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (p2y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy + Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n // 最初的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy + Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (p1y - oy));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy + Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calBezierBottomRight(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = p1x - ox;\n let dsx1 = dx1 * sx;\n let dx2 = p2x - ox;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox + Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n // 最后的是两条border的交界线,需要特殊求交界线延长和椭圆的交点,不能直连圆心求交点\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox + Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox + Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox + cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox + cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx1, cpy1],\n [cx1, cy1],\n [cx2, cy2],\n [cpx2, cpy2]\n ];\n}\n\nfunction calLeftRadiusPoints(borderWidth, deg1, deg2, x1, x2, x3, x4, y1, y2, y3, y4, pointsList, beginRadius, endRadius) {\n let [brx, bry] = beginRadius;\n let [erx, ery] = endRadius;\n // 一条边的两侧圆角均为0时无效\n if((!brx || !bry) && (!erx || !ery)) {\n return pointsList;\n }\n // 分界坐标圆心,上圆角、下圆角、中间矩形,3个区域2个坐标;当上下圆角相接时中间矩形为0即中间2个坐标相等\n let oyt = y2 + bry - (y2 - y1);\n let oyb = y3 - ery + (y4 - y3);\n let beginList = [];\n let centerList = [];\n let endList = [];\n // 同borderTop拆分\n for(let i = 0, len = pointsList.length; i < len; i++) {\n let points = pointsList[i];\n // 全在上圆角\n if(points[3][1] < oyt) {\n beginList.push(points);\n }\n // 全在下圆角\n else if(points[0][1] > oyb) {\n endList.push(points);\n }\n // 跨越上下圆角\n else if(points[3][1] > oyb && points[0][1] < oyt) {\n let xa = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n let xb = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n beginList.push([\n points[0],\n points[1],\n [xa, oyt],\n [x1, oyt]\n ]);\n if(oyt < oyb) {\n if(oyb < y3 && oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, oyb],\n [x1, oyb]\n ]);\n }\n else if(oyt > y2) {\n centerList.push([\n [x1, oyt],\n [x2, oyt],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n else if(oyb < y3) {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, oyb],\n [x1, oyb],\n ]);\n }\n else {\n centerList.push([\n [x1, oyt],\n [xa, oyt],\n [x2, y2],\n [x1, y2],\n ]);\n centerList.push([\n [x1, y2],\n [x2, y2],\n [x2, y3],\n [x1, y3],\n ]);\n centerList.push([\n [x1, y3],\n [x2, y3],\n [xb, oyb],\n [x1, oyb],\n ]);\n }\n }\n endList.push([\n [x1, oyb],\n [xb, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越下圆角\n else if(points[3][1] > oyb) {\n let x = oyb > y3 ? (x2 - Math.tan(deg1) * (oyb - y3)) : x2;\n centerList.push([\n points[0],\n points[1],\n [x, oyb],\n [x1, oyb]\n ]);\n endList.push([\n [x1, oyb],\n [x, oyb],\n points[2],\n points[3]\n ]);\n }\n // 跨越上圆角\n else if(points[1][1] < oyt) {\n let x = oyt < y2 ? (x2 - Math.tan(deg2) * (y2 - oyt)) : x2;\n beginList.push([\n points[0],\n points[1],\n [x, oyt],\n [x1, oyt]\n ]);\n centerList.push([\n [x1, oyt],\n [x, oyt],\n points[2],\n points[3]\n ]);\n }\n else {\n centerList.push(points);\n }\n }\n let beginLength = beginList.length;\n if(beginLength) {\n let needInner = bry > (y2 - y1) && borderWidth < brx;\n let crossDeg = Math.atan((x2 - x1) / (y2 - y1));\n let rx1 = brx;\n let ry1 = bry;\n let sx1 = ry1 / rx1;\n let oxt = x1 + brx;\n let rx2 = brx - (x2 - x1);\n let ry2 = bry - (y2 - y1);\n let sx2 = ry2 / rx2;\n // 先计算第一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftTop(beginList[0][0], beginList[0][3], oxt, oyt, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[ca.length - 1];\n let cb;\n if(needInner) {\n cb = calBezierLeftTop(beginList[0][1], beginList[0][2], oxt, oyt, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[cb.length - 1];\n }\n beginList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === 0) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftTop(points[0], points[3], oxt, oyt, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftTop(points[1], points[2], oxt, oyt, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 6);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 6);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n let endLength = endList.length;\n if(endLength) {\n let needInner = ery > (y4 - y3) && borderWidth < erx;\n let crossDeg = Math.atan((x2 - x1) / (y4 - y3));\n let rx1 = erx;\n let ry1 = ery;\n let sx1 = ry1 / rx1;\n let oxb = x1 + erx;\n let rx2 = erx - (x2 - x1);\n let ry2 = ery - (y4 - y3);\n let sx2 = ry2 / rx2;\n // 先计算最后一个块,确定x/y边界,防止因为划分原因导致出现超过边界情况交叉\n let xa, ya, xb, yb;\n let ca = calBezierLeftBottom(endList[endLength - 1][0], endList[endLength - 1][3], oxb, oyb, sx1, ry1, true, Math.tan(crossDeg) * ry1);\n [xa, ya] = ca[0];\n let cb;\n if(needInner) {\n cb = calBezierLeftBottom(endList[endLength - 1][1], endList[endLength - 1][2], oxb, oyb, sx2, ry2, true, Math.tan(crossDeg) * ry2);\n [xb, yb] = cb[0];\n }\n endList.forEach((points, i) => {\n let controls1;\n let controls2;\n if(i === endLength - 1) {\n controls1 = ca;\n if(needInner) {\n controls2 = cb;\n }\n }\n else {\n controls1 = calBezierLeftBottom(points[0], points[3], oxb, oyb, sx1, ry1);\n if(needInner) {\n controls2 = calBezierLeftBottom(points[1], points[2], oxb, oyb, sx2, ry2);\n }\n }\n for(let i = 0, len = controls1.length; i < len; i++) {\n limit(controls1[i], xa, ya, 7);\n }\n if(needInner) {\n for(let i = 0, len = controls2.length; i < len; i++) {\n limit(controls2[i], xb, yb, 7);\n }\n if(controls2.length === 1) {\n points[2] = controls2[0];\n points.pop();\n }\n else {\n points[2] = controls2[0];\n points[3] = controls2[1].concat(controls2[2]).concat(controls2[3]);\n }\n }\n else {\n points[3] = points[1];\n }\n points[0] = controls1[3];\n points[1] = controls1[2].concat(controls1[1]).concat(controls1[0]);\n });\n }\n return beginList.concat(centerList).concat(endList);\n}\n\nfunction calBezierLeftTop(p1, p2, ox, oy, sx, r, isStart, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg2 = Math.atan(dsx2 / (oy - p2y));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx2 = ox - Math.sin(deg2) * r / sx;\n let cpy2 = oy - Math.cos(deg2) * r;\n let deg1;\n let cpx1;\n let cpy1;\n if(isStart) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg1 = Math.PI * 0.5 - alpha;\n cpx1 = ox - Math.cos(alpha) * r / sx;\n cpy1 = oy - Math.sin(alpha) * r;\n }\n else {\n deg1 = Math.atan(dsx1 / (oy - p1y));\n cpx1 = ox - Math.sin(deg1) * r / sx;\n cpy1 = oy - Math.cos(deg1) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 + degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy - cdy1;\n let degTg2 = deg2 - degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy - cdy2;\n // window.ctx.fillStyle = '#000';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\nfunction calBezierLeftBottom(p1, p2, ox, oy, sx, r, isEnd, crossDx) {\n // 先缩放x轴,椭圆变圆,2个点x坐标相应变化,y不变\n let [p1x, p1y] = p1;\n let [p2x, p2y] = p2;\n let dx1 = ox - p1x;\n let dsx1 = dx1 * sx;\n let dx2 = ox - p2x;\n let dsx2 = dx2 * sx;\n // 求2个点和1/4圆弧的交点坐标,和圆心连线,反三角函数求出夹角\n let deg1 = Math.atan(dsx1 / (p1y - oy));\n // 根据角和半径再三角函数求交点坐标,可以直接缩放x轴恢复原本椭圆坐标,求贝塞尔控制点用不到交点\n let cpx1 = ox - Math.sin(deg1) * r / sx;\n let cpy1 = oy + Math.cos(deg1) * r;\n let deg2;\n let cpx2;\n let cpy2;\n if(isEnd) {\n // 交界线和y轴夹角beta以及交点的x坐标都会受缩放影响,先化圆好求交点坐标\n let crossDsx = crossDx * sx;\n let beta = Math.atan(crossDsx / r);\n // 公式计算可得beta和交点连圆心的角alpha关系\n let tanBetaDiv2Sqrt = Math.sqrt(Math.tan(beta) / 2);\n let tanAlphaHalf = tanBetaDiv2Sqrt / (1 + tanBetaDiv2Sqrt);\n let alpha = Math.atan(tanAlphaHalf) * 2;\n // 获得alpha后直接根据半径求出交点坐标\n deg2 = Math.PI * 0.5 - alpha;\n cpx2 = ox - Math.cos(alpha) * r / sx;\n cpy2 = oy + Math.sin(alpha) * r;\n }\n else {\n deg2 = Math.atan(dsx2 / (p2y - oy));\n cpx2 = ox - Math.sin(deg2) * r / sx;\n cpy2 = oy + Math.cos(deg2) * r;\n }\n // 首尾只有3个点情况下重复了顶点形成4边形,同时圆角x/y相等有inner时\n // 使得交点相同角度相同无法计算,直接返回1个点即可\n if(deg1 === deg2) {\n return [\n [cpx1, cpy1]\n ];\n }\n // 根据夹角求贝塞尔拟合圆弧长度\n let h = geom.h(Math.abs(deg1 - deg2));\n let d = h * r;\n // 过交点做切线,知道切线段长度d,求切线上从交点延长d的坐标,即为控制点\n // 圆心交点控制点连成直角三角形,获得斜边即圆心到控制点距离c\n // 求切线角,用上面夹角减去切线角可得控制点和圆心连线的角,从而获得坐标\n let c = Math.sqrt(Math.pow(r, 2) + Math.pow(d, 2));\n let degTg = Math.atan(d / r);\n let degTg1 = deg1 - degTg;\n let cdx1 = Math.sin(degTg1) * c;\n let cdy1 = Math.cos(degTg1) * c;\n let cx1 = ox - cdx1 / sx;\n let cy1 = oy + cdy1;\n let degTg2 = deg2 + degTg;\n let cdx2 = Math.sin(degTg2) * c;\n let cdy2 = Math.cos(degTg2) * c;\n let cx2 = ox - cdx2 / sx;\n let cy2 = oy + cdy2;\n // window.ctx.fillStyle = '#F90';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx1, cpy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0FF';\n // window.ctx.beginPath();\n // window.ctx.arc(cx1, cy1, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#00F';\n // window.ctx.beginPath();\n // window.ctx.arc(cx2, cy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.fillStyle = '#0F0';\n // window.ctx.beginPath();\n // window.ctx.arc(cpx2, cpy2, 1,0, 2 * Math.PI);\n // window.ctx.fill();\n // window.ctx.closePath();\n return [\n [cpx2, cpy2],\n [cx2, cy2],\n [cx1, cy1],\n [cpx1, cpy1]\n ];\n}\n\n/**\n * 简单计算椭圆的圆化坐标控制点,视作重合位置,外面判断backgroundClip并调整坐标\n * @param x 起始x\n * @param y 起始y\n * @param w 宽\n * @param h 高\n * @param btlr borderTopLeftRadius\n * @param btrr borderTopRightRadius\n * @param bbrr borderBottomRightRadius\n * @param bblr borderBottomLeftRadius\n * @returns {[]} 多边形的顶点和曲线控制点\n */\nfunction calRadius(x, y, w, h, btlr, btrr, bbrr, bblr) {\n let need;\n let [btlx, btly] = btlr;\n let [btrx, btry] = btrr;\n let [bbrx, bbry] = bbrr;\n let [bblx, bbly] = bblr;\n btlx = Math.max(btlx, 0);\n btly = Math.max(btly, 0);\n btrx = Math.max(btrx, 0);\n btry = Math.max(btry, 0);\n bbrx = Math.max(bbrx, 0);\n bbry = Math.max(bbry, 0);\n bblx = Math.max(bblx, 0);\n bbly = Math.max(bbly, 0);\n // 圆角必须x/y都>0才有效,否则视为不绘制\n if(btlx > 0 && btly > 0 || btrx > 0 && btry > 0 || bbrx > 0 && bbry > 0 || bblx > 0 && bbly > 0) {\n need = true;\n }\n if(need) {\n let list = [];\n if(btlx > 0 && btly > 0) {\n list.push([x, y + btly]);\n list.push([x, y + (btly) * (1 - H), x + btlx * (1 - H), y, x + btlx, y]);\n }\n else {\n list.push([x, y]);\n }\n if(btrx > 0 && btry > 0) {\n list.push([x + w - btrx, y]);\n list.push([x + w - btrx * (1 - H), y, x + w, y + btry * (1 - H), x + w, y + btry]);\n }\n else {\n list.push([x + w, y]);\n }\n if(bbrx > 0 && bbry > 0) {\n list.push([x + w, y + h - bbry]);\n list.push([x + w, y + h - bbry * (1 - H), x + w - bbrx * (1 - H), y + h, x + w - bbrx, y + h]);\n }\n else {\n list.push([x + w, y + h]);\n }\n if(bblx > 0 && bbly > 0) {\n list.push([x + bblx, y + h]);\n list.push([x + bblx * (1 - H), y + h, x, y + h - bbly * (1 - H), x, y + h - bbly]);\n }\n else {\n list.push([x, y + h]);\n }\n return list;\n }\n}\n\nfunction limit(points, x, y, direction) {\n if(direction === 0) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 1) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 2) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 3) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n else if(direction === 4) {\n points[0] = Math.max(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 5) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 6) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.max(points[1], y);\n }\n else if(direction === 7) {\n points[0] = Math.min(points[0], x);\n points[1] = Math.min(points[1], y);\n }\n}\n\nconst BR_KS = [BORDER_TOP_LEFT_RADIUS, BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS];\nfunction calBorderRadius(w, h, currentStyle, computedStyle, root) {\n let noRadius = true;\n BR_KS.forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n if(item.v > 0) {\n noRadius = false;\n }\n else {\n return 0;\n }\n if(item.u === PX) {\n return Math.max(0, item.v);\n }\n else if(item.u === PERCENT) {\n return Math.max(0, item.v * (i ? h : w) * 0.01);\n }\n else if(item.u === REM) {\n return Math.max(0, item.v * root.computedStyle[FONT_SIZE]);\n }\n else if(item.u === VW) {\n return Math.max(0, item.v * root.width * 0.01);\n }\n else if(item.u === VH) {\n return Math.max(0, item.v * root.height * 0.01);\n }\n else if(item.u === VMAX) {\n return Math.max(0, item.v * Math.max(root.width, root.height) * 0.01);\n }\n else if(item.u === VMIN) {\n return Math.max(0, item.v * Math.min(root.width, root.height) * 0.01);\n }\n return 0;\n });\n });\n // 优化提前跳出\n if(noRadius) {\n return;\n }\n // radius限制,相交的2个之和不能超过边长,如果2个都超过中点取中点,只有1个超过取交点,这包含了单个不能超过总长的逻辑\n BR_KS.forEach((k, i) => {\n let j = i % 2 === 0 ? 0 : 1;\n let target = j ? h : w;\n let prev = computedStyle[k];\n let next = computedStyle[BR_KS[(i + 1) % 4]];\n // 相加超过边长则是相交\n if(prev[j] + next[j] > target) {\n let half = target * 0.5;\n // 都超过一半中点取中点\n if(prev[j] >= half && next[j] >= half) {\n prev[j] = next[j] = half;\n }\n // 仅1个超过中点,因相交用总长减去另一方即可\n else if(prev[j] > half) {\n prev[j] = target - next[j];\n }\n else if(next[j] > half) {\n next[j] = target - prev[j];\n }\n }\n });\n}\n\nfunction calBorderRadiusInline(contentBoxList, currentStyle, computedStyle) {\n let first, last;\n if(contentBoxList.length) {\n first = contentBoxList[0];\n last = contentBoxList[contentBoxList.length - 1];\n // 不用instanceof防止循环依赖\n if(last.isEllipsis) {\n last = contentBoxList[contentBoxList.length - 2];\n }\n }\n // 先看first的左侧\n let w = first ? first.outerWidth : 0, h = first ? first.outerHeight : 0;\n w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[PADDING_LEFT];\n h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n [BORDER_TOP_LEFT_RADIUS, BORDER_BOTTOM_LEFT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item.u === PX) {\n v = Math.max(0, item.v);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item.v * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n // 再看end的右侧\n w = last ? last.outerWidth : 0;\n h = last ? last.outerHeight : 0;\n [BORDER_TOP_RIGHT_RADIUS, BORDER_BOTTOM_RIGHT_RADIUS].forEach(k => {\n computedStyle[k] = currentStyle[k].map((item, i) => {\n let v;\n if(item.u === PX) {\n v = Math.max(0, item.v);\n v = Math.min(i ? h : w, v);\n }\n else {\n v = Math.max(0, item.v * (i ? h : w) * 0.01);\n v = Math.min(i ? h : w, v);\n }\n return v;\n });\n });\n}\n\nfunction renderBorder(xom, renderMode, ctx, points, color, dx, dy) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n points.forEach(point => {\n canvasPolygon(ctx, point, dx, dy);\n });\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let s = '';\n points.forEach(point => {\n s += svgPolygon(point);\n });\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', s],\n ['fill', color],\n ],\n });\n }\n}\n\nexport default {\n calPoints,\n calRadius,\n calBorderRadius,\n calBorderRadiusInline,\n renderBorder,\n};\n","import unit from './unit';\nimport reg from './reg';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\nimport mx from '../math/matrix';\nimport gradient from '../math/gradient';\nimport border from './border';\nimport mode from '../refresh/mode';\nimport util from '../util/util';\nimport painter from '../util/painter';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\n\nconst { rgba2int, isNil } = util;\nconst { PX, PERCENT, DEG, NUMBER, REM, VW, VH, VMAX, VMIN, calUnit } = unit;\nconst { d2r } = geom;\nconst { canvasPolygon } = painter;\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n },\n} = enums;\n\nfunction getLinearDeg(v) {\n let deg = 180;\n if(v === 'to top') {\n deg = 0;\n }\n else if(v === 'to top right') {\n deg = 45;\n }\n else if(v === 'to right') {\n deg = 90;\n }\n else if(v === 'to bottom right') {\n deg = 135;\n }\n else if(v === 'to bottom') {\n }\n else if(v === 'to bottom left') {\n deg = 225;\n }\n else if(v === 'to left') {\n deg = 270;\n }\n else if(v === 'to top left') {\n deg = 315;\n }\n // 数字角度,没有的话取默认角度\n else {\n let match = /([-+]?[\\d.]+)deg/.exec(v);\n if(match) {\n deg = parseFloat(match[1]);\n }\n }\n return deg % 360;\n}\n\nfunction getRadialPosition(data) {\n if(/^[-+]?[\\d.]/.test(data)) {\n let v = calUnit(data);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.v = PX;\n }\n return v;\n }\n else {\n return {\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[data] || 50,\n u: PERCENT,\n };\n }\n}\n\n// 获取color-stop区间范围,去除无用值\nfunction getColorStop(v, length, root) {\n let list = [];\n let firstColor = v[0][0];\n // 先把已经声明距离的换算成[0,1]以数组形式存入,未声明的原样存入\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n // 考虑是否声明了位置\n if(item.length > 1) {\n let p = item[1];\n if(p.u === PERCENT) {\n list.push([item[0], p.v * 0.01]);\n }\n else if(p.u === REM) {\n list.push([item[0], p.v * root.computedStyle[FONT_SIZE] / length]);\n }\n else if(p.u === VW) {\n list.push([item[0], p.v * root.width / length]);\n }\n else if(p.u === VH) {\n list.push([item[0], p.v * root.height / length]);\n }\n else if(p.u === VMAX) {\n list.push([item[0], p.v * Math.max(root.width, root.height) / length]);\n }\n else if(p.u === VMIN) {\n list.push([item[0], p.v * Math.min(root.width, root.height) / length]);\n }\n else {\n list.push([item[0], p.v / length]);\n }\n }\n else {\n list.push([item[0]]);\n }\n }\n if(list.length === 1) {\n list.push(util.clone(list[0]));\n }\n // 首尾不声明默认为[0, 1]\n if(list[0].length === 1) {\n list[0].push(0);\n }\n if(list.length > 1) {\n let i = list.length - 1;\n if(list[i].length === 1) {\n list[i].push(1);\n }\n }\n // 找到未声明位置的,需区间计算,找到连续的未声明的,前后的区间平分\n let start = list[0][1];\n for(let i = 1, len = list.length; i < len - 1; i++) {\n let item = list[i];\n if(item.length > 1) {\n start = item[1];\n }\n else {\n let j = i + 1;\n let end = list[list.length - 1][1];\n for(; j < len - 1; j++) {\n let item = list[j];\n if(item.length > 1) {\n end = item[1];\n break;\n }\n }\n let num = j - i + 1;\n let per = (end - start) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.push(start + per * (k + 1 - i));\n }\n i = j;\n }\n }\n // 每个不能小于前面的,canvas/svg不能兼容这种情况,需处理\n for(let i = 1, len = list.length; i < len; i++) {\n let item = list[i];\n let prev = list[i - 1];\n if(item[1] < prev[1]) {\n item[1] = prev[1];\n }\n }\n // 0之前的和1之后的要过滤掉\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item[1] > 1) {\n list.splice(i);\n let prev = list[i - 1];\n if(prev && prev[1] < 1) {\n let dr = item[0][0] - prev[0][0];\n let dg = item[0][1] - prev[0][1];\n let db = item[0][2] - prev[0][2];\n let da = item[0][3] - prev[0][3];\n let p = (1 - prev[1]) / (item[1] - prev[1]);\n list.push([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 1],\n );\n }\n break;\n }\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n if(item[1] < 0) {\n list.splice(0, i + 1);\n let next = list[i];\n if(next && next[1] > 0) {\n let dr = next[0][0] - item[0][0];\n let dg = next[0][1] - item[0][1];\n let db = next[0][2] - item[0][2];\n let da = next[0][3] - item[0][3];\n let p = (-item[1]) / (next[1] - item[1]);\n list.unshift([\n [\n item[0][0] + dr * p,\n item[0][1] + dg * p,\n item[0][2] + db * p,\n item[0][3] + da * p,\n ],\n 0],\n );\n }\n break;\n }\n }\n // 可能存在超限情况,如在使用px单位超过len或 {\n // item[0] = int2rgba(item[0]);\n if(item[1] < 0) {\n item[1] = 0;\n }\n else if(item[1] > 1) {\n item[1] = 1;\n }\n });\n // 都超限时,第一个颜色兜底\n if(!list.length) {\n list.push([firstColor, 0]);\n }\n return list;\n}\n\n// 根据角度和圆心获取渐变的4个点坐标\nfunction calLinearCoords(deg, length, cx, cy) {\n let x0;\n let y0;\n let x1;\n let y1;\n if(deg >= 270) {\n let r = d2r(360 - deg);\n x0 = cx + Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n else if(deg >= 180) {\n let r = d2r(deg - 180);\n x0 = cx + Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx - Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else if(deg >= 90) {\n let r = d2r(180 - deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy - Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy + Math.cos(r) * length;\n }\n else {\n let r = d2r(deg);\n x0 = cx - Math.sin(r) * length;\n y0 = cy + Math.cos(r) * length;\n x1 = cx + Math.sin(r) * length;\n y1 = cy - Math.cos(r) * length;\n }\n return [x0, y0, x1, y1];\n}\n\nfunction calCircleCentre(position, x1, y1, iw, ih, root) {\n let cx, cy;\n let positionX = position[0], positionY = position[1];\n if(positionX.u === PERCENT) {\n cx = x1 + positionX.v * iw * 0.01;\n }\n else if(positionX.u === REM) {\n cx = x1 + positionX.v * root.computedStyle[FONT_SIZE];\n }\n else if(positionX.u === VW) {\n cx = x1 + positionX.v * root.width * 0.01;\n }\n else if(positionX.u === VH) {\n cx = x1 + positionX.v * root.height * 0.01;\n }\n else if(positionX.u === VMAX) {\n cx = x1 + positionX.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionX.u === VMIN) {\n cx = x1 + positionX.v * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cx = x1 + positionX.v;\n }\n if(positionY.u === PERCENT) {\n cy = y1 + positionY.v * ih * 0.01;\n }\n else if(positionY.u === REM) {\n cy = y1 + positionY.v * root.computedStyle[FONT_SIZE];\n }\n else if(positionY.u === VW) {\n cy = y1 + positionY.v * root.width * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * root.height * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(positionY.u === VH) {\n cy = y1 + positionY.v * Math.min(root.width, root.height) * 0.01;\n }\n else {\n cy = y1 + positionY.v;\n }\n return [cx, cy];\n}\n\n// 获取径向渐变圆心半径\nfunction calRadialRadius(shape, size, position, iw, ih, x1, y1, x2, y2, root) {\n let cx, cy, xl, yl, r, tx, ty, d = 0;\n // 扩展的from to ratio格式,圆心、长轴坐标、短轴缩放比\n if(Array.isArray(size)) {\n cx = x1 + size[0] * iw;\n cy = y1 + size[1] * ih;\n tx = x1 + size[4] * iw;\n ty = y1 + size[5] * ih;\n if(size[6] <= 0) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n xl = Math.sqrt(Math.pow((size[2] - size[0]) * iw, 2) + Math.pow((size[3] - size[1]) * ih, 2));\n yl = xl * size[6];\n r = Math.max(xl, yl);\n // 看旋转\n if(xl !== yl) {\n if(size[2] >= size[0]) {\n if(size[3] >= size[1]) {\n d = Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = -Math.asin((size[1] - size[3]) * ih / xl);\n }\n }\n else {\n if(size[3] >= size[1]) {\n d = d2r(180) - Math.asin((size[3] - size[1]) * ih / xl);\n }\n else {\n d = Math.asin((size[1] - size[3]) * ih / xl) - d2r(180);\n }\n }\n }\n }\n }\n else {\n // 默认椭圆a是水平轴,b是垂直轴\n [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n tx = cx;\n ty = cy;\n let ratio = 1;\n if(size === 'closest-corner' && shape === 'circle') {\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.sqrt(Math.pow(xl, 2) + Math.pow(yl, 2));\n }\n }\n else if(size === 'closest-side' || size === 'closest-corner') {\n // 在边外特殊情况只有end颜色填充\n if(cx <= x1 || cx >= x2 || cy <= y1 || cy >= y2) {\n r = Math.min(Math.abs(cx - x1), Math.min(Math.abs(cy - y1), Math.min(Math.abs(cy - y2), Math.min(Math.abs(cx - y2)))));\n }\n else {\n let ratio = 1;\n if(cx < x1 + iw * 0.5) {\n xl = cx - x1;\n }\n else {\n xl = x2 - cx;\n }\n if(cy < y1 + ih * 0.5) {\n yl = cy - y1;\n }\n else {\n yl = y2 - cy;\n }\n r = Math.min(xl, yl);\n // css的角和边有对应关系,即边扩展倍数,计算为固定值\n if(size === 'closest-corner') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n else {\n if(cx <= x1) {\n xl = x1 - cx + iw;\n }\n else if(cx >= x2) {\n xl = cx - x2 + iw;\n }\n else if(cx < x1 + iw * 0.5) {\n xl = x2 - cx;\n }\n else {\n xl = cx - x1;\n }\n if(cy <= y1) {\n yl = y1 - cy + ih;\n }\n else if(cy >= y2) {\n yl = cy - y2 + ih;\n }\n else if(cy < y1 + ih * 0.5) {\n yl = y2 - cy;\n }\n else {\n yl = cy - y1;\n }\n r = Math.max(xl, yl);\n if(size !== 'farthest-side') {\n ratio = Math.sqrt(2);\n }\n xl *= ratio;\n yl *= ratio;\n r *= ratio;\n }\n }\n if(shape === 'circle') {\n xl = yl = r;\n }\n return [cx, cy, r, xl, yl, tx, ty, d];\n}\n\nfunction parseGradient(s) {\n let gradient = reg.gradient.exec(s);\n if(gradient) {\n let o = {\n k: gradient[1],\n };\n if(o.k === 'linear') {\n let deg = /([-+]?[\\d.]+deg)|(to\\s+[toprighbml]+)/i.exec(gradient[2]);\n if(deg) {\n o.d = getLinearDeg(deg[0].toLowerCase());\n }\n // 扩展支持从a点到b点相对坐标,而不是css角度,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)/.exec(gradient[2]);\n if(points) {\n o.d = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n }\n else {\n o.d = 180;\n }\n }\n }\n else if(o.k === 'radial') {\n o.s = gradient[2].indexOf('circle') > -1 ? 'circle' : 'ellipse';\n let size = /(closest|farthest)-(side|corner)/i.exec(gradient[2]);\n if(size) {\n o.z = size[0].toLowerCase();\n }\n // 扩展支持从a点到b点相对坐标,而不是size,sketch等ui软件中用此格式\n else {\n let points = /([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)\\s+([-+]?[\\d.]+)(?:\\s+([-+]?[\\d.]+))?(?:\\s+([-+]?[\\d.]+))?(?:\\s+([-+]?[\\d.]+))?/.exec(gradient[2]);\n if(points) {\n o.z = [parseFloat(points[1]), parseFloat(points[2]), parseFloat(points[3]), parseFloat(points[4])];\n let i5 = !isNil(points[5]), i6 = !isNil(points[6]), i7 = !isNil(points[7]);\n // 重载,567是偏移x/y和ratio,都可省略即不偏移和半径1,只有5是ratio,只有56是x/y\n if(i5 && i6 && i7) {\n o.z.push(parseFloat(points[5]));\n o.z.push(parseFloat(points[6]));\n o.z.push(parseFloat(points[7]));\n }\n else if(i5 && i6) {\n o.z.push(parseFloat(points[5]));\n o.z.push(parseFloat(points[6]));\n o.z.push(1);\n }\n else if(i5) {\n o.z.push(o.z[0]);\n o.z.push(o.z[1]);\n o.z.push(parseFloat(points[5]));\n }\n else {\n o.z.push(o.z[0]);\n o.z.push(o.z[1])\n o.z.push(1);\n }\n }\n else {\n o.z = 'farthest-corner';\n }\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [{ v: 50, u: PERCENT }, { v: 50, u: PERCENT }];\n }\n }\n else if(o.k === 'conic') {\n let deg = /([-+]?[\\d.]+deg)/i.exec(gradient[2]);\n if(deg) {\n o.d = parseFloat(deg[0]) % 360;\n }\n else {\n o.d = 0;\n }\n let position = /at\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center))(?:\\s+((?:[-+]?[\\d.]+[pxremvwhina%]*)|(?:left|top|right|bottom|center)))?/i.exec(gradient[2]);\n if(position) {\n let x = getRadialPosition(position[1]);\n let y = position[2] ? getRadialPosition(position[2]) : x;\n o.p = [x, y];\n }\n else {\n o.p = [{ v: 50, u: PERCENT }, { v: 50, u: PERCENT }];\n }\n }\n let v = gradient[2].match(/(([-+]?[\\d.]+[pxremvwhina%]+)?\\s*((#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))\\s*([-+]?[\\d.]+[pxremvwhina%]+)?)|(transparent)/ig) || [];\n o.v = v.map(item => {\n let color = /(?:#[0-9a-f]{3,8})|(?:rgba?\\s*\\(.+?\\))|(?:transparent)/i.exec(item);\n let arr = [rgba2int(color[0])];\n let percent = /[-+]?[\\d.]+[pxremvwhina%]+/.exec(item);\n if(percent) {\n let v = calUnit(percent[0]);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.v = PX;\n }\n arr[1] = v;\n }\n return arr;\n });\n return o;\n }\n}\n\nfunction getLinear(v, d, ox, oy, cx, cy, w, h, root, dx = 0, dy = 0) {\n ox += dx;\n oy += dy;\n cx += dx;\n cy += dy;\n // d为数组是2个坐标点,数字是css标准角度\n let x1, y1, x2, y2, stop;\n if(Array.isArray(d)) {\n x1 = ox + d[0] * w;\n y1 = oy + d[1] * h;\n x2 = ox + d[2] * w;\n y2 = oy + d[3] * h;\n let total = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n stop = getColorStop(v, total);\n }\n else {\n while(d >= 360) {\n d -= 360;\n }\n while(d < 0) {\n d += 360;\n }\n // 根据角度求直线上2点,设置半径为长宽最大值,这样一定在矩形外,看做一个向量A\n let len = Math.max(w, h);\n let coords = calLinearCoords(d, len, cx, cy, w, h);\n len *= 2;\n // start和4个顶点的向量在A上的投影长度\n let l1 = vector.dotProduct(ox - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l2 = vector.dotProduct(ox + w - coords[0], oy - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l3 = vector.dotProduct(ox + w - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n let l4 = vector.dotProduct(ox - coords[0], oy + h - coords[1], coords[2] - coords[0], coords[3] - coords[1]) / len;\n // 最小和最大值为0~100%\n let min = l1, max = l1;\n min = Math.min(min, Math.min(l2, Math.min(l3, l4)));\n max = Math.max(max, Math.max(l2, Math.max(l3, l4)));\n // 求得0和100%的长度和坐标\n let total = max - min;\n let r1 = min / len;\n let dx = coords[2] - coords[0];\n let dy = coords[3] - coords[1];\n x1 = coords[0] + dx * r1;\n y1 = coords[1] + dy * r1;\n x2 = coords[2] - dx * r1;\n y2 = coords[3] - dy * r1;\n stop = getColorStop(v, total, root);\n }\n return {\n x1,\n y1,\n x2,\n y2,\n stop,\n };\n}\n\nfunction getRadial(v, shape, size, position, x1, y1, x2, y2, root, dx = 0, dy = 0) {\n let w = x2 - x1;\n let h = y2 - y1;\n x1 += dx;\n y1 += dy;\n x2 += dx;\n y2 += dy;\n let [cx, cy, r, xl, yl, tx, ty, d] = calRadialRadius(shape, size, position, w, h, x1, y1, x2, y2, root);\n // 圆形取最小值,椭圆根据最小圆进行transform,椭圆其中一边轴和r一样,另一边则大小缩放可能\n let matrix, scx = 1, scy = 1;\n if(xl !== yl || d) {\n matrix = [1, 0, 0, 1, 0, 0];\n if(d) {\n let sin = Math.sin(d);\n let cos = Math.cos(d);\n matrix = [cos, sin, 0, 0, -sin, cos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n }\n if(xl !== r) {\n scx = xl / r;\n let m = [scx, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n if(yl !== r) {\n scy = yl / r;\n let m = [1, 0, 0, 0, 0, scy, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1];\n matrix = mx.multiply(matrix, m);\n }\n }\n let stop = getColorStop(v, r, root);\n return {\n cx,\n cy,\n tx,\n ty,\n r,\n stop,\n scx,\n scy,\n matrix,\n d,\n };\n}\n\nfunction getConic(v, d, p, x1, y1, x2, y2, ratio, root) {\n let [cx, cy, r, deg] = calConicRadius(v, d, p, x1, y1, x2, y2, root);\n let stop = getColorStop(v, 1, root);\n r <<= 1; // 锥形半径*2,这样分割画圆时保证一定会填满原有矩形\n r *= ratio; // 矢量图形比较特殊,有可能超限,传入个倍数扩大半径\n return {\n cx,\n cy,\n w: x2 - x1,\n h: y2 - y1,\n r,\n deg,\n stop,\n };\n}\n\nfunction calConicRadius(v, deg, position, x1, y1, x2, y2, root) {\n let iw = x2 - x1;\n let ih = y2 - y1;\n let [cx, cy] = calCircleCentre(position, x1, y1, iw, ih, root);\n let r, a, b;\n if(cx >= x1 + iw * 0.5) {\n a = cx - x1;\n }\n else {\n a = x2 - cx;\n }\n if(cy >= y1 + ih * 0.5) {\n b = cy - y1;\n }\n else {\n b = y2 - cy;\n }\n r = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n return [cx, cy, r, deg];\n}\n\nfunction renderConic(xom, renderMode, ctx, res, x, y, w, h, btlr, btrr, bbrr, bblr, isInline) {\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n let list = border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n let offscreen = inject.getOffscreenCanvas(w, h, '__$$CONIC_GRADIENT$$__', null);\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(res.cx - x, res.cy - y, res.w, res.h, res.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x, y);\n ctx.restore();\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n}\n\nexport default {\n parseGradient,\n getLinear,\n getRadial,\n getConic,\n renderConic,\n};\n","import reg from './reg';\nimport util from '../util/util';\n\nlet { isNil } = util;\n\nfunction parseFlex(style, grow, shrink, basis) {\n if(isNil(style.flexGrow)) {\n style.flexGrow = grow || 0;\n }\n if(isNil(style.flexShrink)) {\n style.flexShrink = shrink || 0;\n }\n if(isNil(style.flexBasis)) {\n style.flexBasis = basis || 0;\n }\n}\n\nfunction parseMarginPadding(style, key, list) {\n let temp = style[key];\n if(!isNil(temp)) {\n let match = temp.toString().match(/([-+]?[\\d.]+[pxremvwhina%]*)|(auto)/ig);\n if(match) {\n if(match.length === 1) {\n match[3] = match[2] = match[1] = match[0];\n }\n else if(match.length === 2) {\n match[2] = match[0];\n match[3] = match[1];\n }\n else if(match.length === 3) {\n match[3] = match[1];\n }\n list.forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = match[i];\n }\n });\n }\n }\n}\n\nfunction parseOneBorder(style, k) {\n let v = style[k];\n if(isNil(v)) {\n return;\n }\n // 后面会统一格式化处理\n if(isNil(style[k + 'Width'])) {\n let w = /\\b[\\d.]+[pxremvwhina%]*\\b/i.exec(v);\n style[k + 'Width'] = w ? w[0] : 0;\n }\n if(isNil(style[k + 'Style'])) {\n let s = /\\b(solid|dashed|dotted)\\b/i.exec(v);\n style[k + 'Style'] = s ? s[1] : 'solid';\n }\n if(isNil(style[k + 'Color'])) {\n let c = /#[0-9a-f]{3,8}/i.exec(v);\n if(c && [4, 7, 9].indexOf(c[0].length) > -1) {\n style[k + 'Color'] = c[0];\n }\n else if(/\\btransparent\\b/i.test(v)) {\n style[k + 'Color'] = 'transparent';\n }\n else {\n c = /rgba?\\s*\\(.+\\)/i.exec(v);\n style[k + 'Color'] = c ? c[0] : 'transparent';\n }\n }\n}\n\nexport default {\n margin: ['marginTop', 'marginRight', 'marginBottom', 'marginLeft'],\n padding: ['paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft'],\n border: ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'],\n borderTop: ['borderTopWidth', 'borderTopStyle', 'borderTopColor'],\n borderRight: ['borderRightWidth', 'borderRightStyle', 'borderRightColor'],\n borderBottom: ['borderBottomWidth', 'borderBottomStyle', 'borderBottomColor'],\n borderLeft: ['borderLeftWidth', 'borderLeftStyle', 'borderLeftColor'],\n borderWidth: ['borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth'],\n borderColor: ['borderTopColor', 'borderRightColor', 'borderBottomColor', 'borderLeftColor'],\n borderStyle: ['borderTopStyle', 'borderRightStyle', 'borderBottomStyle', 'borderLeftStyle'],\n borderRadius: ['borderTopLeftRadius', 'borderTopRightRadius', 'borderBottomRightRadius', 'borderBottomLeftRadius'],\n background: ['backgroundColor', 'backgroundImage', 'backgroundRepeat', 'backgroundPosition'],\n backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],\n flex: ['flexGrow', 'flexShrink', 'flexBasis'],\n translate: ['translateX', 'translateY'],\n translate3d: ['translateX', 'translateY', 'translateY'],\n scale: ['scaleX', 'scaleY'],\n scale3d: ['scaleX', 'scaleY', 'scaleZ'],\n rotate: ['rotateZ'],\n skew: ['skewX', 'skewY'],\n textStroke: ['textStrokeWidth', 'textStrokeColor', 'textStrokeOver'],\n\n toFull(style, k) {\n let v = style[k];\n if(k === 'background') {\n // bg缩写多个时有color则必须是最后一个\n if(Array.isArray(v)) {\n let length = v.length;\n if(isNil(style.backgroundColor)) {\n let bgc = /^\\s*((transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\)))/i.exec(v[length - 1]);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.slice(0, length - 1);\n }\n }\n let bgi = [];\n let bgr = [];\n let bgp = [];\n v.forEach(item => {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(item);\n if(gd) {\n bgi.push(gd[0]);\n item = item.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n bgi.push(img[0]);\n item = item.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(item);\n if(repeat) {\n bgr.push(repeat[0].toLowerCase());\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = item.match(reg.position);\n if(position) {\n bgp.push(position.join(' '));\n }\n }\n });\n if(bgi.length) {\n style.backgroundImage = bgi;\n }\n if(bgr.length) {\n style.backgroundRepeat = bgr;\n }\n if(bgp.length) {\n style.backgroundPosition = bgp;\n this.toFull(style, 'backgroundPosition');\n }\n }\n else {\n if(isNil(style.backgroundImage)) {\n let gd = reg.gradient.exec(v);\n if(gd) {\n style.backgroundImage = gd[0];\n v = v.replace(gd[0], '');\n }\n else {\n let img = reg.img.exec(v);\n if(img) {\n style.backgroundImage = img[0];\n v = v.replace(img[0], '');\n }\n }\n }\n if(isNil(style.backgroundRepeat)) {\n let repeat = /(no-?)?repeat(-?[xy])?/i.exec(v);\n if(repeat) {\n style.backgroundRepeat = repeat[0].toLowerCase();\n }\n }\n if(isNil(style.backgroundColor)) {\n let bgc = /^(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(bgc) {\n style.backgroundColor = bgc[0];\n v = v.replace(bgc[0], '');\n }\n }\n if(isNil(style.backgroundPosition)) {\n let position = v.match(reg.position);\n if(position) {\n style.backgroundPosition = position.join(' ');\n this.toFull(style, 'backgroundPosition');\n }\n }\n }\n }\n else if(k === 'flex') {\n if(v === 'none') {\n parseFlex(style, 0, 0, 'auto');\n }\n else if(v === 'auto') {\n parseFlex(style, 1, 1, 'auto');\n }\n else if(/^[\\d.]+\\s+[\\d.]+\\s+(auto|none|content)/.test(v) || /^[\\d.]+\\s+[\\d.]+\\s+[\\d.]+[pxremvwhina%]*/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), arr[2]);\n }\n else if(/^[\\d.]+\\s+[\\d.]+$/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), parseFloat(arr[1]), 0);\n }\n else if(/^[\\d.]+\\s+[\\d.]+[pxremvwhina%]+/.test(v)) {\n let arr = v.split(/\\s+/);\n parseFlex(style, parseFloat(arr[0]), 1, arr[1]);\n }\n else if(/^[\\d.]+$/.test(v)) {\n parseFlex(style, parseFloat(v), 1, 0);\n }\n else if(/^[\\d.]+[pxremvwhina%]+/i.test(v)) {\n parseFlex(style, 1, 1, v);\n }\n else {\n parseFlex(style, 0, 1, 'auto');\n }\n }\n else if(k === 'flexFlow') {\n v = v.toString().split(/\\s+/);\n if(v.length) {\n if(isNil(style.flexDirection)) {\n }\n style.flexDirection = v[0];\n if(v.length > 1) {\n style.flexWrap = v[1];\n }\n }\n }\n else if(k === 'borderRadius') {\n // borderRadius缩写很特殊,/分隔x/y,然后上右下左4个\n v = v.toString().split('/');\n if(v.length === 1) {\n v[1] = v[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = v[i].toString().split(/\\s+/);\n if(item.length === 0) {\n v[i] = [0, 0, 0, 0];\n }\n else if(item.length === 1) {\n v[i] = [item[0], item[0], item[0], item[0]];\n }\n else if(item.length === 2) {\n v[i] = [item[0], item[1], item[0], item[1]];\n }\n else if(item.length === 3) {\n v[i] = [item[0], item[1], item[2], item[1]];\n }\n else {\n v[i] = item.slice(0, 4);\n }\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = v[0][i] + ' ' + v[1][i];\n }\n });\n }\n else if(k === 'backgroundPosition') {\n if(!Array.isArray(v)) {\n v = [v];\n }\n let isEmpty = this[k].map(k2 => isNil(style[k2]));\n v.forEach(v2 => {\n v2 = v2.toString().split(/\\s+/);\n if(v2.length === 1) {\n v2[1] = '50%';\n }\n this[k].forEach((k2, i) => {\n if(isEmpty[i]) {\n style[k2] = style[k2] || [];\n style[k2].push(v2[i]);\n }\n });\n });\n }\n else if(['translate', 'scale', 'skew'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(['translate3d', 'scale3d'].indexOf(k) > -1) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[2] = arr[1] = arr[0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? 1 : 0;\n }\n this[k].forEach((k, i) => {\n if(isNil(style[k])) {\n style[k] = arr[i];\n }\n });\n }\n else if(k === 'margin' || k === 'padding') {\n parseMarginPadding(style, k, this[k]);\n }\n else if(/^border((Top)|(Right)|(Bottom)|(Left))$/.test(k)) {\n parseOneBorder(style, k);\n }\n else if(k === 'textStroke') {\n let w = /(?:^|\\s)([-+]?[\\d.]+[pxremvwhina%]*)/.exec(v);\n if(w) {\n style.textStrokeWidth = w[1];\n }\n let c = /(transparent)|(#[0-9a-f]{3,8})|(rgba?\\s*\\(.+?\\))/i.exec(v);\n if(c) {\n style.textStrokeColor = c[0];\n }\n if(/\\bfill\\b/i.test(v)) {\n style.textStrokeOver = 'fill';\n }\n else {\n style.textStrokeOver = 'none';\n }\n }\n else if(this[k]) {\n this[k].forEach(k => {\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n }\n return style;\n }\n};\n","import enums from '../util/enums';\n\nconst { STYLE_KEY } = enums;\n\nconst {\n BACKGROUND_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n COLOR, // 特殊,新增GRADIENT渐变色\n TEXT_STROKE_COLOR, // 同上\n FONT_SIZE,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_TOP_WIDTH,\n LEFT,\n TOP,\n RIGHT,\n BOTTOM,\n FLEX_BASIS,\n WIDTH,\n HEIGHT,\n LINE_HEIGHT,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n PADDING_LEFT,\n STROKE_WIDTH,\n STROKE_MITERLIMIT,\n LETTER_SPACING,\n PERSPECTIVE,\n TEXT_STROKE_WIDTH,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n BACKGROUND_IMAGE,\n FILL,\n STROKE,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n} = STYLE_KEY;\n\nfunction isColorKey(k) {\n return k === BACKGROUND_COLOR || k === BORDER_BOTTOM_COLOR\n || k === BORDER_LEFT_COLOR || k === BORDER_RIGHT_COLOR\n || k === BORDER_TOP_COLOR || k === COLOR || k === TEXT_STROKE_COLOR;\n}\n\nfunction isLengthKey(k) {\n return k === FONT_SIZE || k === TEXT_STROKE_WIDTH\n || k === BORDER_BOTTOM_WIDTH || k === BORDER_LEFT_WIDTH || k === BORDER_RIGHT_WIDTH || k === BORDER_TOP_WIDTH\n || k === LEFT || k === TOP || k === RIGHT || k === BOTTOM || k === FLEX_BASIS || k === WIDTH || k === HEIGHT\n || k === LINE_HEIGHT || k === MARGIN_BOTTOM || k === MARGIN_TOP || k === MARGIN_LEFT || k === MARGIN_RIGHT\n || k === PADDING_TOP || k === PADDING_RIGHT || k === PADDING_LEFT || k === PADDING_BOTTOM\n || k === STROKE_WIDTH || k === STROKE_MITERLIMIT || k === LETTER_SPACING || k === PERSPECTIVE;\n}\n\nfunction isExpandKey(k) {\n return k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z\n || k === SKEW_X || k === SKEW_Y || k === SCALE_X || k === SCALE_Y || k === SCALE_Z\n || k === ROTATE_X || k === ROTATE_Y || k === ROTATE_Z;\n}\n\nfunction isGradientKey(k) {\n return k === BACKGROUND_IMAGE || k === FILL || k === STROKE;\n}\n\nfunction isRadiusKey(k) {\n return k === BORDER_BOTTOM_LEFT_RADIUS || k === BORDER_TOP_LEFT_RADIUS\n || k === BORDER_TOP_RIGHT_RADIUS || k === BORDER_BOTTOM_RIGHT_RADIUS;\n}\n\nexport default {\n isColorKey,\n isLengthKey,\n isExpandKey,\n isGradientKey,\n isRadiusKey,\n};\n","import reset from '../style/reset';\nimport enums from '../util/enums';\n\nconst { DOM: RESET_DOM, GEOM: RESET_GEOM } = reset;\nconst { STYLE_KEY } = enums;\nconst {\n POINTER_EVENTS,\n COLOR,\n STROKE_WIDTH,\n FILL,\n STROKE_DASHARRAY,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_REPEAT,\n BACKGROUND_SIZE,\n STROKE,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n BOX_SHADOW,\n OVERFLOW,\n BACKGROUND_CLIP,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n TRANSLATE_PATH,\n TRANSFORM_STYLE,\n} = STYLE_KEY;\n\nconst GEOM = {};\nconst GEOM_KEY_SET = [];\n\nlet o = {\n GEOM,\n GEOM_KEY_SET,\n addGeom(tagName, ks, cb) {\n if(Array.isArray(ks)) {\n ks.forEach(k => {\n o.addGeom(tagName, k, cb);\n });\n }\n else if(ks) {\n if(!GEOM.hasOwnProperty(ks)) {\n GEOM_KEY_SET.push(ks);\n }\n let hash = GEOM[ks] = GEOM[ks] || {};\n hash[tagName] = cb || true;\n }\n },\n isIgnore(k) {\n return k === POINTER_EVENTS || k === TRANSLATE_PATH;\n },\n isGeom(tagName, k) {\n return tagName && k && GEOM.hasOwnProperty(k) && GEOM[k].hasOwnProperty(tagName);\n },\n isRepaint(k, tagName) {\n return k === COLOR || k === STROKE_WIDTH || k === FILL || k === STROKE_DASHARRAY || k === STROKE_LINECAP\n || k === STROKE_LINEJOIN || k === STROKE_MITERLIMIT || k === BACKGROUND_COLOR || k === BACKGROUND_IMAGE\n || k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === BACKGROUND_REPEAT\n || k === BACKGROUND_SIZE || k === STROKE || k === BORDER_BOTTOM_COLOR || k === BORDER_LEFT_COLOR\n || k === BORDER_BOTTOM_COLOR || k === BORDER_RIGHT_COLOR || k === BORDER_TOP_COLOR\n || k === BORDER_TOP_LEFT_RADIUS || k === BORDER_TOP_RIGHT_RADIUS || k === BORDER_BOTTOM_RIGHT_RADIUS\n || k === BORDER_BOTTOM_LEFT_RADIUS || k === VISIBILITY || k === BOX_SHADOW || k === OVERFLOW\n || k === BACKGROUND_CLIP || k === TEXT_STROKE_WIDTH || k === TEXT_STROKE_COLOR || k === TEXT_STROKE_OVER\n || k === TRANSFORM_STYLE || o.isGeom(tagName, k);\n },\n isValid(tagName, k) {\n if(!k) {\n return false;\n }\n if(RESET_DOM.hasOwnProperty(k)) {\n return true;\n }\n // geom的fill等矢量才有的样式\n if(tagName && tagName.charAt(0) === '$' && RESET_GEOM.hasOwnProperty(k)) {\n return true;\n }\n if(GEOM.hasOwnProperty(k)) {\n return tagName && GEOM[k].hasOwnProperty(tagName);\n }\n if(k === 'translatePath') {\n return true;\n }\n return false;\n },\n};\n\no.addGeom('$line', ['xa', 'ya', 'xb', 'yb', 'controlA', 'controlB', 'start', 'end']);\no.addGeom('$circle', ['r']);\no.addGeom('$ellipse', ['rx', 'ry']);\no.addGeom('$rect', ['rx', 'ry']);\no.addGeom('$sector', ['begin', 'end', 'edge', 'closure']);\no.addGeom('$polyline', ['points', 'controls', 'start', 'end']);\no.addGeom('$polygon', ['points', 'controls', 'start', 'end', 'booleanOperations']);\n\nexport default o;\n","/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据模糊参数sigma求卷积核尺寸\n * @param sigma\n * @returns {number}\n */\nfunction kernelSize(sigma) {\n if(sigma <= 0) {\n return 0;\n }\n let d = Math.floor(sigma * 3 * Math.sqrt(2 * Math.PI) / 4 + 0.5);\n if(d < 2) {\n d = 2;\n }\n if(d % 2 === 0) {\n d++;\n }\n return d;\n}\n\n/**\n * 根据sigma求模糊扩展尺寸,卷积核求得后为d,再求半径/2,然后因为算法要执行3次,所以*3\n * 比如本来d为5,半径2.5算上自身像素点则各方向扩展2,*3则扩展6\n * @param sigma\n * @returns {number}\n */\nfunction outerSize(sigma) {\n let d = kernelSize(sigma);\n return outerSizeByD(d);\n}\n\nfunction outerSizeByD(d) {\n return Math.floor(d * 0.5) * 3;\n}\n\n/**\n * 一维高斯正态分布,根据标准差和卷积核尺寸返回一维权重数组\n * @param sigma\n * @param d\n */\nfunction gaussianWeight(sigma, d) {\n let list = [];\n let len = Math.floor(d * 0.5);\n let total = 0;\n for(let i = len; i >= 0; i--) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n for(let i = 1; i <= len; i++) {\n let n = Math.pow(Math.E, -Math.pow(i, 2) / (2 * Math.pow(sigma, 2)))\n / (sigma * Math.sqrt(2 * Math.PI));\n list.push(n);\n total += n;\n }\n if(total !== 1) {\n for(let i = 0; i < d; i++) {\n list[i] /= total;\n }\n }\n return list;\n}\n\nexport default {\n kernelSize,\n outerSize,\n outerSizeByD,\n gaussianWeight,\n};\n","import unit from './unit';\nimport font from './font';\nimport reset from './reset';\nimport gradient from './gradient';\nimport reg from './reg';\nimport abbr from './abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport key from '../animate/key';\nimport change from '../refresh/change';\nimport blur from '../math/blur';\n\nconst { STYLE_KEY, style2Upper, STYLE_KEY: {\n POSITION,\n WIDTH,\n HEIGHT,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n BACKGROUND_IMAGE,\n BACKGROUND_COLOR,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n OPACITY,\n Z_INDEX,\n COLOR,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n LINE_HEIGHT,\n TEXT_ALIGN,\n FILTER,\n VISIBILITY,\n BOX_SHADOW,\n POINTER_EVENTS,\n FILL,\n STROKE,\n STROKE_WIDTH,\n STROKE_DASHARRAY,\n FLEX_BASIS,\n MATRIX,\n LETTER_SPACING,\n WHITE_SPACE,\n LINE_CLAMP,\n ORDER,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n WRITING_MODE,\n FONT_SIZE_SHRINK,\n} } = enums;\nconst { AUTO, PX, PERCENT, NUMBER, INHERIT, DEG, RGBA, STRING, EM, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, rgba2int, equalArr, equal, replaceRgba2Hex } = util;\nconst { isGeom, GEOM, GEOM_KEY_SET } = change;\nconst { VALID_STRING_VALUE } = reset;\n\nconst {\n isColorKey,\n isExpandKey,\n isLengthKey,\n isGradientKey,\n isRadiusKey,\n} = key;\n\nfunction isGradient(s) {\n if(reg.gradient.test(s)) {\n let gradient = reg.gradient.exec(s);\n if(gradient && ['linear', 'radial', 'conic'].indexOf(gradient[1]) > -1) {\n return true;\n }\n }\n}\n\nconst TRANSFORM_HASH = {\n translateX: TRANSLATE_X,\n translateY: TRANSLATE_Y,\n translateZ: TRANSLATE_Z,\n scaleX: SCALE_X,\n scaleY: SCALE_Y,\n scaleZ: SCALE_Z,\n skewX: SKEW_X,\n skewY: SKEW_Y,\n rotateX: ROTATE_X,\n rotateY: ROTATE_Y,\n rotateZ: ROTATE_Z,\n rotate: ROTATE_Z,\n};\n\nfunction compatibleTransform(k, arr) {\n if(k === SCALE_X || k === SCALE_Y || k === SCALE_Z) {\n arr.u = NUMBER;\n }\n else if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(arr.u === NUMBER) {\n arr.u = PX;\n }\n }\n else if(k === PERSPECTIVE) {\n if([NUMBER, PERCENT, DEG].indexOf(arr.u) > -1) {\n arr.u = PX;\n }\n }\n else {\n if(arr.u === NUMBER) {\n arr.u = DEG;\n }\n }\n}\n\nfunction camel(v) {\n if(isNil(v)) {\n v = '';\n }\n v = v.toString();\n //有-才转换,否则可能是写好的驼峰\n if(v.indexOf('-') > -1) {\n return v.toString().toLowerCase().replace(/-([a-z])/ig, function($0, $1) {\n return $1.toUpperCase();\n });\n }\n return v;\n}\n\nfunction convertStringValue(k, v) {\n v = camel(v);\n let list = VALID_STRING_VALUE[k];\n let i = list.indexOf(v);\n if(i > -1) {\n return list[i];\n }\n // 兜底默认\n return list[0];\n}\n\n/**\n * 将传入的手写style标准化,并且用resetList默认值覆盖其中为空的\n * @param style 手写的style样式\n * @param resetList 默认样式,可选\n * @returns Object 标准化的枚举数组结构样式\n */\nfunction normalize(style, resetList = []) {\n if(!util.isObject(style)) {\n return {};\n }\n let res = {};\n // style只有单层无需深度clone\n style = util.extend({}, style);\n // 缩写提前处理,因为reset里没有缩写\n let temp = style.border;\n if(temp) {\n abbr.toFull(style, 'border');\n }\n ['borderTop', 'borderRight', 'borderBottom', 'borderLeft'].forEach(k => {\n abbr.toFull(style, k);\n });\n temp = style.borderWidth;\n if(temp) {\n abbr.toFull(style, 'borderWidth');\n }\n temp = style.borderColor;\n if(temp) {\n abbr.toFull(style, 'borderColor');\n }\n temp = style.borderStyle;\n if(temp) {\n abbr.toFull(style, 'borderStyle');\n }\n temp = style.borderRadius;\n if(temp) {\n abbr.toFull(style, 'borderRadius');\n }\n temp = style.background;\n // 处理渐变背景缩写\n if(temp) {\n abbr.toFull(style, 'background');\n }\n // 背景位置\n temp = style.backgroundPosition;\n if(!isNil(temp)) {\n abbr.toFull(style, 'backgroundPosition');\n }\n // flex\n temp = style.flex;\n if(temp) {\n abbr.toFull(style, 'flex');\n }\n // flex-flow\n temp = style.flexFlow;\n if(temp) {\n abbr.toFull(style, 'flexFlow');\n }\n temp = style.margin;\n if(!isNil(temp)) {\n abbr.toFull(style, 'margin');\n }\n temp = style.padding;\n if(!isNil(temp)) {\n abbr.toFull(style, 'padding');\n }\n temp = style.textStroke;\n if(temp) {\n abbr.toFull(style, 'textStroke');\n }\n temp = style.rotate3d;\n if(temp) {\n abbr.toFull(style, 'rotate3d');\n }\n // 扩展css,将transform几个值拆分为独立的css为动画准备,同时不能使用transform\n ['translate', 'scale', 'skew', 'translate3d', 'scale3d', 'rotate'].forEach(k => {\n temp = style[k];\n if(!isNil(temp)) {\n abbr.toFull(style, k);\n }\n });\n // 扩展的不能和transform混用,给出警告\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate3d',\n ].forEach(k => {\n let v = style[k];\n if(v !== undefined && style.transform) {\n inject.warn(`Can not use expand style \"${k}\" with transform`);\n }\n });\n // 默认reset,根据传入不同,当style为空时覆盖\n resetList.forEach(item => {\n let { k, v } = item;\n if(isNil(style[k])) {\n style[k] = v;\n }\n });\n // 背景图\n temp = style.backgroundImage;\n if(temp !== undefined) {\n if(!temp) {\n res[BACKGROUND_IMAGE] = [];\n }\n else if(Array.isArray(temp)) {\n res[BACKGROUND_IMAGE] = temp.map(item => {\n if(!item) {\n return null;\n }\n if(isGradient(item)) {\n return {\n v: gradient.parseGradient(item),\n u: GRADIENT,\n };\n }\n if(reg.img.test(item)) {\n return {\n v: reg.img.exec(item)[2],\n u: STRING,\n };\n }\n return null;\n });\n }\n // 区分是渐变色还是图\n else if(isGradient(temp)) {\n res[BACKGROUND_IMAGE] = [{ v: gradient.parseGradient(temp), u: GRADIENT }];\n }\n else if(reg.img.test(temp)) {\n res[BACKGROUND_IMAGE] = [{ v: reg.img.exec(temp)[2], u: STRING }];\n }\n else {\n res[BACKGROUND_IMAGE] = [];\n }\n }\n temp = style.backgroundColor;\n if(temp !== undefined) {\n temp = temp || 'transparent';\n // 先赋值默认透明,后续操作有合法值覆盖\n let bgc = /^#[0-9a-f]{3,8}/i.exec(temp);\n if(bgc && [4, 7, 9].indexOf(bgc[0].length) > -1) {\n res[BACKGROUND_COLOR] = { v: rgba2int(bgc[0]), u: RGBA };\n }\n else {\n bgc = /rgba?\\s*\\(.+\\)/i.exec(temp);\n res[BACKGROUND_COLOR] = { v: rgba2int(bgc ? bgc[0] : [0, 0, 0, 0]), u: RGBA };\n }\n }\n ['backgroundPositionX', 'backgroundPositionY'].forEach((k, i) => {\n temp = style[k];\n if(temp !== undefined) {\n temp = temp || 0;\n k = i ? BACKGROUND_POSITION_Y : BACKGROUND_POSITION_X;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(/^[-+]?[\\d.]/.test(item)) {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n return v;\n }\n else {\n return {\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item] || 0,\n u: PERCENT,\n };\n }\n });\n }\n });\n // 背景尺寸\n temp = style.backgroundSize;\n if(temp !== undefined) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[BACKGROUND_SIZE] = temp.map(item => {\n if(!item) {\n return [\n { u: AUTO },\n { u: AUTO },\n ];\n }\n let match = item.toString().match(/\\b(?:([-+]?[\\d.]+[pxremvwhina%]*)|(contain|cover|auto))/ig);\n if(match) {\n if(match.length === 1) {\n if(match[0].toLowerCase() === 'contain' || match[0].toLowerCase() === 'cover') {\n match[1] = match[0].toLowerCase();\n }\n else {\n match[1] = 'auto';\n }\n }\n let v = [];\n for(let i = 0; i < 2; i++) {\n let item = match[i].toLowerCase();\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n v.push(n);\n }\n else if(item === 'contain' || item === 'cover') {\n v.push({ v: item, u: STRING });\n }\n else {\n v.push({ u: AUTO });\n }\n }\n return v;\n }\n else {\n return [\n { u: AUTO },\n { u: AUTO },\n ];\n }\n });\n }\n // border-color\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k + 'Color';\n let v = style[k];\n if(v !== undefined) {\n res[STYLE_KEY[style2Upper(k)]] = { v: rgba2int(v || 'transparent'), u: RGBA };\n }\n });\n // border-radius\n ['TopLeft', 'TopRight', 'BottomRight', 'BottomLeft'].forEach(k => {\n k = 'border' + k + 'Radius';\n let v = style[k];\n if(v !== undefined) {\n v = v || 0;\n let arr = v.toString().split(/\\s+/);\n if(arr.length === 1) {\n arr[1] = arr[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = arr[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n if(n.v < 0) {\n n.v = 0;\n }\n arr[i] = n;\n }\n else {\n arr[i] = { u: 0, v: PX };\n }\n }\n res[STYLE_KEY[style2Upper(k)]] = arr;\n }\n });\n temp = style.transform;\n if(temp !== undefined) {\n let transform = res[TRANSFORM] = [];\n let match = (temp || '').toString().match(/\\w+\\(.+?\\)/g);\n if(match) {\n match.forEach(item => {\n let i = item.indexOf('(');\n let k = item.slice(0, i);\n let v = item.slice(i + 1, item.length - 1);\n if(k === 'matrix') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 6) {\n arr = arr.slice(0, 6);\n }\n if(arr.length === 6) {\n transform.push({ k: MATRIX, v: [\n arr[0], arr[1], 0, 0, arr[2], arr[3], 0, 0, 0, 0, 1, 0, arr[4], arr[5], 0, 1,\n ]});\n }\n }\n else if(k === 'matrix3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n arr = arr.map(item => parseFloat(item));\n if(arr.length > 16) {\n arr = arr.slice(0, 16);\n }\n if(arr.length === 16) {\n transform.push({ k: MATRIX, v: arr });\n }\n }\n else if(k === 'perspective') {\n let arr = calUnit(v);\n if(arr.v < 0) {\n arr.v = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n transform.push({ k: PERSPECTIVE, v: arr });\n }\n else if(k === 'rotate3d') {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0].replace('(', ''));\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n transform.push({ k: ROTATE_3D, v: arr });\n }\n }\n else if(TRANSFORM_HASH.hasOwnProperty(k)) {\n let k2 = TRANSFORM_HASH[k];\n let arr = calUnit(v);\n compatibleTransform(k2, arr);\n transform.push({ k: k2, v: arr });\n }\n else if({ translate: true, scale: true, skew: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale' ? arr[0] : [0];\n }\n if(arr.length === 2) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n transform.push({ k: k1, v: arr1 });\n transform.push({ k: k2, v: arr2 });\n }\n }\n else if({ translate3d: true, scale3d: true }.hasOwnProperty(k)) {\n let arr = v.toString().split(/\\s*,\\s*/);\n if(arr.length === 1) {\n arr[1] = k === 'scale3d' ? [1] : [0];\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n else if(arr.length === 2) {\n arr[2] = k === 'scale3d' ? [1] : [0];\n }\n if(arr.length === 3) {\n let k1 = STYLE_KEY[style2Upper(k + 'X')];\n let k2 = STYLE_KEY[style2Upper(k + 'Y')];\n let k3 = STYLE_KEY[style2Upper(k + 'Z')];\n let arr1 = calUnit(arr[0]);\n let arr2 = calUnit(arr[1]);\n let arr3 = calUnit(arr[2]);\n compatibleTransform(k1, arr1);\n compatibleTransform(k2, arr2);\n compatibleTransform(k3, arr3);\n transform.push({ k: k1, v: arr1 });\n transform.push({ k: k2, v: arr2 });\n transform.push({ k: k3, v: arr3 });\n }\n }\n });\n }\n }\n temp = style.perspective;\n if(temp !== undefined) {\n let arr = calUnit(temp || 0);\n if(arr.v < 0) {\n arr.v = 0;\n }\n compatibleTransform(PERSPECTIVE, arr);\n res[PERSPECTIVE] = arr;\n }\n ['perspectiveOrigin', 'transformOrigin'].forEach(k => {\n temp = style[k];\n if(temp !== undefined) {\n if(temp === null) {\n temp = '';\n }\n let arr = res[STYLE_KEY[style2Upper(k)]] = [];\n let match = temp.toString().match(reg.position);\n if(match) {\n if(match.length === 1) {\n match[1] = match[0];\n }\n for(let i = 0; i < 2; i++) {\n let item = match[i];\n if(/^[-+]?[\\d.]/.test(item)) {\n let n = calUnit(item);\n if([NUMBER, DEG].indexOf(n.u) > -1) {\n n.u = PX;\n }\n arr.push(n);\n }\n else {\n arr.push({\n v: {\n top: 0,\n left: 0,\n center: 50,\n right: 100,\n bottom: 100,\n }[item],\n u: PERCENT,\n });\n // 不规范的写法变默认值50%\n if(isNil(arr[i].v)) {\n arr[i].v = 50;\n }\n }\n }\n }\n else {\n arr.push({ v: 50, u: PERCENT });\n arr.push({ v: 50, u: PERCENT });\n }\n }\n });\n [\n 'translateX',\n 'translateY',\n 'translateZ',\n 'scaleX',\n 'scaleY',\n 'scaleZ',\n 'skewX',\n 'skewY',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'rotate',\n ].forEach(k => {\n let v = style[k];\n if(v === undefined) {\n return;\n }\n if(v === null) {\n if(k.indexOf('scale') === 0) {\n v = 1;\n }\n else {\n v = 0;\n }\n }\n let k2 = TRANSFORM_HASH[k];\n let n = calUnit(v);\n // 没有单位或默认值处理单位\n compatibleTransform(k2, n);\n res[k2] = n;\n });\n temp = style.rotate3d;\n if(temp !== undefined) {\n let arr = (temp || '').toString().split(/\\s*,\\s*/);\n if(arr.length === 4) {\n let deg = calUnit(arr[3]);\n compatibleTransform(ROTATE_3D, deg);\n arr[0] = parseFloat(arr[0].replace('(', ''));\n arr[1] = parseFloat(arr[1]);\n arr[2] = parseFloat(arr[2]);\n arr[3] = deg;\n }\n res[ROTATE_3D] = arr;\n }\n temp = style.opacity;\n if(temp !== undefined) {\n if(temp === null) {\n temp = 1;\n }\n temp = parseFloat(temp);\n if(!isNaN(temp)) {\n temp = Math.max(temp, 0);\n temp = Math.min(temp, 1);\n res[OPACITY] = temp;\n }\n else {\n res[OPACITY] = 1;\n }\n }\n temp = style.zIndex;\n if(temp !== undefined) {\n res[Z_INDEX] = parseInt(temp) || 0;\n }\n // 转化不同单位值为对象标准化,不写单位的变成number单位转化为px\n [\n 'marginTop',\n 'marginRight',\n 'marginBottom',\n 'marginLeft',\n 'paddingTop',\n 'paddingRight',\n 'paddingBottom',\n 'paddingLeft',\n 'borderTopWidth',\n 'borderRightWidth',\n 'borderBottomWidth',\n 'borderLeftWidth',\n 'top',\n 'right',\n 'bottom',\n 'left',\n 'width',\n 'height',\n ].forEach(k => {\n let v = style[k];\n if(v === undefined) {\n return;\n }\n if(v === 'auto') {\n v = { v: 0, u: AUTO };\n }\n else {\n v = calUnit(v || 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n }\n let k2 = STYLE_KEY[style2Upper(k)];\n res[k2] = v;\n // 限制padding/border为正数\n if({\n paddingTop: true,\n paddingRight: true,\n paddingBottom: true,\n paddingLeft: true,\n borderTopWidth: true,\n borderRightWidth: true,\n borderBottomWidth: true,\n borderLeftWidth: true,\n width: true,\n height: true,\n }.hasOwnProperty(k) && v.v < 0) {\n v.v = 0;\n }\n });\n temp = style.flexBasis;\n if(temp !== undefined) {\n if(/content/i.test(temp)) {\n res[FLEX_BASIS] = { v: temp.toLowerCase(), u: STRING };\n }\n else if(/^[\\d.]/.test(temp)) {\n let v = res[FLEX_BASIS] = calUnit(temp);\n v.v = Math.max(v.v, 0);\n // 无单位视为px\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n }\n else {\n res[FLEX_BASIS] = { v: 0, u: AUTO };\n }\n }\n temp = style.order;\n if(temp !== undefined) {\n res[ORDER] = parseInt(temp) || 0;\n }\n temp = style.color;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[COLOR] = { u: INHERIT };\n }\n else if(isGradient(temp)) {\n res[COLOR] = { v: gradient.parseGradient(temp), u: GRADIENT };\n }\n else {\n res[COLOR] = { v: rgba2int(temp), u: RGBA };\n }\n }\n temp = style.textStrokeColor;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_COLOR] = { u: INHERIT };\n }\n else if(isGradient(temp)) {\n res[TEXT_STROKE_COLOR] = { v: gradient.parseGradient(temp), u: GRADIENT };\n }\n else {\n res[TEXT_STROKE_COLOR] = { v: rgba2int(temp), u: RGBA };\n }\n }\n temp = style.fontSize;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[FONT_SIZE] = { u: INHERIT };\n }\n else {\n let v = calUnit(temp);\n // fontSize不能为非正数,否则为继承\n if(v <= 0) {\n res[FONT_SIZE] = { u: INHERIT };\n }\n else {\n if([NUMBER, DEG, EM].indexOf(v.u) > -1) {\n v.v = parseInt(v.v); // 防止小数\n v.u = PX;\n }\n res[FONT_SIZE] = v;\n }\n }\n }\n temp = style.fontSizeShrink;\n if(temp !== undefined) {\n let v = calUnit(temp);\n // 不能为非正数,否则为0\n if(v <= 0) {\n res[FONT_SIZE_SHRINK] = { v: 0, u: PX };\n }\n else {\n if([NUMBER, DEG, EM].indexOf(v.u) > -1) {\n v.v = parseInt(v.v); // 防止小数\n v.u = PX;\n }\n res[FONT_SIZE_SHRINK] = v;\n }\n }\n temp = style.textStrokeWidth;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[TEXT_STROKE_WIDTH] = { u: INHERIT };\n }\n else {\n let v = calUnit(temp);\n // textStrokeWidth不能为负数,否则为继承\n if(v < 0) {\n res[TEXT_STROKE_WIDTH] = { u: INHERIT };\n }\n else {\n if([NUMBER, DEG, PERCENT].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[TEXT_STROKE_WIDTH] = v;\n }\n }\n }\n temp = style.textStrokeOver;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_STROKE_OVER] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.textStrokeOver;\n if(/fill/i.test(temp)) {\n v = 'fill';\n }\n res[TEXT_STROKE_OVER] = { v, u: STRING };\n }\n }\n temp = style.fontWeight;\n if(temp !== undefined) {\n if(/bold/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 700, u: NUMBER };\n }\n else if(/normal/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 400, u: NUMBER };\n }\n else if(/lighter/i.test(temp)) {\n res[FONT_WEIGHT] = { v: 200, u: NUMBER };\n }\n else if(/inherit/i.test(temp)) {\n res[FONT_WEIGHT] = { u: INHERIT };\n }\n else {\n res[FONT_WEIGHT] = { v: Math.max(0, parseInt(temp)) || 400, u: NUMBER };\n }\n }\n temp = style.fontStyle;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_STYLE] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.fontStyle;\n if(/italic/i.test(temp)) {\n v = 'italic';\n }\n else if(/oblique/i.test(temp)) {\n v = 'oblique';\n }\n res[FONT_STYLE] = { v, u: STRING };\n }\n }\n temp = style.fontFamily;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[FONT_FAMILY] = { u: INHERIT };\n }\n else {\n // 统一文字声明格式\n res[FONT_FAMILY] = { v: temp.toString().toLowerCase()\n .replace(/['\"]/, '')\n .replace(/\\s*,\\s*/g, ','), u: STRING };\n }\n }\n temp = style.writingMode;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WRITING_MODE] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.writingMode;\n if(/vertical-?rl/i.test(temp)) {\n v = 'verticalRl';\n }\n else if(/vertical-?lr/i.test(temp)) {\n v = 'verticalLr';\n }\n res[WRITING_MODE] = { v, u: STRING };\n }\n }\n temp = style.textAlign;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[TEXT_ALIGN] = { u: INHERIT };\n }\n else {\n let v = 'left';\n if(/center/i.test(temp)) {\n v = 'center';\n }\n else if(/right/i.test(temp)) {\n v = 'right';\n }\n res[TEXT_ALIGN] = { v, u: STRING };\n }\n }\n temp = style.lineHeight;\n if(temp !== undefined) {\n if(/inherit/i.test(temp)) {\n res[LINE_HEIGHT] = { u: INHERIT };\n }\n else if(/normal/i.test(temp)) {\n res[LINE_HEIGHT] = { u: AUTO };\n }\n // lineHeight默认数字,想要px必须强制带单位\n else if(/^[\\d.]+/i.test(temp)) {\n let v = calUnit(temp);\n if([DEG].indexOf(v.u) > -1) {\n v.u = NUMBER;\n }\n res[LINE_HEIGHT] = v;\n }\n else {\n let n = Math.max(0, parseFloat(temp)) || 'normal';\n // 非法数字\n if(n === 'normal') {\n res[LINE_HEIGHT] = { u: AUTO };\n }\n else {\n res[LINE_HEIGHT] = { v: n, u: NUMBER };\n }\n }\n }\n temp = style.letterSpacing;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[LETTER_SPACING] = { u: INHERIT };\n }\n else if(/normal/i.test(temp)) {\n res[LETTER_SPACING] = { v: 0, u: PX };\n }\n else if(/^[-+]?[\\d.]/.test(temp)) {\n let v = calUnit(temp);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n res[LETTER_SPACING] = v;\n }\n else {\n res[LETTER_SPACING] = { v: parseFloat(temp) || 0, u: PX };\n }\n }\n temp = style.whiteSpace;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[WHITE_SPACE] = { u: INHERIT };\n }\n else {\n res[WHITE_SPACE] = { v: temp, u: STRING };\n }\n }\n temp = style.lineClamp;\n if(temp !== undefined) {\n temp = parseInt(temp) || 0;\n res[LINE_CLAMP] = Math.max(0, temp);\n }\n // fill和stroke为渐变时特殊处理,fillRule无需处理字符串\n ['fill', 'stroke'].forEach((k, i) => {\n temp = style[k];\n if(temp !== undefined) {\n k = i ? STROKE : FILL;\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[k] = temp.map(item => {\n if(!item) {\n return { v: 'none', u: STRING };\n }\n else if(isGradient(item)) {\n return { v: gradient.parseGradient(item), u: GRADIENT };\n }\n else {\n return { v: rgba2int(item), u: RGBA };\n }\n });\n }\n });\n temp = style.strokeWidth;\n if(temp !== undefined) {\n if(!Array.isArray(temp)) {\n temp = [temp];\n }\n res[STROKE_WIDTH] = temp.map(item => {\n let v = calUnit(item);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n v.v = Math.max(v.v, 0);\n return v;\n });\n }\n temp = style.strokeDasharray;\n if(temp !== undefined) {\n if(Array.isArray(temp)) {\n res[STROKE_DASHARRAY] = temp.map(item => {\n let match = (item || '').toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n return match;\n }\n return [];\n });\n }\n else {\n let match = (temp || '').toString().match(/[\\d.]+/g);\n if(match) {\n match = match.map(item => parseFloat(item));\n if(match.length % 2 === 1) {\n match.push(match[match.length - 1]);\n }\n res[STROKE_DASHARRAY] = [match];\n }\n else {\n res[STROKE_DASHARRAY] = [[]];\n }\n }\n }\n // filter支持数组形式\n temp = style.filter;\n if(temp !== undefined) {\n let f = [];\n // 先替换掉rgba为#RGBA格式,然后分割\n let arr;\n if(Array.isArray(temp)) {\n arr = temp.map(item => {\n return (replaceRgba2Hex(item) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\n });\n }\n else {\n arr = (replaceRgba2Hex(temp) || '').match(/[\\w-]+\\s*\\(.+?\\)/ig);\n }\n if(arr) {\n arr.forEach(item => {\n let match = /([\\w-]+)\\s*\\((\\s*.+\\s*)\\)/i.exec(item);\n if(match) {\n let k = match[1].toLowerCase(), v = match[2];\n if(k === 'drop-shadow' || k === 'dropshadow') {\n let coords = /([-+]?[\\d.]+[pxremvwhina%]*)[\\s,]+([-+]?[\\d.]+[pxremvwhina%]*)[\\s,]+(?:([-+]?[\\d.]+[pxremvwhina%]*)[\\s,])?([-+]?[\\d.]+[pxremvwhina%]*\\s*)?/ig.exec(item);\n if(coords) {\n let res = [];\n // v,h,blur,spread,其中v和h是必须,其余没有为0\n for(let i = 1; i <= 4; i++) {\n let item2 = coords[i];\n if(item2) {\n let v = calUnit(item2);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v.v < 0) {\n v.v = 0;\n }\n res.push(v);\n }\n else {\n res.push({ v: 0, u: PX });\n }\n }\n let color = /#[a-f\\d]{3,8}/i.exec(item);\n if(color) {\n res.push(rgba2int(color[0]));\n }\n else {\n res.push([0, 0, 0, 1]);\n }\n f.push({ k: 'dropShadow', v: res });\n }\n }\n else {\n let m2 = /([-+]?[\\d.]+\\s*[pxremvwhdg%]*)/i.exec(v);\n if(m2) {\n let v = calUnit(m2[0]);\n if(k === 'blur') {\n if([DEG, PERCENT].indexOf(v.u) > -1) {\n return;\n }\n if(v.u === NUMBER) {\n v.u = PX;\n }\n v.v = Math.max(v.v, 0);\n f.push({ k, v });\n }\n else if(k === 'hue-rotate' || k === 'huerotate') {\n if([NUMBER, DEG].indexOf(v.u) === -1) {\n return;\n }\n v.u = DEG;\n f.push({ k:'hueRotate', v });\n }\n else if(k === 'saturate' || k === 'brightness' || k === 'grayscale' || k === 'contrast' || k === 'sepia' || k === 'invert') {\n if([NUMBER, PERCENT].indexOf(v.u) === -1) {\n return;\n }\n v.v = Math.max(v.v, 0);\n v.u = PERCENT;\n f.push({ k, v });\n }\n }\n }\n }\n });\n }\n res[FILTER] = f;\n }\n temp = style.visibility;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[VISIBILITY] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.visibility;\n if(/hidden/i.test(temp)) {\n v = 'hidden';\n }\n res[VISIBILITY] = { v, u: STRING };\n }\n }\n temp = style.pointerEvents;\n if(temp !== undefined) {\n if(temp === null || /inherit/i.test(temp)) {\n res[POINTER_EVENTS] = { u: INHERIT };\n }\n else {\n let v = reset.INHERIT.pointerEvents;\n if(/none/i.test(temp)) {\n v = 'none';\n }\n res[POINTER_EVENTS] = { v, u: STRING };\n }\n }\n temp = style.boxShadow;\n if(temp !== undefined) {\n let bs = [];\n // 先替换掉rgba为#RGBA格式,然后按逗号分割\n let arr = (replaceRgba2Hex(temp) || '').split(',');\n if(arr) {\n arr.forEach(item => {\n let coords = /([-+]?[\\d.]+[pxremvwhina%]*)\\s*([-+]?[\\d.]+[pxremvwhina%]*)\\s*([-+]?[\\d.]+[pxremvwhina%]*\\s*)?([-+]?[\\d.]+[pxremvwhina%]*\\s*)?/i.exec(item);\n if(coords) {\n let res = [];\n // v,h,blur,spread,其中v和h是必须,其余没有为0\n for(let i = 1; i <= 4; i++) {\n let item2 = coords[i];\n if(item2) {\n let v = calUnit(item2);\n if([NUMBER, DEG].indexOf(v.u) > -1) {\n v.u = PX;\n }\n // x/y可以负,blur和spread不行\n if(i > 2 && v.v < 0) {\n v.v = 0;\n }\n res.push(v);\n }\n else {\n res.push({ v: 0, u: PX });\n }\n }\n let color = /#[a-f\\d]{3,8}/i.exec(item);\n if(color) {\n res.push(rgba2int(color[0]));\n }\n else {\n res.push([0, 0, 0, 1]);\n }\n res.push(/inset/i.test(item) ? 'inset' : 'outset');\n bs.push(res);\n }\n });\n }\n res[BOX_SHADOW] = bs;\n }\n // 直接赋值的string类型\n [\n 'position',\n 'display',\n 'boxSizing',\n 'flexDirection',\n 'flexWrap',\n 'justifyContent',\n 'alignItems',\n 'alignSelf',\n 'alignContent',\n 'overflow',\n 'mixBlendMode',\n 'borderTopStyle',\n 'borderRightStyle',\n 'borderBottomStyle',\n 'borderLeftStyle',\n 'backgroundClip',\n 'textOverflow',\n 'transformStyle',\n 'backfaceVisibility',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = convertStringValue(k, style[k]);\n }\n });\n // 直接赋值的number类型\n [\n 'flexGrow',\n 'flexShrink',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[STYLE_KEY[style2Upper(k)]] = Math.max(parseFloat(style[k]) || 0, 0);\n }\n });\n temp = style.zIndex;\n if(temp !== undefined) {\n res[Z_INDEX] = parseFloat(temp) || 0;\n }\n // 这些支持多个的用数组表示\n [\n 'backgroundRepeat',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'fillRule',\n ].forEach(k => {\n if(style.hasOwnProperty(k)) {\n let v = style[k];\n if(!Array.isArray(v)) {\n v = [v];\n }\n if(k === 'backgroundRepeat') {\n v.forEach((item, i) => {\n if(item) {\n v[i] = camel(item);\n }\n });\n }\n res[STYLE_KEY[style2Upper(k)]] = v;\n }\n });\n GEOM_KEY_SET.forEach(k => {\n if(style.hasOwnProperty(k)) {\n res[k] = style[k];\n }\n });\n return res;\n}\n\nfunction setFontStyle(style, specialFontSize) {\n let fontSize = specialFontSize || style[FONT_SIZE] || 0;\n let fontFamily = style[FONT_FAMILY] || inject.defaultFontFamily || 'arial';\n if(/\\s/.test(fontFamily)) {\n fontFamily = '\"' + fontFamily.replace(/\"/g, '\\\\\"') + '\"';\n }\n return (style[FONT_STYLE] || 'normal') + ' ' + (style[FONT_WEIGHT] || '400') + ' '\n + fontSize + 'px/' + fontSize + 'px ' + fontFamily;\n}\n\n/**\n * https://zhuanlan.zhihu.com/p/25808995\n * 根据字形信息计算baseline的正确值,差值上下均分\n * @param style computedStyle\n * @returns {number}\n */\nfunction getBaseline(style) {\n let fontSize = style[FONT_SIZE];\n let ff = calFontFamily(style[FONT_FAMILY]);\n let normal = calNormalLineHeight(style, ff);\n return (style[LINE_HEIGHT] - normal) * 0.5 + fontSize * (font.info[ff] || font.info[inject.defaultFontFamily] || font.info.arial).blr;\n}\n\n// 垂直排版的baseline和水平类似,只是原点坐标系不同,删除加本身高度变为加gap高度\nfunction getVerticalBaseline(style) {\n return style[LINE_HEIGHT] - getBaseline(style);\n}\n\nfunction calNormalLineHeight(style, ff) {\n if(!ff) {\n ff = calFontFamily(style[FONT_FAMILY]);\n }\n return style[FONT_SIZE] * (font.info[ff] || font.info[inject.defaultFontFamily] || font.info.arial).lhr;\n}\n\nfunction calFontFamily(fontFamily) {\n let ff = fontFamily.split(/\\s*,\\s*/);\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(font.hasLoaded(item) || inject.checkSupportFontFamily(item)) {\n return item;\n }\n }\n return inject.defaultFontFamily;\n}\n\nfunction calRelativePercent(n, parent, k) {\n n *= 0.01;\n while(parent) {\n let style = parent.currentStyle[k];\n if(style.u === AUTO) {\n if(k === WIDTH) {\n parent = parent.domParent;\n }\n else {\n break;\n }\n }\n else if(style.u === PX) {\n return n * style.v;\n }\n else if(style.u === PERCENT) {\n n *= style.v * 0.01;\n parent = parent.domParent;\n }\n else if(style.u === REM) {\n return n * style.v * parent.root.computedStyle[FONT_SIZE];\n }\n else if(style.u === VW) {\n return n * style.v * parent.root.width * 0.01;\n }\n else if(style.u === VH) {\n return n * style.v * parent.root.height * 0.01;\n }\n else if(style.u === VMAX) {\n return n * style.v * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(style.u === VMIN) {\n return n * style.v * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n }\n return n;\n}\n\nfunction calRelative(currentStyle, k, v, parent, isWidth) {\n if(v.u === AUTO) {\n v = 0;\n }\n else if([PX, NUMBER].indexOf(v.u) > -1) {\n v = v.v;\n }\n else if(v.u === PERCENT) {\n if(isWidth) {\n v = calRelativePercent(v.v, parent, WIDTH);\n }\n else {\n v = calRelativePercent(v.v, parent, HEIGHT);\n }\n }\n else if(v.u === REM) {\n v = v.v * parent.root.computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n v = v.v * parent.root.width * 0.01;\n }\n else if(v.u === VH) {\n v = v.v * parent.root.height * 0.01;\n }\n else if(v.u === VMAX) {\n v = v.v * Math.max(parent.root.width, parent.root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n v = v.v * Math.min(parent.root.width, parent.root.height) * 0.01;\n }\n return v;\n}\n\nfunction isRelativeOrAbsolute(node) {\n let position = node.currentStyle[POSITION];\n return position === 'relative' || position === 'absolute';\n}\n\nfunction equalStyle(k, a, b, target) {\n if(!a || !b) {\n return a === b;\n }\n if(k === TRANSFORM) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa.k !== ob.k) {\n return false;\n }\n let av = oa.v, bv = ob.v;\n if(oa.k === MATRIX) {\n if(!equalArr(av, bv)) {\n return false;\n }\n }\n else if(av.u !== bv.u || av.v !== bv.v) {\n return false;\n }\n }\n return true;\n }\n if(k === ROTATE_3D) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3].v === b[3].v && a[3].u === b[3].u;\n }\n if(k === FILTER) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let oa = a[i];\n let ob = b[i];\n if(oa.k !== ob.k) {\n return false;\n }\n let av = oa.v, bv = ob.v;\n if(oa.k === 'dropShadow' || oa.k === 'drop-shadow') {\n if(av.length !== bv.length) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n let avj = av[j], bvj = bv[j];\n if(avj.u !== bvj.u || avj.v !== bvj.v) {\n return false;\n }\n }\n }\n else if(av.u !== bv.u || av.v !== bv.v) {\n return false;\n }\n }\n return true;\n }\n if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n return a[0].v === b[0].v && a[0].u === b[0].u\n && a[1].v === b[1].v && a[1].u === b[1].u;\n }\n if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa.v !== bb.v || aa.u !== bb.u || aa.v !== bb.v || aa.u !== bb.u) {\n return false;\n }\n }\n return true;\n }\n if(k === BOX_SHADOW) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if((!aa || !bb) && aa !== bb) {\n return false;\n }\n for(let j = 0; j < 4; j++) {\n if(aa[j].v !== bb[j].v || aa[j].u !== bb[j].u) {\n return false;\n }\n }\n for(let j = 0; j < 4; j++) {\n if(aa[4][j] !== bb[4][j]) {\n return false;\n }\n }\n if(aa[5] !== bb[5]) {\n return false;\n }\n }\n return true;\n }\n if(k === BACKGROUND_SIZE || k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let aa = a[i], bb = b[i];\n if(aa[0].v !== bb[0].v || aa[0].u !== bb[0].u || aa[1].v !== bb[1].v || aa[1].u !== bb[1].u) {\n return false;\n }\n }\n return true;\n }\n // if(k === OPACITY || k === Z_INDEX) {} 原始数字无需判断\n if(isLengthKey(k) || isExpandKey(k)) {\n return a.v === b.v && a.u === b.u;\n }\n if(isGradientKey(k)) {\n if(a.length !== b.length) {\n return false;\n }\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i], bi = b[i];\n if(ai.u !== bi.u) {\n return false;\n }\n let av = ai.v, bv = bi.v;\n if(ai.u === GRADIENT) {\n if(av.k !== bv.k || av.d !== bv.d || av.s !== bv.s || av.z !== bv.z) {\n return false;\n }\n if(av.k === 'linear') {\n let ad = av.d, bd = bv.d;\n let isArrayD1 = Array.isArray(ad);\n let isArrayD2 = Array.isArray(bd);\n if(isArrayD1 !== isArrayD2) {\n return false;\n }\n if(isArrayD1) {\n if(ad[0] !== bd[0] || ad[1] !== bd[1] || ad[2] !== bd[2] || ad[3] !== bd[3]) {\n return false;\n }\n }\n else if(ad !== bd) {\n return false;\n }\n }\n else if(av.k === 'conic' && av.d !== bv.d) {\n return false;\n }\n if(av.k === 'radial' || av.k === 'conic') {\n let ap = av.p, bp = bv.p;\n if(ap[0].u !== bp[0].u || ap[0].v !== bp[0].v || ap[1].u !== bp[1].u || ap[1].v !== bp[1].v) {\n return false;\n }\n }\n for(let j = 0; j < 2; j++) {\n let aj = av.v[j], bj = bv.v[j];\n let ac = aj[0], bc = bj[0];\n if(ac[0] !== bc[0] || ac[1] !== bc[1] || ac[2] !== bc[2] || ac[3] !== bc[3]) {\n return false;\n }\n if(aj[1] && bj[1]) {\n if(aj[1].u !== bj[1].u || aj[1].v !== bj[1].v) {\n return false;\n }\n }\n else if(aj[1] || bj[1]) {\n return false;\n }\n }\n }\n else if(ai.u === RGBA) {\n if(!equalArr(av, bv)) {\n return false;\n }\n }\n else if(av !== bv) {\n return false;\n }\n }\n return true;\n }\n if(isColorKey(k)) {\n if(a.u !== b.u) {\n return false;\n }\n if(a.u === GRADIENT) {\n return equal(a.v, b.v);\n }\n else if(a.u === INHERIT) {\n return true;\n }\n else if(a.u === RGBA) {\n return equalArr(a.v, b.v);\n }\n }\n // multi都是纯值数组,equalArr本身即递归,非multi根据类型判断\n if(isGeom(target.tagName, k) && (target.isMulti || Array.isArray(a) && Array.isArray(b))) {\n return equal(a, b);\n }\n return a === b;\n}\n\nfunction cloneStyle(style, keys) {\n if(!keys) {\n keys = Object.keys(style).map(i => {\n if(!GEOM.hasOwnProperty(i)) {\n i = parseInt(i);\n }\n return i;\n });\n }\n let res = {};\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let v = style[k];\n if(k === TRANSFORM) {\n if(v) {\n let len = v.length;\n let n = new Array(len);\n for(let i = 0; i < len; i++) {\n let o = v[i];\n if(o.k === MATRIX) {\n n[i] = {\n k: o.k,\n v: o.v.slice(0),\n };\n }\n else {\n n[i] = {\n k: o.k,\n v: {\n v: o.v.v,\n u: o.v.u,\n },\n };\n }\n }\n res[k] = n;\n }\n }\n else if(k === ROTATE_3D) {\n res[k] = [v[0], v[1], v[2], { v: v[3].v, u: v[3].u }];\n }\n else if(k === FILTER) {\n if(v) {\n let len = v.length;\n let n = new Array(len);\n for(let i = 0; i < len; i++) {\n let o = v[i];\n let k = o.k, vv = o.v;\n if(k === 'dropShadow') {\n let arr = new Array(5);\n n[i] = { k, v: arr };\n for(let j = 0; j < 4; j++) {\n let temp = vv[j];\n arr[j] = { v: temp.v, u: temp.u };\n }\n arr[4] = vv[4].slice(0);\n }\n else {\n n[i] = {k, v: { v: vv.v, u: vv.u }};\n }\n }\n res[k] = n;\n }\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n if(v) {\n let n = new Array(2);\n for(let i = 0; i < 2; i++) {\n let o = v[i];\n n[i] = { v: o.v, u: o.u };\n }\n res[k] = n;\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y || k === STROKE_WIDTH) {\n res[k] = v.map(item => ({ v: item.v, u: item.u }));\n }\n else if(k === BOX_SHADOW) {\n if(v) {\n v = v.map(item => {\n let n = new Array(6);\n for(let i = 0; i < 4; i++) {\n let o = item[i];\n n[i] = { v: o.v, u: o.u }; // x/y/blur/spread\n }\n n[4] = item[4].slice(0); //rgba\n n[5] = item[5]; // outset/inset\n return n;\n });\n res[k] = v;\n }\n }\n else if(k === BACKGROUND_SIZE) {\n if(v) {\n res[k] = v.map(item => {\n return [\n { v: item[0].v, u: item[0].u },\n { v: item[1].v, u: item[1].u },\n ];\n });\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n res[k] = v;\n }\n else if(k === TRANSLATE_PATH) {\n if(v) {\n res[k] = v.map(item => ({\n v: item.v,\n u: item.u,\n }));\n }\n }\n else if(isLengthKey(k) || isExpandKey(k)) {\n res[k] = { v: v.v, u: v.u };\n }\n // 渐变特殊处理\n else if(isGradientKey(k)) {\n res[k] = v.map(item => {\n if(!item) {\n return null;\n }\n if(item.u === GRADIENT) {\n return { v: util.clone(item.v), u: GRADIENT };\n }\n // 颜色\n else if(item.u === RGBA) {\n return { v: item.v.slice(0), u: RGBA };\n }\n // string和none\n else {\n return { v: item.v, u: item.u };\n }\n });\n }\n else if(isColorKey(k)) {\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n if(v.u === GRADIENT) {\n res[k] = { v: util.clone(v.v), u: GRADIENT };\n }\n else if(v.u === RGBA) {\n res[k] = { v: v.v.slice(0), u: RGBA };\n }\n // inherit\n else {\n res[k] = { u: INHERIT };\n }\n }\n // geom自定义属性\n else if(GEOM.hasOwnProperty(k)) {\n res[k] = util.clone(v);\n }\n // position等直接值类型赋值\n else {\n res[k] = v;\n }\n }\n return res;\n}\n\nfunction spreadBoxShadow(bbox, boxShadow) {\n let [x1, y1, x2, y2] = bbox;\n if(Array.isArray(boxShadow)) {\n let xl = 0, yt = 0, xr = 0, yb = 0;\n boxShadow.forEach(item => {\n let [x, y, sigma, spread, color, inset] = item;\n if(inset !== 'inset' && color[3] > 0) {\n let d = blur.outerSize(sigma);\n d += spread;\n xl = Math.min(xl, x - d);\n yt = Math.min(yt, x - d);\n xr = Math.max(xr, x + d);\n yb = Math.max(yb, y + d);\n }\n });\n x1 += xl;\n y1 += yt;\n x2 += xr;\n y2 += yb;\n }\n return [x1, y1, x2, y2];\n}\n\nfunction spreadFilter(bbox, filter) {\n let [x1, y1, x2, y2] = bbox;\n // filter对整体有影响,且filter子项可以先后多次重复出现,上面计算完后,依次处理\n if(Array.isArray(filter)) {\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let d = blur.kernelSize(v);\n let spread = blur.outerSizeByD(d);\n if(spread) {\n x1 -= spread;\n y1 -= spread;\n x2 += spread;\n y2 += spread;\n }\n }\n else if(k === 'dropShadow') {\n let d = blur.kernelSize(v[2]);\n let spread = blur.outerSizeByD(d);\n // x/y/blur,3个一起影响,要考虑正负号,spread一定为非负\n if(v[0] || v[1] || spread) {\n if(v[0] <= 0 || v[0] > 0 && v[0] < spread) {\n x1 += v[0] - spread;\n }\n if(v[1] <= 0 || v[1] > 0 && v[1] < spread) {\n y1 += v[1] - spread;\n }\n if(v[0] < 0 && -v[0] < spread || v[0] >= 0) {\n x2 += v[0] + spread;\n }\n if(v[1] < 0 && -v[1] < spread || v[1] >= 0) {\n y2 += v[1] + spread;\n }\n }\n }\n });\n }\n return [x1, y1, x2, y2];\n}\n\nexport default {\n normalize,\n setFontStyle,\n getBaseline,\n getVerticalBaseline,\n calRelative,\n equalStyle,\n isRelativeOrAbsolute,\n cloneStyle,\n calNormalLineHeight,\n calFontFamily,\n spreadBoxShadow,\n spreadFilter,\n};\n","import unit from '../style/unit';\nimport enums from '../util/enums';\nimport matrix from '../math/matrix';\nimport geom from '../math/geom';\n\nconst { STYLE_KEY: {\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n SKEW_X,\n SKEW_Y,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n ROTATE_3D,\n PERSPECTIVE,\n MATRIX,\n FONT_SIZE,\n}} = enums;\nconst { PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { identity, multiply, multiplyTfo, tfoMultiply, isE,\n multiplyTranslateX, multiplyTranslateY, multiplyTranslateZ,\n multiplyRotateX, multiplyRotateY, multiplyRotateZ,\n multiplySkewX, multiplySkewY, multiplyPerspective,\n multiplyScaleX, multiplyScaleY, multiplyScaleZ } = matrix;\nconst { d2r } = geom;\n\nfunction calRotateX(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[5] = t[10] = cos;\n t[6] = sin;\n t[9] = -sin;\n return t;\n}\n\nfunction calRotateY(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[10] = cos;\n t[8] = sin;\n t[2] = -sin;\n return t;\n}\n\nfunction calRotateZ(t, v) {\n v = d2r(v);\n let sin = Math.sin(v);\n let cos = Math.cos(v);\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\nfunction calRotate3d(t, v) {\n let [x, y, z, r] = v;\n r = d2r(r);\n let s = Math.sin(r);\n let c = Math.cos(r);\n if(x && !y && !z) {\n if(x < 0) {\n s = -s;\n }\n t[5] = c;\n t[9] = -s;\n t[6] = s;\n t[10] = c;\n }\n else if(y && !x && !z) {\n if(y < 0) {\n s = -s;\n }\n t[0] = c;\n t[8] = s;\n t[2] = -s;\n t[10] = c;\n }\n else if(z && !x && !y) {\n if(z < 0) {\n s = -s;\n }\n t[0] = c;\n t[4] = -s;\n t[1] = s;\n t[5] = c;\n }\n else {\n let len = Math.sqrt(x * x + y * y + z * z);\n if(len !== 1) {\n let rlen = 1 / len;\n x *= rlen;\n y *= rlen;\n z *= rlen;\n }\n let nc = 1 - c;\n let xy = x * y;\n let yz = y * z;\n let zx = z * x;\n let xs = x * s;\n let ys = y * s;\n let zs = z * s;\n\n t[0] = x * x * nc + c;\n t[1] = xy * nc + zs;\n t[2] = zx * nc - ys;\n t[3] = 0;\n\n t[4] = xy * nc - zs;\n t[5] = y * y * nc + c;\n t[6] = yz * nc + xs;\n t[7] = 0;\n\n t[8] = zx * nc + ys;\n t[9] = yz * nc - xs;\n t[10] = z * z * nc + c;\n t[11] = 0;\n\n t[12] = 0;\n t[13] = 0;\n t[14] = 0;\n t[15] = 1;\n }\n return t;\n}\n\nfunction calMatrix(transform, ow, oh, root) {\n let m = identity();\n for(let i = 0, len = transform.length; i < len; i++) {\n let item = transform[i];\n let k = item.k;\n let v = calSingleValue(k, item.v, ow, oh, root);\n if(k === TRANSLATE_X) {\n m = multiplyTranslateX(m, v);\n }\n else if(k === TRANSLATE_Y) {\n m = multiplyTranslateY(m, v);\n }\n else if(k === TRANSLATE_Z) {\n m = multiplyTranslateZ(m, v);\n }\n else if(k === ROTATE_X) {\n m = multiplyRotateX(m, d2r(v));\n }\n else if(k === ROTATE_Y) {\n m = multiplyRotateY(m, d2r(v));\n }\n else if(k === ROTATE_Z) {\n m = multiplyRotateZ(m, d2r(v));\n }\n else if(k === SKEW_X) {\n m = multiplySkewX(m, d2r(v));\n }\n else if(k === SKEW_Y) {\n m = multiplySkewY(m, d2r(v));\n }\n else if(k === SCALE_X) {\n m = multiplyScaleX(m, v);\n }\n else if(k === SCALE_Y) {\n m = multiplyScaleY(m, v);\n }\n else if(k === SCALE_Z) {\n m = multiplyScaleZ(m, v);\n }\n // 这种写法要求ppt必须在开头\n else if(k === PERSPECTIVE && !i) {\n m = multiplyPerspective(m, v);\n }\n else if(k === ROTATE_3D) {\n let t = identity();\n calRotate3d(t, [v[0], v[1], v[2], v[3].v]);\n m = multiply(m, t);\n }\n else if(k === MATRIX) {\n m = multiply(m, v);\n }\n }\n return m;\n}\n\n// 已有计算好的变换矩阵,根据tfo原点计算最终的matrix\nfunction calMatrixByOrigin(m, ox, oy) {\n let res = m.slice(0);\n if(ox === 0 && oy === 0 || isE(m)) {\n return res;\n }\n res = tfoMultiply(ox, oy, res);\n res = multiplyTfo(res, -ox, -oy);\n return res;\n}\n\n// img缩放svg下专用,无rem\nfunction calMatrixWithOrigin(transform, ox, oy, ow, oh) {\n let m = calMatrix(transform, ow, oh);\n return calMatrixByOrigin(m, ox, oy);\n}\n\nfunction calSingleValue(k, v, ow, oh, root) {\n if(k === TRANSLATE_X || k === TRANSLATE_Y || k === TRANSLATE_Z) {\n if(v.u === PX) {\n return v.v;\n }\n else if(v.u === PERCENT) {\n return v.v * (k === TRANSLATE_Y ? oh : ow) * 0.01;\n }\n else if(v.u === REM) {\n return v.v * root.__computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n return v.v * root.width * 0.01;\n }\n else if(v.u === VH) {\n return v.v * root.height * 0.01;\n }\n else if(v.u === VMAX) {\n return v.v * Math.max(root.width, root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n return v.v * Math.min(root.width, root.height) * 0.01;\n }\n }\n else if(k === MATRIX) {\n return v;\n }\n else if(k === ROTATE_3D) {\n return v;\n }\n return v.v;\n}\n\nfunction calPerspectiveMatrix(ppt, ox, oy) {\n if(ppt && ppt > 0) {\n let res = identity();\n ppt = Math.max(ppt, 1);\n res[11] = -1 / ppt;\n if(ox || oy) {\n res = tfoMultiply(ox, oy, res);\n res = multiplyTfo(res, -ox, -oy);\n }\n return res;\n }\n}\n\n// 是否有透视矩阵应用\nfunction isPerspectiveMatrix(m) {\n if(!m) {\n return;\n }\n return !!m[11];\n}\n\nexport default {\n calSingleValue,\n calMatrix,\n calRotateX,\n calRotateY,\n calRotateZ,\n calRotate3d,\n calPerspectiveMatrix,\n calMatrixByOrigin,\n calMatrixWithOrigin,\n isPerspectiveMatrix,\n};\n","import mode from '../refresh/mode';\nimport css from '../style/css';\nimport transform from '../style/transform';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport unit from '../style/unit';\nimport mx from '../math/matrix';\n\nconst { STYLE_KEY: {\n COLOR,\n FONT_WEIGHT,\n FONT_FAMILY,\n FONT_SIZE,\n FONT_STYLE,\n LETTER_SPACING,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n ROTATE_Z,\n LINE_HEIGHT,\n} } = enums;\nconst { DEG } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst TuOrU = /[\\u{00A7}\\u{00A9}\\u{00AE}\\u{00B1}\\u{00BC}-\\u{00BE}\\u{00D7}\\u{00F7}\\u{02EA}-\\u{02EB}\\u{1100}-\\u{11FF}\\u{1401}-\\u{166C}\\u{166D}\\u{166E}\\u{166F}-\\u{167F}\\u{18B0}-\\u{18F5}\\u{18F6}-\\u{18FF}\\u{2016}\\u{2020}-\\u{2021}\\u{2030}-\\u{2031}\\u{203B}-\\u{203C}\\u{2042}\\u{2047}-\\u{2049}\\u{2051}\\u{2065}\\u{20DD}-\\u{20E0}\\u{20E2}-\\u{20E4}\\u{2100}-\\u{2101}\\u{2103}-\\u{2106}\\u{2107}\\u{2108}-\\u{2109}\\u{210F}\\u{2113}\\u{2114}\\u{2116}-\\u{2117}\\u{211E}-\\u{2123}\\u{2125}\\u{2127}\\u{2129}\\u{212E}\\u{2135}-\\u{2138}\\u{2139}\\u{213A}-\\u{213B}\\u{213C}-\\u{213F}\\u{2145}-\\u{2149}\\u{214A}\\u{214C}-\\u{214D}\\u{214F}\\u{2150}-\\u{215F}\\u{2160}-\\u{2182}\\u{2183}-\\u{2184}\\u{2185}-\\u{2188}\\u{2189}\\u{218C}-\\u{218F}\\u{221E}\\u{2234}-\\u{2235}\\u{2300}-\\u{2307}\\u{230C}-\\u{231F}\\u{2324}-\\u{2328}\\u{232B}\\u{237D}-\\u{239A}\\u{23BE}-\\u{23CD}\\u{23CF}\\u{23D1}-\\u{23DB}\\u{23E2}-\\u{23FF}\\u{2400}-\\u{2422}\\u{2424}-\\u{2426}\\u{2427}-\\u{243F}\\u{2440}-\\u{244A}\\u{244B}-\\u{245F}\\u{2460}-\\u{249B}\\u{249C}-\\u{24E9}\\u{24EA}-\\u{24FF}\\u{25A0}-\\u{25B6}\\u{25B7}\\u{25B8}-\\u{25C0}\\u{25C1}\\u{25C2}-\\u{25F7}\\u{25F8}-\\u{25FF}\\u{2600}-\\u{2619}\\u{2620}-\\u{266E}\\u{266F}\\u{2670}-\\u{26FF}\\u{2700}-\\u{2767}\\u{2776}-\\u{2793}\\u{2B12}-\\u{2B2F}\\u{2B50}-\\u{2B59}\\u{2B97}\\u{2BB8}-\\u{2BD1}\\u{2BD3}-\\u{2BEB}\\u{2BF0}-\\u{2BFF}\\u{2E50}-\\u{2E51}\\u{2E80}-\\u{2E99}\\u{2E9A}\\u{2E9B}-\\u{2EF3}\\u{2EF4}-\\u{2EFF}\\u{2F00}-\\u{2FD5}\\u{2FD6}-\\u{2FDF}\\u{2FE0}-\\u{2FEF}\\u{2FF0}-\\u{2FFB}\\u{2FFC}-\\u{2FFF}\\u{3000}\\u{3003}\\u{3004}\\u{3005}\\u{3006}\\u{3007}\\u{3012}-\\u{3013}\\u{3020}\\u{3021}-\\u{3029}\\u{302A}-\\u{302D}\\u{302E}-\\u{302F}\\u{3031}-\\u{3035}\\u{3036}-\\u{3037}\\u{3038}-\\u{303A}\\u{303B}\\u{303C}\\u{303D}\\u{303E}-\\u{303F}\\u{3040}\\u{3042}\\u{3044}\\u{3046}\\u{3048}\\u{304A}-\\u{3062}\\u{3064}-\\u{3082}\\u{3084}\\u{3086}\\u{3088}-\\u{308D}\\u{308F}-\\u{3094}\\u{3097}-\\u{3098}\\u{3099}-\\u{309A}\\u{309D}-\\u{309E}\\u{309F}\\u{30A2}\\u{30A4}\\u{30A6}\\u{30A8}\\u{30AA}-\\u{30C2}\\u{30C4}-\\u{30E2}\\u{30E4}\\u{30E6}\\u{30E8}-\\u{30ED}\\u{30EF}-\\u{30F4}\\u{30F7}-\\u{30FA}\\u{30FB}\\u{30FD}-\\u{30FE}\\u{30FF}\\u{3100}-\\u{3104}\\u{3105}-\\u{3126}\\u{3128}-\\u{312F}\\u{3130}\\u{3131}-\\u{318E}\\u{318F}\\u{3190}-\\u{3191}\\u{3192}-\\u{3195}\\u{3196}-\\u{319F}\\u{31A0}-\\u{31BF}\\u{31C0}-\\u{31E3}\\u{31E4}-\\u{31EF}\\u{3200}-\\u{321E}\\u{321F}\\u{3220}-\\u{3229}\\u{322A}-\\u{3247}\\u{3248}-\\u{324F}\\u{3250}\\u{3251}-\\u{325F}\\u{3260}-\\u{327F}\\u{3280}-\\u{3289}\\u{328A}-\\u{32B0}\\u{32B1}-\\u{32BF}\\u{32C0}-\\u{32FE}\\u{3358}-\\u{337A}\\u{3380}-\\u{33FF}\\u{3400}-\\u{4DBF}\\u{4DC0}-\\u{4DFF}\\u{4E00}-\\u{9FFF}\\u{A000}-\\u{A014}\\u{A015}\\u{A016}-\\u{A48C}\\u{A48D}-\\u{A48F}\\u{A490}-\\u{A4C6}\\u{A4C7}-\\u{A4CF}\\u{A960}-\\u{A97C}\\u{A97D}-\\u{A97F}\\u{AC00}-\\u{D7A3}\\u{D7A4}-\\u{D7AF}\\u{D7B0}-\\u{D7C6}\\u{D7C7}-\\u{D7CA}\\u{D7CB}-\\u{D7FB}\\u{D7FC}-\\u{D7FF}\\u{E000}-\\u{F8FF}\\u{F900}-\\u{FA6D}\\u{FA6E}-\\u{FA6F}\\u{FA70}-\\u{FAD9}\\u{FADA}-\\u{FAFF}\\u{FE10}-\\u{FE16}\\u{FE17}\\u{FE18}\\u{FE19}\\u{FE1A}-\\u{FE1F}\\u{FE30}\\u{FE31}-\\u{FE32}\\u{FE33}-\\u{FE34}\\u{FE35}\\u{FE36}\\u{FE37}\\u{FE38}\\u{FE39}\\u{FE3A}\\u{FE3B}\\u{FE3C}\\u{FE3D}\\u{FE3E}\\u{FE3F}\\u{FE40}\\u{FE41}\\u{FE42}\\u{FE43}\\u{FE44}\\u{FE45}-\\u{FE46}\\u{FE47}\\u{FE48}\\u{FE53}\\u{FE54}-\\u{FE57}\\u{FE5F}-\\u{FE61}\\u{FE62}\\u{FE67}\\u{FE68}\\u{FE69}\\u{FE6A}-\\u{FE6B}\\u{FE6C}-\\u{FE6F}\\u{FF02}-\\u{FF03}\\u{FF04}\\u{FF05}-\\u{FF07}\\u{FF0A}\\u{FF0B}\\u{FF0F}\\u{FF10}-\\u{FF19}\\u{FF20}\\u{FF21}-\\u{FF3A}\\u{FF3C}\\u{FF3E}\\u{FF40}\\u{FF41}-\\u{FF5A}\\u{FFE0}-\\u{FFE1}\\u{FFE2}\\u{FFE4}\\u{FFE5}-\\u{FFE6}\\u{FFE7}\\u{FFF0}-\\u{FFF8}\\u{FFFC}-\\u{FFFD}\\u{10980}-\\u{1099F}\\u{11580}-\\u{115AE}\\u{115AF}-\\u{115B1}\\u{115B2}-\\u{115B5}\\u{115B6}-\\u{115B7}\\u{115B8}-\\u{115BB}\\u{115BC}-\\u{115BD}\\u{115BE}\\u{115BF}-\\u{115C0}\\u{115C1}-\\u{115D7}\\u{115D8}-\\u{115DB}\\u{115DC}-\\u{115DD}\\u{115DE}-\\u{115FF}\\u{11A00}\\u{11A01}-\\u{11A0A}\\u{11A0B}-\\u{11A32}\\u{11A33}-\\u{11A38}\\u{11A39}\\u{11A3A}\\u{11A3B}-\\u{11A3E}\\u{11A3F}-\\u{11A46}\\u{11A47}\\u{11A48}-\\u{11A4F}\\u{11A50}\\u{11A51}-\\u{11A56}\\u{11A57}-\\u{11A58}\\u{11A59}-\\u{11A5B}\\u{11A5C}-\\u{11A89}\\u{11A8A}-\\u{11A96}\\u{11A97}\\u{11A98}-\\u{11A99}\\u{11A9A}-\\u{11A9C}\\u{11A9D}\\u{11A9E}-\\u{11AA2}\\u{11AA3}-\\u{11AAF}\\u{11AB0}-\\u{11ABF}\\u{13000}-\\u{1342F}\\u{13430}-\\u{1343F}\\u{13440}\\u{13441}-\\u{13446}\\u{13447}-\\u{13455}\\u{13456}-\\u{1345F}\\u{14400}-\\u{14646}\\u{14647}-\\u{1467F}\\u{16FE0}-\\u{16FE1}\\u{16FE2}\\u{16FE3}\\u{16FE4}\\u{16FE5}-\\u{16FEF}\\u{16FF0}-\\u{16FF1}\\u{16FF2}-\\u{16FFF}\\u{17000}-\\u{187F7}\\u{187F8}-\\u{187FF}\\u{18800}-\\u{18AFF}\\u{18B00}-\\u{18CD5}\\u{18CD6}-\\u{18CFF}\\u{18D00}-\\u{18D08}\\u{18D09}-\\u{18D7F}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF4}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFC}\\u{1AFFD}-\\u{1AFFE}\\u{1AFFF}\\u{1B000}-\\u{1B0FF}\\u{1B100}-\\u{1B122}\\u{1B123}-\\u{1B12F}\\u{1B130}-\\u{1B131}\\u{1B132}\\u{1B133}-\\u{1B14F}\\u{1B150}-\\u{1B152}\\u{1B153}-\\u{1B154}\\u{1B155}\\u{1B156}-\\u{1B163}\\u{1B164}-\\u{1B167}\\u{1B168}-\\u{1B16F}\\u{1B170}-\\u{1B2FB}\\u{1B2FC}-\\u{1B2FF}\\u{1CF00}-\\u{1CF2D}\\u{1CF2E}-\\u{1CF2F}\\u{1CF30}-\\u{1CF46}\\u{1CF47}-\\u{1CF4F}\\u{1CF50}-\\u{1CFC3}\\u{1CFC4}-\\u{1CFCF}\\u{1D000}-\\u{1D0F5}\\u{1D0F6}-\\u{1D0FF}\\u{1D100}-\\u{1D126}\\u{1D127}-\\u{1D128}\\u{1D129}-\\u{1D164}\\u{1D165}-\\u{1D166}\\u{1D167}-\\u{1D169}\\u{1D16A}-\\u{1D16C}\\u{1D16D}-\\u{1D172}\\u{1D173}-\\u{1D17A}\\u{1D17B}-\\u{1D182}\\u{1D183}-\\u{1D184}\\u{1D185}-\\u{1D18B}\\u{1D18C}-\\u{1D1A9}\\u{1D1AA}-\\u{1D1AD}\\u{1D1AE}-\\u{1D1EA}\\u{1D1EB}-\\u{1D1FF}\\u{1D2E0}-\\u{1D2F3}\\u{1D2F4}-\\u{1D2FF}\\u{1D300}-\\u{1D356}\\u{1D357}-\\u{1D35F}\\u{1D360}-\\u{1D378}\\u{1D379}-\\u{1D37F}\\u{1D800}-\\u{1D9FF}\\u{1DA00}-\\u{1DA36}\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{1F7EF}\\u{1F7F0}\\u{1F7F1}-\\u{1F7FF}\\u{1F900}-\\u{1F9FF}\\u{1FA00}-\\u{1FA53}\\u{1FA54}-\\u{1FA5F}\\u{1FA60}-\\u{1FA6D}\\u{1FA6E}-\\u{1FA6F}\\u{1FA70}-\\u{1FA7C}\\u{1FA7D}-\\u{1FA7F}\\u{1FA80}-\\u{1FA88}\\u{1FA89}-\\u{1FA8F}\\u{1FA90}-\\u{1FABD}\\u{1FABE}\\u{1FABF}-\\u{1FAC5}\\u{1FAC6}-\\u{1FACD}\\u{1FACE}-\\u{1FADB}\\u{1FADC}-\\u{1FADF}\\u{1FAE0}-\\u{1FAE8}\\u{1FAE9}-\\u{1FAEF}\\u{1FAF0}-\\u{1FAF8}\\u{1FAF9}-\\u{1FAFF}\\u{20000}-\\u{2A6DF}\\u{2A6E0}-\\u{2A6FF}\\u{2A700}-\\u{2B739}\\u{2B73A}-\\u{2B73F}\\u{2B740}-\\u{2B81D}\\u{2B81E}-\\u{2B81F}\\u{2B820}-\\u{2CEA1}\\u{2CEA2}-\\u{2CEAF}\\u{2CEB0}-\\u{2EBE0}\\u{2EBE1}-\\u{2F7FF}\\u{2F800}-\\u{2FA1D}\\u{2FA1E}-\\u{2FFFD}\\u{30000}-\\u{3134A}\\u{3134B}-\\u{3134F}\\u{31350}-\\u{323AF}\\u{323B0}-\\u{3FFFD}]/u;\n\n/**\n * 表示一行文本的类,保存它的位置、内容、从属信息,在布局阶段生成,并在渲染阶段被Text调用render()\n * 关系上直属于Text类,一个Text类可能因为换行原因导致有多个TextBox,一行内容中也可能有不同Text从而不同TextBox\n * 另外本类还会被LineBoxManager添加到LineBox里,LineBox为一行中的inline/文本组合,之间需要进行垂直对齐\n * 在textOverflow为ellipsis时,可能会收到后面节点的向前回退(后面不足放下…),使得省略号发生在本节点\n */\nclass TextBox {\n constructor(parent, index, x, y, w, h, content, isUpright = false) {\n this.__parent = parent;\n this.__index = index;\n this.__x = x;\n this.__y = y;\n if(isUpright) {\n this.__width = h;\n this.__height = w;\n }\n else {\n this.__width = w;\n this.__height = h;\n }\n this.__content = content;\n this.__virtualDom = {};\n this.__parentLineBox = null;\n this.__isVertical = isUpright;\n }\n\n /**\n * 渲染阶段被Text类调用,多行Text会有多个TextBox,内容被分拆开\n * @param renderMode\n * @param ctx\n * @param computedStyle\n * @param cacheStyle Text父节点Dom的缓存样式,相比computedStyle可以直接用,比如color被缓存为style字符串\n * @param dx\n * @param dy\n */\n render(renderMode, ctx, computedStyle, cacheStyle, dx, dy) {\n let { content, x, y, parent, width, height, isUpright } = this;\n let dom = parent.__domParent;\n let b = css.getBaseline(computedStyle);\n let bv = css.getVerticalBaseline(computedStyle);\n // 垂直文本x/y互换,渲染时使用rotate模拟,因为是基于baseline绘制,顺时针90deg时tfo是文字左下角,\n // 它等同于lineHeight(现在的w)减去b\n if(isUpright) {\n x += bv;\n }\n else {\n y += b;\n }\n x += dx;\n y += dy;\n if(isUpright) {\n this.__endX = x;\n this.__endY = y + height;\n }\n else {\n this.__endX = x + width;\n this.__endY = y;\n }\n let {\n [LETTER_SPACING]: letterSpacing,\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n [TEXT_STROKE_COLOR]: textStrokeColor,\n [FONT_SIZE]: fontSize,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let i = 0, length = content.length;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let me = dom.matrixEvent, list;\n let dev1 = 0, dev2 = 0;\n if(isUpright) {\n list = [\n { k: ROTATE_Z, v: { v: 90, u: DEG } },\n ];\n dev1 = bv * 0.6;\n dev2 = bv * 0.2;\n }\n let overFill = computedStyle[TEXT_STROKE_OVER] === 'fill';\n if(letterSpacing) {\n for(; i < length; i++) {\n let c = content.charAt(i);\n if(isUpright) {\n let cjk = TuOrU.test(c);\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n if(overFill) {\n ctx.fillText(c, x - dev1, y - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x - dev1, y - dev2);\n }\n if(!overFill) {\n ctx.fillText(c, x - dev1, y - dev2);\n }\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n if(overFill) {\n ctx.fillText(c, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x, y);\n }\n if(!overFill) {\n ctx.fillText(c, x, y);\n }\n }\n y += ctx.measureText(c).width + letterSpacing;\n }\n else {\n if(overFill) {\n ctx.fillText(c, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(c, x, y);\n }\n if(!overFill) {\n ctx.fillText(c, x, y);\n }\n x += ctx.measureText(c).width + letterSpacing;\n }\n }\n }\n else {\n if(isUpright) {\n let cjk = TuOrU.test(content.charAt(0)), last = 0, count = 0, len = content.length;\n for(let i = 1; i < len; i++) {\n let nowCjk = TuOrU.test(content.charAt(i));\n // 不相等时cjk发生变化,输出之前的内容,记录当下的所有\n if(nowCjk !== cjk) {\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n count += fontSize;\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y + count, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x, y + count);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x, y + count);\n }\n if(!overFill) {\n ctx.fillText(s, x, y + count);\n }\n count += ctx.measureText(s).width;\n }\n last = i;\n cjk = !cjk;\n }\n // cjk单字符输出\n else if(nowCjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n let s = content.slice(last, i);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n count += fontSize;\n last = i;\n }\n }\n if(last < len) {\n let s = content.slice(last, len);\n // 最后的cjk只可能是一个字符\n if(cjk) {\n ctx.setTransform(me[0], me[1], me[4], me[5], me[12], me[13]);\n if(overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x - dev1, y + count + b - dev2);\n }\n if(!overFill) {\n ctx.fillText(s, x - dev1, y + count + b - dev2);\n }\n }\n else {\n let m = transform.calMatrixWithOrigin(list, x, y + count, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n if(overFill) {\n ctx.fillText(s, x, y + count);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(s, x, y + count);\n }\n if(!overFill) {\n ctx.fillText(s, x, y + count);\n }\n }\n }\n }\n else {\n if(overFill) {\n ctx.fillText(content, x, y);\n }\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n ctx.strokeText(content, x, y);\n }\n if(!overFill) {\n ctx.fillText(content, x, y);\n }\n }\n }\n }\n else if(renderMode === SVG) {\n let color = cacheStyle[COLOR];\n if(color.k) {\n color = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, color, dx, dy).v;\n }\n // 垂直的svg以中线为基线,需偏移baseline和中线的差值\n if(isUpright) {\n x += lineHeight * 0.5 - bv;\n }\n let props = [\n ['x', x],\n ['y', y],\n ['fill', color],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n // svg无法定义stroke的over\n if(textStrokeWidth && (textStrokeColor[3] > 0 || textStrokeColor.length === 3 || textStrokeColor.k)) {\n let textStrokeColor = cacheStyle[TEXT_STROKE_COLOR];\n // 渐变\n if(textStrokeColor.k) {\n textStrokeColor = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, textStrokeColor, dx, dy).v;\n }\n props.push(['stroke', textStrokeColor]);\n props.push(['stroke-width', computedStyle[TEXT_STROKE_WIDTH]]);\n }\n if(letterSpacing) {\n props.push(['letter-spacing', letterSpacing]);\n }\n if(isUpright) {\n props.push(['writing-mode', 'vertical-lr']);\n }\n this.__virtualDom = {\n type: 'item',\n tagName: 'text',\n props,\n content: util.encodeHtml(content),\n };\n }\n }\n\n __offsetX(diff) {\n this.__x += diff;\n }\n\n __offsetY(diff) {\n this.__y += diff;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get endX() {\n return this.__endX;\n }\n\n get endY() {\n return this.__endY;\n }\n\n get width() {\n return this.__width;\n }\n\n get offsetWidth() {\n return this.__width;\n }\n\n get outerWidth() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get offsetHeight() {\n return this.__height;\n }\n\n get outerHeight() {\n return this.__height;\n }\n\n get content() {\n return this.__content;\n }\n\n get baseline() {\n return this.parent.baseline;\n }\n\n get verticalBaseline() {\n return this.parent.verticalBaseline;\n }\n\n get virtualDom() {\n return this.__virtualDom;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n}\n\nexport default TextBox;\n","import Node from './Node';\nimport mode from '../refresh/mode';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport transform from '../style/transform';\nimport enums from '../util/enums';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n FONT_STYLE,\n COLOR,\n LINE_HEIGHT,\n ROTATE_Z,\n },\n} = enums;\nconst { DEG } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\n\nconst CHAR = '…';\n\nclass Ellipsis extends Node {\n constructor(x, y, width, parent, text, isUpright) {\n super();\n this.__x = this.__x1 = x;\n this.__y = this.__y1 = y;\n this.__width = width;\n this.__parent = this.__domParent = parent;\n this.__text = text;\n parent.__ellipsis = this;\n this.__parentLineBox = null;\n this.__baseline = css.getBaseline(parent.computedStyle);\n this.__isVertical = isUpright;\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let { x, y, parent, isUpright } = this;\n let {\n computedStyle,\n cacheStyle: {\n [COLOR]: color,\n },\n } = parent;\n let b = css.getBaseline(computedStyle);\n let bv = css.getVerticalBaseline(computedStyle);\n if(isUpright) {\n x += bv;\n }\n else {\n y += b;\n }\n x += dx;\n y += dy;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle, this.__text.__fitFontSize);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n if(isUpright) {\n let me = parent.matrixEvent, list = [\n { k: ROTATE_Z, v: { v: 90, u: DEG } },\n ];\n let m = transform.calMatrixWithOrigin(list, x, y, 0, 0);\n m = mx.multiply(me, m);\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n ctx.fillText(CHAR, x, y);\n }\n else if(renderMode === SVG) {\n // 垂直的svg以中线为基线,需偏移baseline和中线的差值\n if(isUpright) {\n x += computedStyle[LINE_HEIGHT] * 0.5 - bv;\n }\n let props = [\n ['x', x],\n ['y', y],\n ['fill', color],\n ['font-family', computedStyle[FONT_FAMILY]],\n ['font-weight', computedStyle[FONT_WEIGHT]],\n ['font-style', computedStyle[FONT_STYLE]],\n ['font-size', computedStyle[FONT_SIZE] + 'px'],\n ];\n if(isUpright) {\n props.push(['writing-mode', 'vertical-lr']);\n }\n let vd = this.__virtualDom = {\n type: 'text',\n children: [\n {\n type: 'item',\n tagName: 'text',\n props,\n content: CHAR,\n },\n ],\n };\n parent.virtualDom.children.push(vd);\n }\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n\n get isEllipsis() {\n return true;\n }\n}\n\nexport default Ellipsis;\n\n","import change from './change';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: {\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n OPACITY: OP,\n FILTER: FT,\n PERSPECTIVE: PPT,\n PERSPECTIVE_ORIGIN,\n Z_INDEX,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z: RZ,\n ROTATE_3D,\n SKEW_X,\n SKEW_Y,\n TRANSFORM: TF,\n TRANSFORM_ORIGIN,\n} } = enums;\n\nconst { isIgnore, isRepaint } = change;\n\n// 低位表示 0;\n },\n // 是否不包含value之外的\n exclude(lv, value) {\n return (lv | value) === value;\n },\n /**\n * 得出等级\n * @param k\n * @returns {number|*}\n */\n getLevel(k) {\n if(isIgnore(k)) {\n return NONE;\n }\n if(k === Z_INDEX) {\n return CACHE;\n }\n if(k === TX) {\n return TRANSLATE_X;\n }\n if(k === TY) {\n return TRANSLATE_Y;\n }\n if(k === TZ) {\n return TRANSLATE_Z;\n }\n if(k === RZ) {\n return ROTATE_Z;\n }\n if(k === SX) {\n return SCALE_X;\n }\n if(k === SY) {\n return SCALE_Y;\n }\n if(k === SZ) {\n return SCALE_Z;\n }\n if(k === OP) {\n return OPACITY;\n }\n if(k === FT) {\n return FILTER;\n }\n if(k === PPT || k === PERSPECTIVE_ORIGIN) {\n return PERSPECTIVE;\n }\n if(isTransforms(k)) {\n return TRANSFORM;\n }\n if(isRepaint(k)) {\n return REPAINT;\n }\n return REFLOW;\n },\n isReflow(lv) {\n return lv >= REFLOW;\n },\n isRepaint(lv) {\n return lv < REFLOW;\n },\n}, ENUM);\n\nexport default o;\n","import Node from './Node';\nimport TextBox from './TextBox';\nimport Ellipsis from './Ellipsis';\nimport mode from '../refresh/mode';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport level from '../refresh/level';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n POSITION,\n LINE_HEIGHT,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n COLOR,\n VISIBILITY,\n LETTER_SPACING,\n OVERFLOW,\n WHITE_SPACE,\n TEXT_OVERFLOW,\n WIDTH,\n HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n PADDING_LEFT,\n PADDING_RIGHT,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n FILTER,\n FONT_SIZE_SHRINK,\n },\n ELLIPSIS,\n} = enums;\n\nconst { AUTO } = unit;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { isFunction } = util;\n\n/**\n * 测量的封装,主要是增加了shrinkFontSize声明时,不断尝试fontSize--,直到限制或者满足一行展示要求\n */\nfunction measureLineWidth(ctx, renderMode, start, length, content, w, ew, perW, computedStyle,\n fontFamily, fontSize, fontWeight, fontSizeShrink, letterSpacing, isUpright) {\n if(start >= length) {\n // 特殊情况不应该走进这里\n return { hypotheticalNum: 0, rw: 0, newLine: false };\n }\n let res = measure(ctx, renderMode, start, length, content, w - ew, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n if(res.newLine && fontSizeShrink > 0 && fontSizeShrink < fontSize) {\n while(res.newLine && fontSize > fontSizeShrink) {\n // 文字和ellipsis同时设置测量\n ctx.font = css.setFontStyle(computedStyle, --fontSize);\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], fontSize, computedStyle[FONT_WEIGHT]);\n }\n res = measure(ctx, renderMode, start, length, content, w - ew, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n res.fitFontSize = fontSize;\n res.ew = ew;\n // 有ew的时候还要尝试没有是否放得下\n if(ew) {\n let t = measure(ctx, renderMode, start, length, content, w, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright);\n if(!t.newLine) {\n t.fitFontSize = fontSize;\n res = t;\n }\n }\n }\n }\n return res;\n}\n\n/**\n * 在给定宽度w的情况下,测量文字content多少个满足塞下,只支持水平书写,从start的索引开始,content长length\n * 尽可能地少的次数调用canvas的measureText或svg的html节点的width,因为比较消耗性能\n * 这就需要一种算法,不能逐字遍历看总长度是否超过,也不能单字宽度相加因为有文本整形某些字体多个字宽度不等于每个之和\n * 简单的2分法实现简单,但是次数稍多,对于性能不是最佳,因为内容的slice裁剪和传递给canvas测量都随尺寸增加而加大\n * 由于知道w和fontSize,因此能推测出平均值为fontSize/w,即字的个数,\n * 进行测量后得出w2,和真实w对比,产生误差d,再看d和fontSize推测差距个数,如此反复\n * 返回内容和end索引和长度,最少也要1个字符\n */\nfunction measure(ctx, renderMode, start, length, content, w, perW,\n fontFamily, fontSize, fontWeight, letterSpacing, isUpright) {\n let i = start, j = length, rw = 0, newLine = false;\n // 特殊降级,有letterSpacing时,canvas无法完全兼容,只能采取单字测量的方式完成\n if(letterSpacing && [CANVAS, WEBGL].indexOf(renderMode) > -1) {\n let count = 0;\n for(; i < j; i++) {\n let mw = ctx.measureText(content.charAt(i)).width + letterSpacing;\n if(count + mw > w + (1e-10)) {\n newLine = true;\n break;\n }\n count += mw;\n }\n return { hypotheticalNum: i - start, rw: count, newLine: newLine || count > w + (1e-10) };\n }\n // 没有letterSpacing或者是svg模式可以完美获取TextMetrics\n let hypotheticalNum = Math.round(w / perW);\n // 不能增长0个字符,至少也要1个\n if(hypotheticalNum <= 0) {\n hypotheticalNum = 1;\n }\n // 超过内容长度范围也不行\n else if(hypotheticalNum > length - start) {\n hypotheticalNum = length - start;\n }\n // 类似2分的一个循环\n while(i < j) {\n let mw, str = content.slice(start, start + hypotheticalNum);\n if(renderMode === CANVAS || renderMode === WEBGL) {\n mw = ctx.measureText(str).width;\n }\n else if(renderMode === SVG) {\n mw = inject.measureTextSync(str, fontFamily, fontSize, fontWeight, isUpright);\n }\n if(letterSpacing) {\n mw += hypotheticalNum * letterSpacing;\n }\n if(mw === w) {\n rw = w;\n newLine = true;\n break;\n }\n // 超出,设置右边界,并根据余量推测减少个数,\n // 因为精度问题,固定宽度或者累加的剩余空间,不用相等判断,而是为原本w宽度加一点点冗余1e-10\n if(mw > w + (1e-10)) {\n newLine = true;\n // 限制至少1个\n if(hypotheticalNum === 1) {\n rw = mw;\n break;\n }\n // 注意特殊判断i和j就差1个可直接得出结果,因为现在超了而-1不超肯定是-1的结果\n if(i === j - 1 || i - start === hypotheticalNum - 1) {\n hypotheticalNum = i - start;\n break;\n }\n j = hypotheticalNum + start - 1;\n let reduce = Math.round((mw - w) / perW);\n if(reduce <= 0) {\n reduce = 1;\n }\n hypotheticalNum -= reduce;\n if(hypotheticalNum < i - start) {\n hypotheticalNum = i - start;\n }\n }\n // 还有空余,设置左边界,并根据余量推测增加的个数\n else {\n rw = mw;\n if(hypotheticalNum === length - start) {\n break;\n }\n i = hypotheticalNum + start;\n let add = Math.round((w - mw) / perW);\n if(add <= 0) {\n add = 1;\n }\n hypotheticalNum += add;\n if(hypotheticalNum > j - start) {\n hypotheticalNum = j - start;\n }\n }\n }\n return { hypotheticalNum, rw, newLine };\n}\n\nfunction getFontKey(ff, fs, fw, ls) {\n return ff + '_' + fs + '_' + fw + '_' + ls;\n}\n\nclass Text extends Node {\n constructor(content) {\n super();\n this.__content = util.isNil(content) ? '' : content.toString();\n this.__textBoxes = [];\n this.__charWidth = 0; // 最小字符宽度(单个)\n this.__textWidth = 0; // 整体宽度\n this.__bp = null; // block父节点\n this.__widthHash = {}; // 存储当前字体样式key下的charWidth/textWidth\n this.__limitCache = false;\n this.__hasContent = false;\n this.__fitFontSize = 0; // 自动缩小时的字体大小\n }\n\n /**\n * text在virtual时和普通一样,无需特殊处理\n * endSpace由外界inline布局控制,末尾最后一行的空白mpb,包含递归情况,递归为多个嵌套末尾节点的空白mpb之和\n * 即便宽度不足,每行还是强制渲染一个字符,换行依据lx开始,因为x可能是从中间开始的,非inline则两个相等\n * 最后一个字符排版时要考虑末尾mpb,排不下的话回退删掉这个字符,如果最后一个字符另起开头,排不下也强制排,每行至少1个字符\n * 在textOverflow时很特殊,多个inline同行,回退可能到前一个inline节点,这个通过x和lx判断是否行首,决定至少1个字符规则\n * @param data\n * @private\n */\n __layoutFlow(data) {\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n let { x, y, w, h, lx = x, ly = y, lineBoxManager, endSpace = 0, lineClamp = 0, lineClampCount = 0, isUpright = false } = data;\n this.__x = this.__x1 = x;\n this.__y = this.__y1 = y;\n let { __isDestroyed, content, computedStyle, textBoxes, root } = this;\n textBoxes.splice(0);\n // 空内容w/h都为0可以提前跳出,lineClamp超出一般不会进这,但有特例flex文本垂直预计算时,所以也要跳出\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || !content || lineClamp && lineClampCount >= lineClamp) {\n return lineClampCount;\n }\n // 顺序尝试分割字符串为TextBox,形成多行,begin为每行起始索引,i是当前字符索引\n let i = 0;\n let length = content.length;\n let maxW = 0;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [WHITE_SPACE]: whiteSpace,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = computedStyle;\n let size = isUpright ? h : w;\n let beginSpace = isUpright ? (y - ly) : (x - lx); // x>=lx,当第一行非起始处时前面被prev节点占据,这个差值可认为是count宽度\n // 基于最近block父节点的样式\n let bp = this.domParent;\n while(bp.computedStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n this.__bp = bp;\n let textOverflow = bp.computedStyle[TEXT_OVERFLOW];\n // 布局测量前置,根据renderMode不同提供不同的测量方法\n let renderMode = root.renderMode;\n let ctx;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx = renderMode === WEBGL\n ? inject.getFontCanvas().ctx\n : root.ctx;\n ctx.font = css.setFontStyle(computedStyle, 0);\n }\n // fontSize在中文是正好1个字宽度,英文不一定,等宽为2个,不等宽可能1~2个,特殊字符甚至>2个,取预估均值然后倒数得每个均宽0.8\n let perW = (fontSize * 0.8) + letterSpacing;\n let lineCount = 0;\n let mainCoords; // 根据书写模式指向不同x/y\n // 不换行特殊对待,同时考虑overflow和textOverflow\n if(whiteSpace === 'nowrap') {\n let isTextOverflow, textWidth = this.textWidth, w = size - endSpace - beginSpace;\n let {\n [POSITION]: position,\n [OVERFLOW]: overflow,\n [FONT_SIZE_SHRINK]: fontSizeShrink,\n } = bp.computedStyle;\n let containerSize = bp.currentStyle[isUpright ? HEIGHT: WIDTH];\n // 只要是overflow隐藏,不管textOverflow如何(默认是clip等同于overflow:hidden的功能)都截取\n if(overflow === 'hidden') {\n // abs自适应宽度时不裁剪\n if(position === 'absolute' && containerSize.u === AUTO) {\n isTextOverflow = false;\n }\n else {\n isTextOverflow = textWidth > size + (1e-10) - beginSpace - endSpace;\n }\n }\n // ellipsis生效情况,本节点开始向前回退查找,尝试放下一部分字符\n if(isTextOverflow && textOverflow === 'ellipsis') {\n [mainCoords] = this.__lineBack(ctx, renderMode, i, length, content, w, perW, x, y, maxW,\n endSpace, lineHeight, textBoxes, lineBoxManager, fontFamily, fontSize, fontWeight, fontSizeShrink, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n }\n // 默认是否clip跟随overflow:hidden,无需感知,裁剪由dom做,这里不裁剪\n else {\n // 但还是要判断缩小字体适应\n if(fontSizeShrink > 0 && fontSizeShrink < fontSize) {\n let fs = fontSize;\n this.__fitFontSize = 0;\n while(fs > fontSizeShrink && textWidth > w) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(computedStyle, --fs);\n textWidth = ctx.measureText(content).width + letterSpacing * content.length;\n }\n else if(renderMode === SVG) {\n textWidth = inject.measureTextSync(content, fontFamily, fs, fontWeight) + letterSpacing * content.length;\n }\n }\n this.__fitFontSize = fs;\n }\n let textBox = new TextBox(this, textBoxes.length, x, y, textWidth, lineHeight,\n content, isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, false);\n if(isUpright) {\n x += lineHeight;\n }\n else {\n y += lineHeight;\n }\n if(isTextOverflow) {\n lineCount++;\n }\n }\n // 和html一样,maxW此时在html是满格\n maxW = textWidth;\n }\n // 普通换行,注意x和lx的区别,可能相同(block起始处)可能不同(非起始处),第1行从x开始,第2行及以后都从lx开始\n // 然后第一次换行还有特殊之处,可能同一行前半部行高很大,此时y增加并非自身的lineHeight,而是整体LineBox的\n else {\n while(i < length) {\n let limit = i ? size : (size - beginSpace);\n if(lineClamp && lineCount + lineClampCount >= lineClamp - 1) {\n limit -= endSpace;\n }\n let { hypotheticalNum: num, rw, newLine } = measureLineWidth(ctx, renderMode, i, length, content, limit, 0, perW,\n computedStyle, fontFamily, fontSize, fontWeight, 0, letterSpacing);\n // 多行文本截断,这里肯定需要回退,注意防止恰好是最后一个字符,此时无需截取\n if(lineClamp && newLine && lineCount + lineClampCount >= lineClamp - 1 && i + num < length) {\n [mainCoords, maxW] = this.__lineBack(ctx, renderMode, i, i + num, content, limit - endSpace, perW,\n lineCount ? lx : x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, 0, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n break;\n }\n // 最后一行考虑endSpace,可能不够需要回退,但不能是1个字符\n if(i + num === length && endSpace && rw + endSpace > limit + (1e-10) && num > 1) {\n let res = measureLineWidth(ctx, renderMode, i, length, content, limit - endSpace, 0, perW,\n computedStyle, fontFamily, fontSize, fontWeight, 0, letterSpacing);\n num = res.hypotheticalNum;\n rw = res.rw;\n newLine = res.newLine;\n // 可能加上endSpace后超过了,还得再判断一次\n if(lineClamp && newLine && lineCount + lineClampCount >= lineClamp - 1) {\n [mainCoords, maxW] = this.__lineBack(ctx, renderMode, i, i + num, content, limit - endSpace, perW,\n lineCount ? lx : x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, 0, letterSpacing, isUpright);\n lineCount++;\n if(isUpright) {\n x = mainCoords;\n }\n else {\n y = mainCoords;\n }\n break;\n }\n }\n maxW = Math.max(maxW, rw);\n // 根据是否第一行分开处理行首空白\n let textBox = new TextBox(this, textBoxes.length,\n lineCount && !isUpright ? lx : x,\n lineCount && isUpright ? ly : y,\n rw, lineHeight, content.slice(i, i + num), isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, newLine);\n // 竖排横排换行不一样\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n // 至少也要1个字符形成1行,哪怕是首行,因为是否放得下逻辑在dom中做过了\n i += num;\n if(newLine) {\n lineCount++;\n }\n }\n // 换行后Text的x重设为lx\n if(lineCount) {\n if(isUpright) {\n this.__y = this.__y1 = ly;\n }\n else {\n this.__x = this.__x1 = lx;\n }\n }\n }\n if(isUpright) {\n this.__width = x - data.x;\n this.__height = maxW;\n this.__verticalBaseline = css.getVerticalBaseline(computedStyle);\n }\n else {\n this.__width = maxW;\n this.__height = y - data.y;\n this.__baseline = css.getBaseline(computedStyle);\n }\n return lineClampCount + lineCount;\n }\n\n __layoutNone() {\n this.__width = this.__height = this.__baseline = this.__verticalBaseline = 0;\n this.__textBoxes.splice(0);\n }\n\n // 末尾行因ellipsis的缘故向前回退字符生成textBox,可能会因不满足宽度导致无法生成,此时向前继续回退TextBox\n __lineBack(ctx, renderMode, i, length, content, limit, perW, x, y, maxW, endSpace, lineHeight, textBoxes, lineBoxManager,\n fontFamily, fontSize, fontWeight, fontSizeShrink, letterSpacing, isUpright) {\n let ew, bp = this.__bp, computedStyle = bp.computedStyle;\n // 临时测量ELLIPSIS的尺寸\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle, 0);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], computedStyle[FONT_SIZE], computedStyle[FONT_WEIGHT]);\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(this.computedStyle, 0);\n if (ctx.font !== font) {\n ctx.font = font;\n }\n }\n this.__fitFontSize = 0;\n let { hypotheticalNum: num, rw, newLine, fitFontSize, ew: ew2 } = measureLineWidth(ctx, renderMode, i, length, content, limit - endSpace, ew, perW,\n computedStyle, fontFamily, fontSize, fontWeight, fontSizeShrink, letterSpacing);\n // 缩小的fontSize\n if(fitFontSize) {\n this.__fitFontSize = fitFontSize;\n }\n if(ew2) {\n ew = ew2;\n }\n // 缩小后可能不再换行,下面的逻辑都要预先判断newLine\n // 还是不够,需要回溯查找前一个inline节点继续回退,同时防止空行首,要至少一个textBox且一个字符\n if(newLine && rw + ew > limit + (1e-10) - endSpace) {\n // 向前回溯已有的tb,需注意可能是新行开头这时还没生成新的lineBox,而旧行则至少1个内容\n // 新行的话进不来,会添加上面num的内容,旧行不添加只修改之前的tb内容也有可能删除一些\n let lineBox = lineBoxManager.lineBox;\n if(!lineBoxManager.isNewLine && lineBox && lineBox.size) {\n let list = lineBox.list;\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n // 可能是个inlineBlock,整个省略掉,除非是第一个不作ellipsis处理\n if(!(tb instanceof TextBox)) {\n if(!j) {\n break;\n }\n let item = list.pop();\n if(isUpright) {\n y -= item.outerHeight;\n }\n else {\n x -= item.outerWidth;\n }\n limit += isUpright ? item.outerHeight : item.outerWidth;\n item.__layoutNone();\n continue;\n }\n // 先判断整个tb都删除是否可以容纳下,同时注意第1个tb不能删除因此必进\n let { content, width, height, parent } = tb;\n if(!j || limit >= width + ew + (1e-10) + endSpace) {\n let length = content.length;\n let {\n [LINE_HEIGHT]: lineHeight,\n [LETTER_SPACING]: letterSpacing,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = parent.computedStyle;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(parent.computedStyle, 0);\n }\n // 再进行查找,这里也会有至少一个字符不用担心\n let { hypotheticalNum: num, rw } = measureLineWidth(ctx, renderMode, 0, length, content, limit + width - endSpace, ew, perW,\n computedStyle, fontFamily, fontSize, fontWeight, 0, letterSpacing);\n // 可能发生x回退,当tb的内容产生减少时\n if(num !== content.length) {\n tb.__content = content.slice(0, num);\n if(isUpright) {\n y -= height - rw;\n tb.__height = rw;\n }\n else {\n x -= width - rw;\n tb.__width = rw;\n }\n }\n // 重新设置lineHeight和baseline,因为可能删除了东西\n lineBox.__resetLb(computedStyle[LINE_HEIGHT],\n isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle));\n let ep = isUpright\n ? new Ellipsis(x, y + rw + endSpace, ew, bp, this, isUpright)\n : new Ellipsis(x + rw + endSpace, y, ew, bp, this, isUpright);\n lineBoxManager.addItem(ep, true);\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n maxW = Math.max(maxW, rw + ew);\n return [y, maxW];\n }\n // 舍弃这个tb,x也要向前回退,w增加,这会发生在ELLIPSIS字体很大,里面内容字体很小时\n let item = list.pop();\n if(isUpright) {\n limit += height;\n y -= height;\n }\n else {\n limit += width;\n x -= width;\n }\n let tbs = item.parent.textBoxes;\n let k = tbs.indexOf(item);\n if(k > -1) {\n tbs.splice(k, 1);\n }\n // 还得去掉dom,防止inline嵌套一直向上,同时得判断不能误删前面一个的dom\n let dom = item.parent.parent;\n let prev = list[list.length - 1];\n if(prev instanceof TextBox) {\n prev = prev.parent.parent;\n }\n while(dom !== bp && dom !== prev) {\n let contentBoxList = dom.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n let computedStyle = dom.computedStyle;\n if(isUpright) {\n let mbp = computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM]\n + computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n y -= mbp;\n limit += mbp;\n }\n else {\n let mbp = computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT]\n + computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT]\n + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n x -= mbp;\n limit += mbp;\n }\n dom.__layoutNone();\n dom = dom.domParent;\n }\n let contentBoxList = prev.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n }\n }\n }\n // 本次回退不用向前追溯删除textBox会进这里,最少一个字符兜底\n let textBox = new TextBox(this, textBoxes.length, x, y, rw, lineHeight, content.slice(i, i + num), isUpright);\n textBoxes.push(textBox);\n lineBoxManager.addItem(textBox, false);\n // ELLIPSIS也作为内容加入,但特殊的是指向最近block使用其样式渲染\n if(newLine) {\n let ep = isUpright\n ? new Ellipsis(x, y + rw + endSpace, ew, bp, this, isUpright)\n : new Ellipsis(x + rw + endSpace, y, ew, bp, this, isUpright);\n lineBoxManager.addItem(ep, true);\n }\n if(isUpright) {\n x += Math.max(lineHeight, lineBoxManager.verticalLineHeight);\n }\n else {\n y += Math.max(lineHeight, lineBoxManager.lineHeight);\n }\n maxW = Math.max(maxW, rw + newLine ? ew : 0);\n return [isUpright ? x : y, maxW];\n }\n\n // 外部dom换行发现超行,且一定是ellipsis时,会进这里让上一行text回退,lineBox一定有值且最后一个一定是本text的最后的textBox\n __backtrack(bp, lineBoxManager, lineBox, textBox, limit, endSpace, ew, computedStyle, ctx, renderMode, isUpright) {\n let list = lineBox.list;\n for(let j = list.length - 1; j >= 0; j--) {\n let tb = list[j];\n // 可能是个inlineBlock,整个省略掉,除非是第一个不作ellipsis处理\n if(!(tb instanceof TextBox)) {\n if(!j) {\n break;\n }\n let item = list.pop();\n limit += isUpright ? item.outerHeight : item.outerWidth;\n item.__layoutNone();\n continue;\n }\n // 先判断整个tb都删除是否可以容纳下,同时注意第1个tb不能删除因此必进\n let { content, width, height, parent } = tb;\n if(!j || limit >= width + ew + (1e-10) + endSpace) {\n let length = content.length;\n let {\n [LETTER_SPACING]: letterSpacing,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [FONT_FAMILY]: fontFamily,\n } = parent.computedStyle;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx.font = css.setFontStyle(parent.computedStyle, 0);\n }\n let perW = (fontSize * 0.8) + letterSpacing;\n // 再进行查找,这里也会有至少一个字符不用担心\n let { hypotheticalNum: num, rw } = measureLineWidth(ctx, renderMode, 0, length, content, limit - endSpace + width, ew, perW,\n computedStyle, fontFamily, fontSize, fontWeight, 0, letterSpacing);\n // 可能发生x回退,当tb的内容产生减少时\n if(num !== content.length) {\n tb.__content = content.slice(0, num);\n if(isUpright) {\n tb.__height = rw;\n }\n else {\n tb.__width = rw;\n }\n }\n // 重新设置lineHeight和baseline,因为可能删除了东西\n lineBox.__resetLb(computedStyle[LINE_HEIGHT],\n isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle));\n let ep = isUpright\n ? new Ellipsis(tb.x, tb.y + rw + endSpace, ew, bp, this, isUpright)\n : new Ellipsis(tb.x + rw + endSpace, tb.y, ew, bp, this, isUpright);\n lineBoxManager.addItem(ep, true);\n return;\n }\n // 舍弃这个tb,x也要向前回退,w增加,这会发生在ELLIPSIS字体很大,里面内容字体很小时\n let item = list.pop();\n limit += isUpright ? height : width;\n let tbs = item.parent.textBoxes;\n let k = tbs.indexOf(item);\n if(k > -1) {\n tbs.splice(k, 1);\n }\n // 还得去掉dom,防止inline嵌套一直向上,同时得判断不能误删前面一个的dom\n let dom = item.parent.parent;\n let prev = list[list.length - 1];\n if(prev instanceof TextBox) {\n prev = prev.parent.parent;\n }\n while(dom !== bp && dom !== prev) {\n let contentBoxList = dom.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n let computedStyle = dom.computedStyle;\n if(isUpright) {\n let mbp = computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM]\n + computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM]\n + computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n limit += mbp;\n }\n else {\n let mbp = computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT]\n + computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT]\n + computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n limit += mbp;\n }\n dom.__layoutNone();\n dom = dom.domParent;\n }\n let contentBoxList = prev.contentBoxList || [];\n let i = contentBoxList.indexOf(item);\n if(i > -1) {\n contentBoxList.splice(i, 1);\n }\n }\n }\n\n __offsetX(diff, isLayout) {\n super.__offsetX(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetX(diff);\n });\n }\n this.__x1 += diff;\n }\n\n __offsetY(diff, isLayout) {\n super.__offsetY(diff, isLayout);\n if(isLayout) {\n this.textBoxes.forEach(item => {\n item.__offsetY(diff);\n });\n }\n this.__y1 += diff;\n }\n\n __tryLayInline(total) {\n return total - this.firstCharWidth;\n }\n\n __inlineSize(isUpright) {\n let min, max;\n this.textBoxes.forEach((item, i) => {\n if(i) {\n min = Math.min(min, isUpright ? item.y : item.x);\n max = Math.max(max, (isUpright ? item.y : item.x) + item.width);\n }\n else {\n min = isUpright ? item.y : item.x;\n max = (isUpright ? item.y : item.x) + item.width;\n }\n });\n if(isUpright) {\n this.__y = this.__y1 = min;\n this.__x = this.__x1;\n this.__height = max - min;\n }\n else {\n this.__x = this.__x1 = min;\n this.__y = this.__y1;\n this.__width = max - min;\n }\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let { __isDestroyed, computedStyle, textBoxes, cacheStyle } = this;\n if(renderMode === SVG) {\n this.__virtualDom = {\n type: 'text',\n children: [],\n };\n }\n // >=REPAINT清空bbox\n this.__bbox = null;\n this.__filterBbox = null;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || computedStyle[VISIBILITY] === 'hidden'\n || !textBoxes.length) {\n this.__hasContent = false;\n return;\n }\n this.__hasContent = true;\n if(renderMode === WEBGL) {\n return;\n }\n if(renderMode === CANVAS) {\n let font = css.setFontStyle(computedStyle, this.__fitFontSize);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n let color = cacheStyle[COLOR];\n // 渐变\n if(color.k) {\n let dom = this.parent;\n color = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, color, dx, dy).v;\n }\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n let strokeWidth = computedStyle[TEXT_STROKE_WIDTH];\n if(ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n let textStrokeColor = cacheStyle[TEXT_STROKE_COLOR];\n // 渐变\n if(textStrokeColor.k) {\n let dom = this.parent;\n textStrokeColor = dom.__gradient(renderMode, ctx, dom.__bx1, dom.__by1, dom.__bx2, dom.__by2, textStrokeColor, dx, dy).v;\n }\n if(ctx.strokeStyle !== textStrokeColor) {\n ctx.strokeStyle = textStrokeColor;\n }\n }\n // 可能为空,整个是个ellipsis\n textBoxes.forEach(item => {\n item.render(renderMode, ctx, computedStyle, cacheStyle, dx, dy);\n });\n if(renderMode === SVG) {\n this.__virtualDom.children = textBoxes.map(textBox => textBox.virtualDom);\n }\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n super.__destroy();\n let __cache = this.__cache;\n if(__cache) {\n __cache.release();\n }\n }\n\n getComputedStyle(key) {\n return this.__domParent.getComputedStyle(key);\n }\n\n updateContent(s, cb) {\n if(s === this.__content || this.__isDestroyed) {\n this.__content = s;\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n this.__widthHash = {};\n if(util.isNil(s)){\n s = '';\n }\n else {\n s = s.toString();\n }\n this.__content = s;\n this.__root.__addUpdate(this.__domParent, null, level.REFLOW, null, null, null, cb);\n }\n\n remove(cb) {\n let { __root: root } = this;\n let parent = this.isShadowRoot ? this.hostRoot.__parent: this.__parent;\n let i;\n if(parent) {\n let target = this.isShadowRoot ? this.hostRoot : this;\n i = parent.__children.indexOf(target);\n parent.__children.splice(i, 1);\n i = parent.__zIndexChildren.indexOf(target);\n parent.__zIndexChildren.splice(i, 1);\n let { __prev, __next } = this;\n if(__prev) {\n __prev.__next = __next;\n }\n if(__next) {\n __next.__prev = __prev;\n }\n }\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n parent.__deleteStruct(this, i);\n // 不可见仅改变数据结构\n if(this.computedStyle[DISPLAY] === 'none') {\n this.__destroy();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow逻辑做结构关系等,text视为父变更\n root.__addUpdate(this, null, level.REFLOW, null, true, null, cb);\n }\n\n get content() {\n return this.__content;\n }\n\n set content(v) {\n this.updateContent(v, null);\n }\n\n get textBoxes() {\n return this.__textBoxes;\n }\n\n get charWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('charWidth')) {\n let max = 0;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle, 0);\n for(let i = 0, len = content.length; i < len; i++) {\n max = Math.max(max, ctx.measureText(content.charAt([i])).width);\n }\n }\n else if(renderMode === SVG) {\n max = inject.measureTextListMax(content, fontFamily, fontSize, fontWeight);\n }\n o.charWidth = max + letterSpacing;\n }\n return o.charWidth;\n }\n\n get firstCharWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('firstCharWidth')) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle, 0);\n o.firstCharWidth = ctx.measureText(content.charAt(0)).width + letterSpacing;\n }\n else if(renderMode === SVG) {\n o.firstCharWidth = inject.measureTextSync(content.charAt(0), fontFamily, fontSize, fontWeight) + letterSpacing;\n }\n }\n return o.firstCharWidth;\n }\n\n get textWidth() {\n let { __widthHash, content, computedStyle, root: { ctx, renderMode } } = this;\n let {\n [FONT_FAMILY]: fontFamily,\n [FONT_SIZE]: fontSize,\n [FONT_WEIGHT]: fontWeight,\n [LETTER_SPACING]: letterSpacing,\n } = computedStyle;\n let fontKey = getFontKey(fontFamily, fontSize, fontWeight, letterSpacing);\n if(!__widthHash.hasOwnProperty(fontKey)) {\n __widthHash[fontKey] = {};\n }\n let o = __widthHash[fontKey];\n if(!o.hasOwnProperty('textWidth')) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n if(renderMode === WEBGL) {\n ctx = inject.getFontCanvas().ctx;\n }\n ctx.font = css.setFontStyle(computedStyle, 0);\n o.textWidth = ctx.measureText(content).width + letterSpacing * content.length;\n }\n else if(renderMode === SVG) {\n o.textWidth = inject.measureTextSync(content, fontFamily, fontSize, fontWeight) + letterSpacing * content.length;\n }\n }\n return o.textWidth;\n }\n\n get clientWidth() {\n return this.__width || 0;\n }\n\n get clientHeight() {\n return this.__height || 0;\n }\n\n get offsetWidth() {\n return this.__width || 0;\n }\n\n get offsetHeight() {\n return this.__height || 0;\n }\n\n get outerWidth() {\n return this.__width || 0;\n }\n\n get outerHeight() {\n return this.__height || 0;\n }\n\n get root() {\n return this.__domParent.__root;\n }\n\n get currentStyle() {\n return this.__domParent.__currentStyle;\n }\n\n get __currentStyle() {\n return this.__domParent.__currentStyle;\n }\n\n get style() {\n return this.__domParent.__style;\n }\n\n get computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get __computedStyle() {\n return this.__domParent.__computedStyle;\n }\n\n get cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get __cacheStyle() {\n return this.__domParent.__cacheStyle;\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __x1, __y1, width, height,\n computedStyle: {\n [TEXT_STROKE_WIDTH]: textStrokeWidth,\n },\n } = this;\n // 文字描边暂时不清楚最大值是多少,影响不确定,先按描边宽算,因为会出现>>0.5宽的情况\n let half = textStrokeWidth;\n this.__bbox = [__x1 - half, __y1 - half, __x1 + width + half, __y1 + height + half];\n }\n return this.__bbox;\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let bbox = this.__bbox || this.bbox;\n let filter = this.computedStyle[FILTER];\n this.__filterBbox = css.spreadFilter(bbox, filter);\n }\n return this.__filterBbox;\n }\n\n get isShadowRoot() {\n return !this.__parent && this.__host && this.__host !== this.root;\n }\n\n get matrix() {\n return this.__domParent.__matrix;\n }\n\n get matrixEvent() {\n return this.__domParent.__matrixEvent;\n }\n\n get perspectiveMatrix() {\n return this.__domParent.__perspectiveMatrix;\n }\n\n get fitFontSize() {\n return this.__fitFontSize;\n }\n}\n\nexport default Text;\n","import util from './util';\n\nconst { isFunction } = util;\n\nclass Event {\n constructor() {\n this.__eHash = {};\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.on(id[i], handle);\n }\n }\n else {\n if(!self.__eHash.hasOwnProperty(id)) {\n self.__eHash[id] = [];\n }\n // 遍历防止此handle被侦听过了\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n if(item[i] === handle) {\n return self;\n }\n }\n self.__eHash[id].push(handle);\n }\n return self;\n }\n\n once(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n let self = this;\n\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n function cb(...data) {\n handle.apply(self, data);\n self.off(id, cb);\n }\n\n cb.__karasEventCb = handle;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.once(id[i], handle);\n }\n }\n else if(handle) {\n self.on(id, cb);\n }\n return this;\n }\n\n off(id, handle) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.off(id[i], handle);\n }\n }\n else if(self.__eHash.hasOwnProperty(id)) {\n if(handle) {\n for(let i = 0, item = self.__eHash[id], len = item.length; i < len; i++) {\n // 需考虑once包裹的引用对比\n if(item[i] === handle || item[i].__karasEventCb === handle) {\n item.splice(i, 1);\n break;\n }\n }\n }\n // 未定义为全部清除\n else {\n delete self.__eHash[id];\n }\n }\n return this;\n }\n\n emit(id, ...data) {\n let self = this;\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n self.emit(id[i], data);\n }\n }\n else {\n if(self.__eHash.hasOwnProperty(id)) {\n let list = self.__eHash[id];\n if(list.length) {\n list = list.slice();\n for(let i = 0, len = list.length; i < len; i++) {\n let cb = list[i];\n if(isFunction(cb)) {\n cb.apply(self, data);\n }\n }\n }\n }\n }\n return this;\n }\n\n static mix(...obj) {\n for(let i = obj.length - 1; i >= 0; i--) {\n let o = obj[i];\n let event = new Event();\n o.__eHash = {};\n let fns = ['on', 'once', 'off', 'emit'];\n for(let j = fns.length - 1; j >= 0; j--) {\n let fn = fns[j];\n o[fn] = event[fn];\n }\n }\n }\n\n static REFRESH = 'refresh';\n static PAUSE = 'pause';\n static PLAY = 'play';\n static FRAME = 'frame';\n static FINISH = 'finish';\n static CANCEL = 'cancel';\n static BEGIN = 'begin';\n static END = 'end';\n}\n\nexport default Event;\n","import Node from './Node';\nimport Text from './Text';\nimport Event from '../util/Event';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport css from '../style/css';\nimport change from '../refresh/change';\n\nconst { isNil, isFunction, extend } = util;\n\nconst REGISTER = {};\n\nclass Component extends Event {\n constructor(props = {}) {\n super();\n this.__tagName = /(?:function|class)\\s+([\\w$]+)/.exec(this.constructor.toString())[1];\n // 构建工具中都是{},手写可能出现[]情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__parent = null;\n this.__host = null;\n this.__ref = {};\n this.__isMounted = false;\n this.__taskList = [];\n }\n\n /**\n * build中调用初始化,处理过flatten\n */\n __init() {\n this.__ref = {};\n let sr = this.__shadowRoot;\n if(sr instanceof Text) {\n // 文字视作为父节点的直接文字子节点\n }\n else if(sr instanceof Node) {\n let style = css.normalize(this.props.style);\n let keys = Object.keys(style);\n extend(sr.style, style, keys);\n extend(sr.currentStyle, style, keys);\n // 事件添加到sr\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n sr.listener[k] = v;\n }\n });\n }\n // 自定义事件无视返回强制添加\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on-[a-zA-Z\\d_$]/.test(k)) {\n k = k.slice(3);\n this.on(k, v);\n }\n });\n if(isFunction(this.componentDidMount)) {\n this.__root.once(Event.REFRESH, () => {\n this.componentDidMount();\n });\n }\n }\n\n render() {\n inject.warn('Component should implement render()');\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n this.__isDestroyed = true;\n this.__isMounted = false;\n let ref = this.props.ref;\n if(!isNil(ref) && !isFunction(ref)) {\n delete this.__root.__ref[ref];\n }\n if(isFunction(this.componentWillUnmount)) {\n this.componentWillUnmount();\n }\n if(this.__shadow) {\n this.__shadow.__destroy();\n }\n this.__host = this.__hostRoot\n = this.__shadow = this.__shadowRoot\n = this.__prev = this.__next = this.__root\n = this.__parent = this.__domParent = null;\n }\n\n __emitEvent(e, force) {\n let sr = this.shadowRoot;\n if(sr instanceof Text) {\n return;\n }\n let res = sr.__emitEvent(e, force);\n if(res) {\n e.target = this;\n return true;\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get shadow() {\n return this.__shadow;\n }\n\n get shadowRoot() {\n return this.__shadowRoot;\n }\n\n get root() {\n return this.__root;\n }\n\n get host() {\n return this.__host;\n }\n\n get hostRoot() {\n return this.__hostRoot;\n }\n\n get parent() {\n return this.__parent;\n }\n\n get prev() {\n return this.__prev;\n }\n\n get next() {\n return this.__next;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get domParent() {\n return this.__domParent;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(name && !util.isString(name) && name.prototype && name.prototype instanceof Component) {\n return name;\n }\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)) {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Component has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || !/^[A-Z]/.test(name)\n || !obj.prototype || !(obj.prototype instanceof Component)) {\n throw new Error('Invalid param: Component register');\n }\n if(Component.hasRegister(name)) {\n throw new Error(`Component has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Component.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nObject.keys(change.GEOM).concat([\n 'x',\n 'y',\n 'width',\n 'height',\n 'outerWidth',\n 'outerHeight',\n 'clientWidth',\n 'clientHeight',\n 'offsetWidth',\n 'offsetHeight',\n 'style',\n 'children',\n 'animationList',\n 'currentStyle',\n 'computedStyle',\n 'cacheStyle',\n '__currentStyle',\n '__computedStyle',\n '__cacheStyle',\n 'currentProps',\n '__currentProps',\n 'cacheProps',\n '__cacheProps',\n 'baseline',\n 'virtualDom',\n 'mask',\n 'maskId',\n 'textWidth',\n 'content',\n 'lineBoxes',\n 'charWidthList',\n 'charWidth',\n '__layoutData',\n '__struct',\n 'bbox',\n 'contentBoxList',\n 'listener',\n 'matrix',\n 'matrixEvent',\n]).forEach(fn => {\n Object.defineProperty(Component.prototype, fn, {\n get() {\n let sr = this.shadowRoot;\n if(sr) {\n return sr[fn];\n }\n },\n });\n});\n\n[\n '__layout',\n '__layoutFlow',\n '__layoutStyle',\n '__layoutAbs',\n '__layoutNone',\n '__tryLayInline',\n '__offsetX',\n '__offsetY',\n '__calAutoBasis',\n '__computeReflow',\n '__mp',\n 'animate',\n 'removeAnimate',\n 'clearAnimate',\n 'frameAnimate',\n 'updateStyle',\n 'getBoundingClientRect',\n 'getComputedStyle',\n 'clearCache',\n '__structure',\n '__modifyStruct',\n '__updateStruct',\n 'flowChildren',\n 'absChildren',\n '__isRealInline',\n '__calBasis',\n '__calMinMax',\n '__computeMeasure',\n 'appendChild',\n 'prependChild',\n 'insertBefore',\n 'insertAfter',\n 'removeChild',\n 'remove',\n 'addEventListener',\n 'removeEventListener',\n].forEach(fn => {\n Component.prototype[fn] = function() {\n let sr = this.shadowRoot;\n if(sr && isFunction(sr[fn])) {\n return sr[fn].apply(sr, arguments);\n }\n };\n});\n\nexport default Component;\n","import Ellipsis from './Ellipsis';\nimport TextBox from './TextBox';\nimport enums from '../util/enums';\n\nconst {\n STYLE_KEY: {\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_TOP,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_BOTTOM,\n BORDER_TOP_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n },\n} = enums;\n\n/**\n * 获取inline的每一行内容的矩形坐标4个点,同时附带上border的矩形,比前面4个点尺寸大或相等(有无border/padding)\n * @param xom\n * @param isUpright\n * @param contentBoxList\n * @param start\n * @param end\n * @param lineBox\n * @param baseline\n * @param lineHeight\n * @param leading\n * @param isStart\n * @param isEnd\n * @param backgroundClip\n * @param paddingTop\n * @param paddingRight\n * @param paddingBottom\n * @param paddingLeft\n * @param borderTopWidth\n * @param borderRightWidth\n * @param borderBottomWidth\n * @param borderLeftWidth\n * @returns {(*|number)[]}\n */\nfunction getInlineBox(xom, isUpright, contentBoxList, start, end, lineBox, baseline,\n lineHeight, leading, isStart, isEnd, backgroundClip,\n paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth) {\n // 根据bgClip确定y伸展范围,inline渲染bg扩展到pb的位置不影响布局\n let bcStart = 0, bcEnd = 0;\n let pbStart = isUpright ? (paddingLeft + borderLeftWidth) : (paddingTop + borderTopWidth);\n let pbEnd = isUpright ? (paddingRight + borderRightWidth) : (paddingBottom + borderBottomWidth);\n if(backgroundClip === 'paddingBox') {\n bcStart = isUpright ? paddingLeft : paddingTop;\n bcEnd = isUpright ? paddingRight : paddingBottom;\n }\n else if(backgroundClip === 'borderBox') {\n bcStart = pbStart;\n bcEnd = pbEnd;\n }\n // inline的baseline和lineBox的差值,不同lh时造成的偏移,一般为多个textBox时比较小的那个发生\n // 垂直排版不能简单算baseline差值,因为原点坐标系不一样\n let diff;\n if(isUpright) {\n diff = lineBox.verticalBaseline - baseline;\n }\n else {\n diff = lineBox.baseline - baseline;\n }\n let x1, y1, x2, y2, bx1, by1, bx2, by2;\n // x坐标取首尾contentBox的左右2侧,clip布局时已算好;y是根据lineHeight和lineBox的高度以及baseline对齐后计算的\n // 垂直排版则互换x/y逻辑\n if(isUpright) {\n x1 = lineBox.x + diff - bcStart + leading;\n y1 = start.y;\n bx1 = lineBox.x + diff - pbStart + leading;\n }\n else {\n x1 = start.x;\n y1 = lineBox.y + lineBox.oy + diff - bcStart + leading;\n by1 = lineBox.y + lineBox.oy + diff - pbStart + leading;\n }\n // 容器内包含的inline节点,需考虑行首水平mbp(垂直排版为垂直头mbp)\n let dom = start instanceof TextBox ? start.parent.domParent : start.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(start === list[0]) {\n if(isUpright) {\n let {\n [MARGIN_TOP]: marginTop,\n [PADDING_TOP]: paddingTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n } = dom.computedStyle;\n y1 -= marginTop + paddingTop + borderTopWidth;\n }\n else {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n x1 -= marginLeft + paddingLeft + borderLeftWidth;\n }\n }\n dom = dom.domParent;\n }\n // 第一个需考虑容器本身的padding/border\n if(isUpright) {\n by1 = y1;\n if(isStart) {\n by1 -= paddingTop + borderTopWidth;\n if(backgroundClip === 'paddingBox') {\n y1 -= paddingTop;\n }\n else if(backgroundClip === 'borderBox') {\n y1 -= paddingTop + borderTopWidth;\n }\n }\n x2 = lineBox.x + diff + lineHeight + bcEnd - leading;\n bx2 = lineBox.x + diff + lineHeight + pbEnd - leading;\n y2 = end.y + end.outerHeight;\n }\n else {\n bx1 = x1;\n if(isStart) {\n bx1 -= paddingLeft + borderLeftWidth;\n if(backgroundClip === 'paddingBox') {\n x1 -= paddingLeft;\n }\n else if(backgroundClip === 'borderBox') {\n x1 -= paddingLeft + borderLeftWidth;\n }\n }\n x2 = end.x + end.outerWidth;\n y2 = lineBox.y + lineBox.oy + diff + lineHeight + bcEnd - leading;\n by2 = lineBox.y + lineBox.oy + diff + lineHeight + pbEnd - leading;\n }\n // TextBox的parent是Text,再是Dom,这里一定是inline,无嵌套就是xom本身,有则包含若干层最上层还是xom\n dom = end instanceof TextBox ? end.parent.domParent : end.domParent;\n // 从end开始,向上获取dom节点的尾部mpb进行累加,直到xom跳出\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(end === list[list.length - 1]) {\n if(isUpright) {\n let {\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = dom.computedStyle;\n y2 += marginBottom + paddingBottom + borderBottomWidth;\n }\n else {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n x2 += marginRight + paddingRight + borderRightWidth;\n }\n }\n dom = dom.domParent;\n }\n if(isUpright) {\n by2 = y2;\n if(isEnd) {\n by2 += paddingBottom + borderBottomWidth;\n if(backgroundClip === 'paddingBox') {\n y2 += paddingBottom;\n }\n else if(backgroundClip === 'borderBox') {\n y2 += paddingBottom + borderBottomWidth;\n }\n }\n }\n else {\n bx2 = x2;\n if(isEnd) {\n bx2 += paddingRight + borderRightWidth;\n if(backgroundClip === 'paddingBox') {\n x2 += paddingRight;\n }\n else if(backgroundClip === 'borderBox') {\n x2 += paddingRight + borderRightWidth;\n }\n }\n }\n return [x1, y1, x2, y2, bx1, by1, bx2, by2];\n}\n\n/**\n * 统计inline的所有contentBox排成一行时的总宽度,考虑嵌套的mpb\n * @param xom\n * @param contentBoxList\n * @param isUpright\n * @returns {number}\n */\nfunction getInlineWidth(xom, contentBoxList, isUpright) {\n let sum = 0;\n let length = contentBoxList.length;\n if(contentBoxList[length - 1] instanceof Ellipsis) {\n length--;\n }\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(isUpright) {\n sum += contentBox.height;\n }\n else {\n sum += contentBox.width;\n }\n // 嵌套时,首尾box考虑mpb\n let dom = contentBox instanceof TextBox ? contentBox.parent.domParent : contentBox.domParent;\n while(dom !== xom) {\n let list = dom.contentBoxList;\n if(contentBox === list[0]) {\n if(isUpright) {\n let {\n [MARGIN_TOP]: marginTop,\n [PADDING_TOP]: paddingTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n } = dom.computedStyle;\n sum += marginTop + paddingTop + borderTopWidth;\n }\n else {\n let {\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = dom.computedStyle;\n sum += marginLeft + paddingLeft + borderLeftWidth;\n }\n }\n if(contentBox === list[list.length - 1]) {\n if(isUpright) {\n let {\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_BOTTOM]: paddingBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } = dom.computedStyle;\n sum += marginBottom + paddingBottom + borderBottomWidth;\n }\n else {\n let {\n [MARGIN_RIGHT]: marginRight,\n [PADDING_RIGHT]: paddingRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } = dom.computedStyle;\n sum += marginRight + paddingRight + borderRightWidth;\n }\n }\n dom = dom.domParent;\n }\n }\n return sum;\n}\n\nexport default {\n getInlineBox,\n getInlineWidth,\n};\n","import unit from './unit';\nimport transform from './transform';\nimport enums from '../util/enums';\n\nconst { STYLE_KEY: { SCALE_X, SCALE_Y } } = enums;\nconst { NUMBER } = unit;\n\nfunction matrixResize(imgWidth, imgHeight, targetWidth, targetHeight, x, y, w, h) {\n if(imgWidth === targetWidth && imgHeight === targetHeight) {\n return;\n }\n let list = [\n { k: SCALE_X, v: { v: targetWidth / imgWidth, u: NUMBER } },\n { k: SCALE_Y, v: { v: targetHeight / imgHeight, u: NUMBER } },\n ];\n return transform.calMatrixWithOrigin(list, x, y, w, h);\n}\n\nexport default {\n matrixResize,\n};\n","import border from './border';\nimport transform from './transform';\nimport mx from '../math/matrix';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport enums from '../util/enums';\nimport image from './image';\n\nconst {\n STYLE_KEY: {\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n },\n} = enums;\nconst { clone, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBgc(xom, renderMode, ctx, color, list, x, y, w, h, btlr, btrr, bbrr, bblr,\n method = 'fill', isInline = false, dx = 0, dy = 0) {\n // radial渐变ellipse形状会有matrix,用以从圆缩放到椭圆\n let matrix, cx, cy;\n if(Array.isArray(color)) {\n matrix = color[1];\n cx = color[2];\n cy = color[3];\n color = color[0];\n }\n // border-radius使用三次贝塞尔曲线模拟1/4圆角,误差在[0, 0.000273]之间\n list = list || border.calRadius(x, y, w, h, btlr, btrr, bbrr, bblr);\n if(!list) {\n list = [\n [x, y],\n [x + w, y],\n [x + w, y + h],\n [x, y + h],\n [x, y],\n ];\n }\n // 椭圆有matrix,用逆矩阵变化点来完成\n if(matrix) {\n matrix = transform.calMatrixByOrigin(matrix, cx, cy);\n let t = mx.inverse(matrix);\n list = list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i], y: item[i + 1] }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(matrix) {\n ctx.save();\n let me = xom.matrixEvent;\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx.fillStyle !== color) {\n ctx.fillStyle = color;\n }\n canvasPolygon(ctx, list, dx, dy);\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = svgPolygon(list);\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n },\n ],\n };\n xom.__cacheDefs.push(v);\n return ctx.add(v);\n }\n else {\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', color],\n ],\n });\n // 椭圆渐变独有\n if(matrix) {\n let bb = xom.virtualDom.bb;\n bb[bb.length - 1].props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n }\n }\n }\n}\n\nfunction renderImage(xom, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, isInline,\n dx = 0, dy = 0) {\n let source = loadBgi.source;\n // 无source不绘制,可能错误或加载中\n if(source) {\n bx1 += dx;\n by1 += dy;\n bx2 += dx;\n by2 += dy;\n let bgW = bx2 - bx1;\n let bgH = by2 - by1;\n let { width, height } = loadBgi;\n let [w, h] = backgroundSize[i] || [];\n // -1为auto,-2为contain,-3为cover\n if(w === -1 && h === -1) {\n w = width;\n h = height;\n }\n else if(w === -2) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n w = bgW;\n h = w * height / width;\n }\n else if(height > bgH) {\n h = bgH;\n w = h * width / height;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w >= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -3) {\n if(width > bgW && height > bgH) {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n else if(width > bgW) {\n h = bgH;\n w = h * width / height;\n }\n else if(height > bgH) {\n w = bgW;\n h = w * height / width;\n }\n else {\n w = width / bgW;\n h = height / bgH;\n if(w <= h) {\n w = bgW;\n h = w * height / width;\n }\n else {\n h = bgH;\n w = h * width / height;\n }\n }\n }\n else if(w === -1) {\n w = h * width / height;\n }\n else if(h === -1) {\n h = w * height / width;\n }\n let bgX = computedStyle[BACKGROUND_POSITION_X][i] || 0;\n if(/%/.test(bgX)) {\n bgX = (bgW - w) * parseFloat(bgX) * 0.01;\n }\n bgX += bx1;\n let bgY = computedStyle[BACKGROUND_POSITION_Y][i] || 0;\n if(/%/.test(bgY)) {\n bgY = (bgH - h) * parseFloat(bgY) * 0.01;\n }\n bgY += by1;\n // 超出尺寸模拟mask截取\n let needMask = bgX < bx1 || bgY < by1 || (bgX + w) > (bx1 + bgW) || (bgY + h) > (by1 + bgH);\n // 计算因为repeat,需要向4个方向扩展渲染几个数量图片\n let xnl = 0;\n let xnr = 0;\n let ynt = 0;\n let ynb = 0;\n // repeat-x\n if(['repeatX', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgX - bx1;\n if(diff > 0) {\n xnl = Math.ceil(diff / w);\n }\n diff = bx1 + bgW - bgX - w;\n if(diff > 0) {\n xnr = Math.ceil(diff / w);\n }\n }\n // repeat-y\n if(['repeatY', 'repeat'].indexOf(backgroundRepeat[i]) > -1) {\n let diff = bgY - by1;\n if(diff > 0) {\n ynt = Math.ceil(diff / h);\n }\n diff = by1 + bgH - bgY - h;\n if(diff > 0) {\n ynb = Math.ceil(diff / h);\n }\n }\n // 分同行列和4个角分别判断,先看同行同列,再看4个角的象限\n let repeat = [];\n if(xnl > 0) {\n for(let i = 0; i < xnl; i++) {\n let x = bgX - (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最左边超过没有\n if(!needMask && i === 0 && x < bx1) {\n needMask = true;\n }\n }\n }\n if(xnr > 0) {\n for(let i = 0; i < xnr; i++) {\n let x = bgX + (i + 1) * w;\n repeat.push([x, bgY]);\n // 看最右边超过没有\n if(!needMask && i === xnr - 1 && x + w > bx1 + bgW) {\n needMask = true;\n }\n }\n }\n if(ynt > 0) {\n for(let i = 0; i < ynt; i++) {\n let y = bgY - (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最上边超过没有\n if(!needMask && i === 0 && y < by1) {\n needMask = true;\n }\n }\n }\n if(ynb > 0) {\n for(let i = 0; i < ynb; i++) {\n let y = bgY + (i + 1) * h;\n repeat.push([bgX, y]);\n // 看最下边超过没有\n if(!needMask && i === ynb - 1 && y + w > by1 + bgH) {\n needMask = true;\n }\n }\n }\n // 原点和同行列十字画完,看4个角的情况\n if(xnl > 0 && ynt > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX - (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynt > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynt; j++) {\n repeat.push([bgX + (i + 1) * w, bgY - (j + 1) * h]);\n }\n }\n }\n if(xnl > 0 && ynb > 0) {\n for(let i = 0; i < xnl; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX - (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(xnr > 0 && ynb > 0) {\n for(let i = 0; i < xnr; i++) {\n for(let j = 0; j < ynb; j++) {\n repeat.push([bgX + (i + 1) * w, bgY + (j + 1) * h]);\n }\n }\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(needMask) {\n ctx.save();\n renderBgc(this, renderMode, ctx, '#FFF', null,\n bx1, by1, bgW, bgH, btlr, btrr, bbrr, bblr, 'clip');\n }\n // 先画不考虑repeat的中心声明的\n ctx.drawImage(source, bgX, bgY, w, h);\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n ctx.drawImage(source, item[0], item[1], w, h);\n });\n if(needMask) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let matrix = image.matrixResize(width, height, w, h, bgX, bgY, bgW, bgH);\n let props = [\n ['xlink:href', loadBgi.url],\n ['x', bgX],\n ['y', bgY],\n ['width', width],\n ['height', height],\n ];\n let needResize;\n if(matrix && !mx.isE(matrix)) {\n needResize = true;\n props.push(['transform', 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n if(needMask) {\n let p1 = { x: bx1, y: by1 };\n let p2 = { x: bx2, y: by2 };\n if(needResize) {\n let inverse = mx.inverse(matrix);\n p1 = mx.calPoint(p1, inverse);\n p2 = mx.calPoint(p2, inverse);\n }\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', `M${p1.x},${p1.y}L${p2.x},${p1.y}L${p2.x},${p2.y}L${p1.x},${p2.y}L${p1.x},${p1.y}`],\n ['fill', '#FFF'],\n ],\n }],\n };\n let id = ctx.add(v);\n xom.__cacheDefs.push(v);\n props.push(['clip-path', 'url(#' + id + ')']);\n }\n if(isInline) {\n let v = {\n tagName: 'symbol',\n props: [],\n children: [\n {\n type: 'img',\n tagName: 'image',\n props,\n }\n ],\n };\n xom.__cacheDefs.push(v);\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n v.children.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n return ctx.add(v);\n }\n else {\n // 先画不考虑repeat的中心声明的\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props,\n });\n // 再画重复的十字和4角象限\n repeat.forEach(item => {\n let copy = clone(props);\n if(needResize) {\n let matrix = image.matrixResize(width, height, w, h, item[0], item[1], bgW, bgH);\n if(matrix && !mx.isE(matrix)) {\n copy[5][1] = 'matrix(' + joinArr(mx.m2m6(matrix), ',') + ')';\n }\n }\n copy[1][1] = item[0];\n copy[2][1] = item[1];\n xom.virtualDom.bb.push({\n type: 'img',\n tagName: 'image',\n props: copy,\n });\n });\n }\n }\n }\n}\n\nexport default {\n renderBgc,\n renderImage,\n};\n","import inject from '../util/inject';\nimport util from '../util/util';\n\nconst { isFunction } = util;\n\nfunction traversalBefore(list, length, diff) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__before && item.__before(diff);\n }\n}\n\nfunction traversalAfter(list, length, diff) {\n for(let i = 0; i < length; i++) {\n let item = list[i];\n item.__after && item.__after(diff);\n }\n}\n\nlet isPause;\n\nclass Frame {\n constructor() {\n this.__rootTask = []; // 动画刷新后,每个root注册的刷新回调执行\n this.__task = [];\n this.__now = inject.now();\n }\n\n __init() {\n let self = this;\n let { task } = self;\n inject.cancelAnimationFrame(self.id);\n let last = self.__now = inject.now();\n function cb() {\n // 必须清除,可能会发生重复,当动画finish回调中gotoAndPlay(0),下方结束判断发现aTask还有值会继续,新的init也会进入再次执行\n inject.cancelAnimationFrame(self.id);\n self.id = inject.requestAnimationFrame(function() {\n if(isPause || !task.length) {\n return;\n }\n let now = self.__now = inject.now();\n let diff = now - last;\n diff = Math.max(diff, 0);\n // let delta = diff * 0.06; // 比例是除以1/60s,等同于*0.06\n last = now;\n // 优先动画计算\n let clone = task.slice(0);\n let length = clone.length;\n // 普通的before/after,动画计算在before,所有回调在after\n traversalBefore(clone, length, diff);\n let list = self.__rootTask.splice(0);\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n item && item(diff);\n }\n // 刷新成功后调用after,确保图像生成\n traversalAfter(clone, length, diff);\n // 执行每个Root的刷新并清空\n // 还有则继续,没有则停止节省性能\n if(task.length) {\n cb();\n }\n });\n }\n cb();\n }\n\n onFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n if(!task.length) {\n this.__init();\n }\n if(isFunction(handle)) {\n handle = {\n __after: handle,\n __karasFramecb: handle,\n };\n }\n task.push(handle);\n }\n\n offFrame(handle) {\n if(!handle) {\n return;\n }\n let { task } = this;\n for(let i = 0, len = task.length; i < len; i++) {\n let item = task[i];\n // 需考虑nextFrame包裹的引用对比\n if(item === handle || item.__karasFramecb === handle) {\n task.splice(i, 1);\n break;\n }\n }\n if(!task.length) {\n inject.cancelAnimationFrame(this.id);\n this.__now = null;\n }\n }\n\n nextFrame(handle) {\n if(!handle) {\n return;\n }\n // 包裹一层会导致添加后删除对比引用删不掉,需保存原有引用进行对比\n let cb = isFunction(handle) ? {\n __after: diff => {\n handle(diff);\n this.offFrame(cb);\n },\n } : {\n __before: handle.__before,\n __after: diff => {\n handle.__after && handle.__after(diff);\n this.offFrame(cb);\n },\n };\n cb.__karasFramecb = handle;\n this.onFrame(cb);\n }\n\n pause() {\n isPause = true;\n }\n\n resume() {\n if(isPause) {\n this.__init();\n isPause = false;\n }\n }\n\n get task() {\n return this.__task;\n }\n}\n\nexport default new Frame();\n","/**\n * https://github.com/gre/bezier-easing\n * BezierEasing - use bezier curve for transition easing function\n * by Gaëtan Renaudeau 2014 - 2015 – MIT License\n */\n\n// These values are established by empiricism with tests (tradeoff: performance VS precision)\nlet NEWTON_ITERATIONS = 4;\nlet NEWTON_MIN_SLOPE = 0.001;\nlet SUBDIVISION_PRECISION = 0.0000001;\nlet SUBDIVISION_MAX_ITERATIONS = 10;\n\nlet kSplineTableSize = 11;\nlet kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);\n\nlet float32ArraySupported = typeof Float32Array === 'function';\n\nfunction A(aA1, aA2) {\n return 1.0 - 3.0 * aA2 + 3.0 * aA1;\n}\n\nfunction B(aA1, aA2) {\n return 3.0 * aA2 - 6.0 * aA1;\n}\n\nfunction C(aA1) {\n return 3.0 * aA1;\n}\n\n// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.\nfunction calcBezier(aT, aA1, aA2) {\n return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\n// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.\nfunction getSlope(aT, aA1, aA2) {\n return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\n}\n\nfunction binarySubdivide(aX, aA, aB, mX1, mX2) {\n let currentX, currentT, i = 0;\n do {\n currentT = aA + (aB - aA) / 2.0;\n currentX = calcBezier(currentT, mX1, mX2) - aX;\n if(currentX > 0.0) {\n aB = currentT;\n } else {\n aA = currentT;\n }\n } while(Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n return currentT;\n}\n\nfunction newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {\n for(let i = 0; i < NEWTON_ITERATIONS; ++i) {\n let currentSlope = getSlope(aGuessT, mX1, mX2);\n if(currentSlope === 0.0) {\n return aGuessT;\n }\n let currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n}\n\nfunction LinearEasing(x) {\n return x;\n}\n\nfunction bezier(mX1, mY1, mX2, mY2) {\n if(!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {\n throw new Error('bezier x values must be in [0, 1] range');\n }\n\n if(mX1 === mY1 && mX2 === mY2) {\n return LinearEasing;\n }\n\n // Precompute samples table\n let sampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n for(let i = 0; i < kSplineTableSize; ++i) {\n sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n }\n\n function getTForX(aX) {\n let intervalStart = 0.0;\n let currentSample = 1;\n let lastSample = kSplineTableSize - 1;\n\n for(; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {\n intervalStart += kSampleStepSize;\n }\n --currentSample;\n\n // Interpolate to provide an initial guess for t\n let dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);\n let guessForT = intervalStart + dist * kSampleStepSize;\n\n let initialSlope = getSlope(guessForT, mX1, mX2);\n if(initialSlope >= NEWTON_MIN_SLOPE) {\n return newtonRaphsonIterate(aX, guessForT, mX1, mX2);\n } else if(initialSlope === 0.0) {\n return guessForT;\n } else {\n return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);\n }\n }\n\n return function BezierEasing(x) {\n // Because JavaScript number are imprecise, we should guarantee the extremes are right.\n if(x === 0 || x === 1) {\n return x;\n }\n return calcBezier(getTForX(x), mY1, mY2);\n };\n}\n\nlet easing = {\n linear: bezier(1, 1, 0, 0),\n easeIn: bezier(0.42, 0, 1, 1),\n easeOut: bezier(0, 0, 0.58, 1),\n ease: bezier(0.25, 0.1, 0.25, 1),\n easeInOut: bezier(0.42, 0, 0.58, 1),\n cubicBezier: bezier,\n getEasing(v, v1, v2, v3) {\n if(arguments.length === 4) {\n return bezier(v, v1, v2, v3);\n }\n else if(Array.isArray(v) && v.length === 4) {\n return bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v) {\n v = v.toString();\n let timingFunction;\n if(/^\\s*(?:cubic-bezier\\s*)?\\(\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*,\\s*[\\d.]+\\s*,\\s*[-\\d.]+\\s*\\)\\s*$/i.test(v)) {\n v = v.match(/[\\d.]+/g);\n timingFunction = bezier(v[0], v[1], v[2], v[3]);\n }\n else if(v !== 'getEasing') {\n timingFunction = this[v];\n }\n return timingFunction;\n }\n },\n};\n\neasing['ease-in'] = easing.easeIn;\neasing['ease-out'] = easing.easeOut;\neasing['ease-in-out'] = easing.easeInOut;\n\nexport default easing;\n","import util from '../util/util';\n\nconst { isFunction, isNil } = util;\n\nclass Controller {\n constructor() {\n this.__records = []; // 默认记录和自动记录\n this.__records2 = []; // 非自动播放的动画记录\n this.__list = [] // 默认初始化播放列表,自动播放也存这里\n this.__list2 = []; // json中autoPlay为false的初始化存入这里\n this.__onList = []; // list中已存在的侦听事件,list2初始化时也需要增加上\n this.__lastTime = {}; // 每个类型的上次触发时间,防止重复emit\n }\n\n add(v, list = this.__list) {\n if(list.indexOf(v) === -1) {\n list.push(v);\n }\n }\n\n remove(v) {\n let i = this.__list.indexOf(v);\n if(i > -1) {\n this.__list.splice(i, 1);\n }\n }\n\n __destroy() {\n this.__records = [];\n this.__records2 = [];\n this.__list = [];\n this.__list2 = [];\n }\n\n __action(k, args) {\n this.__list.forEach(item => {\n item[k].apply(item, args);\n });\n }\n\n init(records = this.__records, list = this.__list) {\n // 检查尚未初始化的record,并初始化,后面才能调用各种控制方法\n if(records.length) {\n // 清除防止重复调用,并且新的json还会进入整体逻辑\n records.splice(0).forEach(item => {\n let { target, animate, areaStart, areaDuration } = item;\n if(target.isDestroyed || !animate) {\n return;\n }\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n animate.forEach(animate => {\n let { value, options } = animate;\n if(areaStart || !isNil(areaDuration)) {\n options = Object.assign({}, options); // clone防止多个使用相同的干扰\n options.areaStart = areaStart;\n options.areaDuration = areaDuration;\n }\n options.autoPlay = false;\n let o = target.animate(value, options);\n this.add(o, list);\n });\n });\n }\n // 非自动播放后初始化需检测事件,给非自动播放添加上,并清空本次\n if(records === this.__records2) {\n let onList = this.__onList;\n let list2 = this.list2;\n if(list2.length && onList.length) {\n list2.forEach(item => {\n onList.forEach(arr => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[arr[0]]) {\n this.__lastTime[arr[0]] = time;\n arr[1] && arr[1]();\n }\n };\n cb.__karasEventCb = arr[1];\n item.off(arr[0], arr[1]);\n item.on(arr[0], cb);\n });\n });\n }\n }\n }\n\n __playAuto() {\n this.init();\n this.__action('play');\n }\n\n play(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('play', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n pause() {\n this.__action('pause');\n }\n\n resume(cb) {\n let once = true;\n this.__action('resume', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n __mergeAuto() {\n this.init();\n this.init(this.__records2);\n if(this.__list2.length) {\n this.__list = this.__list.concat(this.__list2);\n this.__list2 = [];\n }\n }\n\n cancel(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('cancel', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n finish(cb) {\n this.__mergeAuto();\n this.__onList = [];\n let once = true;\n this.__action('finish', [cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndStop(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n let once = true;\n this.__action('gotoAndStop', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n gotoAndPlay(v, options, cb) {\n this.__mergeAuto();\n this.__onList = [];\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n let once = true;\n this.__action('gotoAndPlay', [v, options, cb && function(diff) {\n if(once) {\n once = false;\n if(isFunction(cb)) {\n cb(diff);\n }\n }\n }]);\n }\n\n on(id, handle) {\n if(!isFunction(handle)) {\n return;\n }\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.__on(id[i], handle);\n }\n this.__onList.push([id, handle]);\n }\n else {\n this.__on(id, handle);\n this.__onList.push([id, handle]);\n }\n }\n\n __on(id, handle) {\n this.__list.forEach(item => {\n let cb = () => {\n let time = item.timestamp;\n if(time !== this.__lastTime[id]) {\n this.__lastTime[id] = time;\n handle && handle();\n }\n };\n cb.__karasEventCb = handle;\n item.on(id, cb);\n });\n }\n\n off(id, handle) {\n if(Array.isArray(id)) {\n for(let i = 0, len = id.length; i < len; i++) {\n this.off(id[i], handle);\n }\n }\n else {\n this.list.forEach(item => {\n item.off(id, handle);\n });\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get list2() {\n return this.__list2;\n }\n\n __set(key, value) {\n this.list.forEach(item => {\n item[key] = value;\n });\n }\n\n set playbackRate(v) {\n this.__set('playbackRate', v);\n }\n\n set iterations(v) {\n this.__set('iterations', v);\n }\n\n set playCount(v) {\n this.__set('playCount', v);\n }\n\n set fps(v) {\n this.__set('fps', v);\n }\n\n set currentTime(v) {\n this.__set('currentTime', v);\n }\n\n set spfLimit(v) {\n this.__set('spfLimit', v);\n }\n\n set delay(v) {\n this.__set('delay', v);\n }\n\n set endDelay(v) {\n this.__set('endDelay', v);\n }\n\n set fill(v) {\n this.__set('fill', v);\n }\n\n set direction(v) {\n this.__set('direction', v);\n }\n}\n\nexport default Controller;\n","import css from '../style/css';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport Event from '../util/Event';\nimport inject from '../util/inject';\nimport frame from './frame';\nimport easing from './easing';\nimport change from '../refresh/change';\nimport key from './key';\nimport mx from '../math/matrix';\nimport level from '../refresh/level';\nimport Controller from './Controller';\n\nconst {\n STYLE_KEY: {\n FILTER,\n TRANSFORM_ORIGIN,\n PERSPECTIVE_ORIGIN,\n BACKGROUND_CLIP,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BOX_SHADOW,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n BACKGROUND_SIZE,\n FONT_SIZE,\n FLEX_BASIS,\n FLEX_DIRECTION,\n WIDTH,\n HEIGHT,\n TOP,\n BOTTOM,\n LINE_HEIGHT,\n OPACITY,\n Z_INDEX,\n TRANSFORM,\n COLOR,\n FONT_WEIGHT,\n FONT_STYLE,\n FONT_FAMILY,\n TEXT_ALIGN,\n MATRIX,\n ROTATE_3D,\n TRANSLATE_PATH,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_OVER,\n STROKE_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n TEXT_STROKE_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_TOP_WIDTH,\n LEFT,\n RIGHT,\n MARGIN_BOTTOM,\n MARGIN_TOP,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n PADDING_TOP,\n PADDING_RIGHT,\n PADDING_LEFT,\n PADDING_BOTTOM,\n STROKE_MITERLIMIT,\n LETTER_SPACING,\n PERSPECTIVE,\n SKEW_X,\n SKEW_Y,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n BACKGROUND_IMAGE,\n FILL,\n STROKE,\n BACKGROUND_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_TOP_COLOR,\n POSITION,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, RGBA, STRING, NUMBER, REM, VW, VH, VMAX, VMIN, GRADIENT, calUnit } = unit;\nconst { isNil, isFunction, isNumber, isObject, clone, equalArr } = util;\nconst { linear } = easing;\nconst { cloneStyle, equalStyle } = css;\nconst { isGeom, GEOM } = change;\nconst {\n getLevel,\n isRepaint,\n NONE,\n TRANSFORM: TF,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n ROTATE_Z: RZ,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n SCALE,\n} = level;\n\nconst {\n isColorKey,\n isExpandKey,\n isLengthKey,\n isGradientKey,\n isRadiusKey,\n} = key;\n\n/**\n * 通知root更新当前动画,需要根据frame的状态来决定是否是同步插入\n * 在异步时,因为动画本身是异步,需要addRefreshTask\n * 而如果此时frame在执行before过程中,说明帧动画本身是在before计算的,需要同步插入\n * @param keys 样式所有的key\n * @param root\n * @param node\n * @param aniParams 动画更新的特殊优化参数\n * @param cb\n */\nfunction genBeforeRefresh(keys, root, node, aniParams, cb) {\n if(aniParams && !aniParams.allInFn) {\n aniParams = null;\n }\n root.__addUpdate(node, keys, null, null, null, aniParams, cb);\n}\n\n/**\n * 将每帧的样式格式化,提取出offset属性并转化为时间,提取出缓动曲线easing\n * 加好空数组transition/keys,后续计算两帧之间变化时存入\n * 加好空数组fixed,后续计算无帧变化时存入\n * @param style 关键帧样式\n * @param duration 动画时间长度\n * @param es options的easing曲线控制,frame没有自定义则使用全局的\n */\nfunction framing(style, duration, es) {\n let { offset, easing } = style;\n // 这两个特殊值提出来存储不干扰style\n delete style.offset;\n delete style.easing;\n // translatePath特殊对待,ae的曲线运动动画,普通css不包含,特殊处理并添加到style最后\n let translatePath = style.translatePath;\n style = css.normalize(style);\n if(Array.isArray(translatePath) && [6, 8].indexOf(translatePath.length) > -1) {\n style[TRANSLATE_PATH] = translatePath.map(item => {\n let v = calUnit(item);\n if(v.u === NUMBER) {\n v.u = PX;\n }\n return v;\n });\n }\n return {\n style,\n time: offset * duration,\n easing: easing || es,\n timingFunction: getEasing(easing || es),\n transition: [], // 变化的属性\n keys: [], // 变化的k\n fixed: [], // 不变的k\n lastPercent: -1,\n };\n}\n\nfunction calByUnit(p, n, container, root) {\n if(p.u === PX) {\n if(n.u === PERCENT) {\n return n.v * 0.01 * container - p.v;\n }\n else if(n.u === REM) {\n return n.v * root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width * 0.01 - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height * 0.01 - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) * 0.01 - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) * 0.01 - p.v;\n }\n }\n else if(p.u === PERCENT) {\n if(n.u === PX) {\n return n.v * 100 / container - p.v;\n }\n else if(n.u === REM) {\n return n.v * root.computedStyle[FONT_SIZE] * 100 / container - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width / container - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height / container - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) / container - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) / container - p.v;\n }\n }\n else if(p.u === REM) {\n if(n.u === PX) {\n return n.v / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * 0.01 * container / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) * 0.01 / root.computedStyle[FONT_SIZE] - p.v;\n }\n }\n else if(p.u === VW) {\n if(n.u === PX) {\n return n.v * 100 / root.__width - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / root.__width - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / root.__width - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height / root.__width - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) / root.__width - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) / root.__width - p.v;\n }\n }\n else if(p.u === VH) {\n if(n.u === PX) {\n return n.v * 100 / root.__height - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / root.__height - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width / root.__height - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / root.__height - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) / root.__height - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) / root.__height - p.v;\n }\n }\n else if(p.u === VMAX) {\n if(n.u === PX) {\n return n.v * 100 / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height / Math.max(root.__width, root.__height) - p.v;\n }\n else if(n.u === VMIN) {\n return n.v * Math.min(root.__width, root.__height) / Math.max(root.__width, root.__height) - p.v;\n }\n }\n else if(p.u === VMIN) {\n if(n.u === PX) {\n return n.v * 100 / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === REM) {\n return n.v * 100 * root.computedStyle[FONT_SIZE] / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === PERCENT) {\n return n.v * container / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === VW) {\n return n.v * root.__width / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === VH) {\n return n.v * root.__height / Math.min(root.__width, root.__height) - p.v;\n }\n else if(n.u === VMAX) {\n return n.v * Math.max(root.__width, root.__height) / Math.min(root.__width, root.__height) - p.v;\n }\n }\n return 0;\n}\n\n/**\n * 计算两帧之间的差,单位不同的以后面为准,返回的v表示差值\n * 没有变化返回空\n * auto等无法比较的不参与计算\n * @param prev 上一帧样式\n * @param next 下一帧样式\n * @param k 比较的样式名\n * @param target dom对象\n */\nfunction calDiff(prev, next, k, target) {\n let p = prev.style[k];\n let n = next.style[k];\n // 提前设置好引用,无需每帧计算时取引用,由于单位一定相同,可以简化直接引用到值v上无需单位u,有些直接量没有单位\n let cl = prev.clone[k];\n // translatePath可能不存在\n if(cl && cl.hasOwnProperty('v')) {\n cl = cl.v;\n }\n let res = { k, st: p, cl };\n if(k === TRANSFORM) {\n // transform不存在时需给默认矩阵,他只有1个matrix3d的值做动画\n if(!p && !n || !p.length && !n.length) {\n return;\n }\n let pm, nm;\n if(p && p[0]) {\n pm = p[0].v;\n }\n else {\n pm = mx.identity();\n }\n if(n && n[0]) {\n nm = n[0].v;\n }\n else {\n nm = mx.identity();\n }\n // transform特殊被初始化转成matrix矩阵,直接计算差值\n if(equalArr(pm, nm)) {\n return;\n }\n res.v = [\n nm[0] - pm[0],\n nm[1] - pm[1],\n nm[2] - pm[2],\n nm[3] - pm[3],\n nm[4] - pm[4],\n nm[5] - pm[5],\n nm[6] - pm[6],\n nm[7] - pm[7],\n nm[8] - pm[8],\n nm[9] - pm[9],\n nm[10] - pm[10],\n nm[11] - pm[11],\n nm[12] - pm[12],\n nm[13] - pm[13],\n nm[14] - pm[14],\n nm[15] - pm[15],\n ];\n }\n else if(k === ROTATE_3D) {\n if(p[0] === n[0] && p[1] === n[1] && p[2] === n[2]\n && p[3].v === n[3].v && p[3].u === n[3].u) {\n return;\n }\n res.v = [n[0] - p[0], n[1] - p[1], n[2] - p[2], n[3].v - p[3].v];\n }\n else if(k === FILTER) {\n // filter很特殊,里面有多个滤镜,按顺序计算,为空视为默认值,如blur默认0,brightness默认1\n let len = Math.max(p ? p.length : 0, n ? n.length : 0);\n let v = [], has;\n for(let i = 0; i < len; i++) {\n let pv = p ? p[i] : null, nv = n ? n[i] : null;\n // 空或key不等都无变化\n if(isNil(pv) || isNil(nv) || pv.k !== nv.k) {\n v.push(null);\n }\n else {\n has = true;\n let k = pv.k, pvv = pv.v, nvv = nv.v;\n if(k === 'blur') {\n if(pvv.u === nvv.u) {\n v.push(nvv.v - pvv.v);\n }\n else {\n let v2 = calByUnit(pvv, nvv, 0, target.root);\n v.push(v2);\n }\n }\n else if(k === 'hueRotate' || k === 'saturate' || k === 'brightness' || k === 'contrast'\n || k === 'sepia' || k === 'invert' || k === 'grayscale') {\n v.push(nvv.v - pvv.v);\n }\n else if(k === 'dropShadow') {\n let v2 = [];\n for(let i = 0; i < 4; i++) {\n let a = pvv[i], b = nvv[i];\n if(a.u === b.u) {\n v2.push(b.v - a.v);\n }\n else {\n v2.push(calByUnit(a, b, i === 1 ? target.clientHeight: target.clientWidth, target.root));\n }\n }\n v2.push([\n nvv[4][0] - pvv[4][0],\n nvv[4][1] - pvv[4][1],\n nvv[4][2] - pvv[4][2],\n nvv[4][3] - pvv[4][3],\n ])\n v.push(v2);\n }\n }\n }\n if(!has) {\n return;\n }\n res.v = v;\n }\n else if(k === TRANSFORM_ORIGIN || k === PERSPECTIVE_ORIGIN || isRadiusKey(k)) {\n // x/y都相等无需\n if(n[0].v === p[0].v && n[0].u === p[0].u\n && n[1].v === p[1].v && n[1].u === p[1].u) {\n return;\n }\n res.v = [];\n for(let i = 0; i < 2; i++) {\n let pi = p[i];\n let ni = n[i];\n if(pi.u === ni.u) {\n res.v.push(ni.v - pi.v);\n }\n else {\n let v = calByUnit(pi, ni, target[i ? 'outerHeight' : 'outerWidth'], target.root);\n res.v.push(v);\n }\n }\n }\n else if(k === BACKGROUND_POSITION_X || k === BACKGROUND_POSITION_Y) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(pi.u === ni.u) {\n let v = ni.v - pi.v;\n res.v.push(v);\n }\n else {\n let k2;\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = k === BACKGROUND_POSITION_X ? 'width' : 'height';\n }\n else {\n k2 = k === BACKGROUND_POSITION_X ? 'offsetWidth' : 'offsetHeight';\n }\n let v = calByUnit(pi, ni, target[k2], target.root);\n res.v.push(v);\n }\n }\n }\n else if(k === BOX_SHADOW) {\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let a = p[i];\n let b = n[i];\n // 不能为空,outset/inset必须相等\n if(!a || !b || a[5] !== b[5]) {\n res.v.push(null);\n continue;\n }\n let v = [];\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n if(a[j].u === b[j].u) {\n v.push(b[j].v - a[j].v);\n }\n else {\n let v2 = calByUnit(a[j], b[j], i === 1 ? target.offsetHeight : target.offsetWidth, target.root);\n v.push(v2);\n }\n }\n // rgba\n let c = [];\n for(let j = 0; j < 4; j++) {\n c.push(b[4][j] - a[4][j]);\n }\n v.push(c);\n res.v.push(v);\n }\n }\n else if(k === BACKGROUND_SIZE) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n let has;\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni) {\n res.v.push(null);\n continue;\n }\n let temp = [];\n for(let j = 0; j < 2; j++) {\n let pp = pi[j], nn = ni[j];\n if(pp.u === nn.u) {\n temp.push(nn.v - pp.v);\n }\n else {\n let k2;\n if(['padding-box', 'paddingBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'clientWidth' : 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(target.computedStyle[BACKGROUND_CLIP]) > -1) {\n k2 = i ? 'width' : 'height';\n }\n else {\n k2 = i ? 'offsetWidth' : 'offsetHeight';\n }\n let v = calByUnit(pp, nn, target[k2], target.root);\n temp.push(v);\n }\n }\n if(equalArr(temp, [0, 0])) {\n res.v.push(null);\n }\n else {\n res.v.push(temp);\n has = true;\n }\n }\n if(!has) {\n return;\n }\n }\n else if(k === OPACITY || k === Z_INDEX) {\n if(n === p) {\n return;\n }\n res.v = n - p;\n }\n else if(k === STROKE_WIDTH) {\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(pi.u === ni.u) {\n let v = ni.v - pi.v;\n res.v.push(v);\n }\n let v = calByUnit(pi, ni, target.offsetWidth, target.root);\n res.v.push(v);\n }\n }\n // 特殊的path,不存在style中但在动画某帧中,不会统一化所以可能反向计算frameR时后一帧没有\n else if(k === TRANSLATE_PATH && p) {\n let k1 = 'offsetWidth', k2 = 'offsetHeight';\n let computedStyle = target && target.__computedStyle;\n if(computedStyle) {\n if(['padding-box', 'paddingBox'].indexOf(computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'clientWidth';\n k2 = 'clientHeight';\n }\n else if(['content-box', 'contentBox'].indexOf(computedStyle[BACKGROUND_CLIP]) > -1) {\n k1 = 'width';\n k2 = 'height';\n }\n }\n res.v = p.map((item, i) => {\n let { v, u } = item;\n if(u === PERCENT) {\n if(i % 2 === 0) {\n return { v: (parseFloat(v) || 0) * 0.01 * target[k1], u: PX };\n }\n else {\n return { v: (parseFloat(v) || 0) * 0.01 * target[k2], u: PX };\n }\n }\n else if(u === REM) {\n return { v: (parseFloat(v) || 0) * target.root.computedStyle[FONT_SIZE] * 100, u: PX };\n }\n else if(u === VW) {\n return { v: (parseFloat(v) || 0) * 0.01 * target.root.__width, u: PX };\n }\n else if(u === VH) {\n return { v: (parseFloat(v) || 0) * 0.01 * target.root.__height, u: PX };\n }\n else if(u === VMAX) {\n return { v: (parseFloat(v) || 0) * 0.01 * Math.max(target.root.__width, target.root.__height), u: PX };\n }\n else if(u === VMIN) {\n return { v: (parseFloat(v) || 0) * 0.01 * Math.min(target.root.__width, target.root.__height), u: PX };\n }\n else {\n return { v: parseFloat(v) || 0, u: PX };\n }\n });\n }\n else if(isExpandKey(k)) {\n if(p.u === n.u) {\n let v = n.v - p.v;\n if(v === 0) {\n return;\n }\n res.v = v;\n }\n else {\n let v = calByUnit(p, n, target[k === TRANSLATE_X || k === TRANSLATE_Z ? 'outerWidth' : 'outerHeight'], target.root);\n if(!v) {\n return;\n }\n res.v = v;\n }\n }\n else if(isLengthKey(k)) {\n // auto不做动画\n if(p.u === AUTO || n.u === AUTO) {\n return;\n }\n let computedStyle = target.computedStyle;\n let parentComputedStyle = (target.domParent || target).computedStyle;\n let diff = 0;\n if(p.u === n.u) {\n diff = n.v - p.v;\n }\n // lineHeight奇怪的单位变化,%相对于fontSize\n else if(k === LINE_HEIGHT) {\n diff = calByUnit(p, n, computedStyle[FONT_SIZE], target.root);\n }\n // fontSize的%相对于parent的\n else if(k === FONT_SIZE) {\n diff = calByUnit(p, n, parentComputedStyle[FONT_SIZE], target.root);\n }\n // 相对于父height的特殊属性\n else if(k === FLEX_BASIS\n && ['column', 'column-reverse', 'columnReverse'].indexOf(computedStyle[FLEX_DIRECTION]) > -1\n || [HEIGHT, TOP, BOTTOM].indexOf(k) > -1) {\n if(p.u !== AUTO && n.u !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[HEIGHT], target.root);\n }\n }\n // 其余都是相对于父width的\n else {\n if(p.u !== AUTO && n.u !== AUTO) {\n diff = calByUnit(p, n, parentComputedStyle[WIDTH], target.root);\n }\n }\n // 兜底NaN非法\n if(diff === 0 || isNaN(diff)) {\n return;\n }\n res.v = diff;\n }\n else if(isGradientKey(k)) {\n // backgroundImage发生了渐变色和图片的变化,fill发生渐变色和纯色的变化等\n res.v = [];\n let length = Math.min(p.length, n.length);\n for(let i = 0; i < length; i++) {\n let pi = p[i], ni = n[i];\n if(!pi || !ni || pi.u !== ni.u || pi.u === STRING) {\n res.v.push(null);\n continue;\n }\n let u = pi.u;\n pi = pi.v;\n ni = ni.v;\n let temp;\n // 渐变\n if(u === GRADIENT) {\n let r = calDiffGradient(pi, ni, target);\n if(!r) {\n res.v.push(null);\n continue;\n }\n temp = r;\n }\n // 纯色\n else {\n if(equalArr(ni, pi)) {\n res.v.push(null);\n continue;\n }\n temp = [\n ni[0] - pi[0],\n ni[1] - pi[1],\n ni[2] - pi[2],\n ni[3] - pi[3]\n ];\n }\n res.v.push(temp);\n }\n }\n else if(isColorKey(k)) {\n if(n.u !== p.u) {\n return;\n }\n // 特殊增加支持有gradient的先判断,仅color和textStrokeColor支持\n n = n.v;\n p = p.v;\n if(n.u === GRADIENT) {\n let r = calDiffGradient(p, n, target);\n if(!r) {\n return;\n }\n res.v = r;\n }\n else {\n if(equalArr(n, p)) {\n return;\n }\n res.v = [\n n[0] - p[0],\n n[1] - p[1],\n n[2] - p[2],\n n[3] - p[3]\n ];\n }\n }\n else if(GEOM.hasOwnProperty(k)) {\n let tagName = target.tagName;\n if(isNil(p)) {\n return;\n }\n else if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calDiff)) {\n let fn = GEOM[k][tagName].calDiff;\n if(target.isMulti) {\n let arr = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n arr.push(fn(p[i], n[i]));\n }\n return arr;\n }\n else {\n res.v = fn(p, n);\n }\n }\n // 特殊处理multi\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.min(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(null);\n }\n else {\n let v3 = [];\n for(let k = 0, len3 = Math.max(pv2.length, nv2.length); k < len3; k++) {\n let pv3 = pv2[k];\n let nv3 = nv2[k];\n // control由4点变2点\n if(isNil(pv3) || isNil(nv3)) {\n v3.push(0);\n }\n else {\n v3.push(nv3 - pv3);\n }\n }\n v2.push(v3);\n }\n }\n res.v.push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n res.v.push([\n nv[0] - pv[0],\n nv[1] - pv[1],\n ]);\n }\n }\n }\n else {\n if(n === p || equalArr(n, p) || k === 'edge' || k === 'closure' || k === 'booleanOperations') {\n return;\n }\n let v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || isNil(nv)) {\n v.push(0);\n }\n v.push(nv - pv);\n }\n res.v = v;\n }\n }\n // 非multi特殊处理这几类数组类型数据\n else if(k === 'points' || k === 'controls') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [];\n for(let i = 0, len = Math.min(p.length, n.length); i < len; i++) {\n let pv = p[i];\n let nv = n[i];\n if(isNil(pv) || !pv.length || isNil(nv) || !nv.length) {\n res.v.push(null);\n }\n else {\n let v2 = [];\n for(let j = 0, len2 = Math.max(pv.length, nv.length); j < len2; j++) {\n let pv2 = pv[j];\n let nv2 = nv[j];\n // control由4点变2点\n if(isNil(pv2) || isNil(nv2)) {\n v2.push(0);\n }\n else {\n v2.push(nv2 - pv2);\n }\n }\n res.v.push(v2);\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(isNil(n) || !n.length || isNil(p) || !p.length || equalArr(p, n)) {\n return;\n }\n res.v = [\n n[0] - p[0],\n n[1] - p[1],\n ];\n }\n // 其它简单数据,除了edge/closure/booleanOperations没有增量\n else {\n if(n === p || k === 'edge' || k === 'closure' || k === 'booleanOperations') {\n return;\n }\n else {\n res.v = n - p;\n }\n }\n }\n // display等不能有增量过程的\n else {\n return;\n }\n return res;\n}\n\n// 渐变的差异计算\nfunction calDiffGradient(p, n, target) {\n if(p.k !== n.k) {\n return;\n }\n let pv = p.v;\n let nv = n.v;\n let temp = [[]];\n let eq = equalArr(pv, nv);\n // 渐变值部分是通用的\n for(let i = 0, len = Math.min(pv.length, nv.length); i < len; i++) {\n let a = pv[i];\n let b = nv[i];\n let t = [];\n t.push([\n b[0][0] - a[0][0],\n b[0][1] - a[0][1],\n b[0][2] - a[0][2],\n b[0][3] - a[0][3],\n ]);\n if(a[1] && b[1]) {\n if(a[1].u === b[1].u) {\n t.push(b[1].v - a[1].v);\n }\n else {\n let v = calByUnit(a[1], b[1], target.clientWidth, target.root);\n t.push(v || 0);\n }\n }\n temp[0].push(t);\n }\n if(p.k === 'linear') {\n let isArrP = Array.isArray(p.d);\n let isArrN = Array.isArray(n.d);\n if(isArrN !== isArrP) {\n return;\n }\n if(isArrP) {\n let v = [n.d[0] - p.d[0], n.d[1] - p.d[1], n.d[2] - p.d[2], n.d[3] - p.d[3]];\n if(eq && equalArr(v, [0, 0, 0, 0])) {\n return;\n }\n temp[1] = v;\n }\n else {\n let v = n.d - p.d;\n // 颜色角度都没变化\n if(eq && v === 0) {\n return;\n }\n temp[1] = v;\n }\n }\n else if(p.k === 'radial') {\n let isArrP = Array.isArray(p.z);\n let isArrN = Array.isArray(n.z);\n if(isArrN !== isArrP) {\n return;\n }\n temp[2] = [];\n // sketch中a点到b点特殊格式表达,z是数组忽略p和s\n if(isArrP) {\n // 距离中心外形全等\n if(eq && equalArr(p.z, n.z)) {\n return;\n }\n for(let i = 0; i < 5; i++) {\n let pz = p.z[i];\n // 半径比例省略为1\n if(pz === undefined) {\n pz = 1;\n }\n let nz = n.z[i];\n if(nz === undefined) {\n nz = 1;\n }\n temp[2].push(nz - pz);\n }\n }\n else {\n if(eq && p.z === n.z && p.s === n.s && equalArr(p.p, n.p)) {\n return;\n }\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp.u === np.u) {\n temp[2].push(np.v - pp.v);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n }\n }\n else if(p.k === 'conic') {\n if(eq && p.d === n.d && equalArr(p.p, n.p)) {\n return;\n }\n temp[1]= n.d - p.d;\n temp[2] = [];\n for(let i = 0; i < 2; i++) {\n let pp = p.p[i];\n let np = n.p[i];\n if(pp[1] === np[1]) {\n temp[2].push(np[0] - pp[0]);\n }\n else {\n let v = calByUnit(pp, np, target[i ? 'clientWidth' : 'clientHeight'], target.root);\n temp[2].push(v || 0);\n }\n }\n }\n return temp;\n}\n\n/**\n * 计算两帧之间不相同的变化,存入transition,相同的忽略\n * 同时不变化的key也得存入fixed\n */\nfunction calFrame(prev, next, keys, target) {\n let currentStyle = target.__currentStyle, hasTp, allInFn = true;\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n let ts = calDiff(prev, next, k, target);\n // 可以形成过渡的才会产生结果返回\n if(ts) {\n if(k === TRANSLATE_PATH) {\n hasTp = true;\n }\n ts.cs = currentStyle[k];\n let fn = CAL_HASH[k];\n if(fn) {\n ts.fn = fn;\n }\n else {\n allInFn = false;\n }\n prev.transition.push(ts);\n prev.keys.push(k);\n }\n else if(k !== TRANSLATE_PATH) {\n prev.fixed.push(k);\n allInFn = false;\n }\n }\n // translatePath需特殊处理translate,防止被覆盖\n if(hasTp) {\n let i = prev.keys.indexOf(TRANSLATE_X);\n if(i === -1) {\n prev.keys.push(TRANSLATE_X);\n }\n i = prev.keys.indexOf(TRANSLATE_Y);\n if(i === -1) {\n prev.keys.push(TRANSLATE_Y);\n }\n i = prev.fixed.indexOf(TRANSLATE_X);\n if(i > -1) {\n prev.fixed.splice(i, 1);\n }\n i = prev.fixed.indexOf(TRANSLATE_Y);\n if(i > -1) {\n prev.fixed.splice(i, 1);\n }\n }\n prev.allInFn = allInFn;\n // 特殊优化,加速通知Root的更新\n if(allInFn) {\n let lv = NONE;\n let computedStyle = target.__computedStyle;\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n lv |= getLevel(k);\n if(k === Z_INDEX) {\n prev.hasZ = ['relative', 'absolute'].indexOf(computedStyle[POSITION]) > -1;\n }\n else if(k === COLOR) {\n prev.hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n prev.hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n prev.hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n prev.hasTsOver = true;\n }\n }\n // 提前计算\n prev.lv = lv;\n prev.isRepaint = isRepaint(lv);\n // 常见的几种动画matrix计算是否可优化提前计算\n if(prev.isRepaint && (lv & (TX | TY | TZ | RZ | SCALE))) {\n if((lv & TF) || (\n (lv & SX) && !computedStyle[SCALE_X]\n || (lv & SY) && !computedStyle[SCALE_Y]\n || (lv & SZ) && !computedStyle[SCALE_Z]\n || (lv & RZ) && (computedStyle[ROTATE_X] || computedStyle[ROTATE_Y]\n || computedStyle[SKEW_X] || computedStyle[SKEW_Y])\n )) {\n prev.optimize = false;\n }\n else {\n prev.optimize = true;\n }\n }\n }\n return next;\n}\n\nfunction getEasing(ea) {\n let timingFunction;\n if(ea) {\n if((timingFunction = /^\\s*steps\\s*\\(\\s*(\\d+)(?:\\s*,\\s*(\\w+))?\\s*\\)/i.exec(ea))) {\n let steps = parseInt(timingFunction[1]);\n let stepsD = timingFunction[2];\n timingFunction = function(percent) {\n // steps有效定义正整数\n if(steps && steps > 0) {\n let per = 1 / steps;\n let n = stepsD === 'start' ? Math.ceil(percent / per) : Math.floor(percent / per);\n return n / steps;\n }\n return percent;\n };\n }\n else {\n timingFunction = easing.getEasing(ea);\n }\n }\n return timingFunction;\n}\n\n/**\n * calIntermediateStyle计算优化,不能类型的style动画计算方式不同,也有可以复用的,\n * 全部if分支判断太长且浪费,相同计算的用hash存储,k为样式,v为方法,一次hash获取即可\n */\nconst CAL_HASH = [];\nCAL_HASH[TRANSFORM] = calTransform;\nCAL_HASH[ROTATE_3D] = calRotate3d;\nCAL_HASH[FILTER] = calFilter;\nCAL_HASH[TRANSFORM_ORIGIN] = CAL_HASH[PERSPECTIVE_ORIGIN]\n = CAL_HASH[BORDER_TOP_LEFT_RADIUS] = CAL_HASH[BORDER_TOP_RIGHT_RADIUS]\n = CAL_HASH[BORDER_BOTTOM_RIGHT_RADIUS] = CAL_HASH[BORDER_BOTTOM_LEFT_RADIUS] = calOrigin;\nCAL_HASH[STROKE_WIDTH] = CAL_HASH[BACKGROUND_POSITION_X] = CAL_HASH[BACKGROUND_POSITION_Y] = calPosition;\nCAL_HASH[BOX_SHADOW] = calBoxShadow;\nCAL_HASH[BACKGROUND_SIZE] = calBgSize;\nCAL_HASH[OPACITY] = CAL_HASH[Z_INDEX] = calNumber;\nCAL_HASH[TRANSLATE_PATH] = calPath;\nCAL_HASH[FONT_SIZE] = CAL_HASH[TEXT_STROKE_WIDTH] = CAL_HASH[BORDER_BOTTOM_WIDTH] = CAL_HASH[BORDER_LEFT_WIDTH]\n = CAL_HASH[BORDER_RIGHT_WIDTH] = CAL_HASH[BORDER_TOP_WIDTH] = CAL_HASH[LEFT] = CAL_HASH[TOP] = CAL_HASH[RIGHT]\n = CAL_HASH[BOTTOM] = CAL_HASH[FLEX_BASIS] = CAL_HASH[WIDTH] = CAL_HASH[HEIGHT] = CAL_HASH[LINE_HEIGHT]\n = CAL_HASH[MARGIN_BOTTOM] = CAL_HASH[MARGIN_TOP] = CAL_HASH[MARGIN_LEFT] = CAL_HASH[MARGIN_RIGHT]\n = CAL_HASH[PADDING_TOP] = CAL_HASH[PADDING_RIGHT] = CAL_HASH[PADDING_LEFT] = CAL_HASH[PADDING_BOTTOM]\n = CAL_HASH[STROKE_WIDTH] = CAL_HASH[STROKE_MITERLIMIT] = CAL_HASH[LETTER_SPACING] = CAL_HASH[PERSPECTIVE]\n = CAL_HASH[TRANSLATE_X] = CAL_HASH[TRANSLATE_Y] = CAL_HASH[TRANSLATE_Z] = CAL_HASH[SKEW_X] = CAL_HASH[SKEW_Y]\n = CAL_HASH[SCALE_X] = CAL_HASH[SCALE_Y] = CAL_HASH[SCALE_Z] = CAL_HASH[ROTATE_X] = CAL_HASH[ROTATE_Y]\n = CAL_HASH[ROTATE_Z] = calLength;\nCAL_HASH[BACKGROUND_IMAGE] = CAL_HASH[FILL] = CAL_HASH[STROKE] = calGradient;\nCAL_HASH[BACKGROUND_COLOR] = CAL_HASH[BORDER_BOTTOM_COLOR] = CAL_HASH[BORDER_LEFT_COLOR] = CAL_HASH[BORDER_RIGHT_COLOR]\n = CAL_HASH[BORDER_TOP_COLOR] = CAL_HASH[COLOR] = CAL_HASH[TEXT_STROKE_COLOR] = calColor;\n\n// transform特殊处理,只有1个matrix,有可能不存在,需给默认矩阵\nfunction calTransform(k, v, percent, st, cl, frame, currentStyle) {\n if(!st || !st.length) {\n st = frame.style[k] = [{k: MATRIX, v: mx.identity()}];\n }\n if(!cl || !cl.length) {\n cl = frame.clone[k] = [{k: MATRIX, v: mx.identity()}];\n }\n for(let i = 0; i < 16; i++) {\n st[0].v[i] = cl[0].v[i] + v[i] * percent;\n }\n}\n\nfunction calRotate3d(k, v, percent, st, cl, frame, currentStyle) {\n st[0] = cl[0] + v[0] * percent;\n st[1] = cl[1] + v[1] * percent;\n st[2] = cl[2] + v[2] * percent;\n st[3].v = cl[3].v + v[3] * percent;\n}\n\nfunction calFilter(k, v, percent, st, cl, frame, currentStyle) {\n for(let i = 0, len = v.length; i < len; i++) {\n let item = v[i];\n if(item) {\n let k2 = st[i].k, v2 = st[i].v, clv = cl[i].v;\n // 只有dropShadow是多个数组,存放x/y/blur/spread/color\n if(k2 === 'dropShadow') {\n v2[0].v = clv[0].v + item[0] * percent;\n v2[1].v = clv[1].v + item[1] * percent;\n v2[2].v = clv[2].v + item[2] * percent;\n v2[3].v = clv[3].v + item[3] * percent;\n let c1 = v2[4], cv = clv[4], c2 = item[4];\n c1[0] = cv[0] + c2[0] * percent;\n c1[1] = cv[1] + c2[1] * percent;\n c1[2] = cv[2] + c2[2] * percent;\n c1[3] = cv[3] + c2[3] * percent;\n }\n // 其它都是带单位单值\n else {\n v2.v = clv.v + item * percent;\n }\n }\n }\n}\n\nfunction calOrigin(k, v, percent, st, cl, frame, currentStyle) {\n if(v[0] !== 0) {\n st[0].v = cl[0].v + v[0] * percent;\n }\n if(v[1] !== 0) {\n st[1].v = cl[1].v + v[1] * percent;\n }\n}\n\nfunction calPosition(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((item, i) => {\n if(v[i]) {\n item.v = cl[i].v + v[i] * percent;\n }\n });\n}\n\nfunction calBoxShadow(k, v, percent, st, cl, frame, currentStyle) {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n if(!v[i]) {\n continue;\n }\n // x/y/blur/spread\n for(let j = 0; j < 4; j++) {\n st[i][j].v = cl[i][j].v + v[i][j] * percent;\n }\n // rgba\n for(let j = 0; j < 4; j++) {\n st[i][4][j] = cl[i][4][j] + v[i][4][j] * percent;\n }\n }\n}\n\nfunction calBgSize(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((item, i) => {\n let o = v[i];\n if(o) {\n item[0].v = cl[i][0].v + o[0] * percent;\n item[1].v = cl[i][1].v + o[1] * percent;\n }\n });\n}\n\nfunction calNumber(k, v, percent, st, cl, frame, currentStyle) {\n st = cl + v * percent;\n // 精度问题可能会超过[0,1]区间\n if(k === OPACITY) {\n if(st < 0) {\n st = 0;\n }\n else if(st > 1) {\n st = 1;\n }\n }\n currentStyle[k] = st;\n}\n\n// 特殊的曲线运动计算,转换为translateXY,出现在最后一定会覆盖原本的translate防重\nfunction calPath(k, v, percent, st, cl, frame, currentStyle) {\n let t = 1 - percent;\n if(v.length === 8) {\n currentStyle[TRANSLATE_X] = {\n v: v[0].v * t * t * t\n + 3 * v[2].v * percent * t * t\n + 3 * v[4].v * percent * percent * t\n + v[6].v * percent * percent * percent,\n u: PX,\n };\n currentStyle[TRANSLATE_Y] = {\n v: v[1].v * t * t * t\n + 3 * v[3].v * percent * t * t\n + 3 * v[5].v * percent * percent * t\n + v[7].v * percent * percent * percent,\n u: PX,\n };\n }\n else if(v.length === 6) {\n currentStyle[TRANSLATE_X] = {\n v: v[0].v * t * t\n + 2 * v[2].v * percent * t\n + v[4].v * percent * percent,\n u: PX,\n };\n currentStyle[TRANSLATE_Y] = {\n v: v[1].v * t * t\n + 3 * v[3].v * percent * t\n + v[5].v * percent * percent,\n u: PX,\n };\n }\n}\n\nfunction calLength(k, v, percent, st, cl, frame, currentStyle) {\n st.v = cl + v * percent;\n}\n\nfunction calGradient(k, v, percent, st, cl, frame, currentStyle) {\n st.forEach((st2, i) => {\n let v2 = v[i];\n if(!v2) {\n return;\n }\n let cli = cl[i].v;\n if(st2.u === GRADIENT) {\n st2 = st2.v;\n let [c, d, p, z] = v2;\n for(let j = 0, len = Math.min(st2.v.length, c.length); j < len; j++) {\n let a = st2.v[j];\n let b = c[j];\n a[0][0] = cli.v[j][0][0] + b[0][0] * percent;\n a[0][1] = cli.v[j][0][1] + b[0][1] * percent;\n a[0][2] = cli.v[j][0][2] + b[0][2] * percent;\n a[0][3] = cli.v[j][0][3] + b[0][3] * percent;\n if(a[1] && b[1]) {\n a[1].v = cli.v[j][1].v + b[1] * percent;\n }\n }\n if(st2.k === 'linear' && st2.d !== undefined && d !== undefined) {\n if(Array.isArray(d)) {\n st2.d[0] = cli.d[0] + d[0] * percent;\n st2.d[1] = cli.d[1] + d[1] * percent;\n st2.d[2] = cli.d[2] + d[2] * percent;\n st2.d[3] = cli.d[3] + d[3] * percent;\n }\n else {\n st2.d = cli.d + d * percent;\n }\n }\n else if(st2.k === 'radial') {\n if(st2.z !== undefined && z !== undefined) {\n st2.z[0] = cli.z[0] + z[0] * percent;\n st2.z[1] = cli.z[1] + z[1] * percent;\n st2.z[2] = cli.z[2] + z[2] * percent;\n st2.z[3] = cli.z[3] + z[3] * percent;\n st2.z[4] = cli.z[4] + z[4] * percent;\n }\n else if(st2.p !== undefined && p !== undefined) {\n st2.p[0].v = cli.p[0].v + p[0] * percent;\n st2.p[1].v = cli.p[1].v + p[1] * percent;\n }\n }\n else if(st2.k === 'conic' && st2.d !== undefined && d !== undefined) {\n st2.d = cli.d + d * percent;\n st2.p[0][0] = cli.p[0] + p[0] * percent;\n st2.p[1][0] = cli.p[1] + p[1] * percent;\n }\n }\n // fill纯色\n else {\n st2 = st2.v;\n st2[0] = cli[0] + v2[0] * percent;\n st2[1] = cli[1] + v2[1] * percent;\n st2[2] = cli[2] + v2[2] * percent;\n st2[3] = cli[3] + v2[3] * percent;\n }\n });\n}\n\n// color可能超限[0,255],但浏览器已经做了限制,无需关心\nfunction calColor(k, v, percent, st, cl, frame, currentStyle) {\n let t = st.v;\n t[0] = cl[0] + v[0] * percent;\n t[1] = cl[1] + v[1] * percent;\n t[2] = cl[2] + v[2] * percent;\n t[3] = cl[3] + v[3] * percent;\n}\n\n/**\n * 最后一帧无法计算transition,对整体keys的style进行对比\n */\nfunction calLastStyle(style, target, keys) {\n let currentStyle = target.__currentStyle, currentProps = target.__currentProps, res = [];\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i], v = style[k];\n let isGeom = GEOM.hasOwnProperty(k);\n if(!equalStyle(k, v, isGeom ? currentProps[k] : currentStyle[k], target)) {\n if(isGeom) {\n currentProps[k] = v;\n }\n else {\n currentStyle[k] = v;\n }\n res.push(k);\n }\n }\n return res;\n}\n\nfunction gotoOverload(animation, options, cb) {\n if(isFunction(options)) {\n cb = options;\n options = {};\n }\n options = options || {};\n if(!isNil(options.areaStart)) {\n animation.areaStart = options.areaStart;\n }\n if(!isNil(options.areaDuration)) {\n animation.areaDuration = options.areaDuration;\n }\n return { options, cb };\n}\n\nfunction frameCb(self) {\n self.emit(Event.FRAME, self.__isChange);\n if(self.__firstPlay) {\n self.__firstPlay = false;\n self.emit(Event.PLAY);\n }\n let cb = self.__playCb;\n if(isFunction(cb)) {\n cb(self.__isChange);\n // 清理要检查,gotoAndStop()这种cb回调中直接再次调用goto的话cb会不一致不能删除\n if(self.__playCb === cb) {\n self.__playCb = null;\n }\n }\n}\n\nlet uuid = 0;\n\nclass Animation extends Event {\n constructor(target, list, options) {\n super();\n this.__id = uuid++;\n list = clone(list || []);\n if(Array.isArray(list)) {\n list = list.filter(item => item && isObject(item));\n }\n // 动画过程另外一种形式,object描述k-v形式\n else if(list && isObject(list)) {\n let nl = [];\n Object.keys(list).forEach(k => {\n let v = list[k];\n if(Array.isArray(v)) {\n for(let i = 0, len = v.length; i < len; i++) {\n let o = nl[i] = nl[i] || {\n offset: i / (len - 1),\n };\n o[k] = v[i];\n }\n }\n });\n list = nl;\n }\n else {\n list = [];\n }\n if(isNumber(options)) {\n this.__options = {\n duration: options,\n };\n options = this.__options;\n }\n let op = this.__options = options || {\n duration: 0,\n };\n this.__begin = true;\n this.__playState = 'idle';\n this.__target = target;\n this.__root = target.root;\n this.__isChange = false; // 每帧是否有变化,无变化不刷新也会触发frame事件\n this.__firstPlay = true;\n this.__firstEnter = true;\n let iterations = this.iterations = op.iterations;\n let duration = this.duration = op.duration;\n let { frames, framesR, keys, originStyle } = this.__init(list, iterations, duration, op.easing, target);\n this.__frames = frames;\n this.__framesR = framesR;\n this.__keys = keys;\n this.__originStyle = originStyle;\n this.__isDelay = false;\n this.__outBeginDelay = false;\n this.__playCount = 0;\n let fps = parseInt(op.fps) || 0;\n if(fps <= 0) {\n fps = 60;\n }\n this.fps = fps;\n this.spfLimit = op.spfLimit;\n this.delay = op.delay;\n this.endDelay = op.endDelay;\n this.playbackRate = op.playbackRate;\n this.fill = op.fill;\n this.iterations = op.iterations;\n this.direction = op.direction;\n this.easing = op.easing;\n this.areaStart = op.areaStart; // ae中的功能,播放中间一段动画,为0忽略\n this.areaDuration = op.areaDuration;\n this.__currentFrames = {\n reverse: true,\n 'alternate-reverse': true,\n alternateReverse: true,\n }.hasOwnProperty(op.direction) ? framesR : frames;\n let controller = op.controller;\n if(controller instanceof Controller) {\n controller.add(this);\n }\n else if(controller) {\n this.addControl();\n }\n // 时间戳\n this.__timestamp = frame.__now;\n }\n\n __init(list, iterations, duration, easing, target) {\n if(list.length < 1) {\n return { frames: [], framesR: [], keys: [], originStyle: {} };\n }\n // 标准化帧\n let frames = Animation.parse(list, duration, easing, target);\n // 为方便两帧之间计算变化,强制统一所有帧的css属性相同,没有写的为节点的当前样式currentStyle\n let keys = Animation.unify(frames, target);\n Animation.inherit(frames, keys, target);\n let framesR = clone(frames).reverse();\n // 存储原本样式以便恢复用\n let { __currentStyle, __currentProps } = target;\n let originStyle = {};\n keys.forEach(k => {\n if(isGeom(target.tagName, k)) {\n originStyle[k] = __currentProps[k];\n }\n originStyle[k] = __currentStyle[k];\n });\n originStyle = cloneStyle(originStyle, keys);\n // 再计算两帧之间的变化,存入transition/fixed属性\n Animation.calTransition(frames, keys, target);\n // 反向存储帧的倒排结果\n framesR.forEach(item => {\n item.time = duration - item.time;\n });\n Animation.calTransition(framesR, keys, target);\n return { frames, framesR, keys, originStyle };\n }\n\n __clean(isFinish) {\n this.__cancelTask();\n this.__nextTime = 0;\n if(isFinish) {\n // gotoAndStop到一个很大的时间的话,也需要防止超过\n this.__currentTime = this.__delay + this.__duration * this.__iterations + this.__endDelay;\n this.__playState = 'finished';\n }\n else {\n this.__playCount = this.__currentTime = 0;\n this.__playState = 'idle';\n }\n }\n\n play(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'running') {\n return this;\n }\n this.__cancelTask();\n this.__playCb = cb;\n this.__playState = 'running';\n // 每次play调用标识第一次运行,需响应play事件和回调\n this.__firstPlay = true;\n this.__firstEnter = true;\n this.__playCount = 0;\n // 防止finish/cancel事件重复触发,每次播放重置\n this.__hasFin = false;\n this.__hasCancel = false;\n // 只有第一次调用会进初始化,另外finish/cancel视为销毁也会重新初始化\n if(!this.__enterFrame) {\n this.__enterFrame = true;\n let framesR = this.__framesR;\n let direction = this.__direction;\n // 初始化根据方向确定帧序列\n this.__currentFrames = {\n reverse: true,\n 'alternate-reverse': true,\n alternateReverse: true,\n }.hasOwnProperty(direction) ? framesR : frames;\n this.__currentTime = this.__nextTime = this.__fpsTime = 0;\n }\n // 添加每帧回调且立刻执行,本次执行调用refreshTask也是下一帧再渲染,frame的每帧都是下一帧\n // frame.offFrame(this);\n frame.onFrame(this);\n this.__startTime = frame.__now;\n this.__end = false;\n return this;\n }\n\n __before(diff) {\n this.__timestamp = frame.__now;\n let target = this.__target;\n let fps = this.__fps;\n let currentFrames = this.__currentFrames;\n let iterations = this.__iterations;\n let stayBegin = this.__stayBegin;\n let stayEnd = this.__stayEnd;\n let delay = this.__delay;\n let areaStart = this.__areaStart;\n let areaDuration = this.__areaDuration;\n let root = this.__root;\n let duration = this.__duration;\n let endDelay = this.__endDelay;\n let length = currentFrames.length;\n let playbackRate = this.__playbackRate;\n let spfLimit = this.__spfLimit;\n let currentTime = this.__currentTime = this.__nextTime;\n let lastFrame = this.__currentFrame;\n let dur = areaDuration ? Math.min(duration, areaDuration) : duration;\n this.__isChange = false;\n // 定帧限制每帧时间间隔最大为spf\n if(spfLimit) {\n if(spfLimit === true) {\n diff = Math.min(diff, 1000 / fps);\n }\n else if(spfLimit > 0) {\n diff = Math.min(diff, spfLimit);\n }\n }\n // 播放时间累加,并且考虑播放速度加成\n if(playbackRate !== 1 && playbackRate > 0) {\n diff *= playbackRate;\n }\n // 用本帧和上帧时间差,计算累加运行时间currentTime,以便定位当前应该处于哪个时刻\n this.__nextTime += diff;\n // 增加的fps功能,当<60时计算跳帧,每帧运行依旧累加时间,达到fps时重置,第一帧强制不跳\n if(!this.__firstEnter && fps < 60) {\n diff = this.__fpsTime += diff;\n if(diff < 1000 / fps) {\n this.__inFps = true;\n return;\n }\n this.__fpsTime = 0;\n }\n this.__firstEnter = false;\n // delay仅第一次生效等待\n if(currentTime < delay - areaStart) {\n if(stayBegin && !this.__isDelay) {\n let currentFrame = this.__currentFrame = currentFrames[0];\n let keys = calLastStyle(currentFrame.style, target, this.__keys);\n // 特殊处理,将ts上的cs指向当前currentStyle,一些继承样式如color被更新,否则delay后计算会报错\n let transition = currentFrame.transition;\n if(transition) {\n let currentStyle = target.__currentStyle;\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n item.cs = currentStyle[item.k] = item.st;\n }\n }\n this.__isChange = !!keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, null);\n }\n this.__begin = false; // 默认是true,delay置false防触发\n // 即便不刷新,依旧执行帧回调,同时标明让后续第一帧响应begin\n this.__outBeginDelay = true;\n this.__isDelay = true;\n return;\n }\n this.__isDelay = false;\n // 减去delay,计算在哪一帧\n currentTime -= delay - areaStart;\n if(this.__outBeginDelay) {\n this.__outBeginDelay = false;\n this.__begin = true;\n }\n // 超过duration非尾轮需处理回到开头,触发新一轮动画事件,这里可能时间间隔非常大直接跳过几轮\n let playCount = Math.min(iterations - 1, Math.floor(currentTime / dur));\n currentTime -= dur * playCount;\n // 如果发生轮换,需重新确定正反向\n if(this.__playCount < playCount) {\n this.__begin = true;\n this.__playCount = playCount;\n let direction = this.__direction;\n let frames = this.__frames;\n let framesR = this.__framesR;\n // 有正反向播放需要重设帧序列\n if(direction === 'alternate' || direction === 'alternate-reverse' || direction === 'alternateReverse') {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n currentFrames = this.__currentFrames = isEven ? frames : framesR;\n }\n else {\n currentFrames = this.__currentFrames = isEven ? framesR : frames;\n }\n }\n }\n let isLastCount = playCount >= iterations - 1;\n // 只有2帧可优化,否则2分查找当前帧\n let i, frameTime;\n if(length === 2) {\n i = currentTime < dur ? 0 : 1;\n frameTime = dur;\n }\n else {\n i = Animation.binarySearch(0, length - 1, currentTime, currentFrames);\n frameTime = currentFrames[i].time;\n }\n // 最后一帧结束动画,仅最后一轮才会进入,需处理endDelay\n let isLastFrame = isLastCount && i === length - 1;\n let percent = 0;\n if(isLastFrame) {\n // 无需任何处理\n }\n // 否则根据目前到下一帧的时间差,计算百分比,再反馈到变化数值上\n else if(length === 2) {\n percent = currentTime / duration; // 不能是dur,按照原本计算\n }\n else {\n let total = currentFrames[i + 1].time - frameTime;\n percent = (currentTime - frameTime) / total;\n }\n let inEndDelay, currentFrame = currentFrames[i];\n let notSameFrame = lastFrame !== currentFrame;\n // 对比前后两帧是否为同一关键帧,不是则清除之前关键帧上的percent标识为-1,这样可以识别跳帧和本轮第一次进入此帧\n if(notSameFrame) {\n lastFrame && (lastFrame.lastPercent = -1);\n this.__currentFrame = currentFrame;\n }\n /** 这里要考虑全几种场景:\n * 1. 单次播放无endDelay且fill不停留(有/无差异,下同)\n * 2. 单次播放无endDelay且fill停留\n * 3. 单次播放有endDelay且fill不停留\n * 4. 单次播放有endDelay且fill停留\n * 5. 多次播放无endDelay且fill不停留(尾次/非尾次,下同)\n * 6. 多次播放无endDelay且fill停留\n * 7. 多次播放有endDelay且fill不停留\n * 8. 多次播放有endDelay且fill停留\n */\n let needClean;\n let keys;\n if(isLastFrame) {\n inEndDelay = currentTime < dur + endDelay;\n // 停留对比最后一帧,endDelay可能会多次进入这里,第二次进入样式相等不再重绘\n if(stayEnd) {\n keys = calLastStyle(currentFrame.style, target, this.__keys);\n }\n // 不停留或超过endDelay则计算还原,有endDelay且fill模式不停留会再次进入这里\n else {\n keys = calLastStyle(this.__originStyle, target, this.__keys);\n currentFrame = null; // 特殊清空,genBeforeRefresh()时不传过去\n }\n // 进入endDelay或结束阶段触发end事件,注意只触发一次,防重在触发的地方做\n this.__nextEnd = true;\n if(!inEndDelay) {\n this.__playCount++;\n this.__finished = true;\n frame.offFrame(this);\n needClean = true;\n this.__nextTime = 0;\n }\n }\n else {\n keys = Animation.calIntermediateStyle(currentFrame, percent, target, notSameFrame);\n }\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, null);\n if(needClean) {\n let playCb = this.__playCb;\n this.__clean(true);\n // 丑陋的做法,防止gotoAndStop()这样的cb被clean()掉\n if(playCb) {\n this.__playCb = playCb;\n }\n }\n }\n\n __after() {\n if(this.__inFps) {\n this.__inFps = false;\n return;\n }\n frameCb(this);\n if(this.__begin) {\n this.__begin = false;\n this.emit(Event.BEGIN, this.__playCount);\n }\n // end事件只触发一次,末轮进入endDelay或直接结束时\n if(this.__nextEnd && !this.__end) {\n this.__end = true;\n this.emit(Event.END, this.__playCount - 1);\n }\n if(this.__finished) {\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'finished';\n this.emit(Event.FINISH, this.__isChange);\n }\n }\n\n pause(silence) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let { pending } = this;\n if(isDestroyed || duration <= 0 || pending) {\n return this;\n }\n this.__playState = 'paused';\n this.__cancelTask();\n if(!silence) {\n this.emit(Event.PAUSE);\n }\n return this;\n }\n\n resume(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n if(isDestroyed || duration <= 0 || playState !== 'paused') {\n return this;\n }\n return this.play(cb);\n }\n\n finish(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'finished') {\n if(isFunction(cb)) {\n cb();\n }\n return this;\n }\n // 先清除所有回调任务,多次调用finish也会清除只留最后一次\n this.__clean(true);\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'finished';\n let root = this.__root;\n if(root) {\n let target = this.__target;\n let style;\n // 是否停留在最后一帧\n let currentFrame = null;\n if(this.__stayEnd) {\n let framesR = this.__framesR;\n let direction = this.__direction;\n let iterations = this.__iterations;\n if('reverse'.indexOf(direction) > -1) {\n [frames, framesR] = [framesR, frames];\n }\n if(iterations === Infinity || iterations % 2) {\n currentFrame = frames[frames.length - 1];\n style = currentFrame.style;\n }\n else {\n currentFrame = framesR[framesR.length - 1];\n style = currentFrame.style;\n }\n }\n else {\n style = this.__originStyle;\n }\n this.__currentFrame = currentFrame;\n let keys = calLastStyle(style, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, currentFrame, () => {\n frameCb(this);\n this.emit(Event.FINISH, this.__isChange);\n if(isFunction(cb)) {\n cb(this.__isChange);\n }\n });\n }\n return this;\n }\n\n cancel(cb) {\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let playState = this.__playState;\n let frames = this.__frames;\n if(isDestroyed || duration <= 0 || frames.length < 1) {\n return this;\n }\n if(playState === 'idle') {\n if(isFunction(cb)) {\n cb();\n }\n return this;\n }\n this.__clean();\n this.__begin = this.__end = this.__isDelay = this.__finished\n = this.__inFps = this.__enterFrame = false;\n this.__playState = 'idle';\n this.__currentFrame = null;\n let root = this.__root;\n if(root) {\n let target = this.__target;\n let keys = calLastStyle(this.__originStyle, target, this.__keys);\n this.__isChange = !keys.length;\n genBeforeRefresh(keys, root, target, null,() => {\n frameCb(this);\n this.emit(Event.CANCEL, this.__isChange);\n if(isFunction(cb)) {\n cb(this.__isChange);\n }\n });\n }\n return this;\n }\n\n gotoAndPlay(v, options, cb) {\n let t = gotoOverload(this, options, cb);\n options = t.options;\n cb = t.cb;\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let frames = this.__frames;\n let delay = this.__delay;\n let areaStart = this.__areaStart;\n let areaDuration = this.__areaDuration;\n let endDelay = this.__endDelay;\n let dur = areaDuration ? Math.min(duration, areaDuration) : duration;\n if(isDestroyed || dur <= 0 || frames.length < 1) {\n return this;\n }\n // 计算出时间点直接累加播放\n this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > dur + delay - areaStart + endDelay) {\n return this.finish(cb);\n }\n return this.play(cb);\n }\n\n gotoAndStop(v, options, cb) {\n let t = gotoOverload(this, options, cb);\n options = t.options;\n cb = t.cb;\n let isDestroyed = this.__isDestroyed;\n let duration = this.__duration;\n let frames = this.__frames;\n let delay = this.__delay;\n let areaStart = this.__areaStart;\n let areaDuration = this.__areaDuration;\n let endDelay = this.__endDelay;\n let dur = areaDuration ? Math.min(duration, areaDuration) : duration;\n if(isDestroyed || dur <= 0 || frames.length < 1) {\n return this;\n }\n v = this.__goto(v, options.isFrame, options.excludeDelay);\n if(v > dur + delay - areaStart + endDelay) {\n return this.finish(cb);\n }\n // 先play一帧,回调里模拟暂停\n return this.play(() => {\n this.__playState = 'paused';\n this.__cancelTask();\n if(isFunction(cb)) {\n cb();\n }\n });\n }\n\n // 返回不包含delay且去除多轮的时间\n __goto(v, isFrame, excludeDelay) {\n let iterations = this.__iterations;\n let duration = this.__duration;\n let areaDuration = this.__areaDuration;\n let dur = areaDuration ? Math.min(duration, areaDuration) : duration;\n this.__playState = 'paused';\n if(isNaN(v) || v < 0) {\n throw new Error('Param of gotoAnd(Play/Stop) is illegal: ' + v);\n }\n if(isFrame) {\n v = (v - 1) / this.spf;\n }\n if(excludeDelay) {\n v += this.__delay;\n }\n // 在时间范围内设置好时间,复用play直接跳到播放点\n this.__nextTime = v;\n v -= this.__delay;\n // 超过时间长度需要累加次数,这里可以超过iterations,因为设定也许会非常大\n let playCount = 0;\n while(v >= dur && playCount < iterations - 1) {\n playCount++;\n v -= dur;\n }\n this.__playCount = playCount;\n // 防止play()重置时间和当前帧组,提前计算好\n this.__enterFrame = true;\n let frames = this.__frames;\n let framesR = this.__framesR;\n let direction = this.__direction;\n if({\n alternate: true,\n 'alternate-reverse': true,\n alternateReverse: true,\n }.hasOwnProperty(direction)) {\n let isEven = playCount % 2 === 0;\n if(direction === 'alternate') {\n this.__currentFrames = isEven ? frames : framesR;\n }\n else {\n this.__currentFrames = isEven ? framesR : frames;\n }\n }\n return v;\n }\n\n addControl() {\n let root = this.__root;\n if(!root) {\n return;\n }\n let ac = root.animateController;\n if(ac) {\n ac.add(this);\n }\n }\n\n removeControl() {\n let root = this.__root;\n if(!root) {\n return;\n }\n let ac = root.__animateController;\n if(ac) {\n ac.remove(this);\n }\n }\n\n __setTarget(target) {\n this.__target = target;\n }\n\n __cancelTask() {\n frame.offFrame(this);\n this.__playCb = null;\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n this.removeControl();\n this.__clean();\n this.__target = this.__root = null;\n this.__startTime = 0;\n this.__isDestroyed = true;\n }\n\n __checkModify() {\n if(this.__playState !== 'idle' && this.__playState !== 'finished') {\n inject.warn('Modification will not come into effect when animation is running');\n }\n }\n\n get id() {\n return this.__id;\n }\n\n get target() {\n return this.__target;\n }\n\n get root() {\n return this.__root;\n }\n\n get keys() {\n return this.__keys;\n }\n\n get options() {\n return this.__options;\n }\n\n get duration() {\n return this.__duration;\n }\n\n set duration(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__duration !== v) {\n this.__duration = v;\n this.__checkModify();\n }\n return v;\n }\n\n get delay() {\n return this.__delay;\n }\n\n set delay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__delay !== v) {\n this.__delay = v;\n this.__checkModify();\n }\n return v;\n }\n\n get endDelay() {\n return this.__endDelay;\n }\n\n set endDelay(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__endDelay !== v) {\n this.__endDelay = v;\n this.__checkModify();\n }\n return v;\n }\n\n get fps() {\n return this.__fps;\n }\n\n set fps(v) {\n v = parseInt(v) || 60;\n if(this.__fps !== v) {\n if(v <= 0) {\n v = 60;\n }\n this.__fps = v;\n }\n return v;\n }\n\n get spf() {\n return 1 / this.fps;\n }\n\n get iterations() {\n return this.__iterations;\n }\n\n set iterations(v) {\n if(v === Infinity || util.isString(v) && v.toLowerCase() === 'infinity') {\n v = Infinity;\n }\n else {\n v = parseInt(v);\n if(isNaN(v) || v < 0) {\n v = 1;\n }\n }\n if(this.__iterations !== v) {\n this.__iterations = v;\n }\n return v;\n }\n\n get fill() {\n return this.__fill;\n }\n\n set fill(v) {\n v = v || 'none';\n if(this.__fill !== v) {\n this.__fill = v;\n this.__checkModify();\n }\n this.__stayBegin = {\n backwards: true,\n both: true,\n }.hasOwnProperty(v);\n this.__stayEnd = {\n forwards: true,\n both: true,\n }.hasOwnProperty(v);\n return v;\n }\n\n get direction() {\n return this.__direction;\n }\n\n set direction(v) {\n v = v || 'normal';\n if(this.__direction !== v) {\n this.__direction = v;\n this.__checkModify();\n }\n return v;\n }\n\n get frames() {\n return this.__frames;\n }\n\n get framesR() {\n return this.__framesR;\n }\n\n get playbackRate() {\n return this.__playbackRate;\n }\n\n set playbackRate(v) {\n v = parseFloat(v) || 1;\n if(v <= 0) {\n v = 1;\n }\n if(this.__playbackRate !== v) {\n this.__playbackRate = v;\n }\n return v;\n }\n\n get easing() {\n return this.__easing;\n }\n\n set easing(v) {\n this.__easing = v;\n }\n\n get startTime() {\n return this.__startTime;\n }\n\n get currentTime() {\n return this.__currentTime;\n }\n\n set currentTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__currentTime !== v) {\n this.__currentTime = v;\n this.__nextTime = v;\n }\n return v;\n }\n\n get nextTime() {\n return this.__nextTime;\n }\n\n set nextTime(v) {\n v = Math.max(0, parseFloat(v) || 0);\n if(this.__nextTime !== v) {\n this.__nextTime = v;\n }\n return v;\n }\n\n get timestamp() {\n return this.__timestamp;\n }\n\n get pending() {\n return this.__playState !== 'running';\n }\n\n get finished() {\n return this.__playState === 'finished';\n }\n\n get playState() {\n return this.__playState;\n }\n\n get playCount() {\n return this.__playCount;\n }\n\n set playCount(v) {\n v = Math.max(0, parseInt(v) || 0);\n if(this.__playCount !== v) {\n this.__playCount = v;\n }\n return v;\n }\n\n get areaStart() {\n return this.__areaStart;\n }\n\n set areaStart(v) {\n v = Math.max(0, parseInt(v) || 0);\n if(this.__areaStart !== v) {\n this.__areaStart = v;\n }\n return v;\n }\n\n get areaDuration() {\n return this.__areaDuration;\n }\n\n set areaDuration(v) {\n v = Math.max(0, parseInt(v) || 0);\n if(this.__areaDuration !== v) {\n this.__areaDuration = v;\n }\n return v;\n }\n\n get isDestroyed() {\n return this.__isDestroyed;\n }\n\n get animating() {\n let playState = this.__playState;\n if(playState === 'idle') {\n return false;\n }\n return playState !== 'finished' || this.__stayEnd || this.__stayBegin;\n }\n\n get spfLimit() {\n return this.__spfLimit;\n }\n\n set spfLimit(v) {\n if(util.isNumber(v) || /^\\d/.test(v)) {\n v = Math.max(0, parseInt(v) || 0);\n }\n else {\n v = !!v;\n }\n if(this.__spfLimit !== v) {\n this.__spfLimit = v;\n }\n return v;\n }\n\n static parse(list, duration, easing, target) {\n // 过滤时间非法的,过滤后续offset<=前面的\n let offset = -1;\n for(let i = 0, len = list.length; i < len; i++) {\n let current = list[i];\n if(current.hasOwnProperty('offset')) {\n current.offset = parseFloat(current.offset) || 0;\n current.offset = Math.max(0, current.offset);\n current.offset = Math.min(1, current.offset);\n // 超过区间[0,1]\n if(isNaN(current.offset) || current.offset < 0 || current.offset > 1) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n // <=前面的\n else if(current.offset <= offset) {\n list.splice(i, 1);\n i--;\n len--;\n continue;\n }\n }\n // 缩写处理\n Object.keys(current).forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr.toFull(current, k);\n }\n });\n // 检查key合法性\n Object.keys(current).forEach(k => {\n if(k !== 'easing' && k !== 'offset' && !change.isValid(target && target.tagName, k)) {\n delete current[k];\n }\n });\n }\n // 只有1帧复制出来变成2帧方便运行\n if(list.length === 1) {\n list[0] = clone(list[0]);\n if(list[0].offset === 1) {\n list.unshift({\n offset: 0,\n });\n }\n else {\n let copy = clone(list[0]);\n copy.offset = 1;\n list.push(copy);\n }\n }\n // 强制clone防止同引用\n else {\n list.forEach((item, i) => {\n list[i] = clone(item);\n });\n }\n // 首尾时间偏移强制为[0, 1],不是的话前后加空帧\n let first = list[0];\n if(first.hasOwnProperty('offset') && first.offset > 0) {\n first = {\n offset: 0,\n };\n list.unshift(first);\n }\n else {\n first.offset = 0;\n }\n let last = list[list.length - 1];\n if(last.hasOwnProperty('offset') && last.offset < 1) {\n last = {\n offset: 1,\n };\n list.push(last);\n }\n else {\n last.offset = 1;\n }\n // 计算没有设置offset的帧\n for(let i = 1, len = list.length; i < len; i++) {\n let start = list[i];\n // 从i=1开始offset一定>0,找到下一个有offset的,均分中间无声明的\n if(!start.hasOwnProperty('offset')) {\n let end;\n let j = i + 1;\n for(; j < len; j++) {\n end = list[j];\n if(end.hasOwnProperty('offset')) {\n break;\n }\n }\n let num = j - i + 1;\n start = list[i - 1];\n let per = (end.offset - start.offset) / num;\n for(let k = i; k < j; k++) {\n let item = list[k];\n item.offset = start.offset + per * (k + 1 - i);\n }\n i = j;\n }\n }\n let frames = [];\n for(let i = 0, len = list.length; i < len; i++) {\n frames[i] = framing(list[i], duration, easing);\n }\n return frames;\n }\n\n static unify(frames, target) {\n let hash = {};\n let keys = [];\n // 获取所有关键帧的属性\n frames.forEach(item => {\n let style = item.style;\n Object.keys(style).forEach(k => {\n let v = style[k];\n // 未定义的过滤掉,null空有意义\n if(v !== undefined && !hash.hasOwnProperty(k)) {\n hash[k] = true;\n // geom为属性字符串,style都为枚举int\n if(!GEOM.hasOwnProperty(k)) {\n k = parseInt(k);\n }\n // path动画要转为translateXY,所以手动添加,使2帧之间存在过渡,有可能之前已存在这个动画,可忽视\n if(k === TRANSLATE_PATH) {\n if(!hash.hasOwnProperty(TRANSLATE_X)) {\n keys.push(TRANSLATE_X);\n }\n if(!hash.hasOwnProperty(TRANSLATE_Y)) {\n keys.push(TRANSLATE_Y);\n }\n hash[TRANSLATE_X] = hash[TRANSLATE_Y] = true;\n }\n keys.push(k);\n }\n });\n });\n // 添补没有声明完全的关键帧属性为节点当前值\n frames.forEach(item => {\n let style = item.style;\n keys.forEach(k => {\n if(!style.hasOwnProperty(k) || isNil(style[k])) {\n if(GEOM.hasOwnProperty(k)) {\n if(target) {\n style[k] = clone(target.getProps(k));\n }\n }\n else {\n if(k === TRANSLATE_X && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = clone(style[TRANSLATE_PATH][0]);\n }\n else if(k === TRANSLATE_Y && style.hasOwnProperty(TRANSLATE_PATH)) {\n style[k] = clone(style[TRANSLATE_PATH][1]);\n }\n else if(target) {\n style[k] = cloneStyle(target.__currentStyle, [k])[k];\n }\n }\n }\n });\n });\n return keys;\n }\n\n static inherit(frames, keys, target) {\n let computedStyle = target && target.__computedStyle;\n frames.forEach(item => {\n let style = item.style;\n keys.forEach(k => {\n let v = style[k];\n // geom的属性可能在帧中没有\n if(isNil(v)) {\n return;\n }\n if(k === TRANSFORM) {\n if(target) {\n let ow = target.__outerWidth;\n let oh = target.__outerHeight;\n let m = tf.calMatrix(v, ow, oh, target.__root);\n style[k] = [{ k: MATRIX, v: m }];\n }\n }\n else if(v.u === INHERIT && computedStyle) {\n if(k === COLOR || k === TEXT_STROKE_COLOR) {\n style[k] = { v: util.rgba2int(computedStyle[k]), u: RGBA };\n }\n else if(isLengthKey(k)) {\n style[k] = { v: computedStyle[k], u: PX };\n }\n else if(k === FONT_WEIGHT) {\n style[k] = { v: computedStyle[k], u: NUMBER };\n }\n else if(k === FONT_STYLE || k === FONT_FAMILY || k === TEXT_ALIGN || k === TEXT_STROKE_OVER) {\n style[k] = { v: computedStyle[k], u: STRING };\n }\n }\n });\n });\n }\n\n static calTransition(frames, keys, target) {\n let prev = frames[0];\n prev.clone = cloneStyle(prev.style, keys);\n for(let i = 1, len = frames.length; i < len; i++) {\n let next = frames[i];\n next.clone = cloneStyle(next.style, keys);\n prev = calFrame(prev, next, keys, target);\n }\n }\n\n static binarySearch(i, j, time, frames) {\n while(i < j) {\n if(i === j - 1) {\n if(frames[j].time <= time) {\n return j;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n let frame = frames[middle];\n if(frame.time === time) {\n return middle;\n }\n if(frame.time > time) {\n j = Math.max(middle - 1, i);\n }\n else {\n i = Math.min(middle, j);\n }\n }\n return i;\n }\n\n static calIntermediateStyle(frame, percent, target, notSameFrame) {\n let style = frame.style;\n let transition = frame.transition;\n let timingFunction = frame.timingFunction;\n let allInFn = frame.allInFn;\n if(timingFunction && timingFunction !== linear) {\n percent = timingFunction(percent);\n }\n // 同一关键帧同一percent可以不刷新,比如diff为0时,或者steps情况,离开会清空\n if(frame.lastPercent === percent) {\n return [];\n }\n frame.lastPercent = percent;\n let currentStyle = target.__currentStyle, res = frame.keys;\n // 特殊性能优化,for拆开v8会提升不少\n if(allInFn) {\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, cs = item.cs, cl = item.cl, fn = item.fn;\n // 同一帧内计算可避免赋值currentStyle\n if(notSameFrame) {\n cs = item.cs = currentStyle[k] = item.st;\n }\n fn(k, v, percent, cs, cl, frame, currentStyle);\n }\n }\n else {\n let currentProps = target.__currentProps, modify;\n for(let i = 0, len = transition.length; i < len; i++) {\n let item = transition[i];\n let k = item.k, v = item.v, cs = item.cs, st = item.st, cl = item.cl, fn = item.fn;\n if(fn) {\n // 同一帧内计算可避免赋值currentStyle\n if(notSameFrame) {\n cs = item.cs = currentStyle[k] = item.st;\n }\n fn(k, v, percent, cs, cl, frame, currentStyle);\n }\n else if(GEOM.hasOwnProperty(k)) {\n let tagName = target.tagName;\n if(GEOM[k][tagName] && isFunction(GEOM[k][tagName].calIncrease)) {\n let fn = GEOM[k][tagName].calIncrease;\n if(target.isMulti) {\n st = st.map((item, i) => {\n return fn(item, v[i], percent);\n });\n }\n else {\n st = fn(st, v, percent);\n }\n }\n else if(target.isMulti) {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n let cli = cl[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n let o2 = o[j];\n let n2 = n[j];\n if(!isNil(o2) && !isNil(n2)) {\n for(let k = 0, len3 = Math.min(o2.length, n2.length); k < len3; k++) {\n if(!isNil(o2[k]) && !isNil(n2[k])) {\n o2[k] = cli[j][k] + n2[k] * percent;\n }\n }\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n v.forEach((item, i) => {\n let st2 = st[i];\n if(!isNil(item[0]) && !isNil(st2[0])) {\n st2[0] = cl[i][0] + item[0] * percent;\n }\n if(!isNil(item[1]) && !isNil(st2[1])) {\n st2[1] = cl[i][1] + item[1] * percent;\n }\n });\n }\n else {\n v.forEach((item, i) => {\n if(!isNil(item) && !isNil(st[i])) {\n st[i] = cl[i] + item * percent;\n }\n });\n }\n }\n else {\n if(k === 'points' || k === 'controls') {\n for(let i = 0, len = Math.min(st.length, v.length); i < len; i++) {\n let o = st[i];\n let n = v[i];\n if(!isNil(o) && !isNil(n)) {\n for(let j = 0, len2 = Math.min(o.length, n.length); j < len2; j++) {\n if(!isNil(o[j]) && !isNil(n[j])) {\n o[j] = cl[i][j] + n[j] * percent;\n }\n }\n }\n }\n }\n else if(k === 'controlA' || k === 'controlB') {\n if(!isNil(st[0]) && !isNil(v[0])) {\n st[0] = cl[0] + v[0] * percent;\n }\n if(!isNil(st[1]) && !isNil(v[1])) {\n st[1] = cl[1] + v[1] * percent;\n }\n }\n else {\n if(!isNil(st) && !isNil(v)) {\n st = cl + v * percent;\n }\n }\n }\n currentProps[k] = st;\n }\n // string等的直接量,在不同帧之间可能存在变化,同帧变化后不再改变\n else {\n if(currentStyle[k] !== st) {\n currentStyle[k] = st;\n }\n else {\n if(!modify) {\n modify = true;\n res = res.slice(0);\n }\n let j = res.indexOf(k);\n res.splice(j, 1);\n }\n }\n }\n // 无变化的也得检查是否和当前相等,防止跳到一个不变化的帧上,而前一帧有变化的情况,allInFn不会有这里\n let fixed = frame.fixed;\n for(let i = 0, len = fixed.length; i < len; i++) {\n let k = fixed[i];\n let isGeom = GEOM.hasOwnProperty(k);\n if(!equalStyle(k, style[k], isGeom ? currentProps[k] : currentStyle[k], target)) {\n if(GEOM.hasOwnProperty(k)) {\n currentProps[k] = style[k];\n }\n else {\n currentStyle[k] = style[k];\n }\n if(!modify) {\n modify = true;\n res = res.slice(0);\n }\n res.push(k);\n }\n }\n }\n return res;\n }\n}\n\nexport default Animation;\n","import mode from '../refresh/mode';\nimport geom from '../math/geom';\nimport blur from '../math/blur';\nimport util from '../util/util';\nimport painter from '../util/painter';\n\nconst { int2rgba } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nfunction renderBoxShadow(xom, renderMode, ctx, data, x1, y1, x2, y2, w, h, dx = 0, dy = 0) {\n x1 += dx;\n y1 += dy;\n x2 += dx;\n y2 += dy;\n let [x, y, sigma, spread, color, inset] = data;\n let c = int2rgba(color);\n let n = Math.abs(sigma) * 2 + Math.abs(spread) * 2 + Math.abs(x) * 2 + Math.abs(y) * 2;\n // box本身坐标顺时针\n let box = [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1, y2],\n [x1, y1],\n ];\n // 算上各种偏移/扩散的最外层坐标,且逆时针\n let outer = [\n [x1 - n, y1 - n],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n ];\n if(color[3] > 0) {\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.save();\n ctx.beginPath();\n // inset裁剪box外面\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n // 是否相交判断需要绘制\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n // 扩散区域类似边框填充\n if(spread) {\n canvasPolygon(ctx, cross);\n canvasPolygon(ctx, box.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, box);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, cross);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n // 画在外围的空心矩形,宽度要比blur大,n考虑了这一情况取了最大值\n canvasPolygon(ctx, [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ]);\n }\n else {\n canvasPolygon(ctx, box);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, [\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ]);\n }\n }\n // outset需裁减掉box本身的内容,clip()非零环绕显示box外的阴影内容,fill()绘制在内无效\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n // 分为是否有spread,因模糊成本spread区域将没有模糊\n if(spread) {\n // 扩散区域类似边框填充\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox.slice(0).reverse());\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== c) {\n ctx.fillStyle = c;\n }\n canvasPolygon(ctx, blurBox);\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n ctx.save();\n ctx.beginPath();\n // 阴影部分看相交情况裁剪,有相交时逆时针绘制相交区域即可排除之\n if(cross) {\n canvasPolygon(ctx, [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse());\n }\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, blurBox);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, blurBox);\n }\n else {\n canvasPolygon(ctx, box);\n canvasPolygon(ctx, outer);\n ctx.clip();\n ctx.closePath();\n ctx.beginPath();\n if(ctx.fillStyle !== '#FFF') {\n ctx.fillStyle = '#FFF';\n }\n ctx.shadowOffsetX = x;\n ctx.shadowOffsetY = y;\n ctx.shadowColor = c;\n ctx.shadowBlur = sigma;\n canvasPolygon(ctx, box);\n }\n }\n ctx.fill();\n ctx.closePath();\n ctx.restore();\n }\n else if(renderMode === mode.SVG) {\n let d = blur.outerSize(sigma);\n if(inset === 'inset') {\n let xa = x1 + x + spread;\n let ya = y1 + y + spread;\n let xb = x2 + x - spread;\n let yb = y2 + y - spread;\n let spreadBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [spreadBox[0][0], spreadBox[0][1], spreadBox[2][0], spreadBox[2][1]]);\n if(!cross) {\n return;\n }\n cross = [\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ];\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n xom.__cacheDefs.push(v);\n let filter = ctx.add(v);\n let v2 = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross) + svgPolygon(box.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v2);\n xom.__cacheDefs.push(v2);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(cross)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [x1 - n, yb],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, yb],\n [xa, yb],\n [xa, ya],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n }\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon([\n [x1, y1],\n [x2, y1],\n [x2, y2],\n [x1 - n, y2],\n [x1 - n, y2 + n],\n [x2 + n, y2 + n],\n [x2 + n, y1 - n],\n [x1 - n, y1 - n],\n [x1 - n, y2],\n [x1, y2],\n [x1, y1],\n ])],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n else {\n let xa = x1 + x - spread;\n let ya = y1 + y - spread;\n let xb = x2 + x + spread;\n let yb = y2 + y + spread;\n let blurBox = [\n [xa, ya],\n [xb, ya],\n [xb, yb],\n [xa, yb],\n ];\n let cross = geom.getRectsIntersection(\n [box[0][0], box[0][1], box[2][0], box[2][1]],\n [blurBox[0][0], blurBox[0][1], blurBox[2][0], blurBox[2][1]]);\n if(spread) {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', 0],\n ['dy', 0],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(blurBox.slice(0).reverse())],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', c],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', (cross ? svgPolygon([\n [cross[0], cross[1]],\n [cross[2], cross[1]],\n [cross[2], cross[3]],\n [cross[0], cross[3]],\n [cross[0], cross[1]],\n ].reverse()) : '')\n + svgPolygon(box) + svgPolygon(blurBox) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(blurBox)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n else {\n let v = {\n tagName: 'filter',\n props: [\n ['x', -d / w],\n ['y', -d / h],\n ['width', 1 + d * 2 / w],\n ['height', 1 + d * 2 / h],\n ],\n children: [\n {\n tagName: 'feDropShadow',\n props: [\n ['dx', x],\n ['dy', y],\n ['stdDeviation', sigma * 0.5],\n ['flood-color', c],\n ],\n },\n ],\n };\n let filter = ctx.add(v);\n xom.__cacheDefs.push(v);\n v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(box) + svgPolygon(outer)],\n ['fill', '#FFF'],\n ],\n }],\n };\n let clip = ctx.add(v);\n xom.__cacheDefs.push(v);\n xom.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(box)],\n ['fill', '#FFF'],\n ['filter', 'url(#' + filter + ')'],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n }\n }\n }\n}\n\nexport default {\n renderBoxShadow,\n};\n","const hash = {};\n\nfunction mbmName(v) {\n if(v) {\n if(hash.hasOwnProperty(v)) {\n return hash[v];\n }\n return hash[v] = v.replace(/[A-Z]/, function($0) {\n return '-' + $0.toLowerCase();\n });\n }\n}\n\nfunction isValidMbm(v) {\n if(v === 'normal') {\n return false;\n }\n return v === 'multiply'\n || v === 'screen'\n || v === 'overlay'\n || v === 'darken'\n || v === 'lighten'\n || v === 'colorDodge'\n || v === 'color-dodge'\n || v === 'colorBurn'\n || v === 'color-burn'\n || v === 'hardLight'\n || v === 'hard-light'\n || v === 'softLight'\n || v === 'soft-light'\n || v === 'difference'\n || v === 'exclusion'\n || v === 'hue'\n || v === 'saturation'\n || v === 'color'\n || v === 'luminosity';\n}\n\nexport default {\n mbmName,\n isValidMbm,\n};\n","import Node from './Node';\nimport Component from './Component';\nimport inline from './inline';\nimport Ellipsis from './Ellipsis';\nimport unit from '../style/unit';\nimport tf from '../style/transform';\nimport gradient from '../style/gradient';\nimport border from '../style/border';\nimport css from '../style/css';\nimport bg from '../style/bg';\nimport abbr from '../style/abbr';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport Animation from '../animate/Animation';\nimport frame from '../animate/frame';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport mode from '../refresh/mode';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport font from '../style/font';\nimport bs from '../style/bs';\nimport mbm from '../style/mbm';\nimport reset from '../style/reset';\n\nconst { svgPolygon } = painter;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { normalize, equalStyle } = css;\n\nconst {\n STYLE_KEY,\n STYLE_RV_KEY,\n style2Upper,\n STYLE_KEY: {\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n PADDING_LEFT,\n PADDING_RIGHT,\n PADDING_TOP,\n PADDING_BOTTOM,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_RIGHT,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n WIDTH,\n HEIGHT,\n MATRIX,\n TRANSLATE_X,\n TRANSLATE_Y,\n TRANSLATE_Z,\n TRANSFORM,\n SCALE_X,\n SCALE_Y,\n SCALE_Z,\n ROTATE_X,\n ROTATE_Y,\n ROTATE_Z,\n SKEW_X,\n SKEW_Y,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n ROTATE_3D,\n TRANSFORM_ORIGIN,\n BACKGROUND_POSITION_X,\n BACKGROUND_POSITION_Y,\n BACKGROUND_SIZE,\n BACKGROUND_COLOR,\n BACKGROUND_IMAGE,\n BACKGROUND_REPEAT,\n BOX_SHADOW,\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BORDER_TOP_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n BORDER_RIGHT_COLOR,\n FONT_STYLE,\n COLOR,\n VISIBILITY,\n POINTER_EVENTS,\n BORDER_TOP,\n BORDER_RIGHT,\n BORDER_BOTTOM,\n BORDER_LEFT,\n BACKGROUND_CLIP,\n FONT_SIZE,\n FONT_FAMILY,\n LINE_HEIGHT,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n FONT_WEIGHT,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n TEXT_ALIGN,\n LETTER_SPACING,\n WHITE_SPACE,\n WRITING_MODE,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n BOX_SIZING,\n FONT_SIZE_SHRINK,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, INHERIT, NUMBER, RGBA, STRING, REM, VW, VH, VMAX, VMIN, DEG, GRADIENT } = unit;\nconst { int2rgba, rgba2int, joinArr, isNil, isFunction } = util;\nconst { calRelative, calNormalLineHeight, calFontFamily, spreadBoxShadow, spreadFilter } = css;\nconst { GEOM } = change;\nconst { mbmName, isValidMbm } = mbm;\nconst { point2d, multiply,\n multiplyRotateX, multiplyRotateY, multiplyRotateZ,\n multiplySkewX, multiplySkewY,\n multiplyScaleX, multiplyScaleY, multiplyScaleZ } = mx;\n\nconst {\n TRANSFORM: TF,\n REFLOW,\n REPAINT,\n TRANSLATE_X: TX,\n TRANSLATE_Y: TY,\n TRANSLATE_Z: TZ,\n ROTATE_Z: RZ,\n SCALE_X: SX,\n SCALE_Y: SY,\n SCALE_Z: SZ,\n SCALE,\n TRANSFORM_ALL,\n CACHE,\n MASK,\n} = level;\nconst { d2r } = geom;\nconst { calRotateX, calRotateY, calRotateZ, calRotate3d } = tf;\n\nfunction getFirstEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = 0; i < length; i++) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren && child.flowChildren.length) {\n n += getFirstEmptyInlineWidth(child);\n break;\n }\n else if(child.__isInline) {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nfunction getLastEmptyInlineWidth(xom) {\n let n = 0;\n let flowChildren = xom.flowChildren;\n let length = flowChildren.length;\n for(let i = length - 1; i >= 0; i--) {\n let child = flowChildren[i];\n if(child instanceof Xom || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.flowChildren && child.flowChildren.length) {\n n += getLastEmptyInlineWidth(child);\n break;\n }\n else {\n n += child.outerWidth;\n }\n }\n else {\n break;\n }\n }\n return n;\n}\n\nclass Xom extends Node {\n constructor(tagName, props = {}) {\n super();\n // 构建工具中都是arr,手写可能出现hash情况\n if(Array.isArray(props)) {\n this.props = util.arr2hash(props);\n }\n else {\n this.props = props;\n }\n this.__tagName = tagName;\n this.__style = this.props.style || {}; // style被解析后的k-v形式\n this.__currentStyle = []; // 动画过程中绘制一开始会merge动画样式\n this.__computedStyle = []; // 类似getComputedStyle()将currentStyle计算好数值赋给\n this.__listener = {};\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n if(/^on[a-zA-Z]/.test(k)) {\n k = k.slice(2).toLowerCase();\n this.addEventListener(k, v);\n }\n });\n this.__animationList = [];\n this.__loadBgi = {\n // 刷新回调函数,用以destroy取消用\n cb: function() {\n },\n };\n this.__cacheStyle = []; // 是否缓存重新计算computedStyle的样式key\n this.__cacheDefs = []; // svg专用,缓存渲染时使用已有的defs,diff过程用,否则会defs被清空\n let isClip = this.__clip = !!this.props.clip;\n this.__mask = isClip || !!this.props.mask;\n this.__refreshLevel = REFLOW;\n this.__limitCache = false;\n this.__isInline = false;\n this.__hasContent = false;\n this.__opacity = 1;\n this.__matrix = [];\n this.__matrixEvent = [];\n this.__perspectiveMatrix = null;\n this.__frameAnimateList = [];\n this.__contentBoxList = []; // inline存储内容用\n this.__cacheAsBitmap = !!this.props.cacheAsBitmap;\n this.__cache = this.__cacheTotal = this.__cacheFilter = this.__cacheMask;\n this.__layoutData = null; // 缓存上次布局x/y/w/h数据\n this.__hasComputeReflow = false; // 每次布局计算缓存标,使得每次开始只computeReflow一次\n this.__parentLineBox = null; // inline时指向\n this.__fontRegister = {}; // 优先级字体尚未加载时记录回调hash,销毁时删除回调\n }\n\n __structure(lv, j) {\n let res = super.__structure(lv, j);\n if(this.__hasMask) {\n res.hasMask = this.__hasMask;\n }\n return res;\n }\n\n __modifyStruct() {}\n\n // 设置margin/padding的实际值,layout时执行,inline的垂直方向仍然计算值,但在布局时被忽略\n __mp(currentStyle, computedStyle, w) {\n [\n 'Top',\n 'Right',\n 'Bottom',\n 'Left',\n ].forEach(k => {\n let a = STYLE_KEY[style2Upper('margin' + k)];\n let b = STYLE_KEY[style2Upper('padding' + k)];\n computedStyle[a] = this.__calSize(currentStyle[a], w, true);\n computedStyle[b] = this.__calSize(currentStyle[b], w, true);\n });\n }\n\n __calSize(v, w, includePercent) {\n if(v.u === PX) {\n return v.v;\n }\n else if(v.u === PERCENT) {\n if(includePercent) {\n return v.v * w * 0.01;\n }\n }\n else if(v.u === REM || v.u === REM) {\n return v.v * this.__root.computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n return v.v * this.__root.width * 0.01;\n }\n else if(v.u === VH) {\n return v.v * this.__root.height * 0.01;\n }\n else if(v.u === VMAX) {\n return v.v * Math.max(this.__root.width, this.__root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n return v.v * Math.min(this.__root.width, this.__root.height) * 0.01;\n }\n return 0;\n }\n\n __computeReflow() {\n if(this.__hasComputeReflow) {\n return;\n }\n this.__hasComputeReflow = true;\n\n let { __currentStyle: currentStyle, __computedStyle: computedStyle, __domParent: parent } = this;\n let isRoot = !parent;\n let parentComputedStyle = parent && parent.__computedStyle;\n // 继承的特殊处理,根节点用默认值\n [FONT_SIZE, FONT_FAMILY, FONT_WEIGHT, WRITING_MODE, FONT_SIZE_SHRINK].forEach(k => {\n let v = currentStyle[k];\n // ff特殊处理\n if(k === FONT_FAMILY) {\n if(v.u === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n else {\n computedStyle[k] = v.v;\n let ff = v.v.split(/\\s*,\\s*/);\n // 从左到右即声明的字体优先级\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(font.hasRegister(item)) {\n // 如果已经注册加载了,或者注册且本地支持的,说明可用\n if(font.hasLoaded(item) || inject.checkSupportFontFamily(item)) {\n break;\n }\n }\n // 不可用的都特殊记住等待注册回调__loadFontCallback\n this.__fontRegister[item] = true;\n font.onRegister(item, this);\n }\n }\n }\n else if(v.u === INHERIT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : parentComputedStyle[k];\n }\n // fontSize和shrinkFontSize会有%\n else if(v.u === PERCENT) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v.v * 0.01);\n }\n else if(v.u === REM) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.computedStyle[FONT_SIZE] * v.v);\n }\n else if(v.u === VW) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.width * 0.01 * v.v);\n }\n else if(v.u === VH) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (this.root.height * 0.01 * v.v);\n }\n else if(v.u === VMAX) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.max(this.root.width, this.root.height) * 0.01 * v.v);\n }\n else if(v.u === VMIN) {\n computedStyle[k] = isRoot ? reset.INHERIT[STYLE_RV_KEY[k]] : (Math.min(this.root.width, this.root.height) * 0.01 * v.v);\n }\n else {\n computedStyle[k] = v.v;\n }\n });\n [\n BORDER_TOP_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n ].forEach(k => {\n // border-width不支持百分比\n let item = currentStyle[k];\n computedStyle[k] = this.__calSize(item, 0, false);\n });\n [\n POSITION,\n DISPLAY,\n BOX_SIZING,\n FLEX_DIRECTION,\n JUSTIFY_CONTENT,\n ALIGN_ITEMS,\n ALIGN_SELF,\n FLEX_GROW,\n FLEX_SHRINK,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n TEXT_OVERFLOW,\n ].forEach(k => {\n computedStyle[k] = currentStyle[k];\n });\n // writingMode特殊判断inline\n if(parentComputedStyle && computedStyle[WRITING_MODE] !== parentComputedStyle[WRITING_MODE] && computedStyle[DISPLAY] === 'inline') {\n computedStyle[DISPLAY] = 'inlineBlock';\n }\n // 匿名块对象\n if(computedStyle[POSITION] === 'absolute' || parentComputedStyle && parentComputedStyle[DISPLAY] === 'flex') {\n if(['block', 'flex'].indexOf(computedStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = 'block';\n }\n }\n let textAlign = currentStyle[TEXT_ALIGN];\n if(textAlign.u === INHERIT) {\n computedStyle[TEXT_ALIGN] = isRoot ? 'left' : parentComputedStyle[TEXT_ALIGN];\n }\n else {\n computedStyle[TEXT_ALIGN] = textAlign.v;\n }\n let fontSize = computedStyle[FONT_SIZE];\n let lineHeight = currentStyle[LINE_HEIGHT];\n // lineHeight继承很特殊,数字和normal不同于普通单位\n if(lineHeight.u === INHERIT) {\n if(isRoot) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n else {\n let p = parent;\n let ph;\n while(p) {\n ph = p.currentStyle[LINE_HEIGHT];\n if(ph.u !== INHERIT) {\n break;\n }\n p = p.domParent;\n }\n // 到root还是inherit或normal,或者中途遇到了normal,使用normal\n if([AUTO, INHERIT].indexOf(ph.u) > -1) {\n computedStyle[LINE_HEIGHT] = calNormalLineHeight(computedStyle);\n }\n // 数字继承\n else if(ph.u === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(ph.v, 0) * fontSize;\n }\n // 单位继承\n else {\n computedStyle[LINE_HEIGHT] = parentComputedStyle[LINE_HEIGHT];\n }\n }\n }\n else if(lineHeight.u === NUMBER) {\n computedStyle[LINE_HEIGHT] = Math.max(lineHeight.v, 0) * fontSize || calNormalLineHeight(computedStyle);\n }\n // 防止为0\n else {\n let v = Math.max(this.__calSize(lineHeight, fontSize, true), 0);\n computedStyle[LINE_HEIGHT] = v || calNormalLineHeight(computedStyle);\n }\n let letterSpacing = currentStyle[LETTER_SPACING];\n if(letterSpacing.u === INHERIT) {\n computedStyle[LETTER_SPACING] = isRoot ? 0 : parentComputedStyle[LETTER_SPACING];\n }\n else {\n computedStyle[LETTER_SPACING] = this.__calSize(letterSpacing, fontSize, true);\n }\n //whiteSpace\n let whiteSpace = currentStyle[WHITE_SPACE];\n if(whiteSpace.u === INHERIT) {\n computedStyle[WHITE_SPACE] = isRoot ? 'normal' : parentComputedStyle[WHITE_SPACE];\n }\n else {\n computedStyle[WHITE_SPACE] = whiteSpace.v;\n }\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n this.__width = this.__height = 0;\n // 布局前固定尺寸的线设置好,子元素percent尺寸要用到,flex的子元素侧轴stretch也要特殊提前处理,认为定高\n if(width.u !== AUTO) {\n this.__width = computedStyle[WIDTH] = this.__calSize(width, isRoot ? this.__width : parent.__width, true);\n }\n if(height.u !== AUTO) {\n this.__height = computedStyle[HEIGHT] = this.__calSize(height, isRoot ? this.__height : parent.__height, true);\n }\n else {\n let p = this.__domParent;\n if(p) {\n let crs = p.__currentStyle;\n let alignSelf = currentStyle[ALIGN_SELF];\n // flex的子元素stretch提前处理认为高度,以便其子元素%高度计算\n if(crs[DISPLAY] === 'flex' && p.__height) {\n if(crs[FLEX_DIRECTION].indexOf('row') > -1\n && (alignSelf === 'stretch'\n || crs[ALIGN_ITEMS] === 'stretch' && alignSelf === 'auto')) {\n this.__height = p.__height;\n }\n }\n }\n }\n }\n\n __emitFontRegister(fontFamily) {\n let node = this, fontRegister = node.__fontRegister;\n if(node.__isDestroyed) {\n return;\n }\n delete fontRegister[fontFamily];\n let { root, currentStyle } = node;\n if(!root) {\n return;\n }\n let v = currentStyle[FONT_FAMILY];\n if(v.u === INHERIT) {\n return;\n }\n let ff = v.v.split(/\\s*,\\s*/);\n for(let i = 0, len = ff.length; i < len; i++) {\n let item = ff[i].replace(/^['\"]/, '').replace(/['\"]$/, '');\n if(item === fontFamily) {\n // 加载成功回调可能没注册信息,需要多判断一下\n if(font.hasRegister(item)) {\n root.__addUpdate(node, null, REFLOW, null, null, null, null);\n }\n // 后面低优先级的无需再看\n return;\n }\n // 有更高优先级的已经支持了,回调刷新无效\n else if(font.hasRegister(item)\n && (font.hasLoaded(item) || inject.checkSupportFontFamily(item))) {\n return;\n }\n }\n }\n\n // dom常用的几种尺寸赋值\n __ioSize(w, h) {\n let computedStyle = this.__computedStyle;\n // 可能不传,在虚拟布局时用不到\n if(!isNil(w)) {\n this.__width = computedStyle[WIDTH] = w;\n this.__clientWidth = w += computedStyle[PADDING_LEFT] + computedStyle[PADDING_RIGHT];\n this.__offsetWidth = w += computedStyle[BORDER_LEFT_WIDTH] + computedStyle[BORDER_RIGHT_WIDTH];\n this.__outerWidth = w + computedStyle[MARGIN_LEFT] + computedStyle[MARGIN_RIGHT];\n }\n if(!isNil(h)) {\n this.__height = computedStyle[HEIGHT] = h;\n this.__clientHeight = h += computedStyle[PADDING_TOP] + computedStyle[PADDING_BOTTOM];\n this.__offsetHeight = h += computedStyle[BORDER_TOP_WIDTH] + computedStyle[BORDER_BOTTOM_WIDTH];\n this.__outerHeight = h + computedStyle[MARGIN_TOP] + computedStyle[MARGIN_BOTTOM];\n }\n }\n\n // 为basis的b/min/max添加mpb,只有当b未显示指定等于w/content时才加,同时返回mpb值\n __addMBP(isDirectionRow, w, currentStyle, computedStyle, res, isDirectItem) {\n let {\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [BOX_SIZING]: boxSizing,\n } = currentStyle;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n if(isDirectionRow) {\n let m = this.__calSize(marginLeft, w, isDirectItem)\n + this.__calSize(marginRight, w, isDirectItem);\n let bp = 0;\n if(isDirectItem || boxSizing === 'contentBox') {\n bp = this.__calSize(paddingLeft, w, isDirectItem)\n + this.__calSize(paddingRight, w, isDirectItem)\n + borderLeftWidth + borderRightWidth;\n }\n res = res.map(item => item + m + bp);\n }\n else {\n let m = this.__calSize(marginTop, w, isDirectItem)\n + this.__calSize(marginBottom, w, isDirectItem);\n let bp = 0;\n if(isDirectItem || boxSizing === 'contentBox') {\n bp = this.__calSize(paddingTop, w, isDirectItem)\n + this.__calSize(paddingBottom, w, isDirectItem)\n + borderTopWidth + borderBottomWidth;\n }\n res = res.map(item => item + m + bp);\n }\n return res;\n }\n\n __layout(data, isAbs, isColumn, isRow) {\n this.__layoutFlow(data, isAbs, isColumn, isRow);\n }\n\n // absolute且无尺寸时,isAbs标明先假布局一次计算尺寸,还有flex列计算时isColumn假布局,flex横计算时writingMode垂直假布局\n __layoutFlow(data, isAbs, isColumn, isRow) {\n this.__computeReflow();\n let { __isDestroyed, __currentStyle, __computedStyle, __ellipsis } = this;\n // 虚拟省略号每次清除\n if(__ellipsis) {\n this.__ellipsis = null;\n }\n this.__parentLineBox = null;\n this.__isIbFull = this.__isUprightIbFull = false;\n let {\n [DISPLAY]: display,\n [POSITION]: position,\n } = __computedStyle;\n this.__layoutData = {\n x: data.x,\n y: data.y,\n w: data.w,\n h: data.h,\n lx: data.lx,\n ly: data.ly,\n isUpright: data.isUpright, // 从Root开始,父级的书写模式需每层传递\n container: data.container,\n };\n // 防止display:none不统计mask,isVirtual忽略,abs/flex布局后续会真正来走一遍\n if(!isAbs && !isColumn && !isRow) {\n this.clearCache();\n this.__cacheStyle = [];\n this.__refreshLevel = REFLOW;\n this.__limitCache = false;\n this.__isInline = false;\n let { next } = this;\n // mask关系只有布局才会变更,普通渲染关系不会改变,clip也是mask的一种\n if(!this.__mask && next && (next.__mask)) {\n let count = 0;\n while(next) {\n if(next.__mask) {\n count++;\n }\n else {\n break;\n }\n next = next.next;\n }\n this.__hasMask = count;\n }\n }\n if(__isDestroyed || display === 'none') {\n this.__x = data.x;\n this.__y = data.y;\n this.__layoutNone();\n this.__hasComputeReflow = false;\n return;\n }\n // absolute特殊,在自己布局时已计算相对于容器的mbp\n if(position !== 'absolute') {\n this.__mp(__currentStyle, __computedStyle, data.w);\n }\n // 只有inline会继承计算行数,其它都是原样返回\n let lineClampCount = data.lineClampCount || 0;\n // 4种布局,默认block,inlineBlock基本可以复用inline逻辑,除了尺寸\n if(display === 'flex') {\n data.lineClampCount = 0;\n this.__layoutFlex(data, isAbs, isColumn, isRow);\n }\n else if(display === 'inlineBlock') {\n data.lineClampCount = 0;\n this.__layoutInline(data, isAbs, isColumn, isRow);\n }\n else if(display === 'inline') {\n lineClampCount = this.__layoutInline(data, isAbs, isColumn, isRow, true);\n }\n else {\n data.lineClampCount = 0;\n this.__layoutBlock(data, isAbs, isColumn, isRow);\n }\n // 非虚拟布局才执行,防止重复\n if(!isAbs && !isColumn && !isRow) {\n // 计算结果存入computedStyle和6个坐标,inline在其inlineSize特殊处理\n let x = this.__x;\n let y = this.__y;\n if(!this.__isInline) {\n x = this.__x1 = x + __computedStyle[MARGIN_LEFT];\n x = this.__x2 = x + __computedStyle[BORDER_LEFT_WIDTH];\n x = this.__x3 = x + __computedStyle[PADDING_LEFT];\n x = this.__x4 = x + this.__width;\n x = this.__x5 = x + __computedStyle[PADDING_RIGHT];\n this.__x6 = x + __computedStyle[BORDER_RIGHT_WIDTH];\n y = this.__y1 = y + __computedStyle[MARGIN_TOP];\n y = this.__y2 = y + __computedStyle[BORDER_TOP_WIDTH];\n y = this.__y3 = y + __computedStyle[PADDING_TOP];\n y = this.__y4 = y + this.__height;\n y = this.__y5 = y + __computedStyle[PADDING_BOTTOM];\n this.__y6 = y + __computedStyle[BORDER_BOTTOM_WIDTH];\n }\n // relative渲染时做偏移,百分比基于父元素,若父元素没有定高则为0\n if(position === 'relative') {\n let {[TOP]: top, [RIGHT]: right, [BOTTOM]: bottom, [LEFT]: left} = __currentStyle;\n let {parent} = this;\n if(top.u !== AUTO) {\n let n = calRelative(__currentStyle, TOP, top, parent);\n if(n) {\n this.__offsetY(n, true, null);\n if(this.__isInline) {\n let list = this.__contentBoxList;\n if(Array.isArray(list)) {\n let last;\n list.forEach(item => {\n let p = item.__parentLineBox;\n if(p && p !== last) {\n p.__oy += n;\n }\n last = p;\n });\n }\n }\n }\n __computedStyle[TOP] = n;\n __computedStyle[BOTTOM] = 'auto';\n }\n else if(bottom.u !== AUTO) {\n let n = calRelative(__currentStyle, BOTTOM, bottom, parent);\n if(n) {\n this.__offsetY(-n, true, null);\n if(this.__isInline) {\n let list = this.__contentBoxList;\n if(Array.isArray(list)) {\n let last;\n list.forEach(item => {\n let p = item.__parentLineBox;\n if(p && p !== last) {\n p.__oy -= n;\n }\n last = p;\n });\n }\n }\n }\n __computedStyle[BOTTOM] = n;\n __computedStyle[TOP] = 'auto';\n }\n else {\n __computedStyle[TOP] = __computedStyle[BOTTOM] = 'auto';\n }\n if(left.u !== AUTO) {\n let n = calRelative(__currentStyle, LEFT, left, parent, true);\n if(n) {\n this.__offsetX(n, true, null);\n }\n __computedStyle[LEFT] = n;\n __computedStyle[RIGHT] = 'auto';\n }\n else if (right.u !== AUTO) {\n let n = calRelative(__currentStyle, RIGHT, right, parent, true);\n if(n) {\n this.__offsetX(-n, true, null);\n }\n __computedStyle[RIGHT] = n;\n __computedStyle[LEFT] = 'auto';\n }\n else {\n __computedStyle[LEFT] = __computedStyle[RIGHT] = 'auto';\n }\n }\n else if (position !== 'absolute') {\n __computedStyle[TOP] = __computedStyle[BOTTOM] = __computedStyle[LEFT] = __computedStyle[RIGHT] = 'auto';\n }\n __computedStyle[WIDTH] = this.__width;\n __computedStyle[HEIGHT] = this.__height;\n // abs为parse的根节点时特殊自己执行,前提是真布局\n if(position !== 'absolute') {\n this.__execAr();\n }\n this.__hasComputeReflow = false;\n }\n return lineClampCount;\n }\n\n __layoutStyle() {\n let currentStyle = this.__currentStyle;\n let computedStyle = this.__computedStyle;\n let cacheStyle = this.__cacheStyle;\n this.__calStyle(level.REFLOW, currentStyle, computedStyle, cacheStyle);\n this.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n\n __execAr() {\n // 动态json引用时动画暂存,第一次布局时处理这些动画到root的animateController上\n let ar = this.__animateRecords;\n if(ar) {\n this.__animateRecords = null;\n // parse没有dom时,animate的target引用都是json,vd后生成需重新赋值\n ar.list.forEach(item => {\n if(item.target.vd instanceof Xom) {\n item.target = item.target.vd;\n }\n });\n let ac = ar.controller || this.root.animateController;\n // 不自动播放进入记录列表,初始化并等待手动调用\n if(ar.options && ar.options.autoPlay === false) {\n ac.__records2 = ac.__records2.concat(ar.list);\n ac.init(ac.__records2, ac.list2);\n }\n else {\n ac.__records = ac.__records.concat(ar.list);\n ac.__playAuto();\n }\n }\n }\n\n __layoutNone() {\n this.__computeReflow();\n let { __computedStyle } = this;\n __computedStyle[DISPLAY] = 'none';\n this.__reset0();\n this.__hasComputeReflow = false;\n }\n\n __reset0() {\n let { __computedStyle } = this;\n __computedStyle[MARGIN_TOP]\n = __computedStyle[MARGIN_RIGHT]\n = __computedStyle[MARGIN_BOTTOM]\n = __computedStyle[MARGIN_LEFT]\n = __computedStyle[BORDER_TOP_WIDTH]\n = __computedStyle[BORDER_RIGHT_WIDTH]\n = __computedStyle[BORDER_BOTTOM_WIDTH]\n = __computedStyle[BORDER_LEFT_WIDTH]\n = __computedStyle[PADDING_TOP]\n = __computedStyle[PADDING_RIGHT]\n = __computedStyle[PADDING_BOTTOM]\n = __computedStyle[PADDING_LEFT]\n = __computedStyle[WIDTH]\n = __computedStyle[HEIGHT]\n = this.__width\n = this.__height\n = this.__clientWidth\n = this.__clientHeight\n = this.__offsetWidth\n = this.__offsetHeight\n = this.__outerWidth\n = this.__outerHeight\n = 0;\n }\n\n // 预先计算是否是固定宽高,布局点位和尺寸考虑margin/border/padding\n __preLayout(data, isInline) {\n let { x, y, w, h, w2, h2, w3, h3, lx, ly, lineBoxManager, endSpace = 0, isUpright: isParentVertical, container } = data;\n this.__x = x;\n this.__y = y;\n let { __currentStyle: currentStyle, __computedStyle: computedStyle } = this;\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let position = computedStyle[POSITION];\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [WRITING_MODE]: writingMode,\n [BOX_SIZING]: boxSizing,\n } = computedStyle;\n let isUpright = writingMode.indexOf('vertical') === 0;\n // 除了auto外都是固定宽高度\n let fixedWidth;\n let fixedHeight;\n // 绝对定位是left+right这种其实等于定义了width,但不能修改原始style,存入特殊变量标识\n if(w2 !== undefined) {\n fixedWidth = true;\n w = w2;\n }\n // flex时也会用到,子级得出目标主尺寸后按这个来\n else if(w3 !== undefined) {\n fixedWidth = true;\n w = w3;\n }\n else if(width.u !== AUTO && !isInline) {\n fixedWidth = true;\n // abs的百分比尺寸相对于container\n if(position === 'absolute' && width.u === PERCENT) {\n w = this.__calSize(width, container.__clientWidth, true);\n }\n else {\n w = this.__calSize(width, w, true);\n if(boxSizing === 'borderBox') {\n w -= borderLeftWidth + borderRightWidth + paddingLeft + paddingRight;\n }\n }\n }\n if(h2 !== undefined) {\n fixedHeight = true;\n h = h2;\n }\n else if(h3 !== undefined) {\n fixedHeight = true;\n h = h3;\n }\n // height的百分比需要parent有值不能auto,或者parent的flex定高且侧轴stretch时;abs的百分比相对于container\n else if(height.u !== AUTO && !isInline) {\n if(position === 'absolute' && height.u === PERCENT) {\n h = this.__calSize(height, container.__clientHeight, true);\n }\n else {\n let p = this.__domParent;\n if(height.u === PERCENT) {\n // 一般都是0,除了定高,或者flex的stretch\n if(p.height) {\n fixedHeight = true;\n h = this.__calSize(height, p.height || 0, true);\n }\n }\n else {\n fixedHeight = true;\n h = this.__calSize(height, h, true);\n }\n if(boxSizing === 'borderBox') {\n h -= borderTopWidth + borderBottomWidth + paddingTop + paddingBottom;\n }\n }\n }\n // margin/border/padding影响x和y和尺寸,注意inline的y不受mpb影响(垂直模式则是x)\n if(!isInline) {\n x += borderLeftWidth + marginLeft + paddingLeft;\n y += borderTopWidth + marginTop + paddingTop;\n }\n else {\n if(isUpright) {\n y += borderTopWidth + marginTop + paddingTop;\n }\n else {\n x += borderLeftWidth + marginLeft + paddingLeft;\n }\n }\n data.x = x;\n data.y = y;\n // inline的w/h很特殊,需不考虑inline自身水平的mpb以便换行,因为mpb只在首尾行生效,所以首尾需特殊处理中间忽略\n // 当嵌套inline时更加复杂,假如inline有尾部mpb,最后一行需考虑,如果此inline是父的最后一个且父有mpb需叠加\n let selfEndSpace = 0;\n if(isInline) {\n if(isUpright) {\n selfEndSpace = paddingBottom + borderBottomWidth + marginBottom;\n }\n else {\n selfEndSpace = paddingRight + borderRightWidth + marginRight;\n }\n }\n // 传入w3/h3时,flex的item已知目标主尺寸,需减去mbp,其一定是block,和inline互斥\n else {\n if(width.u === AUTO || w3 !== undefined) {\n w -= borderLeftWidth + borderRightWidth + marginLeft + marginRight + paddingLeft + paddingRight;\n }\n if(height.u === AUTO || h3 !== undefined) {\n h -= borderTopWidth + borderBottomWidth + marginTop + marginBottom + paddingTop + paddingBottom;\n }\n }\n return {\n fixedWidth,\n fixedHeight,\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n selfEndSpace,\n isParentVertical,\n isUpright,\n };\n }\n\n // 处理margin:xx auto居中对齐或右对齐\n __marginAuto(style, data, isUpright) {\n let {\n [POSITION]: position,\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = style;\n if(position !== 'absolute' && (display === 'block' || display === 'flex')) {\n if(isUpright) {\n if((height.u !== AUTO || this.isReplaced) && marginTop.u === AUTO && marginBottom.u === AUTO) {\n let oh = this.outerHeight;\n if(oh < data.h) {\n this.__offsetY((data.h - oh) * 0.5, true, null);\n }\n }\n }\n else {\n if((width.u !== AUTO || this.isReplaced) && marginLeft.u === AUTO && marginRight.u === AUTO) {\n let ow = this.outerWidth;\n if(ow < data.w) {\n this.__offsetX((data.w - ow) * 0.5, true, null);\n }\n }\n }\n }\n }\n\n __calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, optimize) {\n let {\n __x1,\n __y1,\n __offsetWidth,\n __offsetHeight,\n } = this;\n if(this.__isInline) {\n __computedStyle[TRANSFORM_ORIGIN] = [__x1, __y1];\n return __cacheStyle[MATRIX] = this.__matrix = mx.identity();\n }\n let matrixCache = __cacheStyle[MATRIX];\n // 优化计算scale不能为0,无法计算倍数差,rotateZ优化不能包含rotateX/rotateY/skew\n if(!isNil(optimize)) {}\n else if(matrixCache && lv < REFLOW && !(lv & TF)) {\n if((lv & SX) && !__computedStyle[SCALE_X]\n || (lv & SY) && !__computedStyle[SCALE_Y]\n || (lv & SZ) && !__computedStyle[SCALE_Z]\n || (lv & RZ) && (__computedStyle[ROTATE_X] || __computedStyle[ROTATE_Y]\n || __computedStyle[SKEW_X] || __computedStyle[SKEW_Y])) {\n }\n else {\n optimize = true;\n }\n }\n // translate/scale变化特殊优化,d/h/l不能有值,否则不能这样直接简化运算,因为这里不包含perspective,所以一定没有\n if(optimize && matrixCache) {\n let transform = __computedStyle[TRANSFORM];\n if(lv & TX) {\n let v = __currentStyle[TRANSLATE_X];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n let x = v - __computedStyle[TRANSLATE_X];\n __computedStyle[TRANSLATE_X] = v;\n transform[12] += x;\n matrixCache[12] += x;\n }\n if(lv & TY) {\n let v = __currentStyle[TRANSLATE_Y];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetHeight, true);\n }\n let y = v - __computedStyle[TRANSLATE_Y];\n __computedStyle[TRANSLATE_Y] = v;\n transform[13] += y;\n matrixCache[13] += y;\n }\n if(lv & TZ) {\n let v = __currentStyle[TRANSLATE_Z];\n if(!v) {\n v = 0;\n }\n else if(v.u === PX) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.__offsetWidth, true);\n }\n let z = v - __computedStyle[TRANSLATE_Z];\n __computedStyle[TRANSLATE_Z] = v;\n transform[14] += z;\n matrixCache[14] += z;\n }\n if(lv & RZ) {\n let v = __currentStyle[ROTATE_Z].v;\n __computedStyle[ROTATE_Z] = v;\n v = d2r(v);\n let sin = Math.sin(v), cos = Math.cos(v);\n let x = __computedStyle[SCALE_X], y = __computedStyle[SCALE_Y];\n let cx = matrixCache[0] = transform[0] = cos * x;\n let sx = matrixCache[1] = transform[1] = sin * x;\n let sy = matrixCache[4] = transform[4] = -sin * y;\n let cy = matrixCache[5] = transform[5] = cos * y;\n let t = __computedStyle[TRANSFORM_ORIGIN], ox = t[0], oy = t[1];\n ox += __x1;\n oy += __y1;\n matrixCache[12] = transform[12] + ox - cx * ox - oy * sy;\n matrixCache[13] = transform[13] + oy - sx * ox - oy * cy;\n }\n if(lv & SCALE) {\n if(lv & SX) {\n if(!__computedStyle[SCALE_X]) {\n return this.__calMatrix(REFLOW, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_X].v;\n let x = v / __computedStyle[SCALE_X];\n __computedStyle[SCALE_X] = v;\n transform[0] *= x;\n transform[1] *= x;\n transform[2] *= x;\n matrixCache[0] *= x;\n matrixCache[1] *= x;\n matrixCache[2] *= x;\n }\n if(lv & SY) {\n if(!__computedStyle[SCALE_Y]) {\n return this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_Y].v;\n let y = v / __computedStyle[SCALE_Y];\n __computedStyle[SCALE_Y] = v;\n transform[4] *= y;\n transform[5] *= y;\n transform[6] *= y;\n matrixCache[4] *= y;\n matrixCache[5] *= y;\n matrixCache[6] *= y;\n }\n if(lv & SZ) {\n if(!__computedStyle[SCALE_Z]) {\n return this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n let v = __currentStyle[SCALE_Z].v;\n let z = v / __computedStyle[SCALE_Z];\n __computedStyle[SCALE_Z] = v;\n transform[8] *= z;\n transform[9] *= z;\n transform[10] *= z;\n matrixCache[8] *= z;\n matrixCache[9] *= z;\n matrixCache[10] *= z;\n }\n let t = __computedStyle[TRANSFORM_ORIGIN], ox = t[0], oy = t[1];\n ox += __x1;\n oy += __y1;\n matrixCache[12] = transform[12] + ox - transform[0] * ox - transform[4] * oy;\n matrixCache[13] = transform[13] + oy - transform[1] * ox - transform[5] * oy;\n matrixCache[14] = transform[14] - transform[2] * ox - transform[6] * oy;\n }\n }\n // 先根据cache计算需要重新计算的computedStyle\n else {\n if(__cacheStyle[TRANSFORM_ORIGIN] === undefined) {\n __cacheStyle[TRANSFORM_ORIGIN] = true;\n matrixCache = null;\n __computedStyle[TRANSFORM_ORIGIN] = __currentStyle[TRANSFORM_ORIGIN].map((item, i) => {\n return this.__calSize(item, i ? __offsetHeight : __offsetWidth, true);\n });\n }\n if(__cacheStyle[TRANSFORM] === undefined\n || __cacheStyle[TRANSLATE_X] === undefined\n || __cacheStyle[TRANSLATE_Y] === undefined\n || __cacheStyle[TRANSLATE_Z] === undefined\n || __cacheStyle[ROTATE_X] === undefined\n || __cacheStyle[ROTATE_Y] === undefined\n || __cacheStyle[ROTATE_Z] === undefined\n || __cacheStyle[ROTATE_3D] === undefined\n || __cacheStyle[SCALE_X] === undefined\n || __cacheStyle[SCALE_Y] === undefined\n || __cacheStyle[SCALE_Z] === undefined\n || __cacheStyle[SKEW_X] === undefined\n || __cacheStyle[SKEW_Y] === undefined) {\n __cacheStyle[TRANSFORM]\n = __cacheStyle[TRANSLATE_X]\n = __cacheStyle[TRANSLATE_Y]\n = __cacheStyle[TRANSLATE_Z]\n = __cacheStyle[ROTATE_X]\n = __cacheStyle[ROTATE_Y]\n = __cacheStyle[ROTATE_Z]\n = __cacheStyle[SCALE_X]\n = __cacheStyle[SCALE_Y]\n = __cacheStyle[SCALE_Z]\n = __cacheStyle[SKEW_X]\n = __cacheStyle[SKEW_Y]\n = true;\n matrixCache = null;\n this.__selfPerspective = 0;\n this.__selfPerspectiveMatrix = null;\n let matrix, ct = __currentStyle[TRANSFORM];\n // transform相对于自身\n if(ct && ct.length) {\n let first = ct[0];\n // 特殊处理,抽取出来transform的ppt,视为tfo原点的透视\n if(first.k === PERSPECTIVE) {\n let ppt = this.__selfPerspective = this.__calSize(first.v, this.__clientWidth, true);\n let tfo = __computedStyle[TRANSFORM_ORIGIN];\n this.__selfPerspectiveMatrix = tf.calPerspectiveMatrix(ppt, tfo[0] + __x1, tfo[1] + __y1);\n matrix = tf.calMatrix(ct.slice(1), __offsetWidth, __offsetHeight, this.__root);\n }\n else {\n matrix = tf.calMatrix(ct, __offsetWidth, __offsetHeight, this.__root);\n }\n }\n // 没有transform则看是否有扩展的css独立变换属性\n else {\n __computedStyle[TRANSLATE_X] = 0;\n let v = __currentStyle[TRANSLATE_X];\n if(v) {\n v = __computedStyle[TRANSLATE_X] = this.__calSize(v, this.__offsetWidth, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[12] = v;\n }\n }\n __computedStyle[TRANSLATE_Y] = 0;\n v = __currentStyle[TRANSLATE_Y];\n if(v) {\n v = __computedStyle[TRANSLATE_Y] = this.__calSize(v, this.__offsetHeight, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[13] = v;\n }\n }\n __computedStyle[TRANSLATE_Z] = 0;\n v = __currentStyle[TRANSLATE_Z];\n if(v) {\n v = __computedStyle[TRANSLATE_Z] = this.__calSize(v, this.__offsetWidth, true);\n if(v) {\n matrix = matrix || mx.identity();\n matrix[14] = v;\n }\n }\n __computedStyle[ROTATE_X] = 0;\n v = __currentStyle[ROTATE_X];\n if(v) {\n v = __computedStyle[ROTATE_X] = v.v;\n if(v) {\n matrix = matrix || mx.identity();\n if(matrix) {\n matrix = multiplyRotateX(matrix, d2r(v));\n }\n else {\n matrix = calRotateX(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_Y] = 0;\n v = __currentStyle[ROTATE_Y];\n if(v) {\n v = __computedStyle[ROTATE_Y] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplyRotateY(matrix, d2r(v));\n }\n else {\n matrix = calRotateY(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_Z] = 0;\n v = __currentStyle[ROTATE_Z];\n if(v) {\n v = __computedStyle[ROTATE_Z] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplyRotateZ(matrix, d2r(v));\n }\n else {\n matrix = calRotateZ(mx.identity(), v);\n }\n }\n }\n __computedStyle[ROTATE_3D] = [0, 0, 0, 0];\n v = __currentStyle[ROTATE_3D];\n if(v) {\n v = __computedStyle[ROTATE_3D] = [v[0], v[1], v[2], v[3].v];\n if((v[0] || v[1] || v[2]) && v[3]) {\n if(matrix) {\n matrix = multiply(matrix, calRotate3d(mx.identity(), v));\n }\n else {\n matrix = calRotate3d(mx.identity(), v);\n }\n }\n }\n __computedStyle[SKEW_X] = 0;\n v = __currentStyle[SKEW_X];\n if(v) {\n v = __computedStyle[SKEW_X] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplySkewX(matrix, d2r(v));\n }\n else {\n matrix = mx.identity();\n matrix[4] = Math.tan(d2r(v));\n }\n }\n }\n __computedStyle[SKEW_Y] = 0;\n v = __currentStyle[SKEW_Y];\n if(v) {\n v = __computedStyle[SKEW_Y] = v.v;\n if(v) {\n if(matrix) {\n matrix = multiplySkewY(matrix, d2r(v));\n }\n else {\n matrix = mx.identity();\n matrix[1] = Math.tan(d2r(v));\n }\n }\n }\n __computedStyle[SCALE_X] = 1;\n v = __currentStyle[SCALE_X];\n if(v) {\n v = __computedStyle[SCALE_X] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleX(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[0] = v;\n }\n }\n }\n __computedStyle[SCALE_Y] = 1;\n v = __currentStyle[SCALE_Y];\n if(v) {\n v = __computedStyle[SCALE_Y] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleY(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[5] = v;\n }\n }\n }\n __computedStyle[SCALE_Z] = 1;\n v = __currentStyle[SCALE_Z];\n if(v) {\n v = __computedStyle[SCALE_Z] = v.v;\n if(v !== 1) {\n if(matrix) {\n matrix = multiplyScaleZ(matrix, v);\n }\n else {\n matrix = mx.identity();\n matrix[10] = v;\n }\n }\n }\n }\n __computedStyle[TRANSFORM] = matrix || mx.identity();\n }\n if(!matrixCache) {\n let m = __computedStyle[TRANSFORM];\n let tfo = __computedStyle[TRANSFORM_ORIGIN];\n matrixCache = __cacheStyle[MATRIX] = tf.calMatrixByOrigin(m, tfo[0] + __x1, tfo[1] + __y1);\n }\n }\n return this.__matrix = matrixCache;\n }\n\n /**\n * 将currentStyle计算为computedStyle,同时存入cacheStyle可缓存的结果防止无变更重复计算,返回背景渲染范围\n */\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let {\n __x1,\n __x2,\n __x3,\n __x4,\n __x5,\n __x6,\n __y1,\n __y2,\n __y3,\n __y4,\n __y5,\n __y6,\n } = this;\n this.__bbox = null;\n let bx1 = __x1, by1 = __y1, bx2 = __x6, by2 = __y6;\n let backgroundClip = __computedStyle[BACKGROUND_CLIP] = __currentStyle[BACKGROUND_CLIP];\n // 默认border-box\n if(backgroundClip === 'paddingBox') {\n bx1 = __x2;\n by1 = __y2;\n bx2 = __x5;\n by2 = __y5;\n }\n else if(backgroundClip === 'contentBox') {\n bx1 = __x3;\n by1 = __y3;\n bx2 = __x4;\n by2 = __y4;\n }\n let isInline = this.__isInline;\n if(isInline && !this.__contentBoxList.length) {\n isInline = false;\n }\n // 这些直接赋值的不需要再算缓存\n [\n OPACITY,\n Z_INDEX,\n BORDER_TOP_STYLE,\n BORDER_RIGHT_STYLE,\n BORDER_BOTTOM_STYLE,\n BORDER_LEFT_STYLE,\n BACKGROUND_REPEAT,\n OVERFLOW,\n MIX_BLEND_MODE,\n TEXT_OVERFLOW,\n BACKGROUND_CLIP,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n ].forEach(k => {\n __computedStyle[k] = __currentStyle[k];\n });\n if(isNil(__cacheStyle[FILTER])) {\n this.__calFilter(__currentStyle, __computedStyle, __cacheStyle);\n }\n // 特殊的判断,MATRIX不存在于样式key中,所有的transform共用一个\n if(isNil(__cacheStyle[MATRIX]) || (lv & TRANSFORM_ALL)) {\n this.__calMatrix(lv, __currentStyle, __computedStyle, __cacheStyle, false);\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_X])) {\n __cacheStyle[BACKGROUND_POSITION_X] = true;\n let {\n [BACKGROUND_POSITION_X]: bgX,\n } = __currentStyle;\n __computedStyle[BACKGROUND_POSITION_X] = (bgX || []).map(item => {\n if(item.u === PERCENT) {\n return item.v + '%';\n }\n return this.__calSize(item, bx2 - bx1, true);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_POSITION_Y])) {\n __cacheStyle[BACKGROUND_POSITION_Y] = true;\n let {\n [BACKGROUND_POSITION_Y]: bgY,\n } = __currentStyle;\n __computedStyle[BACKGROUND_POSITION_Y] = (bgY || []).map(item => {\n if(item.u === PERCENT) {\n return item.v + '%';\n }\n return this.__calSize(item, by2 - by1, true);\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_SIZE])) {\n __cacheStyle[BACKGROUND_SIZE] = true;\n __computedStyle[BACKGROUND_SIZE] = (__currentStyle[BACKGROUND_SIZE] || []).map(item => {\n if(Array.isArray(item)) {\n // 每项是x/y2个\n return item.map((item2, i) => {\n if(item2.u === AUTO) {\n return -1;\n }\n else if(item2.u === STRING) {\n return item2.v === 'contain' ? -2 : -3;\n }\n return this.__calSize(item2, i ? (by2 - by1) : (bx2 - bx1), true);\n });\n }\n });\n }\n if(isNil(__cacheStyle[BACKGROUND_IMAGE])) {\n let bgI = __currentStyle[BACKGROUND_IMAGE];\n __computedStyle[BACKGROUND_IMAGE] = bgI.map(item => {\n if(item) {\n return item.v;\n }\n return null;\n });\n __cacheStyle[BACKGROUND_IMAGE] = bgI.map((bgi, i) => {\n if(!bgi) {\n return null;\n }\n // 防止隐藏不加载背景图\n if(bgi.u === STRING) {\n let loadBgi = this.__loadBgi[i] = this.__loadBgi[i] || {};\n let cache = inject.IMG[bgi.v];\n if(cache && cache.state === inject.LOADED) {\n loadBgi.url = bgi.v;\n loadBgi.source = cache.source;\n loadBgi.width = cache.width;\n loadBgi.height = cache.height;\n }\n else if(loadBgi.url !== bgi.v) {\n // 可能改变导致多次加载,每次清空,成功后还要比对url是否相同\n loadBgi.url = bgi.v;\n loadBgi.source = null;\n let node = this;\n let root = this.__root;\n let ctx = this.ctx;\n inject.measureImg(bgi.v, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败不绘制bgi\n if(data.success && data.url === loadBgi.url && !this.isDestroyed) {\n loadBgi.source = data.source;\n loadBgi.width = data.width;\n loadBgi.height = data.height;\n __cacheStyle[BACKGROUND_IMAGE] = undefined;\n root.__addUpdate(node, null, REPAINT, null, null, null, null);\n }\n });\n }\n return true;\n }\n else if(!isInline && bgi.v && bgi.u === GRADIENT) {\n // gradient在渲染时才生成\n return true;\n }\n });\n }\n if(isNil(__cacheStyle[BOX_SHADOW])) {\n __cacheStyle[BOX_SHADOW] = true;\n __computedStyle[BOX_SHADOW] = (__currentStyle[BOX_SHADOW] || []).map(item => {\n return item.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n return this.__calSize(item2, i === 0 ? (bx2 - bx1) : (by2 - by1), true);\n });\n });\n }\n [\n BACKGROUND_COLOR,\n BORDER_TOP_COLOR,\n BORDER_RIGHT_COLOR,\n BORDER_BOTTOM_COLOR,\n BORDER_LEFT_COLOR,\n ].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n __cacheStyle[k] = int2rgba(__computedStyle[k] = __currentStyle[k].v);\n }\n });\n // 圆角边计算\n if(isNil(__cacheStyle[BORDER_TOP_LEFT_RADIUS])\n || isNil(__cacheStyle[BORDER_TOP_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS])\n || isNil(__cacheStyle[BORDER_BOTTOM_LEFT_RADIUS])) {\n __cacheStyle[BORDER_TOP_LEFT_RADIUS]\n = __cacheStyle[BORDER_TOP_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_RIGHT_RADIUS]\n = __cacheStyle[BORDER_BOTTOM_LEFT_RADIUS]\n = true;\n // 非替代的inline计算看contentBox首尾\n if(isInline) {\n border.calBorderRadiusInline(this.__contentBoxList, __currentStyle, __computedStyle, this.__root);\n }\n // 普通block整体计算\n else {\n border.calBorderRadius(this.__offsetWidth, this.__offsetHeight, __currentStyle, __computedStyle, this.__root);\n }\n }\n // width/style/radius影响border,color不影响渲染缓存\n let btlr = __computedStyle[BORDER_TOP_LEFT_RADIUS];\n let btrr = __computedStyle[BORDER_TOP_RIGHT_RADIUS];\n let bbrr = __computedStyle[BORDER_BOTTOM_RIGHT_RADIUS];\n let bblr = __computedStyle[BORDER_BOTTOM_LEFT_RADIUS];\n let borderTopWidth = __computedStyle[BORDER_TOP_WIDTH];\n let borderRightWidth = __computedStyle[BORDER_RIGHT_WIDTH];\n let borderBottomWidth = __computedStyle[BORDER_BOTTOM_WIDTH];\n let borderLeftWidth = __computedStyle[BORDER_LEFT_WIDTH];\n ['Top', 'Right', 'Bottom', 'Left'].forEach(k => {\n k = 'border' + k;\n let k2 = STYLE_KEY[style2Upper(k)];\n let kw = STYLE_KEY[style2Upper(k + 'Width')];\n let ks = STYLE_KEY[style2Upper(k + 'Style')];\n // width/style变更影响border重新计算\n if(isNil(__cacheStyle[kw])) {\n __cacheStyle[kw] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[ks])) {\n __cacheStyle[ks] = true;\n __cacheStyle[k2] = undefined;\n }\n if(isNil(__cacheStyle[k2])) {\n if(k2 === BORDER_TOP) {\n if(borderTopWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderTopWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 0, btlr, btrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_RIGHT) {\n if(borderRightWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderRightWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 1, btrr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_BOTTOM) {\n if(borderBottomWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n __cacheStyle[k2] = border.calPoints(borderBottomWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 2, bblr, bbrr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n else if(k2 === BORDER_LEFT) {\n if(borderLeftWidth > 0) {\n if(!isInline) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n __cacheStyle[k2] = border.calPoints(borderLeftWidth, __computedStyle[ks], deg1, deg2,\n __x1, __x2, __x5, __x6, __y1, __y2, __y5, __y6, 3, btlr, bblr);\n }\n }\n else {\n __cacheStyle[k2] = [];\n }\n }\n }\n });\n // 强制计算继承性的\n let parent = this.__domParent;\n let parentComputedStyle = parent && parent.__computedStyle;\n if(__currentStyle[FONT_STYLE].u === INHERIT) {\n __computedStyle[FONT_STYLE] = parent ? parentComputedStyle[FONT_STYLE] : 'normal';\n }\n else if(isNil(__cacheStyle[FONT_STYLE])) {\n __computedStyle[FONT_STYLE] = __currentStyle[FONT_STYLE].v;\n }\n __cacheStyle[FONT_STYLE] = __computedStyle[FONT_STYLE];\n let color = __currentStyle[COLOR];\n if(color.u === INHERIT) {\n let v = __computedStyle[COLOR] = parent ? parentComputedStyle[COLOR] : rgba2int(reset.INHERIT.color);\n if(v.k) {\n __cacheStyle[COLOR] = v;\n }\n else {\n __cacheStyle[COLOR] = int2rgba(__computedStyle[COLOR]);\n }\n }\n else if(isNil(__cacheStyle[COLOR])) {\n if(color.u === GRADIENT) {\n __cacheStyle[COLOR] = __computedStyle[COLOR] = color.v;\n }\n else {\n __cacheStyle[COLOR] = int2rgba(__computedStyle[COLOR] = rgba2int(color.v));\n }\n }\n let textStrokeColor = __currentStyle[TEXT_STROKE_COLOR];\n if(textStrokeColor.u === INHERIT) {\n let v = __computedStyle[TEXT_STROKE_COLOR] = parent ? parentComputedStyle[TEXT_STROKE_COLOR] : rgba2int(reset.INHERIT.textStrokeColor);\n if(v.k) {\n __cacheStyle[TEXT_STROKE_COLOR] = v;\n }\n else {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(__computedStyle[TEXT_STROKE_COLOR]);\n }\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_COLOR])) {\n if(textStrokeColor.u === GRADIENT) {\n __cacheStyle[TEXT_STROKE_COLOR] = __computedStyle[TEXT_STROKE_COLOR] = textStrokeColor.v;\n }\n else if(textStrokeColor.u === RGBA) {\n __cacheStyle[TEXT_STROKE_COLOR] = int2rgba(__computedStyle[TEXT_STROKE_COLOR] = rgba2int(textStrokeColor.v));\n }\n }\n if(__currentStyle[TEXT_STROKE_WIDTH].u === INHERIT) {\n __computedStyle[TEXT_STROKE_WIDTH] = parent ? parentComputedStyle[TEXT_STROKE_WIDTH] : reset.INHERIT.textStrokeWidth;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n else if(isNil(__cacheStyle[TEXT_STROKE_WIDTH])) {\n let v = __currentStyle[TEXT_STROKE_WIDTH];\n if(v.u === REM) {\n v = v.v * this.__root.__computedStyle[FONT_SIZE];\n }\n else if(v.u === VW) {\n v = v.v * this.__root.width * 0.01;\n }\n else if(v.u === VH) {\n v = v.v * this.__root.height * 0.01;\n }\n else if(v.u === VMAX) {\n v = v.v * Math.max(this.__root.width, this.__root.height) * 0.01;\n }\n else if(v.u === VMIN) {\n v = v.v * Math.min(this.__root.width, this.__root.height) * 0.01;\n }\n else {\n v = v.v;\n }\n __computedStyle[TEXT_STROKE_WIDTH] = v;\n __cacheStyle[TEXT_STROKE_WIDTH] = true;\n }\n if(__currentStyle[TEXT_STROKE_OVER].u === INHERIT) {\n __cacheStyle[TEXT_STROKE_OVER] = __computedStyle[TEXT_STROKE_OVER] = parent ? parentComputedStyle[TEXT_STROKE_OVER] : reset.INHERIT.textStrokeOver;\n }\n else {\n __cacheStyle[TEXT_STROKE_OVER] = __computedStyle[TEXT_STROKE_OVER] = __currentStyle[TEXT_STROKE_OVER].v;\n }\n if(__currentStyle[VISIBILITY].u === INHERIT) {\n __computedStyle[VISIBILITY] = parent ? parentComputedStyle[VISIBILITY] : 'visible';\n }\n else if(isNil(__cacheStyle[VISIBILITY])) {\n __computedStyle[VISIBILITY] = __currentStyle[VISIBILITY].v;\n }\n __cacheStyle[VISIBILITY] = __computedStyle[VISIBILITY];\n if(__currentStyle[POINTER_EVENTS].u === INHERIT) {\n __computedStyle[POINTER_EVENTS] = parent ? parentComputedStyle[POINTER_EVENTS] : 'auto';\n }\n else if(isNil(__cacheStyle[POINTER_EVENTS])) {\n __computedStyle[POINTER_EVENTS] = __currentStyle[POINTER_EVENTS].v;\n }\n __cacheStyle[POINTER_EVENTS] = __computedStyle[POINTER_EVENTS];\n // transformStyle需要特殊判断,在一些情况下强制flat,取消规范的opacity<1限制\n if(__computedStyle[TRANSFORM_STYLE] === 'preserve3d') {\n if(__computedStyle[OVERFLOW] === 'hidden'\n || __computedStyle[FILTER].length\n || this.__cacheAsBitmap) {\n __computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n }\n // 影响父级flat的\n if((__computedStyle[MIX_BLEND_MODE] !== 'normal' || this.__mask) && parentComputedStyle) {\n parentComputedStyle[TRANSFORM_STYLE] = 'flat';\n }\n this.__bx1 = bx1;\n this.__bx2 = bx2;\n this.__by1 = by1;\n this.__by2 = by2;\n return [bx1, by1, bx2, by2];\n }\n\n __calPerspective(__currentStyle, __computedStyle, __cacheStyle) {\n this.__perspectiveMatrix = null;\n let rebuild;\n let { __x1, __y1 } = this;\n if(isNil(__cacheStyle[PERSPECTIVE])) {\n __cacheStyle[PERSPECTIVE] = true;\n rebuild = true;\n let v = __currentStyle[PERSPECTIVE];\n __computedStyle[PERSPECTIVE] = this.__calSize(v, this.__clientWidth, true);\n }\n if(isNil(__cacheStyle[PERSPECTIVE_ORIGIN])) {\n __cacheStyle[PERSPECTIVE_ORIGIN] = true;\n rebuild = true;\n __computedStyle[PERSPECTIVE_ORIGIN] = __currentStyle[PERSPECTIVE_ORIGIN].map((item, i) => {\n return this.__calSize(item, i ? this.__offsetHeight : this.__offsetWidth, true);\n });\n }\n let ppt = __computedStyle[PERSPECTIVE];\n // perspective为0无效\n if(rebuild && ppt) {\n let po = __computedStyle[PERSPECTIVE_ORIGIN];\n this.__perspectiveMatrix = tf.calPerspectiveMatrix(ppt, po[0] + __x1, po[1] + __y1);\n }\n return this.__perspectiveMatrix;\n }\n\n __calFilter(__currentStyle, __computedStyle, __cacheStyle) {\n __cacheStyle[FILTER] = true;\n this.__filterBbox = null;\n return __computedStyle[FILTER] = (__currentStyle[FILTER] || []).map(item => {\n let { k, v } = item;\n if(k === 'dropShadow') {\n let v2 = v.map((item2, i) => {\n if(i > 3) {\n return item2;\n }\n return this.__calSize(item2, i === 0 ? (this.__bx2 - this.__bx1) : (this.__by2 - this.__by1), true);\n });\n return { k, v: v2 };\n }\n else {\n // 部分%单位的滤镜强制使用数字\n if(v.u === DEG || v.u === NUMBER || v.u === PERCENT) {\n v = v.v;\n }\n else {\n v = this.__calSize(v, this.root.width, true);\n }\n return { k, v };\n }\n });\n }\n\n __calOffscreen(ctx, __computedStyle) {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow, root = this.__root;\n let { width, height } = root;\n let origin = ctx;\n let {\n [MIX_BLEND_MODE]: mixBlendMode,\n [FILTER]: filter,\n [OVERFLOW]: overflow,\n [DISPLAY]: display,\n } = __computedStyle;\n if(mixBlendMode !== 'normal' && isValidMbm(mixBlendMode)) {\n mixBlendMode = mbmName(mixBlendMode);\n let c = inject.getOffscreenCanvas(width, height, null, 'blend');\n offscreenBlend = {\n ctx,\n target: c,\n mixBlendMode,\n };\n ctx = c.ctx;\n }\n if(this.__hasMask) {\n let c = inject.getOffscreenCanvas(width, height, null, 'mask1');\n offscreenMask = {\n ctx,\n target: c,\n };\n ctx = c.ctx;\n }\n if(filter && filter.length) {\n let c = inject.getOffscreenCanvas(width, height, null, 'filter');\n offscreenFilter = {\n ctx,\n filter,\n target: c,\n };\n ctx = c.ctx;\n }\n if(overflow === 'hidden' && display !== 'inline') {\n let c = inject.getOffscreenCanvas(width, height, null, 'overflow');\n let bx1 = this.__bx1;\n let bx2 = this.__bx2;\n let by1 = this.__by1;\n let by2 = this.__by2;\n let {\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [BACKGROUND_CLIP]: backgroundClip,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n } = __computedStyle;\n let btlr = borderTopLeftRadius.slice(0);\n let btrr = borderTopRightRadius.slice(0);\n let bbrr = borderBottomRightRadius.slice(0);\n let bblr = borderBottomLeftRadius.slice(0);\n if(backgroundClip === 'paddingBox') {\n btlr[0] -= borderLeftWidth;\n btlr[1] -= borderTopWidth;\n btrr[0] -= borderRightWidth;\n btrr[1] -= borderTopWidth;\n bbrr[0] -= borderRightWidth;\n bbrr[1] -= borderBottomWidth;\n bblr[0] -= borderLeftWidth;\n bblr[1] -= borderBottomWidth;\n }\n else if(backgroundClip === 'contentBox') {\n btlr[0] -= borderLeftWidth + paddingLeft;\n btlr[1] -= borderTopWidth + paddingTop;\n btrr[0] -= borderRightWidth + paddingRight;\n btrr[1] -= borderTopWidth + paddingTop;\n bbrr[0] -= borderRightWidth + paddingRight;\n bbrr[1] -= borderBottomWidth + paddingBottom;\n bblr[0] -= borderLeftWidth + paddingLeft;\n bblr[1] -= borderBottomWidth + paddingBottom;\n }\n let borderList = border.calRadius(bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr);\n offscreenOverflow = {\n ctx,\n target: c,\n matrix: this.__matrixEvent,\n x: this.__x1,\n y: this.__y1,\n offsetWidth: this.__offsetWidth,\n offsetHeight: this.__offsetHeight,\n borderList,\n };\n ctx = c.ctx;\n }\n // 无离屏不返回\n if(origin === ctx) {\n return;\n }\n return {\n ctx,\n offscreenBlend,\n offscreenMask,\n offscreenFilter,\n offscreenOverflow,\n };\n }\n\n // 自定义图形可能需要覆盖判断,所以是public方法\n calContent(__currentStyle, __computedStyle) {\n let visibility = __currentStyle[VISIBILITY];\n if(visibility !== 'hidden') {\n let bgI = __currentStyle[BACKGROUND_IMAGE];\n if(Array.isArray(bgI)) {\n for(let i = 0, len = bgI.length; i < len; i++) {\n if(bgI[i]) {\n return this.__hasContent = true;\n }\n }\n }\n if(__currentStyle[BACKGROUND_COLOR].v[3] > 0) {\n let width = __computedStyle[WIDTH], height = __computedStyle[HEIGHT],\n paddingTop = __computedStyle[PADDING_TOP], paddingRight = __computedStyle[PADDING_RIGHT],\n paddingBottom = __computedStyle[PADDING_BOTTOM], paddingLeft = __computedStyle[PADDING_LEFT];\n if(width && height || paddingTop || paddingRight || paddingBottom || paddingLeft) {\n return this.__hasContent = true;\n }\n }\n for(let list = ['Top', 'Right', 'Bottom', 'Left'], i = 0, len = list.length; i < len; i++) {\n let k = list[i];\n if(__computedStyle[STYLE_KEY[style2Upper('border' + k + 'Width')]] > 0\n && __currentStyle[STYLE_KEY[style2Upper('border' + k + 'Color')]].v[3] > 0) {\n return this.__hasContent = true;\n }\n }\n let bs = __currentStyle[BOX_SHADOW];\n if(Array.isArray(bs)) {\n for(let i = 0, len = bs.length; i < len; i++) {\n let item = bs[i];\n if(item && item[4][3] > 0) {\n return this.__hasContent = true;\n }\n }\n }\n }\n return this.__hasContent = false;\n }\n\n /**\n * 渲染基础方法,Dom/Geom公用\n * @param renderMode\n * @see node/mode\n * @param ctx canvas/svg/webgl共用\n * @param dx cache时偏移x\n * @param dy cache时偏移y\n * @return Object\n * x1/x2/x3/x4/x5/x6/y1/y2/y3/y4/y5/y6 坐标\n * break svg判断无变化提前跳出\n */\n render(renderMode, ctx, dx = 0, dy = 0) {\n let {\n __isDestroyed: isDestroyed,\n } = this;\n let cacheStyle = this.__cacheStyle;\n let computedStyle = this.__computedStyle;\n if(isDestroyed) {\n return { isDestroyed, break: true };\n }\n let virtualDom;\n // svg设置vd上的lv属性标明lineHeight的话,另外特殊字体如arial拥有lineGap也会产生间隙,背景色不绘制这个间隙\n * x轴根据contentBox的范围坐标,y则固定和font/lineHeight相关\n * 圆角发生在首尾lineBox处,中间不会有,bgi则产生类似bgc作为mask的效果\n * 另外要注意多个时的顺序,必须依次渲染,后面的bb可能会覆盖前面行的\n */\n if(isRealInline) {\n let contentBoxList = this.contentBoxList;\n let length = contentBoxList.length;\n if(contentBoxList[length - 1] instanceof Ellipsis) {\n length--;\n }\n let hasBgi = backgroundImage.some(item => item);\n if(length) {\n let {\n [FONT_SIZE]: fontSize,\n [FONT_FAMILY]: fontFamily,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n let iw = 0, ih = 0;\n let offscreen, svgBgSymbol = [];\n // bgi视作inline排满一行绘制,然后按分行拆开给每行\n if(hasBgi) {\n iw = inline.getInlineWidth(this, contentBoxList, isUpright);\n ih = lineHeight;\n // 垂直模式互换,计算时始终按照宽度为主轴计算的\n if(isUpright) {\n [iw, ih] = [ih, iw];\n }\n if(backgroundClip === 'paddingBox' || backgroundClip === 'padding-box') {\n if(isUpright) {\n iw += paddingTop + paddingBottom;\n ih += paddingLeft + paddingRight;\n }\n else {\n iw += paddingLeft + paddingRight;\n ih += paddingTop + paddingBottom;\n }\n }\n else if(backgroundClip !== 'contentBox' && backgroundClip !== 'content-box') {\n if(isUpright) {\n iw += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n ih += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n }\n else {\n iw += paddingLeft + paddingRight + borderLeftWidth + borderRightWidth;\n ih += paddingTop + paddingBottom + borderTopWidth + borderBottomWidth;\n }\n }\n if(renderMode === CANVAS || renderMode === WEBGL) {\n offscreen = inject.getOffscreenCanvas(iw, ih, '__$$INLINE_BGI$$__', null);\n }\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === bgi) {\n let uuid = bg.renderImage(this, renderMode, offscreen && offscreen.ctx || ctx, loadBgi,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, true, dx, dy);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, 0, 0, iw, ih, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, 0, 0, iw, lineHeight,\n btlr, btrr, bbrr, bblr, true);\n }\n else {\n let uuid = bg.renderBgc(this, renderMode, offscreen && offscreen.ctx || ctx, gd.v, null,\n 0, 0, iw, ih, btlr, btrr, bbrr, bblr, 'fill', true);\n if(renderMode === SVG && uuid) {\n svgBgSymbol.push(uuid);\n }\n }\n }\n }\n });\n }\n // 获取当前dom的baseline,再减去lineBox的baseline得出差值,这样渲染范围y就是lineBox的y+差值为起始,lineHeight为高\n // lineGap,一般为0,某些字体如arial有,渲染高度需减去它,最终是lineHeight - leading,上下均分\n let leading = fontSize * ((font.info[calFontFamily(fontFamily)] || {}).lgr || 0) * 0.5;\n let baseline = isUpright ? css.getVerticalBaseline(computedStyle) : css.getBaseline(computedStyle);\n // 注意只有1个的时候特殊情况,圆角只在首尾行出现\n let isFirst = true;\n let lastContentBox = contentBoxList[0], lastLineBox = lastContentBox.parentLineBox;\n // bgi需统计宽度累计值,将当前行所处理想单行的x范围位置计算出来,并进行bgi贴图绘制,svg还需统计第几行\n let count = 0;\n for(let i = 0; i < length; i++) {\n let contentBox = contentBoxList[i];\n if(contentBox.parentLineBox !== lastLineBox) {\n // 上一行\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, isUpright, contentBoxList,\n lastContentBox, contentBoxList[i - 1], lastLineBox, baseline, lineHeight, leading, isFirst, false,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], null,\n ix1, iy1, ix2 - ix1, iy2 - iy1, btlr, [0, 0], [0, 0], bblr, 'fill', false, dx, dy);\n }\n let w = ix2 - ix1, h = iy2 - iy1; // 世界参考系的宽高,根据writingMode不同取值使用\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n if(isUpright) {\n ctx.drawImage(offscreen.canvas, 0, count, iw, h, ix1 + dx, iy1 + dy, iw, h);\n }\n else {\n ctx.drawImage(offscreen.canvas, count, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n [\n 'd',\n isUpright\n ? `M${0},${count}L${ih},${count}L${ih},${h+count}L${0},${h+count},L${0},${count}`\n : `M${count},${0}L${w+count},${0}L${w+count},${ih}L${count},${ih},L${count},${0}`\n ],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', isUpright ? ix1 : (ix1 - count)],\n ['y', isUpright ? (iy1 - count) : iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n count += isUpright ? h : w; // 增加主轴方向的一行/列尺寸\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1, dx, dy);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n // right在最后这里不渲染\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], [0, 0]);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n isFirst = false;\n lastContentBox = contentBox;\n lastLineBox = contentBox.parentLineBox;\n }\n // 最后一个特殊判断\n if(i === length - 1) {\n let [ix1, iy1, ix2, iy2, bx1, by1, bx2, by2] = inline.getInlineBox(this, isUpright, contentBoxList,\n lastContentBox, contentBoxList[i], lastLineBox, baseline, lineHeight, leading, isFirst, true,\n backgroundClip, paddingTop, paddingRight, paddingBottom, paddingLeft,\n borderTopWidth, borderRightWidth, borderBottomWidth, borderLeftWidth);\n // 要算上开头空白inline,可能有多个和递归嵌套\n if(isFirst) {\n let n = getFirstEmptyInlineWidth(this);\n ix1 -= n;\n bx1 -= n;\n }\n // 要算上末尾空白inline,可能有多个和递归嵌套\n let n = getLastEmptyInlineWidth(this);\n ix2 += n;\n bx2 += n;\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], null,\n ix1, iy1, ix2 - ix1, iy2 - iy1, isFirst ? btlr : [0, 0], btrr, bbrr, isFirst ? bblr : [0, 0],\n 'fill', false, dx, dy);\n }\n let w = ix2 - ix1, h = iy2 - iy1;\n // canvas的bg位图裁剪\n if((renderMode === CANVAS || renderMode === WEBGL) && offscreen) {\n if(isUpright) {\n ctx.drawImage(offscreen.canvas, 0, count, iw, h, ix1 + dx, iy1 + dy, iw, h);\n }\n else {\n ctx.drawImage(offscreen.canvas, count, 0, w, ih, ix1 + dx, iy1 + dy, w, ih);\n }\n }\n //svg则特殊判断\n else if(renderMode === SVG && svgBgSymbol.length) {\n svgBgSymbol.forEach(symbol => {\n if(symbol) {\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n tagName: 'path',\n props: [\n [\n 'd',\n isUpright\n ? `M${0},${count}L${ih},${count}L${ih},${h+count}L${0},${h+count},L${0},${count}`\n : `M${count},${0}L${w+count},${0}L${w+count},${ih}L${count},${ih},L${count},${0}`\n ],\n ],\n }\n ],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.bb.push({\n type: 'item',\n tagName: 'use',\n props: [\n ['xlink:href', '#' + symbol],\n ['x', isUpright ? ix1 : (ix1 - count)],\n ['y', isUpright ? (iy1 - count) : iy1],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n }\n });\n }\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, bx1, by1, bx2, by2, bx2 - bx1, by2 - by1, dx, dy);\n });\n }\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n let deg1 = Math.atan(borderTopWidth / borderLeftWidth);\n let deg2 = Math.atan(borderTopWidth / borderRightWidth);\n let list = border.calPoints(borderTopWidth, computedStyle[BORDER_TOP_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 0, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n let deg1 = Math.atan(borderRightWidth / borderTopWidth);\n let deg2 = Math.atan(borderRightWidth / borderBottomWidth);\n let list = border.calPoints(borderRightWidth, computedStyle[BORDER_RIGHT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 1, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n let deg1 = Math.atan(borderBottomWidth / borderLeftWidth);\n let deg2 = Math.atan(borderBottomWidth / borderRightWidth);\n let list = border.calPoints(borderBottomWidth, computedStyle[BORDER_BOTTOM_STYLE], deg1, deg2,\n bx1, bx1, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 2, isFirst ? btlr : [0, 0], btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(isFirst && borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n let deg1 = Math.atan(borderLeftWidth / borderTopWidth);\n let deg2 = Math.atan(borderLeftWidth / borderBottomWidth);\n let list = border.calPoints(borderLeftWidth, computedStyle[BORDER_LEFT_STYLE], deg1, deg2,\n bx1, bx1 + borderLeftWidth, bx2 - borderRightWidth, bx2,\n by1, by1 + borderTopWidth, by2 - borderBottomWidth, by2, 3, btlr, btrr);\n border.renderBorder(this, renderMode, ctx, list, cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n }\n }\n if(offscreen) {\n offscreen.ctx.clearRect(0, 0, iw, ih);\n }\n return res;\n }\n // 无内容且无尺寸的无需渲染\n else if(bx1 === bx2 || by1 === by2) {\n return res;\n }\n }\n // block渲染,bgc垫底\n if(backgroundColor[3] > 0) {\n bg.renderBgc(this, renderMode, ctx, cacheStyle[BACKGROUND_COLOR], borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n // 渐变或图片叠加\n if(backgroundImage) {\n let length = backgroundImage.length;\n backgroundImage.slice(0).reverse().forEach((bgi, i) => {\n if(!bgi) {\n return;\n }\n i = length - 1 - i;\n if(util.isString(bgi)) {\n let loadBgi = this.__loadBgi[i];\n if(loadBgi.url === bgi) {\n bg.renderImage(this, renderMode, ctx, loadBgi,\n bx1, by1, bx2, by2, btlr, btrr, bbrr, bblr,\n computedStyle, i, backgroundSize, backgroundRepeat, false, dx, dy);\n }\n }\n else if(bgi.k) {\n let gd = this.__gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx, dy);\n if(gd) {\n if(gd.k === 'conic') {\n gradient.renderConic(this, renderMode, ctx, gd.v, bx1, by1, bx2 - bx1, by2 - by1,\n btlr, btrr, bbrr, bblr);\n }\n else {\n bg.renderBgc(this, renderMode, ctx, gd.v, borderList,\n bx1, by1, bx2 - bx1, by2 - by1, btlr, btrr, bbrr, bblr, 'fill', false, dx, dy);\n }\n }\n }\n });\n }\n // boxShadow可能会有多个\n if(boxShadow) {\n boxShadow.forEach(item => {\n bs.renderBoxShadow(this, renderMode, ctx, item, x1, y1, x6, y6, x6 - x1, y6 - y1, dx, dy);\n });\n }\n // 边框需考虑尖角,两条相交边平分45°夹角\n if(borderTopWidth > 0 && borderTopColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_TOP], cacheStyle[BORDER_TOP_COLOR], dx, dy);\n }\n if(borderRightWidth > 0 && borderRightColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_RIGHT], cacheStyle[BORDER_RIGHT_COLOR], dx, dy);\n }\n if(borderBottomWidth > 0 && borderBottomColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_BOTTOM], cacheStyle[BORDER_BOTTOM_COLOR], dx, dy);\n }\n if(borderLeftWidth > 0 && borderLeftColor[3] > 0) {\n border.renderBorder(this, renderMode, ctx, cacheStyle[BORDER_LEFT], cacheStyle[BORDER_LEFT_COLOR], dx, dy);\n }\n return res;\n }\n\n // 强制刷新API\n refresh(lv, cb) {\n let root = this.__root;\n if(isFunction(lv) || !lv) {\n lv = CACHE;\n }\n if(lv) {\n this.clearCache(lv < REPAINT);\n }\n if(root && !this.__isDestroyed) {\n root.__addUpdate(this, null, lv, null, null, null, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n __destroy() {\n if(this.__isDestroyed) {\n return;\n }\n let ref = this.props.ref;\n if(!isNil(ref) && !isFunction(ref)) {\n delete this.__root.__ref[ref];\n }\n super.__destroy();\n this.clearAnimate();\n this.clearFrameAnimate();\n this.clearCache();\n let fontRegister = this.__fontRegister;\n for(let i in fontRegister) {\n if(fontRegister.hasOwnProperty(i)) {\n font.offRegister(i, this);\n }\n }\n this.__host = this.__hostRoot = this.__root\n = this.__prev = this.__next\n = this.__parent = this.__domParent = null;\n this.__reset0();\n }\n\n // 先查找到注册了事件的节点,再捕获冒泡判断增加性能\n __emitEvent(e, force) {\n let { __isDestroyed, __computedStyle: computedStyle, __mask } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __mask) {\n return;\n }\n let { event: { type } } = e;\n let { __listener, __hasMask } = this;\n let cb;\n if(__listener.hasOwnProperty(type)) {\n cb = __listener[type];\n }\n // touchmove之类强制的直接由Root通知即可\n if(force) {\n if(computedStyle[POINTER_EVENTS] !== 'none' && !e.__stopImmediatePropagation\n && (isFunction(cb) || Array.isArray(cb))) {\n if(Array.isArray(cb)) {\n cb.forEach(item => {\n if(isFunction(item)) {\n item.call(this, e);\n }\n });\n }\n else {\n cb.call(this, e);\n }\n }\n return true;\n }\n // 非force的判断事件坐标是否在节点内\n if(this.willResponseEvent(e)) {\n // 如果有mask,点在mask上才行,点在clip外才行\n if(__hasMask) {\n let next = this.next;\n let isClip = next.__clip;\n let hasEmitMask;\n while(next && next.__mask) {\n if(next.willResponseEvent(e, true)) {\n hasEmitMask = true;\n break;\n }\n next = next.next;\n }\n if(!isClip && !hasEmitMask) {\n return;\n }\n }\n if(Array.isArray(cb) && !e.__stopImmediatePropagation) {\n cb.forEach(item => {\n if(isFunction(item)) {\n item.call(this, e);\n }\n });\n }\n else if(isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n\n willResponseEvent(e, ignore) {\n let { x, y } = e;\n let { __x1, __y1, __offsetWidth, __offsetHeight, __matrixEvent, __computedStyle } = this;\n if(__computedStyle[POINTER_EVENTS] === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __x1, __y1,\n __x1 + __offsetWidth, __y1,\n __x1 + __offsetWidth, __y1 + __offsetHeight,\n __x1, __y1 + __offsetHeight,\n __matrixEvent\n );\n if(inThis) {\n if(!e.target && !ignore) {\n e.target = this;\n // 缓存target给move用\n if(e.event.type === 'touchstart') {\n this.root && (this.root.__touchstartTarget = this);\n }\n }\n return true;\n }\n }\n\n __gradient(renderMode, ctx, bx1, by1, bx2, by2, bgi, dx = 0, dy = 0) {\n let iw = bx2 - bx1;\n let ih = by2 - by1;\n // 无尺寸无需创建渐变\n if(!iw || !ih) {\n return;\n }\n let { k, v, d, s, z, p } = bgi;\n let cx = bx1 + iw * 0.5;\n let cy = by1 + ih * 0.5;\n let res = { k };\n if(k === 'linear') {\n let gd = gradient.getLinear(v, d, bx1, by1, cx, cy, iw, ih, this.root, dx, dy);\n res.v = this.__getLg(renderMode, ctx, gd);\n }\n else if(k === 'radial') {\n let gd = gradient.getRadial(v, s, z, p, bx1, by1, bx2, by2, this.root, dx, dy);\n if(gd) {\n res.v = this.__getRg(renderMode, ctx, gd)\n if(gd.matrix) {\n res.v = [res.v, gd.matrix, gd.cx, gd.cy];\n }\n }\n }\n else if(k === 'conic') {\n let bbox = this.bbox;\n let m1 = Math.max(Math.abs(bbox[2] - bbox[0]), Math.abs(bbox[3] - bbox[1]));\n let m2 = Math.max(Math.abs(iw), Math.abs(ih));\n let gd = gradient.getConic(v, d, p, bx1, by1, bx2, by2, m1 / m2, this.root, dx, dy);\n res.v = this.__getCg(renderMode, ctx, gd);\n }\n return res;\n }\n\n __getLg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let lg = ctx.createLinearGradient(gd.x1, gd.y1, gd.x2, gd.y2);\n gd.stop.forEach(item => {\n lg.addColorStop(item[1], int2rgba(item[0]));\n });\n return lg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'linearGradient',\n props: [\n ['x1', gd.x1],\n ['y1', gd.y1],\n ['x2', gd.x2],\n ['y2', gd.y2],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n let uuid = ctx.add(v);\n this.__cacheDefs.push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getRg(renderMode, ctx, gd) {\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let rg = ctx.createRadialGradient(gd.cx, gd.cy, 0, gd.tx, gd.ty, gd.r);\n gd.stop.forEach(item => {\n rg.addColorStop(item[1], int2rgba(item[0]));\n });\n return rg;\n }\n else if(renderMode === SVG) {\n let v = {\n tagName: 'radialGradient',\n props: [\n ['cx', gd.tx],\n ['cy', gd.ty],\n ['r', gd.r],\n ],\n children: gd.stop.map(item => {\n return {\n tagName: 'stop',\n props: [\n ['stop-color', int2rgba(item[0])],\n ['offset', item[1] * 100 + '%'],\n ],\n };\n }),\n };\n if(gd.tx !== gd.cx) {\n v.props.push(['fx', gd.cx]);\n }\n if(gd.ty !== gd.cy) {\n v.props.push(['fy', gd.cy]);\n }\n let uuid = ctx.add(v);\n this.__cacheDefs.push(v);\n return 'url(#' + uuid + ')';\n }\n }\n\n __getCg(renderMode, ctx, gd) {\n let { stop } = gd;\n let len = stop.length - 1;\n if(stop[len][1] < 1) {\n stop.push([stop[len][0].slice(0), 1]);\n }\n if(stop[0][1] > 0) {\n stop.unshift([stop[0][0].slice(0), 0]);\n }\n // canvas采用点色值计算法,svg则分360度画块\n let res = [];\n if(renderMode === CANVAS || renderMode === WEBGL) {\n return gd;\n }\n return res;\n }\n\n // canvas清空自身cache,cacheTotal在Root的自底向上逻辑做,svg仅有cacheTotal\n clearCache(onlyTotal) {\n let __cacheTotal = this.__cacheTotal;\n let __cacheFilter = this.__cacheFilter;\n let __cacheMask = this.__cacheMask;\n let __cache = this.__cache;\n if(__cache && !onlyTotal) {\n __cache.release();\n this.__refreshLevel |= REPAINT;\n }\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n this.__refreshLevel |= CACHE;\n this.clearTopCache();\n }\n\n clearTopCache() {\n let p = this.__domParent;\n while(p) {\n let __cacheTotal = p.__cacheTotal;\n let __cacheFilter = p.__cacheFilter;\n let __cacheMask = p.__cacheMask;\n p.__refreshLevel |= CACHE;\n if(__cacheTotal) {\n __cacheTotal.release();\n }\n if(__cacheFilter) {\n __cacheFilter.release();\n }\n if(__cacheMask) {\n __cacheMask.release();\n }\n p = p.__domParent;\n }\n }\n\n updateStyle(style, cb) {\n let formatStyle = normalize(style);\n this.updateFormatStyle(formatStyle, cb);\n }\n\n // 传入格式化好key/value的样式\n updateFormatStyle(style, cb) {\n let root = this.__root, currentStyle = this.__currentStyle, currentProps = this.__currentProps;\n let keys = [];\n Object.keys(style).forEach(i => {\n let isGeom = GEOM.hasOwnProperty(i);\n if(!isGeom) {\n i = parseInt(i);\n }\n if(!equalStyle(i, isGeom ? currentProps[i] : currentStyle[i], style[i], this)) {\n if(isGeom) {\n currentProps[i] = style[i];\n }\n else {\n currentStyle[i] = style[i];\n }\n keys.push(i);\n }\n });\n if(!keys.length || this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(root) {\n root.__addUpdate(this, keys, null, null, null, null, cb);\n }\n }\n\n animate(list, options = {}) {\n let animation = new Animation(this, list, options);\n if(this.__isDestroyed) {\n animation.__destroy();\n return animation;\n }\n this.__animationList.push(animation);\n if(options.autoPlay === false) {\n return animation;\n }\n return animation.play();\n }\n\n removeAnimate(o) {\n if(o instanceof Animation) {\n let i = this.__animationList.indexOf(o);\n if(i > -1) {\n o.cancel();\n o.__destroy();\n this.__animationList.splice(i, 1);\n }\n }\n }\n\n clearAnimate() {\n this.__animationList.splice(0).forEach(o => {\n o.cancel();\n o.__destroy();\n });\n }\n\n frameAnimate(cb) {\n if(isFunction(cb)) {\n let list = this.__frameAnimateList;\n // 防止重复\n for(let i = 0, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n return cb;\n }\n }\n let enter = {\n __after(diff) {\n cb(diff);\n },\n __karasFramecb: cb,\n };\n list.push(enter);\n frame.onFrame(enter);\n return cb;\n }\n }\n\n removeFrameAnimate(cb) {\n for(let i = 0, list = this.__frameAnimateList, len = list.length; i < len; i++) {\n if(list[i].__karasFramecb === cb) {\n list.splice(i, 1);\n frame.offFrame(cb);\n return;\n }\n }\n }\n\n clearFrameAnimate() {\n this.__frameAnimateList.splice(0).forEach(o => {\n frame.offFrame(o);\n });\n }\n\n // isLayout为false时,为relative,true则是absolute/justify/marginAuto等直接改layoutData数据的\n // lv是reflow偏移时传入,需要清除cacheStyle,并且对位图cache进行偏移设置\n // 注意所有的offset/resize都要避免display:none的,比如合并margin导致block的孩子inline因clamp为none时没有layoutData\n __offsetX(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetX(diff);\n if(isLayout) {\n this.__layoutData.x += diff;\n }\n this.__x1 += diff;\n this.__x2 += diff;\n this.__x3 += diff;\n this.__x4 += diff;\n this.__x5 += diff;\n this.__x6 += diff;\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n if(this.__bbox) {\n this.__bbox[0] += diff;\n this.__bbox[2] += diff;\n }\n if(this.__filterBbox) {\n this.__filterBbox[0] += diff;\n this.__filterBbox[2] += diff;\n }\n }\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff);\n if(isLayout) {\n this.__layoutData && (this.__layoutData.y += diff);\n }\n this.__y1 += diff;\n this.__y2 += diff;\n this.__y3 += diff;\n this.__y4 += diff;\n this.__y5 += diff;\n this.__y6 += diff;\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n if(this.__bbox) {\n this.__bbox[1] += diff;\n this.__bbox[3] += diff;\n }\n if(this.__filterBbox) {\n this.__filterBbox[1] += diff;\n this.__filterBbox[3] += diff;\n }\n if(this.__cache) {\n this.__cache.__offsetY(diff);\n }\n if(this.__cacheTotal) {\n this.__cacheTotal.__offsetY(diff);\n }\n if(this.__cacheFilter) {\n this.__cacheFilter.__offsetY(diff);\n }\n if(this.__cacheMask) {\n this.__cacheMask.__offsetY(diff);\n }\n }\n }\n\n __resizeX(diff, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n this.__computedStyle.width = this.__width += diff;\n this.__clientWidth += diff;\n this.__offsetWidth += diff;\n this.__outerWidth += diff;\n this.__layoutData && (this.__layoutData.w += diff);\n this.__x4 += diff;\n this.__x5 += diff;\n this.__x6 += diff;\n if(diff < 0) {\n this.__limitCache = false;\n }\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n }\n this.clearCache();\n }\n\n __resizeY(diff, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n this.__computedStyle.height = this.__height += diff;\n this.__clientHeight += diff;\n this.__offsetHeight += diff;\n this.__outerHeight += diff;\n this.__layoutData.h += diff;\n this.__y4 += diff;\n this.__y5 += diff;\n this.__y6 += diff;\n if(diff < 0) {\n this.__limitCache = false;\n }\n if(lv) {\n this.__refreshLevel |= lv;\n if(lv >= REFLOW) {\n this.__cacheStyle = [];\n this.__calStyle(lv, this.__currentStyle, this.__computedStyle, this.__cacheStyle);\n }\n }\n this.clearCache();\n }\n\n getComputedStyle(key) {\n let computedStyle = this.__computedStyle;\n let res = {};\n let keys = [];\n if(key) {\n let temp;\n if(Array.isArray(key)) {\n temp = key;\n }\n else {\n temp = [key];\n }\n temp.forEach(k => {\n if(abbr.hasOwnProperty(k)) {\n abbr[k].forEach(k => {\n keys.push(STYLE_KEY[style2Upper(k)]);\n });\n }\n else {\n keys.push(STYLE_KEY[style2Upper(k)]);\n }\n });\n }\n else {\n keys = Object.keys(computedStyle);\n }\n keys.forEach(k => {\n if(GEOM.hasOwnProperty(k)) {\n res[k] = computedStyle[k];\n }\n else {\n res[STYLE_RV_KEY[k]] = computedStyle[k];\n }\n });\n return res;\n }\n\n getBoundingClientRect(includeBbox) {\n let box;\n if(includeBbox) {\n box = this.bbox;\n }\n else {\n let { __x1, __y1, __offsetWidth, __offsetHeight } = this;\n box = [__x1, __y1, __x1 + __offsetWidth, __y1 + __offsetHeight];\n }\n let matrixEvent = this.__matrixEvent;\n let p1 = point2d(mx.calPoint({ x: box[0], y: box[1] }, matrixEvent));\n let p2 = point2d(mx.calPoint({ x: box[2], y: box[1] }, matrixEvent));\n let p3 = point2d(mx.calPoint({ x: box[2], y: box[3] }, matrixEvent));\n let p4 = point2d(mx.calPoint({ x: box[0], y: box[3] }, matrixEvent));\n return {\n left: Math.min(p1.x, Math.min(p2.x, Math.min(p3.x, p4.x))),\n top: Math.min(p1.y, Math.min(p2.y, Math.min(p3.y, p4.y))),\n right: Math.max(p1.x, Math.max(p2.x, Math.max(p3.x, p4.x))),\n bottom: Math.max(p1.y, Math.max(p2.y, Math.max(p3.y, p4.y))),\n points: [p1, p2, p3, p4],\n };\n }\n\n // img和geom返回false,在inline布局时判断是否是真的inline\n __isRealInline() {\n return true;\n }\n\n remove(cb) {\n let { __root: root } = this;\n let parent = this.isShadowRoot ? this.hostRoot.__parent: this.__parent;\n let i;\n if(parent) {\n // 移除component的shadowRoot视为移除component\n let target = this.isShadowRoot ? this.hostRoot : this;\n i = parent.__children.indexOf(target);\n parent.__children.splice(i, 1);\n i = parent.__zIndexChildren.indexOf(target);\n parent.__zIndexChildren.splice(i, 1);\n let { __prev, __next } = target;\n if(__prev) {\n __prev.__next = __next;\n }\n if(__next) {\n __next.__prev = __prev;\n }\n }\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n parent.__deleteStruct(this, i);\n // 不可见仅改变数据结构\n if(this.__computedStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n this.__destroy();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow逻辑做结构关系等\n root.__addUpdate(this, null, REFLOW, null, true, null, cb);\n }\n\n addEventListener(type, cb) {\n if(type && isFunction(cb)) {\n type = type.toLowerCase();\n let arr = this.__listener[type] = this.__listener[type] || [];\n for(let i = 0, len = arr.length; i < len; i++) {\n if(arr[i] === cb) {\n return;\n }\n }\n arr.push(cb);\n }\n }\n\n removeEventListener(type, cb) {\n if(!type) {\n return;\n }\n type = type.toLowerCase();\n let arr = this.__listener[type];\n if(Array.isArray(arr) && cb) {\n for(let i = 0, len = arr.length; i < len; i++) {\n if(arr[i] === cb) {\n arr.splice(i, 1);\n break;\n }\n }\n }\n else if(isFunction(arr) && arr === cb) {\n delete this.__listener[type];\n }\n }\n\n get tagName() {\n return this.__tagName;\n }\n\n get clientWidth() {\n return this.__clientWidth || 0;\n }\n\n get clientHeight() {\n return this.__clientHeight || 0;\n }\n\n get offsetWidth() {\n return this.__offsetWidth || 0;\n }\n\n get offsetHeight() {\n return this.__offsetHeight || 0;\n }\n\n get outerWidth() {\n return this.__outerWidth || 0;\n }\n\n get outerHeight() {\n return this.__outerHeight || 0;\n }\n\n // 相对自身原点,不考虑margin的范围,>=REPAINT渲染或个别有影响的渲染改变(如blur)清空缓存\n get bbox() {\n if(!this.__bbox) {\n let {\n __x1, __y1, __offsetWidth, __offsetHeight,\n __computedStyle: {\n [BOX_SHADOW]: boxShadow,\n },\n } = this;\n this.__bbox = spreadBoxShadow([__x1, __y1, __x1 + __offsetWidth, __y1 + __offsetHeight], boxShadow);\n }\n return this.__bbox;\n }\n\n get filterBbox() {\n if(!this.__filterBbox) {\n let bbox = this.__bbox || this.bbox;\n let filter = this.__computedStyle[FILTER];\n this.__filterBbox = spreadFilter(bbox, filter);\n }\n return this.__filterBbox;\n }\n\n get listener() {\n return this.__listener;\n }\n\n get opacity() {\n return this.__opacity;\n }\n\n get matrix() {\n return this.__matrix;\n }\n\n get matrixEvent() {\n let __domParent = this.__domParent, matrix = this.__matrix;\n while(__domParent) {\n matrix = mx.multiply(__domParent.__perspectiveMatrix, matrix);\n matrix = mx.multiply(__domParent.__matrix, matrix);\n __domParent = __domParent.__domParent;\n }\n return matrix;\n }\n\n get perspectiveMatrix() {\n return this.__perspectiveMatrix;\n }\n\n get style() {\n return this.__style;\n }\n\n get computedStyle() {\n return this.__computedStyle;\n }\n\n get animationList() {\n return this.__animationList;\n }\n\n get currentStyle() {\n return this.__currentStyle;\n }\n\n get cacheStyle() {\n return this.__cacheStyle;\n }\n\n get isShadowRoot() {\n return !this.parent && this.host && this.host !== this.root;\n }\n\n get contentBoxList() {\n return this.__contentBoxList;\n }\n\n get baseline() {\n return this.__offsetHeight;\n }\n\n get firstBaseline() {\n return this.__offsetHeight;\n }\n\n get verticalBaseline() {\n return this.__offsetWidth;\n }\n\n get mask() {\n return this.__mask;\n }\n\n set mask(v) {\n v = !!v;\n if(this.__mask !== v) {\n this.__mask = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n let p = this.__domParent;\n if(p) {\n if(v) {\n p.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n p.__computedStyle[TRANSFORM_STYLE] = p.__currentStyle[TRANSFORM_STYLE];\n }\n }\n root.__addUpdate(this, null, MASK, null, null, null, null);\n }\n }\n }\n\n get clip() {\n return this.__clip;\n }\n\n set clip(v) {\n v = !!v;\n if(this.__clip !== v) {\n this.__clip = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n let p = this.__domParent;\n if(p) {\n if(v) {\n p.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n p.__computedStyle[TRANSFORM_STYLE] = p.__currentStyle[TRANSFORM_STYLE];\n }\n }\n root.__addUpdate(this, null, MASK, null, null, null, null);\n }\n }\n }\n\n get cacheAsBitmap() {\n return this.__cacheAsBitmap;\n }\n\n set cacheAsBitmap(v) {\n v = !!v;\n if(this.__cacheAsBitmap !== v) {\n this.__cacheAsBitmap = v;\n let root = this.__root;\n if(root && !this.__isDestroyed) {\n if(v) {\n this.__computedStyle[TRANSFORM_STYLE] = 'flat';\n }\n else {\n this.__computedStyle[TRANSFORM_STYLE] = this.__currentStyle[TRANSFORM_STYLE];\n }\n root.__addUpdate(this, null, REPAINT, null, null, null, null);\n }\n }\n }\n\n get parentLineBox() {\n return this.__parentLineBox;\n }\n\n get env() {\n let root = this.__root;\n if(root) {\n return root.__env || {\n x: this.__x1,\n y: this.__y1,\n width: root.__width,\n height: root.__height,\n node: root,\n };\n }\n }\n}\n\nexport default Xom;\n","import TextBox from './TextBox';\nimport enums from '../util/enums';\nimport css from '../style/css';\n\nconst { STYLE_KEY: {\n DISPLAY,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n MARGIN_RIGHT,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_RIGHT_WIDTH,\n PADDING_TOP,\n PADDING_BOTTOM,\n PADDING_LEFT,\n PADDING_RIGHT,\n LINE_HEIGHT,\n} } = enums;\n\n/**\n * css中常见的概念,一行内容,里面可能有若干不同的内容,仅在布局阶段出现,不参与渲染逻辑\n * 本类是个抽象逻辑概念,会包含Text的内容TextBox和inlineBlock等节点,而内容TextBox则属于Text\n * 一个Text可能因为换行产生多个TextBox,从而形成不同行的内容就属于不同的LineBox\n * 本类属于block(包含flex和inlineBlock,下同)节点下,一个dom会有个专门列表,\n * 包含若干个LineBox保存着若干行文本内容TextBox,不直接关联Text,\n * inline则不会有此对象和列表,其复用最近block父层的,这样解决嵌套问题,\n * block在布局时将列表向孩子传递下去,每遇到block会重新生成\n * 每当发生换行时,专门列表中会新生成一个LineBox,让后续内容继续跟随新的LB\n * LB内部要进行垂直对齐,Text内容较简单x字符底部为baseline,inlineBlock等节点按最后一行baseline\n */\nclass LineBox {\n constructor(x, y, lineHeight, baseline, isUpright) {\n this.__list = [];\n this.__x = x;\n this.__y = y;\n this.__oy = 0; // 很难受,relative的offset不能直接加在x上,会引发重复以及block父尺寸问题\n this.__lineHeight = lineHeight; // 可能出现空的inline,因此一个inline进入布局时先设置当前lineBox的最小lineHeight/baseline\n this.__baseline = baseline;\n this.__isUpright = isUpright;\n this.__bOffset = 0;\n }\n\n add(item) {\n this.list.push(item);\n item.__parentLineBox = this;\n }\n\n verticalAlign(isUpright) {\n let baseline = isUpright ? this.verticalBaseline : this.baseline;\n let lineHeight = isUpright ? this.verticalLineHeight : this.lineHeight;\n let increase = lineHeight;\n // 只有1个也需要对齐,因为可能内嵌了空inline使得baseline发生变化\n if(this.list.length) {\n this.list.forEach(item => {\n if(item.isEllipsis) {\n return;\n }\n // 垂直排版计算不太一样,因为原点坐标系不一样\n if(isUpright) {\n let n = item.verticalBaseline;\n if(n !== baseline) {\n let d = baseline - n;\n item.__offsetX(d, true);\n // 同下方\n increase = Math.max(increase, item.offsetWidth + d);\n }\n }\n else {\n let n = item.baseline;\n if(n !== baseline) {\n let d = baseline - n;\n item.__offsetY(d, true);\n // text的话对齐下移可能影响整体高度,在同行有img/ib这样的替换元素下,需记录最大偏移导致的高度调整值\n // 比如一个字符和img,字符下调y即字符的baseline和图片底部对齐,导致高度增加lineHeight和baseline的差值\n increase = Math.max(increase, item.offsetHeight + d);\n }\n }\n });\n // 特殊情况,有img这样的替换元素时,要参与这一行和baseline的对齐扩充,常见于css的img底部额外4px问题\n // 先计算总体baseline和本身baseline差值得出偏移,然后加到本身lineHeight上得出尺寸,再和其它扩充取最大值\n let diff = baseline - this.__baseline;\n increase = Math.max(increase, this.__lineHeight + diff);\n }\n return Math.max(0, increase - lineHeight);\n }\n\n __offsetX(diff, isAlign) {\n this.__x += diff;\n // vertical-align或水平情况特殊对齐,可能替换元素img和text导致偏移\n if(isAlign) {\n this.list.forEach(item => {\n item.__offsetX(diff, true);\n });\n }\n }\n\n __offsetY(diff, isAlign) {\n this.__y += diff;\n // vertical-align情况或水平特殊对齐,可能替换元素img和textBox导致偏移\n if(isAlign) {\n this.list.forEach(item => {\n item.__offsetY(diff, true);\n });\n }\n }\n\n /**\n * 防止非行首空inline,每当遇到inline就设置当前lineBox的lineHeight/baseline,这样有最小值兜底\n * @param l\n * @param b\n * @private\n */\n __setLB(l, b) {\n this.__lineHeight = Math.max(l, this.__lineHeight);\n this.__baseline = Math.max(b, this.__baseline);\n }\n\n __resetLb(l, b) {\n this.list.forEach(item => {\n let dom = item;\n if(item instanceof TextBox) {\n dom = item.parent.parent;\n }\n let computedStyle = dom.computedStyle;\n while(computedStyle[DISPLAY] === 'inline') {\n l = Math.max(l, computedStyle[LINE_HEIGHT]);\n b = Math.max(b, css.getBaseline(computedStyle));\n dom = dom.domParent;\n computedStyle = dom.computedStyle;\n }\n });\n this.__lineHeight = l;\n this.__baseline = b;\n }\n\n get list() {\n return this.__list;\n }\n\n get size() {\n return this.__list.length;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get ox() {\n return this.__ox;\n }\n\n get oy() {\n return this.__oy;\n }\n\n get endX() {\n return this.x + this.width;\n }\n\n get endY() {\n return this.y + this.height;\n }\n\n get width() {\n if(this.isUpright) {\n return this.verticalLineHeight;\n }\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let x1 = first.x;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n x1 -= marginLeft + borderLeftWidth + paddingLeft;\n }\n dom = dom.domParent;\n }\n let x2 = last.x + last.outerWidth;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_RIGHT]: paddingRight,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n x2 += marginRight + borderRightWidth + paddingRight;\n }\n dom = dom.domParent;\n }\n return x2 - x1;\n }\n return 0;\n }\n\n get height() {\n if(!this.isUpright) {\n return this.lineHeight;\n }\n let list = this.list;\n let length = list.length;\n if(length) {\n let first = list[0];\n let last = list[length - 1];\n let y1 = first.y;\n let dom = first instanceof TextBox ? first.parent.domParent : first.domParent;\n // 因为inline可以嵌套inline,所以一直向上查找到非inline为止,每层inline如果是首个则减去左侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[0]) {\n y1 -= marginTop + borderTopWidth + paddingTop;\n }\n dom = dom.domParent;\n }\n let y2 = last.y + last.outerHeight;\n dom = last instanceof TextBox ? last.parent.domParent : last.domParent;\n // 同向上查非inline,每层inline如果是最后一个则加上右侧mbp\n while(true) {\n let list = dom.contentBoxList;\n let {\n [DISPLAY]: display,\n [MARGIN_BOTTOM]: marginBottom,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [PADDING_BOTTOM]: paddingBottom,\n } = dom.computedStyle;\n if(display !== 'inline') {\n break;\n }\n if(first === list[list.length - 1]) {\n y2 += marginBottom + borderBottomWidth + paddingBottom;\n }\n dom = dom.domParent;\n }\n return y2 - y1;\n }\n return 0;\n }\n\n get bOffset() {\n return this.__bOffset;\n }\n\n get baseline() {\n let baseline = this.__baseline;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n baseline = Math.max(baseline, item.baseline);\n });\n return baseline;\n }\n\n get verticalBaseline() {\n let baseline = this.__baseline;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n baseline = Math.max(baseline, item.verticalBaseline);\n });\n return baseline;\n }\n\n get lineHeight() {\n let lineHeight = this.__lineHeight;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerHeight);\n });\n return lineHeight;\n }\n\n get verticalLineHeight() {\n let lineHeight = this.__lineHeight;\n // 只有TextBox和InlineBlock或replaced\n this.list.forEach(item => {\n lineHeight = Math.max(lineHeight, item.outerWidth);\n });\n return lineHeight;\n }\n\n get isUpright() {\n return this.__isUpright;\n }\n}\n\nexport default LineBox;\n","import LineBox from './LineBox';\n\n/**\n * 维护一个上下文的LineBox,向LineBox中添加Item以及新增下一行的LineBox,多个LineBox组成一个区域\n * 一个block/inlineBlock拥有一个本类对象,上下文即对应这个dom流,而inline则复用最近非inline父元素的\n * 同时LineBox可能连续也可能不连续,不连续的是中间有block之类的隔离开来\n */\nclass LineBoxManager {\n constructor(x, y, lineHeight, baseline, isUpright) {\n this.__x = this.__lastX = x; // last存储目前最后一行LineBox的结尾位置,供后续inline使用\n this.__y = this.__lastY = y;\n this.__max = isUpright ? y : x;\n this.__domList = [];\n this.__domStack = [];\n this.__list = []; // 包含若干LineBox\n this.__isNewLine = true; // 区域内是否是新行,容器dom(block)开头肯定是\n this.__lineHeight = lineHeight;\n this.__baseline = baseline;\n this.__isEnd = true; // 在dom中是否一个区域处在结尾,外部控制\n this.__spreadList = []; // verticalAlign时每个区域增加的y高度\n this.__isVertical = isUpright;\n }\n\n /**\n * 每次换行时重新生成LineBox存入列表,同时由于flow流当前一定是流(dom)的结尾,设置isEnd\n * @returns {LineBox}\n */\n genLineBox(x, y) {\n let lineBox = new LineBox(x, y, this.__lineHeight, this.__baseline, this.isUpright);\n this.list.push(lineBox);\n this.__isEnd = true;\n return lineBox;\n }\n\n /**\n * inline的特殊调用,防止空内容但有mbp的inline不占位,放入一个有lineHeight的空lineBox\n * 只有新行开头时需要,后面的无论是否有内容都会影响lineHeight\n * @param x\n * @param y\n * @param l\n * @param b\n * @returns {LineBox}\n */\n genLineBoxByInlineIfNewLine(x, y, l, b) {\n let lineHeight = Math.max(this.__lineHeight, l);\n let baseline = Math.max(this.__baseline, b);\n if(this.__isNewLine) {\n let lineBox = new LineBox(x, y, lineHeight, baseline, this.isUpright);\n this.list.push(lineBox);\n this.__isEnd = true;\n this.__isNewLine = false;\n return lineBox;\n }\n }\n\n /**\n * 外部设置为结尾,如一个LineBox后出现一个block,此时会被隔断,不再作为流的末尾\n */\n setNotEnd() {\n this.__isEnd = false;\n }\n\n /**\n * 外部设置新行,下次新生成LineBox\n */\n setNewLine() {\n this.__isNewLine = true;\n }\n\n /**\n * 当前LineBox放入一个新项,当新行时(如第一行)产生一个新的LineBox并存入列表\n * 是否新区域和新行都是可以被外部控制,默认第一行是新\n * 当被隔断后会被外部重置新行,这样会生成新的来作为新加项的LineBox\n * 当换行时外部也会调用新行,这样再次添加Item时会自动生成新的LineBox而不是用之前的\n * @param o TextBox/Inline/InlineBlock\n * @param nextNewLine 是否设置newLine,标明下次添加新生成LineBox\n * @returns {LineBox}\n */\n addItem(o, nextNewLine) {\n let lineBox, isUpright = this.isUpright;\n // 新行新的lineBox,否则复用最后一个\n if(this.__isNewLine) {\n this.__isNewLine = false;\n lineBox = this.genLineBox(o.x, o.y);\n }\n else {\n let list = this.list;\n let length = list.length;\n lineBox = list[length - 1];\n }\n // inline递归过程中所有inline父子顺序列表,每个dom都需要对当前内容保存\n this.__domStack.forEach(item => {\n item.__contentBoxList.push(o);\n });\n lineBox.add(o);\n // 设置结束x的位置给next的inline标记用,o可能是TextBox或inlineBlock,当next新行时注意位置\n if(nextNewLine) {\n this.__isNewLine = true;\n if(isUpright) {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = this.__y;\n }\n else {\n this.__lastX = this.__x;\n this.__lastY = o.y + o.outerHeight;\n }\n }\n else {\n if(isUpright) {\n this.__lastX = o.x;\n this.__lastY = o.y + o.outerHeight;\n }\n else {\n this.__lastX = o.x + o.outerWidth;\n this.__lastY = o.y;\n }\n }\n this.__max = Math.max(this.__max, isUpright ? (o.y + o.outerHeight) : (o.x + o.outerWidth));\n return lineBox;\n }\n\n horizonAlign(size, textAlign, isUpright) {\n this.list.forEach(lineBox => {\n let diff = size - (isUpright ? lineBox.height : lineBox.width);\n if(diff > 0) {\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(isUpright) {\n lineBox.__offsetY(diff, true);\n }\n else {\n lineBox.__offsetX(diff, true);\n }\n }\n });\n }\n\n /**\n * 垂直对齐过程中,如果遇到占位元素如img,可能会导致每行lineBox高度增加,需返回增加量,\n * next行也需要y偏移\n * @returns {number}\n */\n verticalAlign(isUpright) {\n let spreadList = this.__spreadList;\n spreadList.splice(0);\n let spread = 0;\n this.list.forEach(lineBox => {\n if(spread) {\n lineBox.__bOffset = spread; // 对齐造成的误差需记录给baseline修正\n if(isUpright) {\n lineBox.__offsetX(spread, true);\n }\n else {\n lineBox.__offsetY(spread, true);\n }\n }\n spread += lineBox.verticalAlign(isUpright);\n spreadList.push(spread);\n });\n return spread;\n }\n\n addX(n) {\n this.__lastX += n;\n }\n\n addY(n) {\n this.__lastY += n;\n }\n\n /**\n * inline递归过程中布局调用,不断出入栈dom对象,获取当前行状态下有哪些dom还在\n * @param dom\n */\n pushContentBoxList(dom) {\n this.__domList.push(dom);\n this.__domStack.push(dom);\n }\n\n popContentBoxList() {\n this.__domStack.pop();\n }\n\n __offsetX(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetX(diff);\n });\n }\n\n __offsetY(diff) {\n this.list.forEach(lineBox => {\n lineBox.__offsetY(diff);\n });\n }\n\n /**\n * inline的特殊调用,非行首无论是否有内容都设置lineBox的lineHeight\n * @param l\n * @param b\n * @private\n */\n setLbByInlineIfNotNewLine(l, b) {\n let length = this.list.length;\n if(length && !this.isNewLine) {\n this.list[length - 1].__setLB(l, b, false);\n }\n }\n\n get size() {\n return this.list.length;\n }\n\n get lastX() {\n return this.__lastX;\n }\n\n get lastY() {\n return this.__lastY;\n }\n\n get endX() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endX;\n }\n return this.__x;\n }\n\n get endY() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[length - 1].endY;\n }\n return this.__y;\n }\n\n get isEnd() {\n return this.__isEnd;\n }\n\n get isNewLine() {\n return this.__isNewLine;\n }\n\n get breakLine() {\n return this.list.length > 1;\n }\n\n get domList() {\n return this.__domList;\n }\n\n get baseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n let n = 0;\n for(let i = 0; i < length - 1; i++) {\n n += list[i].height;\n }\n // 需考虑因为verticalAlign造成的lineBox偏移offset值,修正计算正确的baseline\n return n + list[length - 1].baseline + list[length - 1].bOffset;\n }\n return 0;\n }\n\n get firstBaseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseline;\n }\n return 0;\n }\n\n get verticalBaseline() {\n let list = this.list;\n let length = list.length;\n if(length) {\n return list[0].baseline + list[0].bOffset;\n }\n return 0;\n }\n\n get lineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].lineHeight;\n }\n return 0;\n }\n\n get verticalLineHeight() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1].verticalLineHeight;\n }\n return 0;\n }\n\n get lineBox() {\n let list = this.list;\n if(list.length) {\n return list[list.length - 1];\n }\n }\n\n get list() {\n return this.__list;\n }\n\n get width() {\n let w = 0;\n this.list.forEach(item => {\n w = Math.max(w, item.width);\n });\n return w;\n }\n\n get spreadList() {\n return this.__spreadList;\n }\n\n get isUpright() {\n return this.__isVertical;\n }\n\n get max() {\n return this.__max;\n }\n}\n\nexport default LineBoxManager;\n","const TAG_NAME = {\n 'div': true,\n 'p': true,\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst INLINE = {\n 'span': true,\n 'img': true,\n 'b': true,\n 'strong': true,\n};\n\nconst BOLD = {\n 'b': true,\n 'strong': true,\n}\n\nexport default {\n TAG_NAME,\n INLINE,\n BOLD,\n};\n","import Xom from '../Xom';\nimport reset from '../../style/reset';\nimport css from '../../style/css';\nimport unit from '../../style/unit';\nimport enums from '../../util/enums';\nimport mode from '../../refresh/mode';\nimport util from '../../util/util';\nimport painter from '../../util/painter';\nimport transform from '../../style/transform';\nimport mx from '../../math/matrix';\nimport inject from '../../util/inject';\nimport gradient from '../../math/gradient';\nimport level from '../../refresh/level';\n\nconst {\n STYLE_KEY: {\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n WIDTH,\n HEIGHT,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n FILL,\n STROKE,\n STROKE_MITERLIMIT,\n STROKE_WIDTH,\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_DASHARRAY,\n STROKE_DASHARRAY_STR,\n FILL_RULE,\n FLEX_BASIS,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN, RGBA, GRADIENT } = unit;\nconst { int2rgba, isNil, joinArr } = util;\nconst { canvasPolygon, svgPolygon } = painter;\n\nconst REGISTER = {};\n\nclass Geom extends Xom {\n constructor(tagName, props) {\n super(tagName, props);\n this.__isMulti = !!this.props.multi;\n this.__style = css.normalize(this.style, reset.DOM_ENTRY_SET.concat(reset.GEOM_ENTRY_SET));\n this.__currentStyle = util.extend([], this.__style);\n this.__currentProps = util.clone(this.props);\n this.__cacheProps = {};\n }\n\n __tryLayInline(w, total) {\n this.__computeReflow();\n // 无children,直接以style的width为宽度,不定义则为0\n let { currentStyle: {\n [WIDTH]: width,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width[1] !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n // 减去水平mbp\n w -= this.__calSize(marginRight, total, true);\n w -= this.__calSize(paddingRight, total, true);\n w -= borderRightWidth;\n w -= this.__calSize(marginLeft, total, true);\n w -= this.__calSize(paddingLeft, total, true);\n w -= borderLeftWidth;\n return w;\n }\n\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, computedStyle } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n if(isFixed) {\n b = max = min = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n else if(([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = max = min = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n __layout(data, isAbs, isColumn, isRow) {\n super.__layout(data, isAbs, isColumn, isRow);\n this.__layoutStyle();\n }\n\n __layoutBlock(data, isAbs, isColumn, isRow) {\n let { fixedWidth, fixedHeight, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n let tw = 0, th = 0;\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n this.__ioSize(tw, th);\n if(isAbs || isColumn || isRow) {\n return;\n }\n this.__marginAuto(this.currentStyle, data);\n this.__cacheProps = {};\n }\n\n __layoutFlex(data, isAbs, isColumn, isRow) {\n // 无children所以等同于block\n this.__layoutBlock(data, isAbs, isColumn, isRow);\n }\n\n __layoutInline(data, isAbs, isInline) {\n let { fixedWidth, fixedHeight, w, h } = this.__preLayout(data, false);\n let tw = fixedWidth ? w : 0;\n let th = fixedHeight ? h : 0;\n this.__ioSize(tw, th);\n this.__cacheProps = {};\n }\n\n __calStyle(lv, __currentStyle, __computedStyle, __cacheStyle) {\n let res = super.__calStyle(lv, __currentStyle, __computedStyle, __cacheStyle);\n if(isNil(__cacheStyle[STROKE_WIDTH])) {\n __cacheStyle[STROKE_WIDTH] = true;\n let strokeWidth = __currentStyle[STROKE_WIDTH] || [];\n let w = this.width;\n __computedStyle[STROKE_WIDTH] = strokeWidth.map(item => {\n return this.__calSize(item, w, true);\n });\n }\n if(isNil(__cacheStyle[STROKE_DASHARRAY])) {\n __cacheStyle[STROKE_DASHARRAY] = true;\n __computedStyle[STROKE_DASHARRAY] = __currentStyle[STROKE_DASHARRAY] || [];\n __cacheStyle[STROKE_DASHARRAY_STR] = __computedStyle[STROKE_DASHARRAY].map(item => joinArr(item, ','));\n }\n // 直接赋值的\n [\n STROKE_LINECAP,\n STROKE_LINEJOIN,\n STROKE_MITERLIMIT,\n FILL_RULE,\n ].forEach(k => {\n __computedStyle[k] = __currentStyle[k];\n });\n // stroke/fll移至render里处理,因为cache涉及渐变坐标偏移\n [FILL, STROKE].forEach(k => {\n if(isNil(__cacheStyle[k])) {\n let v = __currentStyle[k];\n let cs = __computedStyle[k] = [];\n let res = __cacheStyle[k] = [];\n if(Array.isArray(v)) {\n v.forEach(item => {\n if(item && item.u === GRADIENT) {\n // let t = this.__gradient(renderMode, ctx, x3, y3, x4, y4, item[0], 0, 0);\n cs.push(item.v);\n res.push(true);\n }\n else if(item && item.u === RGBA && item.v[3] > 0) {\n cs.push(item.v);\n res.push(int2rgba(item.v));\n }\n else {\n cs.push('none');\n res.push('none');\n }\n });\n }\n }\n });\n return res;\n }\n\n calContent(currentStyle, computedStyle) {\n let res = super.calContent(currentStyle, computedStyle);\n this.__hasXomContent = res;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_WIDTH]: strokeWidth,\n } = computedStyle;\n let empty = true;\n for(let i = 0, len = fill.length; i < len; i++) {\n let item = fill[i];\n if(item.k || item[3] > 0) {\n empty = false;\n break;\n }\n }\n for(let i = 0, len = stroke.length; i < len; i++) {\n let item = stroke[i];\n if((item.k || item[3] > 0) && strokeWidth[i] > 0) {\n empty = false;\n break;\n }\n }\n // 矢量图形默认有内容\n if(!empty) {\n return true;\n }\n // 没有fill和stroke则认为矢量图形为空\n if(!res && empty) {\n return false;\n }\n return res;\n }\n\n __preSet(renderMode, res) {\n let { width, height, __cacheStyle, computedStyle } = this;\n let cx = res.x3 + width * 0.5;\n let cy = res.y3 + height * 0.5;\n let {\n [STROKE_DASHARRAY_STR]: strokeDasharrayStr,\n } = __cacheStyle;\n let {\n [FILL]: fill,\n [STROKE]: stroke,\n [STROKE_WIDTH]: strokeWidth,\n [STROKE_LINECAP]: strokeLinecap,\n [STROKE_LINEJOIN]: strokeLinejoin,\n [STROKE_MITERLIMIT]: strokeMiterlimit,\n [STROKE_DASHARRAY]: strokeDasharray,\n [FILL_RULE]: fillRule,\n } = computedStyle;\n stroke = stroke.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n fill = fill.map(item => {\n if(item.k) {\n return this.__gradient(renderMode, res.ctx, res.x3, res.y3, res.x4, res.y4, item, res.dx, res.dy);\n }\n return int2rgba(item);\n });\n return {\n cx,\n cy,\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n fillRule,\n };\n }\n\n __preSetCanvas(renderMode, ctx, res) {\n let {\n stroke,\n strokeWidth,\n strokeDasharray,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n fill,\n } = res;\n if(renderMode === mode.CANVAS) {\n if(fill) {\n if(fill.k === 'linear') {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'radial' && !Array.isArray(fill.v)) {\n ctx.fillStyle = fill.v;\n }\n else if(fill.k === 'conic') {\n //\n }\n else if(!fill.k && ctx.fillStyle !== fill) {\n ctx.fillStyle = fill;\n }\n }\n if(stroke) {\n if(stroke.k === 'linear') {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'radial' && !Array.isArray(stroke.v)) {\n ctx.strokeStyle = stroke.v;\n }\n else if(stroke.k === 'conic') {\n //\n }\n else if(!stroke.k && ctx.strokeStyle !== stroke) {\n ctx.strokeStyle = stroke;\n }\n }\n if(strokeWidth !== undefined && ctx.lineWidth !== strokeWidth) {\n ctx.lineWidth = strokeWidth;\n }\n if(strokeLinecap !== undefined && ctx.lineCap !== strokeLinecap) {\n ctx.lineCap = strokeLinecap;\n }\n if(strokeLinejoin !== undefined && ctx.lineJoin !== strokeLinejoin) {\n ctx.lineJoin = strokeLinejoin;\n }\n if(strokeMiterlimit !== undefined && ctx.miterLimit !== strokeMiterlimit) {\n ctx.miterLimit = strokeMiterlimit;\n }\n // 小程序没这个方法\n if(util.isFunction(ctx.getLineDash)) {\n if(strokeDasharray && !util.equalArr(ctx.getLineDash(), strokeDasharray)) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n else if(strokeDasharray) {\n ctx.setLineDash(strokeDasharray);\n }\n }\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(renderMode === mode.SVG) {\n this.virtualDom.type = 'geom';\n }\n // 无论canvas/svg,break可提前跳出省略计算\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n // data在无cache时没有提前设置\n let preData = this.__preSet(renderMode, res);\n return Object.assign(res, preData);\n }\n\n __renderPolygon(renderMode, ctx, res) {\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list }, isMulti, bbox } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n bbox,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, o);\n }\n }\n }\n }\n\n __renderOnePolygon(renderMode, ctx, isMulti, list, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill && fill.k === 'conic';\n let isStrokeCE = stroke && stroke.k === 'conic';\n // 椭圆是array\n let isFillRE = fill && fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth && strokeWidth > 0 && stroke && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth && strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth && strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke.v = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n else if(strokeWidth && strokeWidth > 0 && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, false, true);\n }\n }\n else {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, true);\n }\n }\n\n __drawPolygon(renderMode, ctx, isMulti, list, res, isFill, isStroke) {\n let {\n fill,\n stroke,\n strokeWidth,\n fillRule,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n if(renderMode === mode.CANVAS) {\n this.__preSetCanvas(renderMode, ctx, res);\n ctx.beginPath();\n if(isMulti) {\n list.forEach(item => canvasPolygon(ctx, item, dx, dy));\n }\n else {\n canvasPolygon(ctx, list, dx, dy);\n }\n if(isFill && fill && fill !== 'none') {\n ctx.fill(fillRule);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n ctx.stroke();\n }\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n // 2个都没有常出现在多fill/stroke时,也有可能特殊单个故意这样写的\n if((!fill || fill === 'none') && (!stroke || stroke === 'none')) {\n return;\n }\n if(isFill && fill && fill !== 'none') {\n props.push(['fill', fill.v || fill]);\n if(fillRule && fillRule !== 'nonzero') { // evenodd\n props.push(['fill-rule', fillRule]);\n }\n }\n else {\n props.push(['fill', 'none']);\n }\n if(isStroke && stroke && stroke !== 'none' && strokeWidth && strokeWidth > 0) {\n props.push(['stroke', stroke.v || stroke]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n else {\n props.push(['stroke-width', 0]);\n }\n this.addGeom('path', props);\n }\n }\n\n __inversePtList(list, isMulti, t, dx = 0, dy = 0) {\n if(isMulti) {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n return item.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i] + dx, y: item[i + 1] + dy }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n });\n }\n else {\n return list.map(item => {\n if(!item || !item.length) {\n return null;\n }\n let arr = [];\n for(let i = 0, len = item.length; i < len; i += 2) {\n let p = mx.calPoint({ x: item[i] + dx, y: item[i + 1] + dy }, t);\n arr.push(p.x);\n arr.push(p.y);\n }\n return arr;\n });\n }\n }\n\n __radialEllipse(renderMode, ctx, list, isMulti, res, method) {\n let {\n strokeWidth,\n strokeDasharrayStr,\n strokeLinecap,\n strokeLinejoin,\n strokeMiterlimit,\n dx,\n dy,\n } = res;\n let [color, matrix, cx, cy] = res[method].v;\n // 椭圆渐变的转换,顶点逆矩阵变换\n matrix = transform.calMatrixByOrigin(matrix, cx, cy);\n let t = mx.inverse(matrix);\n list = this.__inversePtList(list, isMulti, t, dx, dy);\n // 用正向matrix渲染\n if(renderMode === mode.CANVAS) {\n if(matrix) {\n ctx.save();\n // 获取当前matrix,在webgl中为E,在canvas中分无cache和有cache模式\n let me = ctx.getTransform();\n me = [me.a, me.b, 0, 0, me.c, me.d, 0, 0, 0, 0, 1, 0, me.e, me.f, 1, 0];\n matrix = mx.multiply(me, matrix);\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n }\n ctx.beginPath();\n if(ctx[method + 'Style'] !== color) {\n ctx[method + 'Style'] = color;\n }\n if(isMulti) {\n list.forEach(item => painter.canvasPolygon(ctx, item));\n }\n else {\n canvasPolygon(ctx, list);\n }\n ctx[method]();\n ctx.closePath();\n if(matrix) {\n ctx.restore();\n }\n }\n else if(renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n list.forEach(item => d += svgPolygon(item));\n }\n else {\n d = svgPolygon(list);\n }\n let props = [\n ['d', d],\n ];\n if(method === 'fill') {\n props.push(['fill', color]);\n props.push(['strokeWidth', 0]);\n }\n else if(method === 'stroke') {\n props.push(['fill', 'none']);\n props.push(['stroke', color]);\n props.push(['stroke-width', strokeWidth]);\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n }\n props.push(['transform', `matrix(${joinArr(mx.m2m6(matrix), ',')})`]);\n this.addGeom('path', props);\n }\n }\n\n __conicGradient(renderMode, ctx, list, isMulti, res) {\n let {\n fill,\n bbox,\n dx = 0,\n dy = 0,\n } = res;\n let color = fill.v;\n if(renderMode === mode.CANVAS) {\n let [x1, y1, x2, y2] = bbox;\n let w = x2 - x1, h = y2 - y1;\n let offscreen = inject.getOffscreenCanvas(w, h, '__$$CONIC_GRADIENT$$__', null);\n let imgData = offscreen.ctx.getImageData(0,0, w, h);\n gradient.getConicGradientImage(w * 0.5, h * 0.5, w, h, fill.v.stop, imgData.data);\n offscreen.ctx.putImageData(imgData, 0, 0);\n if(isMulti) {\n list.forEach(item => {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, item, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n });\n }\n else {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(offscreen.canvas, x1 + dx, y1 + dy);\n ctx.restore();\n }\n offscreen.ctx.clearRect(0, 0, w, h);\n }\n else if(renderMode === mode.SVG) {\n if(isMulti) {\n list.forEach(item => {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(item)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n });\n }\n else {\n let v = {\n tagName: 'clipPath',\n children: [{\n tagName: 'path',\n props: [\n ['d', svgPolygon(list)],\n ],\n }],\n };\n let clip = ctx.add(v);\n this.__cacheDefs.push(v);\n color.forEach(item => {\n this.virtualDom.bb.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', svgPolygon(item[0])],\n ['fill', item[1]],\n ['clip-path', 'url(#' + clip + ')'],\n ],\n });\n });\n }\n }\n }\n\n __propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(strokeDasharrayStr) {\n props.push(['stroke-dasharray', strokeDasharrayStr]);\n }\n if(strokeLinecap && strokeLinecap !== 'butt') {\n props.push(['stroke-linecap', strokeLinecap]);\n }\n if(strokeLinejoin && strokeLinejoin !== 'miter') {\n props.push(['stroke-linejoin', strokeLinejoin]);\n }\n if(strokeMiterlimit && strokeMiterlimit !== 4) {\n props.push(['stroke-miterlimit', strokeMiterlimit]);\n }\n }\n\n // offset/resize时要多一步清空props上记录的缓存\n __offsetX(diff, isLayout, lv) {\n super.__offsetX(diff, isLayout, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __offsetY(diff, isLayout, lv) {\n super.__offsetY(diff, isLayout, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __resizeX(diff, lv) {\n super.__resizeX(diff, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n __resizeY(diff, lv) {\n super.__resizeY(diff, lv);\n if(lv && lv >= level.REFLOW) {\n this.__cacheProps = {};\n }\n }\n\n addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n getProps(k) {\n let v = this.currentProps[k];\n if(!isNil(v)) {\n return v;\n }\n return this['__' + k];\n }\n\n __isRealInline() {\n return false;\n }\n\n get isMulti() {\n return this.__isMulti;\n }\n\n get currentProps() {\n return this.__currentProps;\n }\n\n static get REGISTER() {\n return REGISTER;\n }\n\n static getRegister(name) {\n if(name && !util.isString(name) && name.prototype && name.prototype instanceof Geom) {\n return name;\n }\n if(!name || !util.isString(name) || name.charAt(0) !== '$') {\n throw new Error('Invalid param');\n }\n if(!REGISTER.hasOwnProperty(name)) {\n throw new Error(`Geom has not register: ${name}`);\n }\n return REGISTER[name];\n }\n\n static register(name, obj) {\n if(!name || !util.isString(name) || name.charAt(0) !== '$'\n || !obj.prototype || !(obj.prototype instanceof Geom)) {\n throw new Error('Invalid param');\n }\n if(Geom.hasRegister(name)) {\n throw new Error(`Geom has already register: ${name}`);\n }\n REGISTER[name] = obj;\n }\n\n static hasRegister(name) {\n return name && REGISTER.hasOwnProperty(name);\n }\n\n static delRegister(name) {\n if(Geom.hasRegister(name)) {\n delete REGISTER[name];\n }\n }\n}\n\nexport default Geom;\n","import enums from '../util/enums';\nimport unit from '../style/unit';\nimport level from './level';\nimport css from '../style/css';\nimport Text from '../node/Text';\nimport Component from '../node/Component';\nimport Geom from '../node/geom/Geom';\nimport mode from './mode';\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n TOP,\n BOTTOM,\n POSITION,\n WIDTH,\n HEIGHT,\n MARGIN_TOP,\n MARGIN_BOTTOM,\n MARGIN_LEFT,\n BORDER_TOP_WIDTH,\n PADDING_TOP,\n BORDER_LEFT_WIDTH,\n PADDING_LEFT,\n },\n} = enums;\nconst { AUTO, PX, REM, VW, VH, VMAX, VMIN, PERCENT } = unit;\nconst { REPAINT, REFLOW, CACHE } = level;\nconst { isRelativeOrAbsolute } = css;\n\nfunction clearSvgCache(node, child) {\n if(child) {\n node.__refreshLevel |= REPAINT;\n }\n else {\n node.__refreshLevel |= CACHE;\n }\n if(Array.isArray(node.children)) {\n node.children.forEach(child => {\n if(child instanceof Component) {\n child = child.shadowRoot;\n }\n clearSvgCache(child, true);\n });\n }\n}\n\n// 合并margin,和原本不合并情况下的差值\nfunction getMergeMargin(topList, bottomList) {\n let total = 0;\n let max = topList[0] || 0;\n let min = topList[0] || 0;\n topList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n bottomList.forEach(item => {\n total += item;\n max = Math.max(max, item);\n min = Math.min(min, item);\n });\n // 正数取最大,负数取最小,正负则相加\n let target = 0;\n if(max > 0 && min > 0) {\n target = Math.max(max, min);\n }\n else if(max < 0 && min < 0) {\n target = Math.min(max, min);\n }\n else if(max !== 0 || min !== 0) {\n target = max + min;\n }\n return {\n target, // 应该的目标margin\n total, // 累计的margin\n diff: target - total,\n };\n}\n\n// 提取出对比节点尺寸是否固定非AUTO\nfunction isFixedWidthOrHeight(node, k) {\n let c = node.currentStyle[k];\n return c.u !== AUTO;\n}\n// 除了固定尺寸,父级也不能是flex\nfunction isFixedSize(node, includeParentFlex) {\n let res = isFixedWidthOrHeight(node, WIDTH) && isFixedWidthOrHeight(node, HEIGHT);\n if(res && includeParentFlex) {\n let parent = node.__domParent;\n if(parent) {\n if(parent.computedStyle[DISPLAY] === 'flex') {\n return false;\n }\n }\n }\n return res;\n}\n\nfunction getPrevMergeMargin(prev, mtList, mbList) {\n while(prev && !(prev instanceof Text)\n && !(prev instanceof Component && prev.shadowRoot instanceof Text)\n && ['block', 'flex'].indexOf(prev.computedStyle[DISPLAY]) > -1\n && prev.computedStyle[POSITION] !== 'absolute') {\n mbList.push(prev.computedStyle[MARGIN_BOTTOM]);\n if(prev.offsetHeight > 0) {\n break;\n }\n mtList.push(prev.computedStyle[MARGIN_TOP]);\n prev = prev.__prev;\n }\n}\n\nfunction getNextMergeMargin(next, mtList, mbList) {\n while(next && !(next instanceof Text)\n && !(next instanceof Component && next.shadowRoot instanceof Text)\n && ['block', 'flex'].indexOf(next.computedStyle[DISPLAY]) > -1\n && next.computedStyle[POSITION] !== 'absolute') {\n mtList.push(next.computedStyle[MARGIN_TOP]);\n if(next.offsetHeight > 0) {\n break;\n }\n mbList.push(next.computedStyle[MARGIN_BOTTOM]);\n next = next.__next;\n }\n}\n\nfunction offsetNext(next, diff, parentFixed, absList) {\n while(next) {\n let cs = next.currentStyle;\n // flow流和auto/px/rem的absolute流需要偏移diff值\n if(cs[POSITION] !== 'absolute'\n || (cs[TOP].u === AUTO && cs[BOTTOM].u === AUTO\n || cs[TOP].u === AUTO && [PX, REM, VW, VH, VMAX, VMIN].indexOf(cs[BOTTOM].u) > -1)) {\n next.__offsetY(diff, true, REFLOW);\n }\n // absolute中百分比的特殊计算偏移,但要排除parent固定尺寸\n else if(!parentFixed && cs[POSITION] === 'absolute'\n && (cs[TOP].u === PERCENT || cs[BOTTOM].u === PERCENT)) {\n if(cs[TOP].u === PERCENT) {\n next.__offsetY(diff * 0.01 * cs[TOP].v, true, REFLOW);\n }\n else {\n next.__offsetY(diff * (1 - 0.01 * cs[BOTTOM].v), true, REFLOW);\n }\n }\n // abs的percent调整,记录\n if(!(cs instanceof Text) && !(cs instanceof Component && cs.shadowRoot instanceof Text)) {\n if(cs[POSITION] === 'absolute' && cs[HEIGHT].u === PERCENT) {\n absList.push(next);\n }\n }\n next = next.__next;\n }\n return diff;\n}\n\n/**\n * 单独提出共用检测影响的函数,从节点本身开始向上分析影响,找到最上层的影响节点设置其重新布局\n * ---\n * 当一个元素absolute时,其变化不会影响父元素和兄弟元素,直接自己重新layout\n * 当absolute发生改变时,其变化会影响父和兄弟,视作父重新布局\n * 当inline变化时,视为其最近block/flex父变化\n * 当block/flex变化时,往上查找最上层flex视为其变化,如没有flex则影响后面兄弟offset和父resize\n * 以上情况向上查找时遇到父absolute均提前跳出,并layout\n * 上面所有情况即便结束还得额外看是否处于absolute中,是还是标记absolute重新布局\n * 当relative只变化left/top/right/bottom时,自己重新layout\n * ===\n * 返回最上层节点,可能为node自己\n */\nfunction checkTop(root, node, addDom, removeDom) {\n if(root === node) {\n return root;\n }\n if(node instanceof Text) {\n node = node.__domParent;\n }\n // add/remove情况abs节点特殊对待不影响其它节点,不能判断display,因为inline会强制block\n if(addDom && node.currentStyle[POSITION] === 'absolute') {\n return node;\n }\n if(removeDom && node.computedStyle[POSITION] === 'absolute') {\n return node;\n }\n let target = node;\n // add/remove的相邻出现inline的话,视为父节点reflow\n if(addDom || removeDom) {\n let isSiblingBlock = true;\n let { __prev, __next } = node;\n if(__prev\n && (__prev instanceof Text\n || ['inline', 'inlineBlock'].indexOf(__prev.computedStyle[DISPLAY]) > -1)) {\n isSiblingBlock = false;\n }\n else if(__next\n && (__next instanceof Text\n || ['inline', 'inlineBlock'].indexOf(__next.computedStyle[DISPLAY]) > -1)) {\n isSiblingBlock = false;\n }\n if(!isSiblingBlock) {\n target = node.__domParent;\n if(target === root) {\n return root;\n }\n }\n }\n // 如果一直是absolute,则不影响其它节点\n if(target.currentStyle[POSITION] === 'absolute' && target.computedStyle[POSITION] === 'absolute') {\n return target;\n }\n // inline节点变为最近的父非inline,自身可能会display变化前后状态都要看,\n // absolute不变会影响但被上面if排除,而absolute发生变化则也需要进入这里\n if(['inline', 'inlineBlock'].indexOf(target.currentStyle[DISPLAY]) > -1\n || ['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1) {\n do {\n target = target.__domParent;\n if(target === root) {\n return root;\n }\n }\n // 父节点不会display变化,因为同步检测,只看computedStyle即可\n while(['inline', 'inlineBlock'].indexOf(target.computedStyle[DISPLAY]) > -1\n && target.computedStyle[POSITION] !== 'absolute');\n // target已不是inline,父固定宽高跳出直接父进行LAYOUT即可,不影响上下文,但不能是flex孩子,此时固定尺寸无用\n // root也会进这里,因为root强制固定size\n if(isFixedSize(target, true)) {\n return target;\n }\n }\n // 此时target指向node,如果是inline/absolute变化则是其最近的非inline父\n let parent = target;\n // 向上检查flex/absolute/fixedSize,以最上层的flex视作其更改,node本身flex不进入\n let top;\n do {\n if(parent === root) {\n break;\n }\n if(parent.computedStyle[DISPLAY] === 'flex') {\n top = parent;\n }\n // 遇到固定size提前跳出,以及absolute也是\n if(parent.computedStyle[POSITION] === 'absolute' || isFixedSize(parent, true)) {\n break;\n }\n parent = parent.__domParent;\n }\n while(parent);\n // 找到最上层flex,视作其更改\n if(top) {\n target = top;\n }\n return target;\n}\n\n/**\n * checkReflow之后,节点重新布局对自己next的节点的offset影响,计算偏移量让所有next兄弟offsetY,\n * 以及递归向上父级resize和父级所有next兄弟offsetY\n */\nfunction checkNext(root, top, node, hasZ, addDom, removeDom) {\n let cps = top.computedStyle, crs = top.currentStyle;\n let position = cps[POSITION], display = cps[DISPLAY];\n let isLastAbs = position === 'absolute';\n let isNowAbs = crs[POSITION] === 'absolute';\n let isLastNone = display === 'none';\n let isNowNone = crs[DISPLAY] === 'none';\n let isLast0 = top.offsetHeight === 0;\n // none不可见布局无效可以无视,add/remove已提前判断,none时不会进来\n if(isLastNone && isNowNone) {\n return;\n }\n let parent = top.__domParent, oldH = top.offsetHeight;\n // svg在特殊children顺序变化的情况需清除缓存以便diff运行\n // add/remove已提前自己做好,zIndex有效变化也触发,position变更static和非static触发\n let svg = root.renderMode === mode.SVG;\n if(!addDom && !removeDom) {\n if(hasZ && position === 'static' && crs[POSITION] === 'static') {\n hasZ = false;\n }\n else if(position !== crs[POSITION] && (position === 'static' || crs[POSITION] === 'static')) {\n hasZ = true;\n }\n // 特殊,zIndexChildren不变化但影响svg的diff\n else if(isLastNone !== isNowNone && !hasZ) {\n svg && clearSvgCache(parent, false);\n }\n }\n else {\n hasZ = false;\n }\n // remove自身且abs时不影响其它,除了svg的zIndex\n if(removeDom && top === node && node.computedStyle[POSITION] === 'absolute') {\n top.clearCache(true);\n svg && clearSvgCache(parent, false);\n return;\n }\n // 后续调整offsetY需要考虑mergeMargin各种情况(包含上下2个方向),之前合并前和合并后的差值都需记录\n // 先记录没更新前的,如果是空节点则m1作为整个,忽视m2\n let t1 = 0, d1 = 0, t2 = 0, d2 = 0;\n let mbList = [], mtList = [];\n let prev = top.isShadowRoot ? top.__hostRoot.__prev : top.__prev;\n let next = top.isShadowRoot ? top.__hostRoot.__next : top.__next;\n if(addDom || isLast0) {\n getPrevMergeMargin(prev, mtList, mbList);\n getNextMergeMargin(next, mtList, mbList);\n if(!addDom) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n let t = getMergeMargin(mtList, mbList);\n t1 = t.target;\n d1 = t.diff;\n }\n else {\n getPrevMergeMargin(prev, mtList, mbList);\n mtList.push(cps[MARGIN_TOP]);\n let t = getMergeMargin(mtList, mbList);\n t1 = t.target;\n d1 = t.diff;\n mtList.splice(0);\n mbList.splice(0);\n getNextMergeMargin(next, mtList, mbList);\n mbList.push(cps[MARGIN_BOTTOM]);\n t = getMergeMargin(mtList, mbList);\n t2 = t.target;\n d2 = t.diff;\n }\n // __layoutData使用prev或者父节点,并重新计算y(不包含合并margin),因为display:none或add的无数据或不对\n let __layoutData = parent.__layoutData;\n let x = __layoutData.x;\n let y = __layoutData.y;\n let w = parent.__width;\n let h = parent.__currentStyle[HEIGHT].u === AUTO ? __layoutData.h : parent.__height;\n let current = top;\n // cp的shadowRoot要向上到cp本身,考虑高阶组件在内到真正的顶层cp\n if(current.isShadowRoot) {\n current = current.__hostRoot;\n }\n // y使用prev或者parent的,首个节点无prev,prev要忽略absolute的和display:none的\n let ref = current.__prev;\n let hasFlowPrev;\n while(ref) {\n // 注意有可能是text,此时可以直接用text位置,因为none的话不会进来,而text绝对不会absolute\n let isText = ref instanceof Text;\n let computedStyle = ref.computedStyle;\n if(isText || computedStyle[POSITION] !== 'absolute' && computedStyle[DISPLAY] !== 'none') {\n y = ref.y + ref.outerHeight;\n hasFlowPrev = true;\n break;\n }\n ref = ref.__prev;\n }\n // 找不到prev以默认parent的为基准,找到则增加自身,排除remove\n let __computedStyle = parent.__computedStyle;\n if(!hasFlowPrev) {\n y += __computedStyle[MARGIN_TOP] + __computedStyle[BORDER_TOP_WIDTH] + __computedStyle[PADDING_TOP];\n }\n x += __computedStyle[MARGIN_LEFT] + __computedStyle[BORDER_LEFT_WIDTH] + __computedStyle[PADDING_LEFT];\n // 特殊的如add/remove时为absolute和none的在调用时即检查提前跳出了,不触发reflow,这里一定是触发的\n // 找到最上层容器供absolute使用,注意top本身是否abs的区别,非abs可能为relative)\n let container = isNowAbs ? parent : top;\n while(container && container !== root) {\n if(isRelativeOrAbsolute(container)) {\n break;\n }\n container = container.__domParent;\n }\n if(!container) {\n container = root;\n }\n // 删除的节点的影响top是自己,无需重新布局只要看next节点的offsetY\n if(removeDom && top === node) {\n }\n // 一定不是add/remove,同步操作提前判断\n else if(isNowNone) {\n top.__layoutNone();\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n }\n // 现在是定位流,还要看之前是什么\n else if(isNowAbs) {\n parent.__layoutAbs(container, __layoutData, top);\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n // add/remove的zIndex已提前做好无需关心,只看普通变更\n if(!addDom && !removeDom) {\n // 之前也是abs,可以跳出不会影响其它只看zIndex即可\n if(isLastAbs) {\n top.clearCache(true);\n return;\n }\n }\n }\n // 现在是普通流,不管之前是啥直接布局\n else {\n let ld = Object.assign({}, addDom ? __layoutData : top.__layoutData, {\n x,\n y,\n w,\n h,\n });\n top.__layout(ld, false, false, false);\n // 防止Geom\n if(!(top instanceof Geom)) {\n top.__layoutAbs(container, ld, null);\n }\n if(hasZ) {\n parent.__zIndexChildren = null;\n parent.__updateStruct();\n svg && clearSvgCache(parent, false);\n }\n }\n // add的情况在自身是abs时不影响next,除了svg的zIndex\n if(addDom && top === node && node.currentStyle[POSITION] === 'absolute') {\n top.clearCache(true);\n svg && clearSvgCache(parent, false);\n return;\n }\n // 向上查找最近的relative的parent,获取ox/oy并赋值,无需继续向上递归,因为parent已经递归包含了\n let p = parent;\n while(p) {\n if(p.__computedStyle[POSITION] === 'relative') {\n let { ox, oy } = p;\n ox && top.__offsetX(ox, false, null);\n oy && top.__offsetY(oy, false, null);\n break;\n }\n p = p.__domParent;\n }\n // 高度不变一直0提前跳出,不影响包含margin合并,但需排除节点add/remove,因为空节点会上下穿透合并\n let isNow0 = removeDom && top === node || top.offsetHeight === 0;\n // 几种忽略的情况\n if(addDom && isNow0 || removeDom && isLast0) {\n top.clearCache(true);\n return;\n }\n // 查看现在的上下margin合并情况,和之前的对比得出diff差值进行offsetY/resizeY\n if(top.isShadowRoot) {\n top = top.__hostRoot;\n }\n let t3 = 0, d3 = 0, t4 = 0, d4 = 0;\n mbList.splice(0);\n mtList.splice(0);\n if(removeDom || isNow0) {\n getPrevMergeMargin(prev, mtList, mbList);\n getNextMergeMargin(next, mtList, mbList);\n if(!removeDom) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n let t = getMergeMargin(mtList, mbList);\n t3 = t.target;\n d3 = t.diff;\n }\n else {\n getPrevMergeMargin(prev, mtList, mbList);\n mtList.push(cps[MARGIN_TOP]);\n let t = getMergeMargin(mtList, mbList);\n t3 = t.target;\n d3 = t.diff;\n mtList.splice(0);\n mbList.splice(0);\n getNextMergeMargin(next, mtList, mbList);\n mbList.push(cps[MARGIN_BOTTOM]);\n t = getMergeMargin(mtList, mbList);\n t4 = t.target;\n d4 = t.diff;\n }\n let nowH;\n if(removeDom) {\n // remove有没有向上影响,决定布局后的高度nowH\n let isRemoveSelf = top === node || node.isShadowRoot && node.__hostRoot === top;\n if(isRemoveSelf) {\n nowH = 0;\n }\n else {\n nowH = top.offsetHeight;\n }\n }\n else if(isNowAbs) {\n nowH = 0;\n }\n else {\n nowH = top.offsetHeight;\n }\n // 查看mergeMargin对top造成的偏移\n if(!removeDom && d3) {\n top.__offsetY(d3, true, REFLOW);\n }\n // 差值计算注意考虑margin合并前的值,和合并后的差值,height使用offsetHeight不考虑margin\n let diff = t3 + t4 - t1 - t2 + nowH - oldH;\n // console.log('t3', t3, 'd3', d3, 't4', t4, 'd4', d4, 't1', t1, 'd1', d1, 't2', t2, 'd2', d2, nowH, oldH, diff);\n if(!diff) {\n top.clearCache(true);\n return;\n }\n let parentFixed = isFixedWidthOrHeight(parent, HEIGHT);\n if(!parentFixed) {\n parent.__resizeY(diff, REFLOW);\n }\n // 调整的同时遇到百分比高度的abs需记录下来最后重新布局\n let absList = [];\n offsetNext(next, diff, parentFixed, absList);\n top.clearCache(true);\n // 影响完next之后,向上递归,所有parent的next都影响,遇到固定尺寸或absolute跳出\n while(parent && !parentFixed && parent.__computedStyle[POSITION] !== 'absolute') {\n next = parent.__next;\n parent = parent.__domParent;\n parentFixed = parent && isFixedWidthOrHeight(parent, HEIGHT);\n if(!parentFixed) {\n parent.__resizeY(diff, REFLOW);\n }\n offsetNext(next, diff, parentFixed, absList);\n if(parentFixed) {\n parent.clearCache(false);\n }\n }\n // 记录的受影响的abs节点,都是百分比高度,需重新布局\n absList.forEach(item => {\n let ld = item.__layoutData, container = ld.container;\n item.__domParent.__layoutAbs(container, ld, item);\n });\n}\n\nexport default {\n getMergeMargin,\n checkTop,\n checkNext,\n clearSvgCache,\n};\n","import Xom from './Xom';\nimport Node from './Node';\nimport Text from './Text';\nimport Component from './Component';\nimport util from '../util/util';\n\n/**\n * 打平children,多维嵌套的数组变成一维\n */\nfunction buildChildren(parent, children) {\n let list = [];\n flatten(parent, children, list);\n return list;\n}\n\nfunction flatten(parent, children, list) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n flatten(parent, item, list);\n });\n }\n else if(children instanceof Xom) {\n if(['canvas', 'svg', 'webgl'].indexOf(children.tagName) > -1) {\n throw new Error('Can not nest canvas/svg/webgl');\n }\n children.__parent = parent;\n list.push(children);\n }\n else if(children instanceof Component) {\n children.__parent = parent;\n list.push(children);\n }\n else if(!util.isNil(children) && children !== '') {\n let t = new Text(children);\n t.__parent = parent;\n list.push(t);\n }\n}\n\n/**\n * 设置关系,父子和兄弟,被添加到真实dom中前调用\n */\nfunction relation(root, host, parent, children, options = {}) {\n if(Array.isArray(children)) {\n children.forEach(item => {\n relation(root, host, parent, item, options);\n });\n }\n else if(children instanceof Xom || children instanceof Component || children instanceof Text) {\n children.__root = root;\n children.__host = children.__hostRoot = host;\n children.__parent = parent;\n children.__domParent = parent;\n children.__isDestroyed = false;\n if(options.prev) {\n options.prev.__next = children;\n children.__prev = options.prev;\n }\n options.prev = children;\n if(!(children instanceof Text)) {\n let ref = children.props.ref;\n if(util.isString(ref) && ref || util.isNumber(ref)) {\n host.ref[ref] = children;\n }\n else if(ref && util.isFunction(ref)) {\n ref(children);\n }\n }\n if(children instanceof Xom && children.__children) {\n relation(root, host, children, children.__children, {});\n }\n else if(children instanceof Component) {\n let sr = children.render();\n let hoc = [];\n while(sr && sr instanceof Component) {\n hoc.push(sr);\n let res = sr.render();\n if(res) {\n sr.__shadow = res;\n res.__host = sr;\n }\n sr = res;\n }\n if(!(sr instanceof Node)) {\n sr = new Text(sr);\n }\n if(hoc.length) {\n children.__shadow = hoc[0];\n hoc[0].__host = children;\n hoc.forEach(item => {\n item.__shadowRoot = sr;\n item.__hostRoot = children;\n item.__root = root;\n item.__domParent = parent;\n });\n }\n else {\n children.__shadow = sr;\n sr.__host = children;\n }\n children.__shadowRoot = sr;\n sr.__hostRoot = children;\n sr.__root = root;\n sr.__domParent = parent;\n sr.__isDestroyed = false;\n children.__init();\n if(sr instanceof Xom && sr.__children) {\n relation(root, children, sr, sr.__children, {});\n }\n }\n }\n return children;\n}\n\n// 设置每个节点root引用,组件初始化\nfunction buildRoot(root, children) {\n root.__root = root;\n root.__host = root;\n relation(root, root, root, children, {});\n}\n\nexport default {\n buildChildren,\n buildRoot,\n relation,\n};\n","import Xom from './Xom';\nimport Text from './Text';\nimport Node from './Node';\nimport LineBoxManager from './LineBoxManager';\nimport Component from './Component';\nimport tag from './tag';\nimport TextBox from './TextBox';\nimport Ellipsis from './Ellipsis';\nimport reset from '../style/reset';\nimport css from '../style/css';\nimport unit from '../style/unit';\nimport enums from '../util/enums';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport reflow from '../refresh/reflow';\nimport builder from './builder';\nimport mode from '../refresh/mode';\nimport level from '../refresh/level';\nimport geom from '../math/geom';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n POSITION,\n DISPLAY,\n MARGIN_LEFT,\n MARGIN_TOP,\n MARGIN_RIGHT,\n MARGIN_BOTTOM,\n PADDING_LEFT,\n PADDING_BOTTOM,\n PADDING_RIGHT,\n PADDING_TOP,\n BORDER_TOP_WIDTH,\n BORDER_BOTTOM_WIDTH,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n WIDTH,\n HEIGHT,\n TEXT_ALIGN,\n FLEX_DIRECTION,\n FLEX_BASIS,\n FLEX_SHRINK,\n FLEX_GROW,\n ALIGN_SELF,\n ALIGN_ITEMS,\n JUSTIFY_CONTENT,\n Z_INDEX,\n WHITE_SPACE,\n LINE_HEIGHT,\n LINE_CLAMP,\n ORDER,\n FLEX_WRAP,\n ALIGN_CONTENT,\n OVERFLOW,\n FONT_SIZE,\n FONT_FAMILY,\n FONT_WEIGHT,\n WRITING_MODE,\n },\n ELLIPSIS,\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { isRelativeOrAbsolute, getBaseline, getVerticalBaseline } = css;\nconst { extend, isNil, isFunction, assignMatrix } = util;\nconst { CANVAS, SVG, WEBGL } = mode;\nconst { isE, multiply } = mx;\nconst { REFLOW } = level;\n\n// 渲染获取zIndex顺序\nfunction genZIndexChildren(dom) {\n let normal = [];\n let hasMc;\n let mcHash = {};\n let lastMaskIndex;\n let children = dom.children;\n children.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n // 遮罩单独保存后特殊排序\n if(item instanceof Xom && item.__mask) {\n // 开头的mc忽略,后续的连续mc以第一次出现为准\n if(lastMaskIndex !== undefined) {\n mcHash[lastMaskIndex].push(item);\n }\n else if(i) {\n lastMaskIndex = i - 1;\n children[lastMaskIndex].__iIndex = lastMaskIndex;\n mcHash[lastMaskIndex] = [item];\n hasMc = true;\n }\n }\n else {\n lastMaskIndex = undefined;\n if(item instanceof Xom) {\n child.__zIndex = item.currentStyle[Z_INDEX];\n if(isRelativeOrAbsolute(item)) {\n // 临时变量为排序使用\n child.__aIndex = true;\n normal.push(child);\n }\n else {\n // 之前遗留清除\n child.__aIndex = undefined;\n normal.push(child);\n }\n }\n else {\n child.__zIndex = 0;\n normal.push(child);\n }\n child.__iIndex = i;\n }\n });\n normal.sort(function(a, b) {\n if(a.__zIndex !== b.__zIndex) {\n return a.__zIndex - b.__zIndex;\n }\n // zIndex相等时abs优先flow\n if(a.__aIndex !== b.__aIndex) {\n if(a.__aIndex) {\n return 1;\n }\n return -1;\n }\n // 都相等看索引\n return a.__iIndex - b.__iIndex;\n });\n // 将遮罩插入到对应顺序上\n if(hasMc) {\n for(let i = normal.length - 1; i >= 0; i--) {\n let idx = normal[i].__iIndex;\n if(mcHash.hasOwnProperty(idx)) {\n normal.splice(i + 1, 0, ...mcHash[idx]);\n }\n }\n }\n return normal;\n}\n\n// flex布局阶段顺序,不是渲染也和struct结构无关,可以无视mask\nfunction genOrderChildren(flowChildren) {\n let normal = [];\n flowChildren.forEach((item, i) => {\n let child = item;\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n child.__order = item.currentStyle[ORDER];\n }\n else {\n child.__order = 0;\n }\n normal.push(child);\n child.__iIndex = i;\n });\n normal.sort(function(a, b) {\n if(a.__order !== b.__order) {\n return a.__order - b.__order;\n }\n // order相等时看节点索引\n return a.__iIndex - b.__iIndex;\n });\n return normal;\n}\n\n/**\n * lineClamp超出范围时ib作为最后一行最后一个无法挤下时进行回溯\n */\nfunction backtrack(bp, lineBoxManager, lineBox, total, endSpace, isUpright) {\n let ew, computedStyle = bp.computedStyle, root = bp.root, renderMode = root.renderMode;\n let list = lineBox.list;\n // 根据textBox里的内容,确定当前内容,索引,x和剩余宽度\n list.forEach(item => {\n total -= isUpright ? item.outerHeight : item.outerWidth;\n });\n let ctx;\n if(renderMode === CANVAS || renderMode === WEBGL) {\n ctx = renderMode === WEBGL\n ? inject.getFontCanvas().ctx\n : root.ctx;\n }\n // 临时测量ELLIPSIS的尺寸\n if(renderMode === CANVAS || renderMode === WEBGL) {\n let font = css.setFontStyle(computedStyle);\n if(ctx.font !== font) {\n ctx.font = font;\n }\n ew = ctx.measureText(ELLIPSIS).width;\n }\n else {\n ew = inject.measureTextSync(ELLIPSIS, computedStyle[FONT_FAMILY], computedStyle[FONT_SIZE], computedStyle[FONT_WEIGHT]);\n }\n for(let i = list.length - 1; i >= 0; i--) {\n let item = list[i];\n // 无论删除一个ib还是textBox,放得下的话都可以暂停循环,注意强制保留行首\n if(!i || total + item.outerWidth >= ew + (1e-10)) {\n if(item instanceof TextBox) {\n let text = item.parent;\n text.__backtrack(bp, lineBoxManager, lineBox, item, total, endSpace, ew, computedStyle, ctx, renderMode, isUpright);\n }\n else {\n let ep = new Ellipsis(item.x + item.outerWidth + endSpace, item.y, ew, bp, item, isUpright);\n lineBoxManager.addItem(ep, true);\n }\n break;\n }\n // 放不下删除\n else {\n if(item instanceof TextBox) {\n let text = item.parent;\n let i = text.textBoxes.indexOf(item);\n if(i > -1) {\n text.textBoxes.splice(i, 1);\n }\n }\n else {\n item.__layoutNone();\n }\n list.pop();\n total += isUpright ? item.outerHeight : item.outerWidth;\n }\n }\n}\n\nclass Dom extends Xom {\n constructor(tagName, props, children) {\n super(tagName, props);\n let { style } = this;\n if(!style.display || !{\n flex: true,\n block: true,\n inline: true,\n 'inline-block': true,\n inlineBlock: true,\n none: true,\n }.hasOwnProperty(style.display)) {\n if(tag.INLINE.hasOwnProperty(this.tagName)) {\n style.display = 'inline';\n }\n else {\n style.display = 'block';\n }\n }\n if(!style[FONT_WEIGHT] && tag.BOLD.hasOwnProperty(tagName)) {\n style.fontWeight = 700;\n }\n this.__style = css.normalize(style, reset.DOM_ENTRY_SET);\n // currentStyle/currentProps不深度clone,继承一层即可,动画时也是extend这样只改一层引用不动原始静态style\n this.__currentStyle = extend([], this.__style);\n this.__children = builder.buildChildren(this, children);\n this.__flexLine = []; // flex布局多行模式时存储行\n this.__ellipsis = null; // 虚拟节点,有的话渲染\n this.__zIndexChildren = null;\n }\n\n __structure(lv, j) {\n let res = super.__structure(lv, j);\n let arr = [res];\n let zIndexChildren = this.__zIndexChildren = this.__zIndexChildren || genZIndexChildren(this);\n zIndexChildren.forEach((child, i) => {\n let temp = child.__structure(lv + 1, i);\n if(Array.isArray(temp)) {\n arr = arr.concat(temp);\n }\n else {\n arr.push(temp);\n }\n });\n let total = arr.length - 1;\n res.num = zIndexChildren.length;\n res.total = total;\n return arr;\n }\n\n __modifyStruct() {\n let struct = this.__struct;\n let total = struct.total || 0;\n let root = this.__root, __structs = root.__structs;\n // 新生成了struct,引用也变了\n let nss = this.__structure(struct.lv, struct.childIndex);\n let i = __structs.indexOf(struct);\n root.__structs.splice(i, total + 1, ...nss);\n let d = 0;\n if(this !== root) {\n struct = this.__struct;\n d = (struct.total || 0) - total;\n if(d) {\n let p = this.__domParent;\n while(p) {\n p.__struct.total = p.__struct.total || 0;\n p.__struct.total += d;\n p = p.__domParent;\n }\n }\n }\n }\n\n __insertStruct(child, childIndex) {\n let struct = this.__struct;\n let cs = child.__structure(struct.lv + 1, childIndex);\n let root = this.__root, structs = root.__structs;\n // 根据是否有prev确定插入索引位置\n let zIndexChildren = this.__zIndexChildren;\n let i;\n if(childIndex) {\n let ps = zIndexChildren[childIndex - 1].__struct;\n let total = ps.total || 0;\n i = structs.indexOf(ps) + total + 1;\n }\n else {\n i = structs.indexOf(struct) + 1;\n }\n let total;\n if(Array.isArray(cs)) {\n structs.splice(i, 0, ...cs);\n total = (cs[0].total || 0) + 1;\n }\n else {\n structs.splice(i, 0, cs);\n total = (cs.total || 0) + 1;\n }\n // 调整后面children的childIndex,+1\n i++;\n for(let len = zIndexChildren.length; i < len; i++) {\n zIndexChildren[i].__struct.childIndex++;\n }\n // 向上添加parent的total数量\n struct.num++;\n struct.total += total;\n let p = this.__domParent;\n while(p) {\n struct = p.__struct;\n struct.total = struct.total || 0;\n struct.total += total;\n p = p.__domParent;\n }\n }\n\n __deleteStruct(child, childIndex) {\n let cs = child.__struct;\n let total = (cs.total || 0) + 1;\n let root = this.__root, structs = root.__structs;\n let i = structs.indexOf(cs);\n structs.splice(i, total);\n // zIndexChildren后面的childIndex偏移\n let zIndexChildren = this.__zIndexChildren;\n for(let i = childIndex + 1, len = zIndexChildren.length; i < len; i++) {\n zIndexChildren[i].__struct.childIndex--;\n }\n // 向上减少parent的total数量\n let struct = this.__struct;\n struct.num--;\n struct.total = struct.total || 0;\n struct.total -= total;\n let p = this.__domParent;\n while(p) {\n struct = p.__struct;\n struct.total = struct.total || 0;\n struct.total -= total;\n p = p.__domParent;\n }\n }\n\n /**\n * 因为zIndex/abs/add的变化造成的更新,只需重排这一段顺序即可\n */\n __updateStruct() {\n let structs = this.__root.__structs;\n let struct = this.__struct;\n let total = struct.total || 0;\n let index = structs.indexOf(struct);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n let length = zIndexChildren.length;\n if(length === 1) {\n return;\n }\n let needSort;\n zIndexChildren.forEach((child, i) => {\n let cs = child.__struct;\n cs.childIndex = i; // 仅后面排序用\n });\n // 按之前的structs划分为相同数量的若干段进行排序\n let source = [], arr = [], count = 0;\n for(let i = index + 1; i <= index + total; i++) {\n let cs = structs[i];\n let o = {\n cs,\n list: structs.slice(i, i + (cs.total || 0) + 1),\n };\n if(cs.childIndex !== count++) {\n needSort = true;\n }\n source.push(o);\n i += cs.total || 0;\n }\n\n if(needSort) {\n let list = [];\n source.sort(function(a, b) {\n return a.cs.childIndex - b.cs.childIndex;\n });\n source.forEach(item => {\n list = list.concat(item.list);\n });\n structs.splice(index + 1, total, ...list);\n }\n }\n\n /**\n * 给定父宽度情况下,尝试行内放下后的剩余宽度,为负数即放不下,这里只会出现行内级即inline(Block)\n * 调用前提是非行开头的inline尝试计算是否放得下,开头无需且禁止判断,防止出现永远放不下一个字符卡死\n * 返回非负数就是放得下,这样一些尺寸为0的也算\n * @param free 剩余宽度\n * @param total 容器尺寸\n * @param isUpright 垂直排版\n * @returns {number|*}\n * @private\n */\n __tryLayInline(free, total, isUpright) {\n this.__computeReflow();\n let { flowChildren, currentStyle: {\n [DISPLAY]: display,\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n } } = this;\n // inline没w/h,并且尝试孩子第一个能放下即可,如果是文字就是第一个字符\n if(display === 'inline') {\n if(flowChildren.length) {\n let first = flowChildren[0];\n if(first instanceof Component) {\n first = first.shadowRoot;\n }\n if(first instanceof Xom) {\n free = first.__tryLayInline(free, total, isUpright);\n }\n else {\n free -= first.firstCharWidth;\n }\n }\n }\n // inlineBlock尝试所有孩子在一行上\n else {\n if(width.u !== AUTO) {\n free -= isUpright ? this.__calSize(height, total, true) : this.__calSize(width, total, true);\n }\n else {\n for(let i = 0; i < flowChildren.length; i++) {\n // 当放不下时直接返回,无需继续多余的尝试计算\n if(free < 0) {\n return free;\n }\n let item = flowChildren[i];\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Xom) {\n free = item.__tryLayInline(free, total, isUpright);\n }\n // text强制一行,否则非头就是放不下,需从头开始\n else {\n free -= item.textWidth;\n }\n }\n }\n // ib要减去末尾mpb\n if(isUpright) {\n free -= this.__calSize(marginBottom, total, true);\n free -= this.__calSize(paddingBottom, total, true);\n free -= borderBottomWidth;\n }\n else {\n free -= this.__calSize(marginRight, total, true);\n free -= this.__calSize(paddingRight, total, true);\n free -= borderRightWidth;\n }\n }\n // 还要减去开头的mpb\n if(isUpright) {\n free -= this.__calSize(marginTop, total, true);\n free -= this.__calSize(paddingTop, total, true);\n free -= borderTopWidth;\n }\n else {\n free -= this.__calSize(marginLeft, total, true);\n free -= this.__calSize(paddingLeft, total, true);\n free -= borderLeftWidth;\n }\n return free;\n }\n\n // 设置y偏移值,递归包括children,此举在justify-content/margin-auto/relative等对齐用\n __offsetX(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetX(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetX(diff, isLayout);\n }\n // 记得偏移LineBox\n if(isLayout && !this.__isInline && this.lineBoxManager) {\n this.lineBoxManager.__offsetX(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetX(diff, isLayout, lv);\n }\n });\n }\n\n __offsetY(diff, isLayout, lv) {\n if(this.__computedStyle[DISPLAY] === 'none') {\n return;\n }\n super.__offsetY(diff, isLayout, lv);\n let ep = this.__ellipsis;\n if(ep) {\n ep.__offsetY(diff, isLayout);\n }\n if(isLayout && !this.__isInline && this.lineBoxManager) {\n this.lineBoxManager.__offsetY(diff);\n }\n this.flowChildren.forEach(item => {\n if(item) {\n item.__offsetY(diff, isLayout, lv);\n }\n });\n }\n\n\n /**\n * flex布局时,计算basis尺寸,如果有固定声明则以其为标准,content为内容最大尺寸,auto依赖w/h或降级content\n * basis要考虑相加直接item的mpb,非绝对值单位以container为基准,basis为内容时为max值\n * item的孩子为孙子节点需递归,不参与basis计算,只参与min/max,尺寸和mpb均只考虑绝对值\n * 自动计算时影响尺寸的只有换行的text,以及一组inline,均按其中最大尺寸的一个计算\n * auto自动计算递归进行,如果是普通row方向,按最大text的charWidth为准\n * 如果是column方向,则虚拟布局后看text的height\n * 在abs下时进入特殊状态,无论是row/column,都会按row方向尝试最大尺寸,直到舞台边缘或容器声明的w折行\n * 返回b,声明则按css值,否则是auto/content\n * 返回min为最小宽度,遇到字符/inline则单列排版后需要的最大宽度\n * 返回max为最大宽度,理想情况一排最大值,在abs时virtualMode状态参与计算,文本抵达边界才进行换行\n * 当为column方向时,特殊进行虚拟布局isVirtual,需要获取高度\n * @param isDirectionRow\n * @param isAbs\n * @param isColumn\n * @param data\n * @param isDirectChild\n * @private\n */\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { flowChildren, __currentStyle: currentStyle, __computedStyle: computedStyle } = this;\n let { x, y, w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_DIRECTION]: flexDirection,\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let {\n [LINE_HEIGHT]: lineHeight,\n [DISPLAY]: display,\n [LINE_CLAMP]: lineClamp,\n [WRITING_MODE]: writingMode,\n } = computedStyle;\n let isUpright = writingMode.indexOf('vertical') === 0;\n let main = isDirectionRow ? width : height;\n // basis3种情况:auto、固定、content\n let isAuto = flexBasis.u === AUTO;\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n let isContent = !isAuto && !isFixed;\n let fixedSize;\n // flex的item固定basis计算\n if(isFixed) {\n b = fixedSize = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n // 已声明主轴尺寸的,当basis是auto时为main值\n else if(isAuto && ([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = fixedSize = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // 非固定尺寸的basis为auto时降级为content\n else if(isAuto) {\n isContent = true;\n }\n let countMin = 0, countMax = 0;\n lineClamp = lineClamp || 0;\n // row的flex时,child只需计算宽度的basis/min/max,递归下去也是如此,即便包含递归的flex\n if(isDirectionRow) {\n // flex的item还是flex时\n if(display === 'flex') {\n let isR = ['column', 'columnReverse'].indexOf(flexDirection) === -1;\n flowChildren = genOrderChildren(flowChildren);\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, min2, max2] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h }, false);\n if(isR) {\n min += min2;\n max += max2;\n }\n else {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n }\n }\n // text除了flex还需要分辨垂直排版\n else {\n if(isUpright) {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n isUpright,\n });\n min += item.width;\n max += item.width;\n }\n if(isR) {\n min += item.charWidth;\n max += item.textWidth;\n }\n else {\n min = Math.max(min, item.charWidth);\n max = Math.max(max, item.textWidth);\n }\n }\n });\n }\n // 特殊的flex水平布局但书写垂直,遇到后直接假布局获取宽度,因为水平尺寸视为无限但垂直不是,\n // 这里一定是第一个垂直排版不会递归下去,因为flex的child匿名block,水平的垂直书写inline匿名ib\n else if(isUpright) {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n this.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n isUpright,\n }, isAbs, false, true);\n min = max = b = this.width;\n }\n // flex的item是block/inline时,inline也会变成block统一对待,递归下去会有inline出现,但row的水平size为无穷不会换行可以忽略\n else {\n let lineBoxManager = data.lineBoxManager;\n if(display !== 'inline') {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n }\n flowChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let [, min2, max2] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h, lineBoxManager }, false);\n let display = item.computedStyle[DISPLAY];\n // row看块级最大尺寸和连续行级最大尺寸的宽\n if(display === 'block' || display === 'flex') {\n min = Math.max(min, min2);\n max = Math.max(max, max2);\n countMin = countMax = 0;\n }\n else {\n countMin += min2;\n countMax += max2;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n }\n else {\n countMin += item.charWidth;\n countMax += item.textWidth;\n min = Math.max(min, countMin);\n max = Math.max(max, countMax);\n }\n });\n }\n if(fixedSize) {\n max = Math.max(fixedSize, max);\n }\n // row降级为内容时basis等同于max\n if(isContent) {\n b = max;\n }\n }\n // column的flex时,每个child做一次虚拟布局,获取到每个child的高度和宽度\n else {\n this.__layoutFlow({\n x,\n y,\n w,\n h,\n isUpright,\n }, isAbs, true, false);\n min = max = b = this.height; // column的child,max和b总相等\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n // flow的layout包裹方法,布局后递归计算computedStyle,abs节点在__layoutAbs中做\n __layout(data, isAbs, isColumn, isRow) {\n super.__layout(data, isAbs, isColumn, isRow);\n this.__layoutStyle();\n }\n\n // 布局结束后递归向下计算computedStyle,父级必须先算因为有inherit\n __layoutStyle() {\n super.__layoutStyle();\n this.flowChildren.forEach(child => {\n if(!(child instanceof Text)) {\n child.__layoutStyle();\n }\n });\n }\n\n __layoutNone() {\n super.__layoutNone();\n let { children } = this;\n children.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n item.__layoutNone();\n }\n });\n }\n\n /**\n * block布局,本身固定尺寸优先,否则看内容从上往下从左往右flow流排布\n * 内部inline和inlineBlock组成LineBox,通过LineBoxManager来管理混排的现象\n * LineBoxManager只有block和inlineBlock内部生成,inline会复用最近父级的\n * 内部的block在垂直方向要考虑margin合并的问题,强制所有节点为bfc,精简逻辑\n * @param data\n * @param isAbs abs无尺寸时提前虚拟布局计算尺寸\n * @param isColumn flex列无尺寸时提前虚拟布局计算尺寸\n * @param isRow flex行布局时出现writingMode垂直排版计算尺寸\n */\n __layoutBlock(data, isAbs, isColumn, isRow) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [OVERFLOW]: overflow,\n } = computedStyle;\n let { fixedWidth, fixedHeight, x, y, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n // abs虚拟布局需预知width,固定可提前返回\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return;\n }\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return;\n }\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n // 虚线管理一个block内部的LineBox列表,使得inline的元素可以中途衔接处理折行\n // 内部维护inline结束的各种坐标来达到目的,遇到block时中断并处理换行坐标\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n // 因精度问题,统计宽度均从0开始累加每行,最后取最大值,仅在abs布局时isVirtual生效\n let maxSize = 0;\n let countSize = 0;\n let lx = x; // 行首,考虑了mbp\n let ly = y;\n // 连续block(flex相同,下面都是)的上下margin合并值记录,合并时从列表中取\n let mergeMarginEndList = [], mergeMarginStartList = [];\n let length = flowChildren.length;\n let ignoreNextLine; // lineClamp超过后,后面的均忽略并置none,注意block内部行数统计是跨子block的\n let ignoreNextWrap; // whiteSpace单行超过后,后面的均忽略并置none,注意这也是跨block的会被隔断重计\n flowChildren.forEach((item, i) => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n if(isXom) {\n item.__computeReflow(); // writing-mode可能会造成inline改变为ib\n }\n let isInline = isXom && item.computedStyle[DISPLAY] === 'inline';\n let isInlineBlock = isXom && item.computedStyle[DISPLAY] === 'inlineBlock';\n let isRealInline = isInline && item.__isRealInline();\n let lastLineClampCount = lineClampCount;\n // 每次循环开始前,这次不是block的话,看之前遗留待合并margin,并重置\n if((!isXom || isInline || isInlineBlock)) {\n if(mergeMarginEndList.length && mergeMarginStartList.length) {\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n if(isUpright) {\n x += diff;\n }\n else {\n y += diff;\n }\n }\n }\n mergeMarginStartList = [];\n mergeMarginEndList = [];\n }\n if(isXom) {\n // inline和inlineBlock的细节不同之处,ib除了w/h之外,更想像block一样占据一行\n // 比如2个inline前面占一半后面比一半多但还是会从一半开始然后第2行换行继续,但ib放不下则重开一行\n // inline和ib能互相嵌套,形成的LineBox中则是TextBox和节点混合\n if(isInlineBlock || isInline) {\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n // x开头或者nowrap单行的非block,不用考虑是否放得下直接放\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager, // ib内部新生成会内部判断,这里不管统一传入\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // inlineBlock的特殊之处,一旦w为auto且内部产生折行时,整个变成block独占一块区域,坐标计算和block一样,注意nowrap排除\n if(item.__isIbFull) {\n lineClampCount++;\n }\n if((isUpright && item.__isUprightIbFull || !isUpright && item.__isIbFull)\n && whiteSpace !== 'nowrap') {\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n // 单行时inline在ellipsis会导致行数变化,否则判断坐标尺寸(恰好有点空剩余inline排不下),注意前提是非abs,其虚拟计算尺寸无视限制\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // abs统计宽度,注意nowrap时累加\n if(isAbs) {\n if(whiteSpace === 'nowrap') {\n countSize += isUpright ? item.outerHeight : item.outerWidth;\n }\n else {\n countSize = isUpright ? item.outerHeight : item.outerWidth;\n if(lineClampCount > lastLineClampCount) {\n countSize = Math.max(countSize, isUpright ? h : w);\n }\n }\n maxSize = Math.max(maxSize, countSize);\n }\n }\n else {\n // 非开头先尝试是否放得下,内部判断了inline/ib,ib要考虑是否有width\n let free = item.__tryLayInline(isUpright ? (h + ly - y) : (w + lx - x), isUpright ? h : w, isUpright);\n // 放得下继续,奇怪的精度问题,加上阈值\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n // ib和非换行inline累加\n if(isInlineBlock || lineClampCount === lastLineClampCount) {\n countSize += isUpright ? item.outerHeight : item.outerWidth;\n maxSize = Math.max(maxSize, countSize);\n }\n // inline换行时一定超过边界至少撑满w\n else {\n maxSize = Math.max(maxSize, isUpright ? h : w);\n countSize = isUpright ? (y - ly) : (x - lx);\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n // 放不下处理之前的lineBox,并考虑重新开头或截断\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 超过行数,整个block共用计数器\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(this, lineBoxManager, lineBox, isUpright ? h : w, 0, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineBoxManager.addItem(item, false);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n lineClampCount++;\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n maxSize = Math.max(maxSize, countSize);\n // 此处发生换行撑满\n maxSize = Math.max(maxSize, isUpright ? h : w);\n // 新行重计\n countSize = isUpright ? item.outerHeight : item.outerWidth;\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n }\n // block/flex先处理之前可能遗留的最后一行LineBox,然后递归时不传lineBoxManager,其内部生成新的\n else {\n ignoreNextWrap = false; // block出现的话只隔断单行,不影响多行计数器\n // 非开头,说明之前的text/ib未换行,需要增加行数\n if((isUpright && y > ly) || (!isUpright && x > lx)) {\n lineClampCount++;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isUpright) {\n y = ly;\n }\n else {\n x = lx;\n }\n if(lineBoxManager.isEnd) {\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNotEnd();\n lineBoxManager.setNewLine();\n }\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 自身无内容\n let isNone = item.currentStyle[DISPLAY] === 'none';\n let isEmptyBlock;\n if(!isNone && item.flowChildren && item.flowChildren.length === 0) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [WIDTH]: width,\n [HEIGHT]: height,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = item.computedStyle;\n // 无内容高度为0的空block特殊情况,记录2个margin下来等后续循环判断处理\n if(isUpright && paddingLeft <= 0 && paddingRight <= 0 && width <= 0 && borderLeftWidth <= 0 && borderRightWidth <= 0) {\n mergeMarginEndList.push(marginRight);\n mergeMarginStartList.push(marginLeft);\n isEmptyBlock = true;\n }\n else if(!isUpright && paddingTop <= 0 && paddingBottom <= 0 && height <= 0 && borderTopWidth <= 0 && borderBottomWidth <= 0) {\n mergeMarginEndList.push(marginBottom);\n mergeMarginStartList.push(marginTop);\n isEmptyBlock = true;\n }\n }\n if(isUpright) {\n x += item.outerWidth;\n lineBoxManager.__lastX = x;\n }\n else {\n y += item.outerHeight;\n lineBoxManager.__lastY = y;\n }\n // absolute/flex前置虚拟计算\n if(isAbs) {\n maxSize = Math.max(maxSize, isUpright ? item.outerHeight : item.outerWidth);\n countSize = 0;\n }\n // 空block要留下轮循环看,除非是最后一个,此处非空本轮处理掉看是否要合并\n if(!isNone && !isEmptyBlock) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n } = item.computedStyle;\n // 有bottom值说明之前有紧邻的block,任意个甚至空block,自己有个top所以无需判断top\n // 如果是只有紧邻的2个非空block,也被包含在情况内,取上下各1合并\n if(mergeMarginEndList.length) {\n if(isUpright) {\n mergeMarginStartList.push(marginLeft);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n item.__offsetX(diff, true, null);\n x += diff;\n }\n }\n else {\n mergeMarginStartList.push(marginTop);\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n item.__offsetY(diff, true, null);\n y += diff;\n }\n }\n }\n // 同时自己保存bottom,为后续block准备\n mergeMarginStartList = [];\n mergeMarginEndList = [isUpright ? marginRight : marginBottom];\n }\n // 最后一个空block当是正正和负负时要处理,正负在outHeight处理了结果是0\n else if(i === length - 1) {\n let diff = reflow.getMergeMargin(mergeMarginStartList, mergeMarginEndList).diff;\n if(diff) {\n if(isUpright) {\n x += diff;\n }\n else {\n y += diff;\n }\n }\n }\n }\n }\n // 文字和inline类似\n else {\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n // x开头,不用考虑是否放得下直接放\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // 和inline很像,只是没有ib\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // abs统计宽度,注意nowrap时累加\n if(isAbs) {\n if(whiteSpace === 'nowrap') {\n countSize += isUpright ? item.height : item.width;\n }\n else {\n countSize = isUpright ? item.height : item.width;\n if(lineClampCount > lastLineClampCount) {\n countSize = Math.max(countSize, isUpright ? h : w);\n }\n }\n maxSize = Math.max(maxSize, countSize);\n }\n }\n else {\n // 非开头先尝试是否放得下\n let free = item.__tryLayInline(isUpright ? (h + ly - y) : (w + lx - x));\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n if(lineClampCount === lastLineClampCount) {\n countSize += isUpright ? item.height : item.width;\n maxSize = Math.max(maxSize, countSize);\n }\n // inline换行一定超过边界\n else {\n maxSize = Math.max(maxSize, isUpright ? h : w);\n countSize = isUpright ? (y - ly) : (x - lx);\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 和inline/ib一样\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(this, lineBoxManager, lineBox, isUpright ? h : w, 0, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n if(isAbs) {\n maxSize = Math.max(maxSize, countSize);\n // 此处发生换行撑满\n maxSize = Math.max(maxSize, isUpright ? h : w);\n // 新行重计\n countSize = isUpright ? item.height : item.width;\n maxSize = Math.max(maxSize, countSize);\n }\n }\n }\n }\n });\n // 结束后如果是以LineBox结尾,则需要设置y到这里,否则流布局中block会设置\n // 当以block换行时,新行是true,否则是false即结尾\n if(lineBoxManager.isEnd) {\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n }\n let tw = 0, th = 0;\n // 根据书写模式、嵌套等条件计算宽高,只有父子同向才会主轴撑满\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n else if(isAbs) {\n tw = isUpright ? (x - data.x) : maxSize;\n }\n else {\n tw = x - data.x;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n else if(isAbs) {\n th = isUpright ? maxSize : (y - data.y);\n }\n else {\n th = y - data.y;\n }\n this.__ioSize(tw, th);\n // 除了水平abs的虚拟外,都需要垂直对齐,因为img这种占位元素会影响lineBox高度,水平abs虚拟只需宽度\n if(!isAbs) {\n let spread = lineBoxManager.verticalAlign(isUpright);\n if(spread) {\n if(isUpright && !fixedWidth) {\n this.__resizeX(spread, null);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread, null);\n }\n /**\n * parent以及parent的next无需处理,因为深度遍历后面还会进行,\n * 但自己的block需处理,因为对齐只处理了inline元素,忽略了block,\n * 同时由于block和inline区域可能不连续,每个增加的y不一样,\n * 需要按照每个不同区域来判断,区域是按索引次序依次增大的,\n * 只有在inline出现过后才开始生效,inline之前的block忽略\n */\n let count = 0, spreadList = lineBoxManager.spreadList;\n let isLastBlock = false, hasStart = false;\n flowChildren.forEach(item => {\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n let isBlock = isXom && ['block', 'flex'].indexOf(item.computedStyle[DISPLAY]) > -1;\n if(isBlock) {\n if(!hasStart) {\n return;\n }\n isLastBlock = true;\n if(isUpright) {\n item.__offsetX(spreadList[count], true, null);\n }\n else {\n item.__offsetY(spreadList[count], true, null);\n }\n }\n else {\n hasStart = true;\n if(isLastBlock) {\n count++;\n }\n isLastBlock = false;\n }\n });\n }\n // 非abs提前的虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐\n if(!isColumn && !isRow) {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(isUpright ? th : tw, textAlign, isUpright);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n // 所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(isUpright ? th : tw, textAlign, isUpright);\n });\n this.__marginAuto(currentStyle, data, isUpright);\n }\n }\n }\n\n // 弹性布局时的计算位置\n __layoutFlex(data, isAbs, isColumn, isRow) {\n let { flowChildren, currentStyle, computedStyle, __flexLine } = this;\n let {\n [FLEX_DIRECTION]: flexDirection,\n [JUSTIFY_CONTENT]: justifyContent,\n [ALIGN_ITEMS]: alignItems,\n [LINE_CLAMP]: lineClamp,\n [FLEX_WRAP]: flexWrap,\n [ALIGN_CONTENT]: alignContent,\n [LINE_HEIGHT]: lineHeight,\n [TEXT_ALIGN]: textAlign,\n } = computedStyle;\n let { fixedWidth, fixedHeight, x, y, w, h, isParentVertical, isUpright } = this.__preLayout(data, false);\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return;\n }\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return;\n }\n // 每次布局情况多行内容\n __flexLine.splice(0);\n // 只有>=1的正整数才有效\n lineClamp = lineClamp || 0;\n let lineClampCount = 0;\n let isDirectionRow = ['column', 'columnReverse'].indexOf(flexDirection) === -1;\n // 计算伸缩基数\n let growList = [];\n let shrinkList = [];\n let basisList = [];\n let maxList = [];\n let minList = [];\n let orderChildren = genOrderChildren(flowChildren);\n orderChildren.forEach(item => {\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n let { currentStyle, computedStyle } = item;\n let [b, min, max] = item.__calBasis(isDirectionRow, isAbs, isColumn, { x, y, w, h }, true);\n let { [FLEX_GROW]: flexGrow, [FLEX_SHRINK]: flexShrink } = currentStyle;\n computedStyle[FLEX_BASIS] = b;\n growList.push(flexGrow);\n shrinkList.push(flexShrink);\n // 根据basis不同,计算方式不同\n basisList.push(b);\n maxList.push(max);\n minList.push(min);\n }\n // 文本\n else {\n growList.push(0);\n shrinkList.push(1);\n // 水平flex垂直文字和垂直flex水平文字都先假布局一次取结果,其它取文本最大最小宽度即可\n if(isDirectionRow && isUpright || !isDirectionRow && !isUpright) {\n let lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n item.__layoutFlow({\n x,\n y,\n w,\n h,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n let n = isUpright ? item.width: item.height;\n basisList.push(n);\n maxList.push(n);\n minList.push(n);\n }\n // 水平flex水平文本和垂直flex垂直文本\n else {\n let cw = item.charWidth;\n let tw = item.textWidth;\n basisList.push(tw);\n maxList.push(tw);\n minList.push(cw);\n }\n }\n });\n let containerSize = isDirectionRow ? w : h;\n let isMultiLine = ['wrap', 'wrapReverse'].indexOf(flexWrap) > -1;\n /**\n * 判断是否需要分行,根据假设主尺寸来统计尺寸和计算,假设主尺寸是clamp(min_main_size, flex_base_size, max_main_size)\n * 当多行时,由于每行一定有最小限制,所以每行一般情况都不是shrink状态,\n * 但也有极端情况,比如一行只能放下1个元素时,且此元素比容器小,会是shrink\n */\n let line = [], sum = 0, hypotheticalList = [];\n basisList.forEach((item, i) => {\n let min = minList[i], max = maxList[i];\n let hypothetical;\n if(item < min) {\n hypothetical = min;\n }\n else if(item > max) {\n hypothetical = max;\n }\n else {\n hypothetical = item;\n }\n hypotheticalList.push(hypothetical);\n if(isMultiLine) {\n // 超过尺寸时,要防止sum为0即1个也会超过尺寸\n if(sum + hypothetical > containerSize) {\n if(sum) {\n __flexLine.push(line);\n line = [orderChildren[i]];\n sum = hypothetical;\n }\n else {\n line.push(orderChildren[i]);\n __flexLine.push(line);\n line = [];\n sum = 0;\n }\n }\n else {\n line.push(orderChildren[i]);\n sum += hypothetical;\n }\n }\n else {\n line.push(orderChildren[i]);\n }\n });\n if(line.length) {\n __flexLine.push(line);\n }\n let offset = 0, clone = { x, y, w, h };\n let maxCrossList = [], marginAutoCountList = [], freeList = [];\n __flexLine.forEach(item => {\n let length = item.length;\n let end = offset + length;\n let [x1, y1, maxCross, marginAutoCount, free] = this.__layoutFlexLine(clone, isDirectionRow, isAbs, isColumn, isRow, isUpright,\n containerSize, fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems,\n orderChildren.slice(offset, end), item, textAlign,\n growList.slice(offset, end), shrinkList.slice(offset, end), basisList.slice(offset, end),\n hypotheticalList.slice(offset, end), minList.slice(offset, end), maxList.slice(offset, end));\n // 下一行/列更新坐标\n if(isDirectionRow) {\n clone.y = y1;\n }\n else {\n clone.x = x1;\n }\n x = Math.max(x, x1);\n y = Math.max(y, y1);\n maxCrossList.push(maxCross);\n marginAutoCountList.push(marginAutoCount);\n freeList.push(free);\n offset += length;\n });\n // abs预布局只计算宽度无需对齐\n if(isAbs) {\n let max = 0;\n __flexLine.forEach(line => {\n let count = 0;\n line.forEach(item => {\n if(isDirectionRow) {\n count += isUpright ? item.outerHeight : item.outerWidth;\n }\n else {\n count = Math.max(count, isUpright ? item.outerHeight : item.outerWidth);\n }\n // 文字发生换行无论row/column一定放不下需占满容器尺寸\n if(item instanceof Text) {\n if(isUpright) {\n if(item.textWidth > h) {\n max = Math.max(max, h);\n }\n }\n else {\n if(item.textWidth > w) {\n max = Math.max(max, w);\n }\n }\n }\n });\n max = Math.max(max, count);\n });\n if(isUpright) {\n this.__ioSize(undefined, max);\n }\n else {\n this.__ioSize(max, undefined);\n }\n return;\n }\n // 同block计算\n let tw = 0, th = 0;\n if(fixedWidth || !isAbs && !isParentVertical && !isUpright) {\n tw = w;\n }\n else {\n tw = x - data.x;\n }\n if(fixedHeight || !isAbs && isParentVertical && isUpright) {\n th = h;\n }\n else {\n th = y - data.y;\n }\n this.__ioSize(tw, th);\n if(isColumn || isRow) {\n return;\n }\n // flexDirection当有reverse时交换每line的主轴序\n if(flexDirection === 'rowReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = tw - item.outerWidth - (item.x - data.x) * 2;\n if(diff) {\n item.__offsetX(diff, true, null);\n }\n });\n });\n }\n else if(flexDirection === 'columnReverse') {\n __flexLine.forEach(line => {\n line.forEach(item => {\n // 一个矩形内的子矩形进行镜像移动,用外w减去内w再减去开头空白的2倍即可\n let diff = th - item.outerHeight - (item.y - data.y) * 2;\n if(diff) {\n item.__offsetY(diff, true, null);\n }\n });\n });\n }\n // wrap-reverse且多轴线时交换轴线序,需要2行及以上才行\n let length = __flexLine.length;\n if(flexWrap === 'wrapReverse' && length > 1) {\n let crossSum = 0, crossSumList = [];\n maxCrossList.forEach(item => {\n crossSumList.push(crossSum);\n crossSum += item;\n });\n let count = 0;\n for(let i = length - 1; i >= 0; i--) {\n let line = __flexLine[i];\n let source = crossSumList[i];\n let diff = count - source;\n if(diff) {\n line.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true, null);\n }\n else {\n item.__offsetX(diff, true, null);\n }\n });\n }\n count += maxCrossList[i];\n }\n __flexLine.reverse();\n }\n // 侧轴对齐分flexLine做,要考虑整体的alignContent的stretch和每行的alignItems的stretch\n // 先做整体的,得出交叉轴空白再均分给每一行做单行的,整体的只有1行忽略\n let per;\n if(length > 1 && (fixedHeight && isDirectionRow || !isDirectionRow)) {\n let diff = isDirectionRow ? th - (y - data.y) : tw - (x - data.x);\n // 有空余时才进行对齐\n if(diff > 0) {\n if(alignContent === 'center') {\n let per = diff * 0.5;\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per, true, null);\n }\n else {\n item.__offsetX(per, true, null);\n }\n });\n }\n else if(alignContent === 'flexStart') {}\n else if(alignContent === 'flexEnd') {\n orderChildren.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(diff, true, null);\n }\n else {\n item.__offsetX(diff, true, null);\n }\n });\n }\n else if(alignContent === 'spaceBetween') {\n let between = diff / (length - 1);\n // 除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(between, true, null);\n }\n else {\n item.__offsetX(between, true, null);\n }\n });\n }\n });\n }\n else if(alignContent === 'spaceAround') {\n let around = diff / (length + 1);\n __flexLine.forEach((item, i) => {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(around * (i + 1), true, null);\n }\n else {\n item.__offsetX(around * (i + 1), true, null);\n }\n });\n });\n }\n // 默认stretch,每个flexLine进行扩充\n else {\n per = diff / length;\n // 因为每行都cross扩充了per,所有除了第1行其它进行偏移\n __flexLine.forEach((item, i) => {\n if(i) {\n item.forEach(item => {\n if(isDirectionRow) {\n item.__offsetY(per * i, true, null);\n }\n else {\n item.__offsetX(per * i, true, null);\n }\n });\n }\n });\n }\n }\n }\n // 每行再进行main/cross对齐,在alignContent为stretch时计算每行的高度\n if(!isColumn && !isRow) {\n if(length > 1) {\n __flexLine.forEach((item, i) => {\n let maxCross = maxCrossList[i];\n if(per) {\n maxCross += per;\n }\n this.__flexAlign(item, alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCountList[i], freeList[i]);\n });\n }\n else if(length) {\n let maxCross = isDirectionRow ? th : tw;\n this.__flexAlign(__flexLine[0], alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCountList[0], freeList[0]);\n }\n this.__marginAuto(currentStyle, data, isUpright);\n }\n }\n\n /**\n * 计算获取子元素的b/min/max完毕后,尝试进行flex每行布局\n * https://www.w3.org/TR/css-flexbox-1/#layout-algorithm\n * 假想主尺寸,其为clamp(min_main_size, flex_base_size, max_main_size)\n * 随后按算法一步步来 https://zhuanlan.zhihu.com/p/354567655\n * 规范没提到mpb,item的要计算,孙子的只考虑绝对值\n * 先收集basis和假设主尺寸\n */\n __layoutFlexLine(data, isDirectionRow, isAbs, isColumn, isRow, isUpright,\n containerSize, fixedWidth, fixedHeight, lineClamp, lineClampCount,\n lineHeight, computedStyle, justifyContent, alignItems,\n orderChildren, flexLine, textAlign,\n growList, shrinkList, basisList, hypotheticalList, minList, maxList) {\n let { x, y, w, h } = data;\n let hypotheticalSum = 0;\n hypotheticalList.forEach(item => {\n hypotheticalSum += item;\n });\n // 根据假设尺寸确定使用grow还是shrink,冻结非弹性项并设置target尺寸,确定剩余未冻结数量\n let isOverflow = hypotheticalSum >= containerSize;\n let targetMainList = [];\n basisList.forEach((item, i) => {\n if(isOverflow) {\n if(!shrinkList[i] || (basisList[i] < hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n else {\n if(!growList[i] || (basisList[i] > hypotheticalList[i])) {\n targetMainList[i] = hypotheticalList[i];\n }\n }\n });\n // 初始可用空间,冻结使用确定的target尺寸,未冻结使用假想\n let free = 0;\n basisList.forEach((item, i) => {\n if(targetMainList[i] !== undefined) {\n free += targetMainList[i];\n }\n else {\n free += item;\n }\n });\n let total = Infinity;\n if(isDirectionRow) {\n total = w;\n }\n else if(fixedHeight) {\n total = h;\n }\n else {\n total = free;\n }\n free = Math.abs(total - free); // 压缩也使用正值\n let lessOne = 0;\n // 循环,文档算法不够简练,其合并了grow和shrink,实际拆开写更简单\n let factorSum = 0;\n if(isOverflow) {\n // 计算真正的因子占比,同时得出缩小尺寸数值\n // 还需判断每个item收缩不能 {\n if(targetMainList[i] === undefined) { // 冻结项的目标主尺寸有值,因子无值或为0\n factorSum += item;\n return item;\n }\n });\n while(true) {\n // 都冻结了\n if(factorSum === 0) {\n break;\n }\n if(factorSum < 1) {\n lessOne += free * (1 - factorSum);\n free *= factorSum;\n }\n let needReset, factorSum2 = 0, count1 = 0, count2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要收缩的尺寸\n let n = basisList[i] - s; // 实际尺寸\n // 比min还小设置为min,同时设0冻结剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n count1 += basisList[i] - minList[i]; // 超出的尺寸也要减去实际收缩的尺寸,最终从free里减去\n }\n // else if(n > maxList[i]) {\n // targetMainList[i] = maxList[i];\n // factorList[i] = 0;\n // needReset = true;\n // count1 += maxList[i];\n // }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n count2 += n;\n }\n }\n });\n if(!needReset) {\n free -= count2;\n break;\n }\n free -= count1;\n factorSum = factorSum2;\n }\n }\n else {\n let factorList = growList.map((item, i) => {\n if(targetMainList[i] === undefined) {\n factorSum += item;\n return item;\n }\n });\n while(true) {\n if(factorSum === 0) {\n break;\n }\n if(factorSum < 1) {\n lessOne += free * (1 - factorSum);\n free *= factorSum;\n }\n let needReset, factorSum2 = 0, count1 = 0, count2 = 0;\n factorList.forEach((item, i) => {\n if(item) {\n let r = item / factorSum;\n let s = r * free; // 需要扩展的尺寸\n let n = basisList[i] + s; // 实际尺寸\n // 比min还小设置为min,同时设0剔除\n if(n < minList[i]) {\n targetMainList[i] = minList[i];\n factorList[i] = 0;\n needReset = true;\n count1 += basisList[i] - minList[i];\n }\n // else if(n > maxList[i]) {\n // targetMainList[i] = maxList[i];\n // factorList[i] = 0;\n // needReset = true;\n // count1 += maxList[i];\n // }\n // 先按照没有超限的设置,正常情况直接跳出,如果有超限,记录sum2给下轮赋值重新计算\n else {\n targetMainList[i] = n;\n factorSum2 += item;\n count2 += n;\n }\n }\n });\n if(!needReset) {\n free -= count2;\n break;\n }\n free -= count1;\n factorSum = factorSum2;\n }\n }\n let maxCross = 0;\n let lbmList = [];\n let marginAutoCount = 0;\n orderChildren.forEach((item, i) => {\n let main = targetMainList[i];\n if(item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom) {\n if(isDirectionRow) {\n item.__layoutFlow({\n x,\n y,\n w: main,\n h,\n w3: main, // w3假设固定宽度,忽略原始style中的设置\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n let {\n [ALIGN_SELF]: alignSelf,\n [WIDTH]: width,\n } = item.currentStyle;\n // column的child真布局时,如果是stretch宽度,则可以直接生成animateRecord,否则自适应调整后才进行\n if(!isAbs && !isColumn && !isRow) {\n let needGenAr;\n if(width.u !== AUTO || alignSelf === 'stretch') {\n needGenAr = true;\n }\n else if(alignSelf === 'auto' && alignItems === 'stretch') {\n needGenAr = true;\n }\n if(needGenAr) {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n else {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, true, isColumn, isRow);\n item.__layoutFlow({\n x,\n y,\n w,\n w3: item.outerWidth,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n }\n else {\n item.__layoutFlow({\n x,\n y,\n w,\n h: main,\n h3: main, // 同w2\n isUpright,\n }, isAbs, isColumn, isRow);\n }\n }\n // 记录主轴是否有margin为auto的情况\n if(!isAbs && !isColumn && !isRow) {\n let currentStyle = item.currentStyle;\n if(isDirectionRow) {\n if(currentStyle[MARGIN_LEFT].u === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_RIGHT].u === AUTO) {\n marginAutoCount++;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP].u === AUTO) {\n marginAutoCount++;\n }\n if(currentStyle[MARGIN_BOTTOM].u === AUTO) {\n marginAutoCount++;\n }\n }\n }\n }\n // 文字\n else {\n let lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n lbmList.push(lineBoxManager);\n item.__layoutFlow({\n x,\n y,\n w: isDirectionRow ? main : w,\n h: isDirectionRow ? h : main,\n lineBoxManager,\n lineClamp,\n lineClampCount,\n isUpright,\n });\n }\n if(isDirectionRow) {\n x += item.outerWidth;\n maxCross = Math.max(maxCross, item.outerHeight);\n }\n else {\n y += item.outerHeight;\n maxCross = Math.max(maxCross, item.outerWidth);\n }\n });\n if(isDirectionRow) {\n y += maxCross;\n }\n else {\n x += maxCross;\n }\n // flex的直接text对齐比较特殊\n if(!isAbs && !isColumn && !isRow && ['center', 'right'].indexOf(textAlign) > -1) {\n lbmList.forEach(item => {\n item.horizonAlign(isUpright? item.height : item.width, textAlign, isUpright);\n })\n }\n return [x, y, maxCross, marginAutoCount, isOverflow ? 0 : Math.max(0, free + lessOne)];\n }\n\n // 每个flexLine的主轴侧轴对齐\n __flexAlign(line, alignItems, justifyContent, isDirectionRow, maxCross, marginAutoCount, free) {\n let baseline = 0;\n line.forEach(item => {\n baseline = Math.max(baseline, item.firstBaseline);\n });\n // 先主轴对齐方式,需要考虑margin,如果有auto则优先于justifyContent\n let len = line.length;\n if(marginAutoCount) {\n // 类似于space-between,空白均分于auto,两边都有就是2份,只有1边是1份\n let count = 0, per = free / marginAutoCount;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n let currentStyle = child.currentStyle;\n if(isDirectionRow) {\n if(currentStyle[MARGIN_LEFT].u === AUTO) {\n count += per;\n child.__offsetX(count, true, null);\n }\n else if(count) {\n child.__offsetX(count, true, null);\n }\n if(currentStyle[MARGIN_RIGHT].u === AUTO) {\n count += per;\n }\n }\n else {\n if(currentStyle[MARGIN_TOP].u === AUTO) {\n count += per;\n child.__offsetY(count, true, null);\n }\n else if(count) {\n child.__offsetY(count, true, null);\n }\n if(currentStyle[MARGIN_BOTTOM].u === AUTO) {\n count += per;\n }\n }\n }\n }\n else {\n if(justifyContent === 'flexEnd') {\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(free, true, null) : child.__offsetY(free, true, null);\n }\n }\n else if(justifyContent === 'center') {\n let center = free * 0.5;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(center, true, null) : child.__offsetY(center, true, null);\n }\n }\n else if(justifyContent === 'spaceBetween') {\n let between = free / (len - 1);\n for(let i = 1; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(between * i, true, null) : child.__offsetY(between * i, true, null);\n }\n }\n else if(justifyContent === 'spaceAround') {\n let around = free * 0.5 / len;\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(around * (i * 2 + 1), true, null) : child.__offsetY(around * (i * 2 + 1), true, null);\n }\n }\n else if(justifyContent === 'spaceEvenly') {\n let around = free / (len + 1);\n for(let i = 0; i < len; i++) {\n let child = line[i];\n isDirectionRow ? child.__offsetX(around * (i + 1), true, null) : child.__offsetY(around * (i + 1), true, null);\n }\n }\n }\n // 再侧轴\n line.forEach(item => {\n let { currentStyle: { [ALIGN_SELF]: alignSelf } } = item;\n if(isDirectionRow) {\n if(alignSelf === 'flexStart') {}\n else if(alignSelf === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true, null);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [HEIGHT]: height } } = item;\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height.u === AUTO) {\n let old = item.height;\n let v = item.__height = computedStyle[HEIGHT] = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__y4 += d;\n item.__y5 += d;\n item.__y6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n else if(alignSelf === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff * 0.5, true, null);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerHeight;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetY(diff, true, null);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [DISPLAY]: display,\n [FLEX_DIRECTION]: flexDirection,\n [HEIGHT]: height,\n } } = item;\n // row的孩子还是flex且column且不定高时,如果高度<侧轴拉伸高度则重新布局\n if(isDirectionRow && display === 'flex' && flexDirection === 'column' && height.u === AUTO && item.outerHeight < maxCross) {\n item.__layoutFlow(Object.assign(item.__layoutData, { h3: maxCross }));\n }\n let {\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n } = computedStyle;\n if(height.u === AUTO) {\n let old = item.height;\n let v = maxCross - marginTop - marginBottom - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth;\n let d = v - old;\n item.__y4 += d;\n item.__y5 += d;\n item.__y6 += d;\n item.__height += d;\n item.__clientHeight += d;\n item.__offsetHeight += d;\n item.__outerHeight += d;\n }\n }\n }\n }\n // column\n else {\n if(alignSelf === 'flexStart') {}\n else if(alignSelf === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n else if(alignSelf === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true, null);\n }\n }\n else if(alignSelf === 'stretch') {\n let { computedStyle, currentStyle: { [WIDTH]: width } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width.u === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__x4 += d;\n item.__x5 += d;\n item.__x6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n // 默认auto,取alignItems\n else {\n if(alignItems === 'flexStart') {}\n else if(alignItems === 'center') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff * 0.5, true, null);\n }\n }\n else if(alignItems === 'flexEnd') {\n let diff = maxCross - item.outerWidth;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n else if(alignItems === 'baseline') {\n let diff = baseline - item.firstBaseline;\n if(diff !== 0) {\n item.__offsetX(diff, true, null);\n }\n }\n // 默认stretch\n else {\n let { computedStyle, currentStyle: {\n [WIDTH]: width,\n } } = item;\n let {\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_LEFT]: paddingLeft,\n } = computedStyle;\n if(width.u === AUTO) {\n let old = item.width;\n let v = item.__width = computedStyle[WIDTH] = maxCross - marginLeft - marginRight - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth;\n let d = v - old;\n item.__x4 += d;\n item.__x5 += d;\n item.__x6 += d;\n item.__width += d;\n item.__clientWidth += d;\n item.__offsetWidth += d;\n item.__outerWidth += d;\n }\n }\n }\n }\n });\n }\n\n /**\n * inline比较特殊,先简单顶部对齐,后续还需根据vertical和lineHeight计算y偏移\n * inlineBlock复用逻辑,可以设置w/h,在混排时表现不同,inlineBlock换行限制在规定的矩形内,\n * 且ib会在没设置width且换行的时候撑满上一行,即便内部尺寸没抵达边界\n * 而inline换行则会从父容器start处开始,且首尾可能占用矩形不同\n * 嵌套inline情况十分复杂,尾部mpb空白可能产生叠加情况,因此endSpace表示自身,\n * 然后根据是否在最后一个元素进行叠加父元素的,多层嵌套则多层尾部叠加,均以最后一个元素为依据判断\n * Text获取这个叠加的endSpace值即可,无需感知是否最后一个,外层(此处)进行逻辑封装\n * @param data\n * @param isAbs\n * @param isColumn\n * @param isRow\n * @param isInline\n * @private\n */\n __layoutInline(data, isAbs, isColumn, isRow, isInline) {\n let { flowChildren, currentStyle, computedStyle } = this;\n let {\n [TEXT_ALIGN]: textAlign,\n [WHITE_SPACE]: whiteSpace,\n [LINE_CLAMP]: lineClamp,\n [LINE_HEIGHT]: lineHeight,\n [MARGIN_TOP]: marginTop,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [PADDING_TOP]: paddingTop,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n } = computedStyle;\n let lineClampCount = data.lineClampCount || 0;\n let { fixedWidth, fixedHeight, x, y, w, h, lx, ly,\n lineBoxManager, endSpace, selfEndSpace, isUpright } = this.__preLayout(data, isInline);\n // abs虚拟布局需预知width,固定可提前返回\n if(isAbs && (fixedWidth && !isUpright || fixedHeight && isUpright)) {\n if(isUpright) {\n this.__ioSize(undefined, h);\n }\n else {\n this.__ioSize(w, undefined);\n }\n return lineClampCount;\n }\n let {\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n if(isInline && !this.__isRealInline()) {\n isInline = false;\n }\n // inline-block假布局提前结束\n if(!isInline) {\n if(isColumn && fixedHeight) {\n this.__ioSize(undefined, h);\n return lineClampCount;\n }\n if(isRow && fixedWidth) {\n this.__ioSize(w, undefined);\n return lineClampCount;\n }\n }\n // 只有inline的孩子需要考虑换行后从行首开始,而ib不需要,因此重置行首标识lx为x,末尾空白为0\n // 而inline的LineBoxManager复用最近非inline父dom的,ib需要重新生成,末尾空白叠加\n if(isInline) {\n this.__isInline = true;\n this.__lineBoxManager = lineBoxManager;\n let baseline = isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle);\n // 特殊inline调用,有内容的话(如左右mbp),默认生成一个lineBox,即便是空,也要形成占位,只有开头时需要\n if(isUpright\n && (marginTop || marginBottom || paddingTop || paddingBottom || borderTopWidth || borderBottomWidth)\n || !isUpright\n && (marginLeft || marginRight || paddingLeft || paddingRight || borderLeftWidth || borderRightWidth)) {\n if(lineBoxManager.isNewLine) {\n lineBoxManager.genLineBoxByInlineIfNewLine(x, y, lineHeight, baseline);\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseline);\n }\n }\n else {\n lineBoxManager.setLbByInlineIfNotNewLine(lineHeight, baseline);\n }\n lineClamp = data.lineClamp || 0;\n }\n else {\n lineBoxManager = this.__lineBoxManager = new LineBoxManager(x, y, lineHeight,\n isUpright ? getVerticalBaseline(computedStyle) : getBaseline(computedStyle), isUpright);\n lx = x;\n ly = y;\n endSpace = selfEndSpace = lineClampCount = 0;\n }\n // 存LineBox里的内容列表专用,布局过程中由lineBoxManager存入,递归情况每个inline节点都保存contentBox\n if(isInline) {\n this.contentBoxList.splice(0);\n lineBoxManager.pushContentBoxList(this);\n }\n // ib的bp是自己,inline是最近的非inline\n let bp = this;\n while(bp.computedStyle[DISPLAY] === 'inline') {\n bp = bp.domParent;\n }\n let {\n [OVERFLOW]: overflow,\n } = bp.computedStyle;\n let isIbFull = false, isUprightIbFull = false; // ib时不限定w情况下发生折行则撑满行,即便内容没有撑满边界\n let length = flowChildren.length;\n let ignoreNextLine = false; // lineClamp超过后,后面的均忽略并置none,注意ib内部自己统计类似block\n let ignoreNextWrap = false; // whiteSpace单行超过后,后面的均忽略并置none,注意和block不一样不隔断\n let hasAddEndSpace; // 最后一行生效,只加1次防重复\n flowChildren.forEach((item, i) => {\n // 和block不太一样可以提前判断,因为不可能包含block隔断区域了\n if(ignoreNextLine || ignoreNextWrap) {\n item.__layoutNone();\n return;\n }\n let isXom = item instanceof Xom || item instanceof Component && item.shadowRoot instanceof Xom;\n if(isXom) {\n item.__computeReflow(); // writing-mode可能会造成inline改变为ib\n }\n let isInline2 = isXom && item.computedStyle[DISPLAY] === 'inline';\n let isInlineBlock2 = isXom && item.computedStyle[DISPLAY] === 'inlineBlock';\n let isRealInline = isInline2 && item.__isRealInline();\n // 最后一个元素会产生最后一行,叠加父元素的尾部mpb,注意只执行一次防止重复叠加\n let isEnd = isInline && !hasAddEndSpace\n && (whiteSpace === 'nowrap' || (!isXom && i === length - 1)\n || ((lineClamp && i === length - 1) || lineClampCount === lineClamp - 1));\n if(isEnd) {\n hasAddEndSpace = true;\n endSpace += selfEndSpace;\n }\n let lastLineClampCount = lineClampCount;\n if(isXom) {\n if(!isInline2 && !isInlineBlock2) {\n item.currentStyle[DISPLAY] = item.computedStyle[DISPLAY] = 'inlineBlock';\n isInlineBlock2 = true;\n inject.warn('Inline can not contain block/flex');\n }\n // x开头或者nowrap单行,不用考虑是否放得下直接放,因为有beginSpace所以要多判断i为0\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 同block布局\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineClampCount++;\n }\n if(item.__isIbFull && whiteSpace !== 'nowrap') {\n if(isUpright && h.u === AUTO) {\n isUprightIbFull = true;\n }\n else if(!isUpright && w.u === AUTO) {\n isIbFull = true;\n }\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中,以计算宽度\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n else {\n // 不换行继续排,换行非开头先尝试是否放得下,结尾要考虑mpb因此减去endSpace\n let free = item.__tryLayInline(isUpright ? (h + ly - y - endSpace) : (w + lx - x - endSpace), isUpright ? h : w, isUpright);\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // ib放得下要么内部没有折行,要么声明了width限制,都需手动存入当前lb\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 可能超行了,无需继续,并且进行回溯\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(bp, lineBoxManager, lineBox, w, endSpace, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n // 重新开头的ib和上面开头处一样逻辑\n if(item.__isIbFull || item.__isUprightIbFull) {\n lineBoxManager.addItem(item, true);\n if(isUpright) {\n x += item.outerWidth;\n y = ly;\n }\n else {\n x = lx;\n y += item.outerHeight;\n }\n lineBoxManager.setNotEnd();\n lineClampCount++;\n }\n // inline和不折行的ib,其中ib需要手动存入当前lb中\n else {\n (isInlineBlock2 || !isRealInline) && lineBoxManager.addItem(item, false);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n }\n }\n // inline里的其它只有文本,可能开始紧跟着之前的x,也可能换行后从lx行头开始\n // 紧跟着x可能出现在前面有节点换行后第2行,此时不一定放得下,因此不能作为判断依据,开头仅有lx\n else {\n let n = lineBoxManager.size;\n // i为0时强制不换行\n if((isUpright && y === ly) || (!isUpright && x === lx) || !i || whiteSpace === 'nowrap') {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行,且非定宽\n if(!isInline && (lineBoxManager.size - n) > 1) {\n if(height.u === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width.u === AUTO && !isUpright) {\n isIbFull = true;\n }\n }\n if(!isAbs && overflow === 'hidden' && whiteSpace === 'nowrap'\n && ((isUpright && y - ly > h + (1e-10)) || (!isUpright && x - lx > w + (1e-10))\n || lineClampCount > lastLineClampCount)) {\n ignoreNextWrap = true;\n }\n else if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n else {\n // 非开头先尝试是否放得下,如果放得下再看是否end,加end且只有1个字时放不下要换行,否则可以放,换行由text内部做\n let free = item.__tryLayInline(isUpright ? (h + ly - y - endSpace) : (w + lx - x - endSpace));\n // 放得下继续\n if(free >= (-1e-10)) {\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n // 这里ib放得下一定是要么没换行要么固定宽度,所以无需判断isIbFull\n }\n // 放不下处理之前的lineBox,并重新开头\n else {\n lineClampCount++;\n if(isUpright) {\n x = lineBoxManager.endX;\n y = ly;\n }\n else {\n x = lx;\n y = lineBoxManager.endY;\n }\n lineBoxManager.setNewLine();\n // 可能超行了,无需继续,并且进行回溯\n if(lineClamp && lineClampCount >= lineClamp) {\n item.__layoutNone();\n ignoreNextLine = true;\n let list = lineBoxManager.list;\n let lineBox = list[list.length - 1];\n backtrack(bp, lineBoxManager, lineBox, w, endSpace, isUpright);\n return;\n }\n lineClampCount = item.__layoutFlow({\n x,\n y,\n w,\n h,\n lx,\n ly,\n lineBoxManager,\n endSpace,\n lineClamp,\n lineClampCount,\n isUpright,\n }, isAbs, isColumn, isRow);\n x = lineBoxManager.lastX;\n y = lineBoxManager.lastY;\n // ib情况发生折行\n if(!isInline && (lineBoxManager.size - n) > 1) {\n if(height.u === AUTO && isUpright) {\n isUprightIbFull = true;\n }\n if(width.u === AUTO && !isUpright) {\n isIbFull = true;\n }\n }\n if(lineClamp && lineClampCount >= lineClamp) {\n ignoreNextLine = true;\n }\n }\n }\n }\n });\n // 同block结尾,不过这里一定是lineBox结束,无需判断\n if(isUpright) {\n x = lineBoxManager.endX;\n }\n else {\n y = lineBoxManager.endY;\n }\n // 标识ib情况同block一样占满行\n this.__isIbFull = isIbFull;\n this.__isUprightIbFull = isUprightIbFull;\n // 元素的width在固定情况或者ibFull情况已被计算出来,否则为最大延展尺寸,inline没有固定尺寸概念\n let tw, th;\n if(isInline) {\n // inline最后的x要算上右侧mpb,为next行元素提供x坐标基准,同时其尺寸计算比较特殊\n if(selfEndSpace) {\n if(isUpright) {\n lineBoxManager.addY(selfEndSpace);\n }\n else {\n lineBoxManager.addX(selfEndSpace);\n }\n }\n // 如果没有内容,空白还要加上开头即左侧mpb\n if(!flowChildren.length) {\n let {\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n } = computedStyle;\n if(isUpright) {\n lineBoxManager.addY(marginTop + paddingTop + borderTopWidth);\n }\n else {\n lineBoxManager.addX(marginLeft + paddingLeft + borderLeftWidth);\n }\n }\n // 结束出栈contentBox,递归情况结束子inline获取contentBox,父inline继续\n lineBoxManager.popContentBoxList();\n // abs非固定w时预计算,本来是最近非inline父层统一计算,但在abs时不算,这里无视textAlign默认left\n if(isAbs) {\n this.__inlineSize(0, 'left', isUpright);\n }\n }\n else {\n // ib在满时很特殊,取最大值,可能w本身很小不足排下1个字符,此时要用max\n let max = lineBoxManager.max - (isUpright ? data.y : data.x);\n if(isUpright) {\n tw = fixedWidth ? w : x - data.x;\n th = fixedHeight ? h : (isIbFull ? Math.max(h, max) : max);\n }\n else {\n tw = fixedWidth ? w : (isIbFull ? Math.max(w, max) : max);\n th = fixedHeight ? h : y - data.y;\n }\n this.__ioSize(tw, th);\n }\n // 非abs提前虚拟布局,真实布局情况下最后为所有行内元素进行2个方向上的对齐,inline会被父级调用这里只看ib\n if(!isAbs && !isInline) {\n let spread = lineBoxManager.verticalAlign(isUpright);\n if(spread) {\n if(isUpright && !fixedWidth) {\n this.__resizeX(spread, null);\n }\n else if(!isUpright && !fixedHeight) {\n this.__resizeY(spread, null);\n }\n }\n if(!isColumn && !isRow) {\n if(['center', 'right'].indexOf(textAlign) > -1) {\n lineBoxManager.horizonAlign(isUpright ? th : tw, textAlign, isUpright);\n // 直接text需计算size\n flowChildren.forEach(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n // block的所有inline计算size\n lineBoxManager.domList.forEach(item => {\n item.__inlineSize(isUpright ? th : tw, textAlign, isUpright);\n });\n }\n }\n // inlineBlock新开上下文,但父级block遇到要处理换行\n return lineClampCount;\n }\n\n /**\n * inline的尺寸计算非常特殊,并非一个矩形区域,而是由字体行高结合节点下多个LineBox中的内容决定,\n * 且这个尺寸又并非真实LineBox中的内容直接合并计算而来,比如包含了个更大尺寸的ib却不会计入\n * 具体方法为遍历持有的LineBox下的内容,x取两侧极值,同时首尾要考虑mpb,y值取上下极值,同样首尾考虑mpb\n * 首尾行LineBox可能不是不是占满一行,比如前后都有同行inline的情况,非首尾行则肯定占满\n * 绘制内容(如背景色)的区域也很特殊,每行LineBox根据lineHeight对齐baseline得来,并非LineBox全部\n * 当LineBox只有直属Text时如果font没有lineGap则等价于全部,如有则需减去\n * 另外其client/offset/outer的w/h尺寸计算也很特殊,皆因首尾x方向的mpb导致\n * @private\n */\n __inlineSize(size, textAlign, isUpright) {\n let { contentBoxList, computedStyle } = this;\n let {\n [DISPLAY]: display,\n [MARGIN_TOP]: marginTop,\n [MARGIN_RIGHT]: marginRight,\n [MARGIN_BOTTOM]: marginBottom,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_TOP]: paddingTop,\n [PADDING_RIGHT]: paddingRight,\n [PADDING_BOTTOM]: paddingBottom,\n [PADDING_LEFT]: paddingLeft,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n [BORDER_BOTTOM_WIDTH]: borderBottomWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [LINE_HEIGHT]: lineHeight,\n } = computedStyle;\n // 可能因为Ellipsis回溯变成none\n if(display === 'none') {\n return;\n }\n // x/clientX/offsetX/outerX\n let maxX, maxY, minX, minY, maxCX, maxCY, minCX, minCY, maxFX, maxFY, minFX, minFY, maxOX, maxOY, minOX, minOY;\n let length = contentBoxList.length;\n if(length) {\n // 遍历contentBox,里面存的是LineBox内容,根据父LineBox引用判断是否换行\n contentBoxList.forEach((item, i) => {\n // 非第一个除了minY不用看其它都要,minX是换行导致,而maxX在最后一个要考虑右侧mpb,中间的无需考虑嵌套inline的mpb\n if(i) {\n minX = Math.min(minX, item.x);\n minCX = Math.min(minCX, item.x);\n minFX = Math.min(minFX, item.x);\n minOX = Math.min(minOX, item.x);\n if(i === length - 1) {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n maxY = maxCY = maxFY = maxOY = Math.max(maxY, item.y + item.outerHeight);\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n else {\n maxX = maxCX = maxFX = maxOX = Math.max(maxX, item.x + item.outerWidth);\n }\n }\n // 第一个初始化\n else {\n minX = item.x;\n minY = item.y;\n minCX = minX - paddingLeft;\n minCY = minY - paddingTop;\n minFX = minCX - borderLeftWidth;\n minFY = minCY - borderTopWidth;\n minOX = minFX - marginLeft;\n minOY = minFY - marginTop;\n maxX = maxCX = maxFX = maxOX = item.x + item.outerWidth;\n maxY = maxCY = maxFY = maxOY = item.y + item.outerHeight;\n if(i === length - 1) {\n maxCX += paddingRight;\n maxCY += paddingBottom;\n maxFX += paddingRight + borderRightWidth;\n maxFY += paddingBottom + borderBottomWidth;\n maxOX += borderRightWidth + paddingRight + marginRight\n maxOY += borderBottomWidth + paddingBottom + marginBottom;\n }\n }\n });\n this.__x = minOX;\n this.__y = minOY;\n this.__width = computedStyle[WIDTH] = maxX - minX;\n // 防止比自己最小高度lineHeight还小,比如内容是个小字体\n this.__height = computedStyle[HEIGHT] = Math.max(lineHeight, maxY - minY);\n this.__clientWidth = maxCX - minCX;\n this.__clientHeight = maxCY - minCY;\n this.__offsetWidth = maxFX - minFX;\n this.__offsetHeight = maxFY - minFY;\n this.__outerWidth = maxOX - minOX;\n this.__outerHeight = maxOY - minOY;\n this.__x1 = minFX;\n this.__y1 = minFY;\n this.__x2 = minCX;\n this.__y2 = minCY;\n this.__x3 = minX;\n this.__y3 = minY;\n this.__x4 = maxX;\n this.__y4 = maxY;\n this.__x5 = maxCX;\n this.__y5 = maxCY;\n this.__x6 = maxFX;\n this.__y6 = maxFY;\n // inline的text整体设置相同\n if(['center', 'right'].indexOf(textAlign) > -1) {\n this.children.forEach(item => {\n if(item instanceof Text) {\n item.__inlineSize(isUpright);\n }\n });\n }\n }\n // 如果没有内容,宽度为0高度为lineHeight,对齐也特殊处理,lineBoxManager不会处理\n else {\n let tw = 0, th = 0;\n if(['center', 'right'].indexOf(textAlign) > -1) {\n let diff = size;\n if(textAlign === 'center') {\n diff *= 0.5;\n }\n if(diff > 0) {\n if(isUpright) {\n this.__offsetY(diff, true, null);\n }\n else {\n this.__offsetX(diff, true, null);\n }\n }\n }\n if(isUpright) {\n tw = lineHeight;\n this.__ioSize(tw, 0);\n this.__x -= marginLeft + paddingLeft + borderLeftWidth;\n }\n else {\n th = lineHeight;\n this.__ioSize(0, th);\n this.__y -= marginTop + paddingTop + borderTopWidth;\n }\n this.__x1 = this.__x + marginLeft;\n this.__y1 = this.__y + marginTop;\n this.__x2 = this.__x1 + borderLeftWidth;\n this.__y2 = this.__y1 + borderTopWidth;\n this.__x4 = this.__x3 = this.__x2 + paddingLeft;\n this.__y4 = this.__y3 = this.__y2 + paddingTop;\n this.__x5 = this.__x4 + tw + paddingRight;\n this.__y5 = this.__y4 + th + paddingBottom;\n this.__x6 = this.__x5 + borderRightWidth;\n this.__y6 = this.__y5 + borderBottomWidth;\n this.__clientWidth = this.__x5 - this.__x2;\n this.__clientHeight = this.__y5 - this.__y2;\n this.__offsetWidth = this.__x6 - this.__x1;\n this.__offsetHeight = this.__y6 - this.__y1;\n this.__outerWidth = this.__offsetWidth + marginLeft + marginRight;\n this.__outerHeight = this.__offsetHeight + marginTop + marginBottom;\n }\n }\n\n /**\n * 只针对绝对定位children布局\n * @param container\n * @param data\n * @param target 可选,只针对某个abs的child特定布局,在局部更新时用\n * @private\n */\n __layoutAbs(container, data, target) {\n let { __x: x, __y: y,\n __clientWidth: clientWidth, __clientHeight: clientHeight,\n __computedStyle: computedStyle } = container;\n let { __isDestroyed: isDestroyed, children, absChildren } = this;\n let {\n [DISPLAY]: display,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [MARGIN_TOP]: marginTop,\n [MARGIN_LEFT]: marginLeft,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_TOP]: paddingTop,\n } = computedStyle;\n if(isDestroyed || display === 'none') {\n this.__layoutNone();\n return;\n }\n x += marginLeft + borderLeftWidth;\n y += marginTop + borderTopWidth;\n // 对absolute的元素进行相对容器布局\n absChildren.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n let { currentStyle, computedStyle } = item;\n if(item.isDestroyed || currentStyle[DISPLAY] === 'none') {\n item.__layoutNone();\n return;\n }\n // 先根据容器宽度计算margin/padding,匿名块对象特殊处理,此时没有computedStyle\n item.__computeReflow();\n item.__mp(currentStyle, computedStyle, clientWidth);\n let {\n [LEFT]: left,\n [TOP]: top,\n [RIGHT]: right,\n [BOTTOM]: bottom,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let x2, y2, w2, h2;\n let onlyRight;\n let onlyBottom;\n let fixedTop;\n let fixedRight;\n let fixedBottom;\n let fixedLeft;\n // 判断何种方式的定位,比如左+宽度,左+右之类\n if(left.u !== AUTO) {\n fixedLeft = true;\n computedStyle[LEFT] = this.__calSize(left, clientWidth, true);\n }\n else {\n computedStyle[LEFT] = 'auto';\n }\n if(right.u !== AUTO) {\n fixedRight = true;\n computedStyle[RIGHT] = this.__calSize(right, clientWidth, true);\n }\n else {\n computedStyle[RIGHT] = 'auto';\n }\n if(top.u !== AUTO) {\n fixedTop = true;\n computedStyle[TOP] = this.__calSize(top, clientHeight, true);\n }\n else {\n computedStyle[TOP] = 'auto';\n }\n if(bottom.u !== AUTO) {\n fixedBottom = true;\n computedStyle[BOTTOM] = this.__calSize(bottom, clientHeight, true);\n }\n else {\n computedStyle[BOTTOM] = 'auto';\n }\n // 优先级最高left+right,其次left+width,再次right+width,再次仅申明单个,最次全部auto\n if(fixedLeft && fixedRight) {\n x2 = x + computedStyle[LEFT];\n w2 = clientWidth - computedStyle[RIGHT] - computedStyle[LEFT];\n }\n else if(fixedLeft) {\n x2 = x + computedStyle[LEFT];\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n else if(fixedRight) {\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n else {\n onlyRight = true;\n }\n x2 = x + clientWidth - computedStyle[RIGHT] - (w2 || 0);\n // 右对齐有尺寸时还需减去margin/border/padding的\n x2 -= computedStyle[MARGIN_LEFT];\n x2 -= computedStyle[MARGIN_RIGHT];\n x2 -= computedStyle[PADDING_LEFT];\n x2 -= computedStyle[PADDING_RIGHT];\n x2 -= computedStyle[BORDER_LEFT_WIDTH];\n x2 -= computedStyle[BORDER_RIGHT_WIDTH];\n }\n else {\n x2 = x + paddingLeft;\n if(width.u !== AUTO) {\n w2 = this.__calSize(width, clientWidth, true);\n }\n }\n // top/bottom/height优先级同上\n if(fixedTop && fixedBottom) {\n y2 = y + computedStyle[TOP];\n h2 = clientHeight - computedStyle[TOP] - computedStyle[BOTTOM];\n }\n else if(fixedTop) {\n y2 = y + computedStyle[TOP];\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n else if(fixedBottom) {\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n else {\n onlyBottom = true;\n }\n y2 = y + clientHeight - computedStyle[BOTTOM] - (h2 || 0);\n // 底对齐有尺寸时y值还需减去margin/border/padding的\n y2 -= computedStyle[MARGIN_TOP];\n y2 -= computedStyle[MARGIN_BOTTOM];\n y2 -= computedStyle[PADDING_TOP];\n y2 -= computedStyle[PADDING_BOTTOM];\n y2 -= computedStyle[BORDER_TOP_WIDTH];\n y2 -= computedStyle[BORDER_BOTTOM_WIDTH];\n }\n // 未声明y的找到之前的流布局child,紧随其下\n else {\n y2 = y + paddingTop;\n let prev = item.__prev, mtList = [], mbList = [];\n while(prev) {\n // 以前面的flow的最近的prev末尾为准\n if(prev instanceof Text || (prev instanceof Component && prev.shadowRoot instanceof Text)\n || prev.computedStyle[POSITION] !== 'absolute') {\n // 当prev是空白节点时,还要考虑margin合并的影响\n let cps = prev.computedStyle;\n if(prev.clientHeight <= 0) {\n mtList.push(cps[MARGIN_TOP]);\n mbList.push(cps[MARGIN_BOTTOM]);\n }\n else {\n mbList.push(cps[MARGIN_BOTTOM]);\n let t = reflow.getMergeMargin(mtList, mbList);\n y2 = prev.__y1 + prev.offsetHeight + t.target;\n break;\n }\n }\n prev = prev.__prev;\n }\n if(height.u !== AUTO) {\n h2 = this.__calSize(height, clientHeight, true);\n }\n }\n // onlyRight时做的布局其实是以那个点位为left/top布局然后offset,limit要特殊计算,从本点向左侧为边界\n let widthLimit = onlyRight ? x2 - x : clientWidth + x - x2;\n // onlyBottom相同,正常情况是左上到右下的尺寸限制\n let heightLimit = onlyBottom ? y2 - y : clientHeight + y - y2;\n // 未直接或间接定义尺寸,取特殊孩子宽度的最大值,同时不能超限\n if(w2 === undefined) {\n item.__layoutFlow({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n isUpright: data.isUpright, // 父亲的\n container,\n }, true, false);\n widthLimit = item.outerWidth;\n }\n // 这里用包裹方法标明要递归计算computedStyle\n item.__layoutFlow({\n x: x2,\n y: y2,\n w: widthLimit,\n h: heightLimit,\n w2, // left+right这种等于有宽度,但不能修改style,继续传入到__preLayout中特殊对待\n h2,\n isUpright: data.isUpright,\n container,\n }, false, false);\n if(onlyRight) {\n item.__offsetX(-item.width, true, null);\n }\n if(onlyBottom) {\n item.__offsetY(-item.height, true, null);\n }\n item.__layoutStyle();\n });\n // 递归进行,遇到absolute/relative/component的设置新容器\n children.forEach(item => {\n if(target) {\n // 传入target局部布局更新,这时候如果是Component引发的,当setState时是Cp自身,当layout时是sr\n let node = item;\n if(node instanceof Component) {\n node = item.shadowRoot;\n }\n // 所以得2个都对比\n if(target !== node && target !== item) {\n return;\n }\n }\n if(item instanceof Dom) {\n item.__layoutAbs(isRelativeOrAbsolute(item) ? item : container, data, null);\n }\n else if(item instanceof Component) {\n let sr = item.shadowRoot;\n if(sr instanceof Dom) {\n sr.__layoutAbs(sr, data, null);\n }\n }\n });\n // 根节点自己特殊执行,不在layout统一\n this.__execAr();\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n let ep = this.__ellipsis;\n if(ep) {\n ep.render(renderMode, res.ctx, dx, dy)\n }\n if(renderMode === SVG) {\n this.virtualDom.type = 'dom';\n }\n return res;\n }\n\n __destroy() {\n if(this.isDestroyed) {\n return;\n }\n this.children.forEach(child => {\n // 有可能为空,因为diff过程中相同的cp被移到新的vd中,老的防止destroy设null\n if(child) {\n child.__destroy();\n }\n });\n if(this.__ellipsis) {\n this.__ellipsis.__destroy();\n }\n super.__destroy();\n }\n\n __emitEvent(e, pm, force) {\n if(force) {\n return super.__emitEvent(e, force);\n }\n let { __isDestroyed, __computedStyle: computedStyle, __mask, __cacheTotal } = this;\n if(__isDestroyed || computedStyle[DISPLAY] === 'none' || e.__stopPropagation || __mask) {\n return;\n }\n // 检查perspective嵌套状态,自身有perspective则设置10位,自身有transform的p矩阵则设置01位\n // if(computedStyle[PERSPECTIVE]) {\n // perspectiveNest++;\n // }\n // if(tf.isPerspectiveMatrix(computedStyle[TRANSFORM])) {\n // perspectiveTfNest++;\n // }\n // overflow:hidden时还需要判断是否超出范围外,如果是则无效\n if(computedStyle[OVERFLOW] === 'hidden' && !this.willResponseEvent(e, true)) {\n return;\n }\n // __cacheTotal可提前判断是否在bbox范围内,svg没有bbox防止进入判断\n if(__cacheTotal && __cacheTotal.available && __cacheTotal.bbox) {\n // 不是E的话,因为缓存缘故影响cache的子元素,先左乘可能的父matrix(嵌套cache),再赋值给pm递归传下去\n if(!isE(this.__matrix)) {\n pm = multiply(pm, this.__matrix);\n assignMatrix(this.__matrixEvent, pm);\n }\n else if(this.__perspectiveMatrix) {\n pm = this.__perspectiveMatrix;\n }\n let bbox = __cacheTotal.bbox;\n if(!geom.pointInQuadrilateral(\n e.x, e.y,\n bbox[0], bbox[1],\n bbox[2], bbox[1],\n bbox[2], bbox[3],\n bbox[0], bbox[3], this.__matrixEvent)) {\n return;\n }\n }\n // 递归传下来的pm如果有说明是cache的子元素且需要重新计算matrix\n else if(!mx.isE(pm)) {\n util.assignMatrix(this.__matrixEvent, mx.multiply(pm, this.__matrix));\n }\n // 找到对应的callback\n let { event: { type } } = e;\n let { listener, zIndexChildren } = this;\n let cb;\n if(listener.hasOwnProperty(type)) {\n cb = listener[type];\n }\n // child触发则parent一定触发\n for(let i = zIndexChildren.length - 1; i >=0; i--) {\n let child = zIndexChildren[i];\n if(child instanceof Xom\n || child instanceof Component && child.shadowRoot instanceof Xom) {\n if(child.__emitEvent(e, pm, false)) {\n // 孩子阻止冒泡\n if(e.__stopPropagation) {\n return;\n }\n if(Array.isArray(cb) && !e.__stopImmediatePropagation) {\n cb.forEach(item => {\n if(isFunction(item)) {\n item.call(this, e);\n }\n });\n }\n else if(isFunction(cb) && !e.__stopImmediatePropagation) {\n cb.call(this, e);\n }\n return true;\n }\n }\n }\n // child不触发再看自己\n return super.__emitEvent(e, false);\n }\n\n appendChild(child, cb) {\n let { __root: root, __host: host, __children: children } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n // 只设兄弟/parent,children在relation做,离屏则等真实添加时机\n let len = children.length;\n if(len) {\n let last = children[len - 1];\n last.__next = child;\n child.__prev = last;\n }\n child.__parent = this;\n children.push(child);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, host, this, child, {});\n this.__insertStruct(child, zIndexChildren.indexOf(child));\n // 可能为component,不能用__currentStyle\n if(child.currentStyle[DISPLAY] === 'none' || this.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在reflow过程中设置struct,text视为父变更\n if(child instanceof Text) {\n child = this;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n prependChild(child, cb) {\n let { __root: root, __host: host, __children: children } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n // 只设兄弟/parent,children在relation做,离屏则等真实添加时机\n let len = children.length;\n if(len) {\n let first = children[0];\n first.__prev = child;\n child.__next = first;\n }\n child.__parent = this;\n children.unshift(child);\n let zIndexChildren = this.__zIndexChildren = genZIndexChildren(this);\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, host, this, child, {});\n this.__insertStruct(child, zIndexChildren.indexOf(child));\n // 可能为component,不能用__currentStyle\n if(child.currentStyle[DISPLAY] === 'none' || this.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 可见在reflow过程中设置struct\n if(child instanceof Text) {\n child = this;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n insertBefore(child, cb) {\n let { __root: root } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n let parent = this.isShadowRoot ? this.__hostRoot.__parent: this.__parent;\n let i;\n // 即便没被添加到dom中,也有可能有父节点,除非是离屏根节点,注意组件\n if(parent) {\n let children = parent.__children;\n let target = this.isShadowRoot ? this.__hostRoot : this;\n i = children.indexOf(target);\n if(i === -1) {\n throw new Error('Index exception of insertBefore()');\n }\n let prev = target.__prev;\n if(prev) {\n prev.__next = child;\n child.__prev = prev;\n }\n child.__next = target;\n target.__prev = child;\n children.splice(i, 0, child);\n parent.__zIndexChildren = genZIndexChildren(parent);\n }\n else {\n throw new Error('InsertBefore() illegal');\n }\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, parent.__host, parent, child, {});\n parent.__insertStruct(child, parent.__zIndexChildren.indexOf(child));\n if(child.currentStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(child instanceof Text) {\n child = parent;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n insertAfter(child, cb) {\n let { __root: root } = this;\n if(!(child instanceof Node || child instanceof Component)) {\n child = new Text(child);\n }\n child.remove();\n let parent = this.isShadowRoot ? this.__hostRoot.__parent: this.__parent;\n let i;\n // 即便没被添加到dom中,也有可能有父节点,除非是离屏根节点,注意组件\n if(parent) {\n let children = parent.__children;\n let target = this.isShadowRoot ? this.__hostRoot : this;\n i = children.indexOf(target);\n if(i === -1) {\n throw new Error('Index exception of insertBefore()');\n }\n target.__next = child;\n child.__prev = target;\n children.splice(i + 1, 0, child);\n parent.__zIndexChildren = genZIndexChildren(parent);\n }\n else {\n throw new Error('InsertAfter() illegal');\n }\n // 离屏情况,不刷新\n if(this.__isDestroyed) {\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n // 在dom中则整体设置关系和struct,不可见提前跳出\n builder.relation(root, parent.__host, parent, child, {});\n parent.__insertStruct(child, parent.__zIndexChildren.indexOf(child));\n if(child.currentStyle[DISPLAY] === 'none' || parent.__computedStyle[DISPLAY] === 'none') {\n child.__layoutNone();\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n if(child instanceof Text) {\n child = parent;\n }\n root.__addUpdate(child, null, REFLOW, true, null, null, cb);\n }\n\n removeChild(target, cb) {\n if((target.__parent === this || target.__domParent === this)\n && (target instanceof Node || target instanceof Component)) {\n target.remove(cb);\n }\n else {\n inject.error('Invalid parameter of removeChild()');\n }\n }\n\n get children() {\n return this.__children;\n }\n\n get flowChildren() {\n return this.__children.filter(item => {\n if(item instanceof Component) {\n item = item.shadowRoot;\n }\n return item instanceof Text || item.__currentStyle[POSITION] !== 'absolute';\n });\n }\n\n get absChildren() {\n return this.__children.filter(item => {\n if(item instanceof Component) {\n item = item.__shadowRoot;\n }\n return item instanceof Xom && item.__currentStyle[POSITION] === 'absolute';\n });\n }\n\n get zIndexChildren() {\n return this.__zIndexChildren;\n }\n\n get lineBoxManager() {\n return this.__lineBoxManager;\n }\n\n get baseline() {\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n [WRITING_MODE]: writingMode,\n } = this.computedStyle;\n if(!this.lineBoxManager || !this.lineBoxManager.size\n || writingMode.indexOf('vertical') === 0) {\n return this.offsetHeight;\n }\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.baseline;\n }\n\n get firstBaseline() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return this.offsetHeight;\n }\n let {\n [MARGIN_TOP]: marginTop,\n [BORDER_TOP_WIDTH]: borderTopWidth,\n [PADDING_TOP]: paddingTop,\n } = this.computedStyle;\n return marginTop + borderTopWidth + paddingTop + this.lineBoxManager.firstBaseline;\n }\n\n get verticalBaseline() {\n if(!this.lineBoxManager || !this.lineBoxManager.size) {\n return 0;\n }\n let {\n [MARGIN_LEFT]: marginLeft,\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [PADDING_LEFT]: paddingLeft,\n [WRITING_MODE]: writingMode,\n } = this.computedStyle;\n if(!this.lineBoxManager || !this.lineBoxManager.size\n || writingMode.indexOf('vertical') === -1) {\n return 0;\n }\n return marginLeft + borderLeftWidth + paddingLeft + this.lineBoxManager.verticalBaseline;\n }\n}\n\nexport default Dom;\n","/**\n * canvas和texture合图的基类,和Page类配合,抽象出基础尺寸偏差等信息\n * 派生2个子类\n */\n\nlet uuid = 0;\n\nclass Cache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n this.__uuid = uuid++;\n this.__renderMode = renderMode;\n this.__ctx = ctx;\n this.__rootId = rootId;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n this.__pos = pos;\n let { x, y } = page.getCoords(pos);\n this.__x = x;\n this.__y = y;\n let size = page.__size;\n this.__tx1 = x / size;\n this.__ty1 = (size - y - h) / size;\n this.__tx2 = (x + w) / size;\n this.__ty2 = (size - y) / size;\n this.__enabled = true;\n this.__available = false;\n this.__appendData(x1, y1);\n }\n\n __appendData(x1, y1) {\n this.x1 = x1; // 去除margin的左上角原点坐标\n this.y1 = y1;\n let bbox = this.__bbox;\n this.dx = this.__x - bbox[0]; // cache坐标和box原点的差值\n this.dy = this.__y - bbox[1];\n this.dbx = x1 - bbox[0]; // 原始sx1/sy1和box原点的差值\n this.dby = y1 - bbox[1];\n this.update();\n }\n\n update() {\n this.__page.__update = true;\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n this.update();\n return true;\n }\n }\n\n // svg打标用会覆盖此方法\n release() {\n if(this.__enabled) {\n this.clear();\n this.__page.del(this.__pos);\n this.__page = null;\n this.__enabled = false;\n return true;\n }\n }\n\n reset(bbox, x1, y1, klass) {\n // 尺寸没变复用之前的并清空\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let res = klass.getInstance(this.__renderMode, this.__ctx, this.__rootId, Math.max(w, h), null);\n if(!res) {\n return;\n }\n let { page, pos } = res;\n this.__init(w, h, bbox, page, pos, x1, y1);\n }\n\n __offsetY(diff) {\n this.y1 += diff;\n let bbox = this.__bbox;\n bbox[1] += diff;\n bbox[3] += diff;\n this.dy -= diff;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n // 是否功能可用,生成离屏canvas及尺寸超限\n get enabled() {\n return this.__enabled;\n }\n\n // 是否有可用缓存内容\n get available() {\n return this.__enabled && this.__available;\n }\n\n get bbox() {\n return this.__bbox;\n }\n\n get page() {\n return this.__page;\n }\n\n get x() {\n return this.__x;\n }\n\n get y() {\n return this.__y;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get pos() {\n return this.__pos;\n }\n\n get size() {\n return this.__page.__size;\n }\n\n get texture() {\n return this.__page.texture;\n }\n\n get updated() {\n return this.__page.__update;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, x1, y1, cacheKlass, pageKlass, excludePage) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n let res = pageKlass.getInstance(renderMode, ctx, rootId, n, excludePage);\n if(!res) {\n return;\n }\n let { page, pos } = res;\n return new cacheKlass(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n}\n\nexport default Cache;\n","/**\n * 默认的动态合图配置,保守低端机8个纹理单元和最大2048px尺寸,一般chrome是16个和16384px\n * webgl初始化会调用获取参数动态进行更改,16px是最小划分基本单位1,后续成2倍增长\n * 并不需要非常紧凑合理,因为特定需求如骨骼动画,合图都是前置做好的,这里应对临时的Dom位图\n * 应该尽可能避免纹理单元切换,因此设计固定的正方形尺寸,以2的幂次方增长,从16px开始到MAX\n * 每个texture从左到右按小到大排列,一列都为相同尺寸的正方形格子,用数组存储表示状态\n * 内容0为空白,1为单位1大小占用,2为2个单位1,如此成2倍增长,可能会形成这种状态:\n * 1 0 2 2 4 4 4 4 ...\n * 其中开头0位置是个单位1的正方形,1位置为空,2、3位置为一个2个单位的正方形,4、5、6、7是4个单位\n * 一张纹理存储时可以按照自己的bbox尺寸计算出正方形大小n,然后循环搜索,每次递增n,不必++遍历\n * 如此可满足不同尺寸分布在一张texture上的需求,碎片情况也较少,避免频繁纹理切换,清空置0\n * canvas模式时固定2048,是个保守值,当webgl第一次初始化,会改变这些值\n */\nconst UNIT = 16;\nlet MAX = 2048;\nlet NUMBER = 128;\nconst HASH = {};\n\nlet uuid = 0;\nlet init = false;\n\nclass Page {\n constructor(renderMode, ctx, size, number) {\n this.__size = size;\n this.__number = number;\n this.__width = this.__height = size;\n // 标识n*n个单元格是否空闲可用,一维数组表示\n let grid = [];\n for(let i = 0, len = number * number; i < len; i++) {\n grid.push(0);\n }\n this.__grid = new Int32Array(grid);\n this.__uuid = uuid++;\n // webgl贴图缓存更新使用,canvas/img等发生变更需刷新重新生成texture,fbo的texture不需要\n this.__update = false;\n this.time = 0;\n }\n\n add(unitSize, pos) {\n let { number, grid } = this;\n for(let i = pos; i < pos + unitSize; i++) {\n grid[i] = unitSize;\n for(let j = 1; j < unitSize; j++) {\n grid[i + j * number] = unitSize;\n }\n }\n }\n\n del(pos) {\n let { number, grid } = this;\n let u = grid[pos];\n if(u) {\n grid[pos] = 0;\n for(let i = pos; i < pos + u; i++) {\n grid[i] = 0;\n for(let j = 1; j < u; j++) {\n grid[i + j * number] = 0;\n }\n }\n }\n }\n\n getCoords(pos) {\n let { number } = this;\n let x = (pos % number) * UNIT;\n let y = Math.floor(pos / number) * UNIT;\n return { x, y };\n }\n\n getFreePos(unitSize) {\n let { number, grid } = this;\n outer:\n for(let i = 0; i < number; i++) {\n let u = grid[i];\n if(u) {\n if(u === unitSize) {\n // 找到同尺寸的列位置,向下查找空白区域确定行位置\n for(let j = unitSize; j < number; j += unitSize) {\n let n = i + j * number;\n if(!grid[n]) {\n return n;\n }\n }\n }\n else {\n i += u - 1;\n }\n }\n else if(i + unitSize <= number) {\n // 空白列检查尺寸是否符合\n for(let j = i + 1, len = i + unitSize; j < len; j++) {\n if(grid[j]) {\n i = j - 1;\n continue outer;\n }\n }\n return i;\n }\n }\n return -1;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get size() {\n return this.__size;\n }\n\n get width() {\n return this.__width;\n }\n\n get height() {\n return this.__height;\n }\n\n get number() {\n return this.__number;\n }\n\n get grid() {\n return this.__grid;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(renderMode, ctx, rootId, size, klass, excludePage) {\n if(size > MAX) {\n return;\n }\n // 换算为每单位16px占多少单位\n let unitSize = 1;\n while((UNIT * unitSize) < size) {\n unitSize <<= 1;\n }\n let m = MAX, n = NUMBER;\n // 只有超过一定尺寸时用8192最大尺寸,大部分情况4096足够,且8192会轻微卡顿一下\n if(size <= 2048 && MAX === 8192) {\n m = 4096;\n n = Math.ceil(m / UNIT);\n }\n let key = rootId + ',' + renderMode;\n // 每个root复用自己的合图,webgl中为了隔离不同实例\n let list = HASH[key] = HASH[key] || [];\n let page, pos;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(excludePage && item === excludePage || item.__size !== m) {\n continue;\n }\n if((pos = item.getFreePos(unitSize)) > -1) {\n page = item;\n break;\n }\n }\n if(!page) {\n page = new klass(renderMode, ctx, m, n);\n pos = 0;\n list.push(page);\n }\n page.add(unitSize, pos);\n return { page, pos };\n }\n\n static get UNIT() {\n return UNIT;\n }\n\n static get MAX() {\n return MAX;\n }\n\n static set MAX(MAX_TEXTURE_SIZE) {\n // 确保MAX_TEXTURE_SIZE是2的幂级数,如果不是向下取整\n let n = 2;\n while(n < MAX_TEXTURE_SIZE) {\n n = n << 1;\n if(n >= MAX_TEXTURE_SIZE) {\n if(n > MAX_TEXTURE_SIZE) {\n n = n << 1;\n }\n break;\n }\n }\n MAX = n;\n NUMBER = Math.ceil(MAX / UNIT);\n }\n\n static get NUMBER() {\n return NUMBER;\n }\n\n static genUuid() {\n return uuid++;\n }\n\n static init(MAX_TEXTURE_SIZE) {\n if(init) {\n return;\n }\n init = true;\n if(MAX_TEXTURE_SIZE !== MAX) {\n // 超过限制会明显卡一下\n Page.MAX = Math.min(MAX_TEXTURE_SIZE, 8192);\n }\n }\n}\n\nexport default Page;\n","import mx from '../math/matrix';\n\nconst { calRectPoint, calPoint } = mx;\n\n/**\n * 初始化 shader\n * @param gl GL context\n * @param vshader vertex shader (string)\n * @param fshader fragment shader (string)\n * @return program, if the program object was created and successfully made current\n */\nfunction initShaders(gl, vshader, fshader) {\n let program = createProgram(gl, vshader, fshader);\n if(!program) {\n throw new Error('Failed to create program');\n }\n\n // 要开启透明度,用以绘制透明的图形\n gl.enable(gl.BLEND);\n // gl.enable(gl.DEPTH_TEST);\n // gl.enable(gl.POLYGON_OFFSET_FILL);\n gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n return program;\n}\n\n/**\n * Create the linked program object\n * @param gl GL context\n * @param vshader a vertex shader program (string)\n * @param fshader a fragment shader program (string)\n * @return created program object, or null if the creation has failed\n */\nfunction createProgram(gl, vshader, fshader) {\n // Create shader object\n let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader);\n let fragmentShader = loadShader(gl, gl.FRAGMENT_SHADER, fshader);\n if(!vertexShader || !fragmentShader) {\n return null;\n }\n\n // Create a program object\n let program = gl.createProgram();\n if(!program) {\n return null;\n }\n program.vertexShader = vertexShader;\n program.fragmentShader = fragmentShader;\n\n // Attach the shader objects\n gl.attachShader(program, vertexShader);\n gl.attachShader(program, fragmentShader);\n\n // Link the program object\n gl.linkProgram(program);\n\n // Check the result of linking\n let linked = gl.getProgramParameter(program, gl.LINK_STATUS);\n if(!linked) {\n let error = gl.getProgramInfoLog(program);\n gl.deleteProgram(program);\n gl.deleteShader(fragmentShader);\n gl.deleteShader(vertexShader);\n throw new Error('Failed to link program: ' + error);\n }\n return program;\n}\n\n/**\n * Create a shader object\n * @param gl GL context\n * @param type the type of the shader object to be created\n * @param source shader program (string)\n * @return created shader object, or null if the creation has failed.\n */\nexport function loadShader(gl, type, source) {\n // Create shader object\n let shader = gl.createShader(type);\n if(shader == null) {\n throw new Error('unable to create shader');\n }\n\n // Set the shader program\n gl.shaderSource(shader, source);\n\n // Compile the shader\n gl.compileShader(shader);\n\n // Check the result of compilation\n let compiled = gl.getShaderParameter(shader, gl.COMPILE_STATUS);\n if(!compiled) {\n let error = gl.getShaderInfoLog(shader);\n gl.deleteShader(shader);\n throw new Error('Failed to compile shader: ' + error);\n }\n\n return shader;\n}\n\nfunction convertCoords2Gl(x, y, z, w, cx, cy, tz) {\n if(w && w !== 1) {\n x /= w;\n y /= w;\n z /= w;\n }\n if(x === cx) {\n x = 0;\n }\n else {\n x = (x - cx) / cx;\n }\n if(y === cy) {\n y = 0;\n }\n else {\n y = (cy - y) / cy;\n }\n if(tz) {\n z /= -tz;\n }\n if(w === 1) {\n return { x, y, z, w };\n }\n return { x: x * w, y: y * w, z: z * w, w };\n}\n\nfunction createTexture(gl, tex, n, width, height) {\n let texture = gl.createTexture();\n bindTexture(gl, texture, n);\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, 1);\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);\n // 传入高宽时是绑定fbo,且tex一定为null\n if(width && height) {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n }\n // 普通将canvas对象作为纹理\n else {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, tex);\n }\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n return texture;\n}\n\nfunction bindTexture(gl, texture, n) {\n gl.activeTexture(gl['TEXTURE' + n]);\n gl.bindTexture(gl.TEXTURE_2D, texture);\n}\n\nlet lastVtPoint, lastVtTex, lastVtOpacity;\n/**\n * texCache集满纹理上传占用最多可用纹理单元后,进行批量顺序绘制\n * 将所有dom的矩形顶点(经过transform变换后的)、贴图坐标、透明度存入3个buffer中,\n * 然后相同纹理单元的形成一批,设置uniform的纹理单元号进行绘制,如此循环\n */\nfunction drawTextureCache(gl, list, cx, cy, dx, dy) {\n let length = list.length;\n if(!length) {\n return;\n }\n let vtPoint, vtTex, vtOpacity;\n if(lastVtPoint && lastVtPoint.length === length * 24) {\n vtPoint = lastVtPoint;\n }\n else {\n vtPoint = lastVtPoint = new Float32Array(length * 24);\n }\n if(lastVtTex && lastVtTex.length === length * 12) {\n vtTex = lastVtTex;\n }\n else {\n vtTex = lastVtTex = new Float32Array(length * 12);\n }\n if(lastVtOpacity && lastVtOpacity.length === length * 6) {\n vtOpacity = lastVtOpacity;\n }\n else {\n vtOpacity = lastVtOpacity = new Float32Array(length * 6);\n }\n for(let i = 0; i < length; i++) {\n let { cache, opacity, matrix } = list[i];\n let { __width: width, __height: height,\n __tx1: tx1, __ty1: ty1, __tx2: tx2, __ty2: ty2,\n __page: page, __bbox: bbox } = cache;\n if(!i) {\n // canvas需要生成texture,texture则强制不会进来\n if(page.__update) {\n page.genTexture(gl);\n }\n bindTexture(gl, page.texture, 0);\n }\n // 计算顶点坐标和纹理坐标,转换[0,1]对应关系\n let bx = bbox[0], by = bbox[1];\n let xa = bx + dx, ya = by + height + dy;\n let xb = bx + width + dx, yb = by + dy;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 } = calRectPoint(xa, ya, xb, yb, matrix);\n // console.warn(x1,y1,z1,w1,',',x2,y2,z2,w2,',',x3,y3,z3,w3,',',x4,y4,z4,w4);\n // z范围取所有、对角线最大值,只有当非0有值时才求\n let z = Math.max(Math.abs(z1), Math.abs(z2));\n z = Math.max(z, Math.abs(z3));\n z = Math.max(z, Math.abs(z4));\n if(z) {\n z = Math.max(z, Math.sqrt(cx * cx + cy * cy));\n }\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, z);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, z);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, z);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, z);\n x4 = t.x; y4 = t.y; z4 = t.z;\n // console.log(x1,y1,z1,w1,',',x2,y2,z2,w2,',',x3,y3,z3,w3,',',x4,y4,z4,w4);\n let j = i * 24;\n vtPoint[j] = x1;\n vtPoint[j + 1] = y1;\n vtPoint[j + 2] = z1;\n vtPoint[j + 3] = w1;\n vtPoint[j + 4] = x4;\n vtPoint[j + 5] = y4;\n vtPoint[j + 6] = z4;\n vtPoint[j + 7] = w4;\n vtPoint[j + 8] = x2;\n vtPoint[j + 9] = y2;\n vtPoint[j + 10] = z2;\n vtPoint[j + 11] = w2;\n vtPoint[j + 12] = x4;\n vtPoint[j + 13] = y4;\n vtPoint[j + 14] = z4;\n vtPoint[j + 15] = w4;\n vtPoint[j + 16] = x2;\n vtPoint[j + 17] = y2;\n vtPoint[j + 18] = z2;\n vtPoint[j + 19] = w2;\n vtPoint[j + 20] = x3;\n vtPoint[j + 21] = y3;\n vtPoint[j + 22] = z3;\n vtPoint[j + 23] = w3;\n j = i * 12;\n vtTex[j] = tx1;\n vtTex[j + 1] = ty1;\n vtTex[j + 2] = tx1;\n vtTex[j + 3] = ty2;\n vtTex[j + 4] = tx2;\n vtTex[j + 5] = ty1;\n vtTex[j + 6] = tx1;\n vtTex[j + 7] = ty2;\n vtTex[j + 8] = tx2;\n vtTex[j + 9] = ty1;\n vtTex[j + 10] = tx2;\n vtTex[j + 11] = ty2;\n j = i * 6;\n vtOpacity[j] = opacity;\n vtOpacity[j + 1] = opacity;\n vtOpacity[j + 2] = opacity;\n vtOpacity[j + 3] = opacity;\n vtOpacity[j + 4] = opacity;\n vtOpacity[j + 5] = opacity;\n }\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtPoint, gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtTex, gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, vtOpacity, gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, length * 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核扩大3倍性能慢\n * x/y方向分开执行,加速性能,计算次数由d*d变为d+d,d为卷积核大小\n * spread由d和sigma计算得出,d由sigma计算得出,sigma即css的blur()参数\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * i和j为filter和total的纹理单元,3次执行(x/y合起来算1次)需互换单元,来回执行源和结果\n * 由total变为filter时cache会各方向上扩展spread的大小到width/height\n */\nfunction drawBlur(gl, program, tex1, width, height) {\n gl.useProgram(program);\n gl.viewport(0, 0, width, height);\n /**\n * 注意max和ratio的设置,当是100尺寸的正方形时,传给direction的始终为1\n * 当正方形<100时,direction相应地要扩大相对于100的倍数,反之则缩小,如此为了取相邻点坐标时是+-1\n * 当非正方形时,长轴一端为基准值不变,短的要二次扩大比例倍数\n * tex1和tex2来回3次,最后是到tex1\n */\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n let u_direction = gl.getUniformLocation(program, 'u_direction');\n let recycle = []; // 3次过程中新生成的中间纹理需要回收\n let max = 100 / Math.max(width, height);\n let ratio = width / height;\n for(let n = 0; n < 3; n++) {\n // tex1到tex2\n let tex2 = createTexture(gl, null, 1, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex2, 0);\n bindTexture(gl, tex1, 0);\n if(width >= height) {\n gl.uniform2f(u_direction, max, 0);\n }\n else {\n gl.uniform2f(u_direction, max * ratio, 0);\n }\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // tex2到tex1\n let tex3 = createTexture(gl, null, 0, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex3, 0);\n bindTexture(gl, tex2, 1);\n if(width >= height) {\n gl.uniform2f(u_direction, 0, max * ratio);\n }\n else {\n gl.uniform2f(u_direction, 0, max);\n }\n gl.uniform1i(u_texture, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n recycle.push(tex1);\n recycle.push(tex2);\n tex1 = tex3;\n }\n // 0/1单元都解绑\n bindTexture(gl, null, 0);\n bindTexture(gl, null, 1);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n recycle.forEach(item => gl.deleteTexture(item));\n return tex1;\n}\n\nfunction drawCm(gl, program, target, source, m, center, size) {\n gl.useProgram(program);\n bindTexture(gl, source.__page.texture, 0);\n gl.viewport(0, 0, size, size);\n let { x: tx1, y: ty1, width: w1, height: h1 } = target;\n let { x: tx2, y: ty2, width: w2, height: h2 } = source;\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = tx2 / size, ya = (size - ty2) / size, xb = (tx2 + w2) / size, yb = (size - ty2 - h2) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n // matrix\n let u_m = gl.getUniformLocation(program, 'u_m');\n gl.uniform1fv(u_m, new Float32Array(m));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n bindTexture(gl, null, 0);\n}\n\n/**\n * 根据total/filter生成overflow\n */\nfunction drawOverflow(gl, program, target, source, center, size) {\n gl.useProgram(program);\n let { x: tx1, y: ty1, width: w1, height: h1, bbox: bbox1 } = target;\n let { x: tx2, y: ty2, bbox: bbox2 } = source;\n let dx = bbox1[0] - bbox2[0], dy = bbox1[1] - bbox2[1];\n gl.viewport(0, 0, size, size);\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = (tx2 + dx) / size, ya = (size - ty2 - dy) / size, xb = (tx2 + w1 + dx) / size, yb = (size - ty2 - h1 - dy) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, source.__page.texture, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawMask(gl, program, target, source, temp, center, size) {\n gl.useProgram(program);\n bindTexture(gl, source.__page.texture, 0);\n bindTexture(gl, temp, 1);\n gl.viewport(0, 0, size, size);\n let { x: tx1, y: ty1, width: w1, height: h1 } = target;\n let { x: tx2, y: ty2, width: w2, height: h2 } = source;\n let { x: x1, y: y2 } = convertCoords2Gl(tx1, ty1 + h1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(tx1 + w1, ty1, 0, 1, center, center);\n let xa = tx2 / size, ya = (size - ty2) / size, xb = (tx2 + w2) / size, yb = (size - ty2 - h2) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer1 = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer1);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords1 = gl.getAttribLocation(program, 'a_texCoords1');\n gl.vertexAttribPointer(a_texCoords1, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords1);\n let texBuffer2 = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer2);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords2 = gl.getAttribLocation(program, 'a_texCoords2');\n gl.vertexAttribPointer(a_texCoords2, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords2);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, 0);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer1);\n gl.deleteBuffer(texBuffer2);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords1);\n gl.disableVertexAttribArray(a_texCoords2);\n gl.deleteTexture(temp);\n gl.bindTexture(gl.TEXTURE_2D, null);\n bindTexture(gl, null, 0);\n bindTexture(gl, null, 1);\n}\n\nfunction drawMbm(gl, program, tex1, tex2) {\n bindTexture(gl, tex1, 0);\n bindTexture(gl, tex2, 1);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture1 = gl.getUniformLocation(program, 'u_texture1');\n gl.uniform1i(u_texture1, 0);\n let u_texture2 = gl.getUniformLocation(program, 'u_texture2');\n gl.uniform1i(u_texture2, 1);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n}\n\nfunction drawDropShadow(gl, program, frameBuffer, cache, color, w1, w2, h1, h2) {\n gl.useProgram(program);\n let { x, y, width, height, __page: page } = cache;\n let size = page.size, texture = page.texture;\n let xa = x / size, ya = (size - y) / size, xb = (x + width) / size, yb = (size - y - height) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n let w = w1 / w2, h = h1 / h2;\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -w, -h,\n -w, h,\n w, -h,\n -w, h,\n w, -h,\n w, h,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, yb,\n xa, ya,\n xb, yb,\n xa, ya,\n xb, yb,\n xb, ya,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n bindTexture(gl, texture, 0);\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n // color\n let u_color = gl.getUniformLocation(program, 'u_color');\n gl.uniform1fv(u_color, new Float32Array([color[0] / 255, color[1] / 255, color[2] / 255, color[3]]));\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n // 回收\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n bindTexture(gl, null, 0);\n}\n\nfunction drawDropShadowMerge(gl, target, size, tex1, dx1, dy1, w, h, tex2, dx2, dy2, width, height) {\n let { x, y } = target;\n let center = size * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(x + dx1, y + h + dy1, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(x + w + dx1, y + dy1, 0, 1, center, center);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n bindTexture(gl, tex1, 0);\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n let { x: x3, y: y4 } = convertCoords2Gl(x + dx2, y + height + dy2, 0, 1, center, center);\n let { x: x4, y: y3 } = convertCoords2Gl(x + width + dx2, y + dy2, 0, 1, center, center);\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x3, y3,\n x3, y4,\n x4, y3,\n x3, y4,\n x4, y3,\n x4, y4,\n ]), gl.STATIC_DRAW);\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n bindTexture(gl, tex2, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n bindTexture(gl, null, 0);\n}\n\nfunction drawTex2Cache(gl, program, cache, tex, width, height) {\n gl.useProgram(program);\n let page = cache.__page, size = page.__size;\n gl.viewport(0, 0, size, size);\n let x = cache.x, y = cache.y, center = size * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(x, y + height, 0, 1, center, center);\n let { x: x2, y: y1 } = convertCoords2Gl(x + width, y, 0, 1, center, center);\n bindTexture(gl, tex, 0);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 1,\n 0, 0,\n 1, 1,\n 0, 0,\n 1, 1,\n 1, 0,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 透明度buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, tex, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n gl.bindTexture(gl.TEXTURE_2D, null);\n}\n\nfunction drawCache2Tex(gl, program, cache, width, height, spread) {\n let { x: tx1, y: ty1, width: w1, height: h1, __page: { texture, size } } = cache;\n gl.useProgram(program);\n gl.viewport(0, 0, width, height);\n // 首先将cache的纹理原状绘制到tex1上,为后续3次循环做准备,注意扩充的spread距离\n let cx = width * 0.5, cy = height * 0.5;\n let { x: x1, y: y2 } = convertCoords2Gl(spread, height - spread, 0, 1, cx, cy);\n let { x: x2, y: y1 } = convertCoords2Gl(width - spread, spread, 0, 1, cx, cy);\n let xa = tx1 / size, ya = (size - ty1) / size, xb = (tx1 + w1) / size, yb = (size - ty1 - h1) / size;\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n x1, y1,\n x1, y2,\n x2, y1,\n x1, y2,\n x2, y1,\n x2, y2,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n xa, ya,\n xa, yb,\n xb, ya,\n xa, yb,\n xb, ya,\n xb, yb,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n bindTexture(gl, texture, 0);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n}\n\nfunction drawSameSize(gl, tex, opacity) {\n let program = gl.programSs;\n gl.useProgram(program);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // 纹理单元\n let u_texture = gl.getUniformLocation(program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n bindTexture(gl, tex, 0);\n let u_opacity = gl.getUniformLocation(program, 'u_opacity');\n gl.uniform1f(u_opacity, opacity);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.useProgram(gl.program);\n}\n\nfunction drawOitPlane(gl, structs, list, ppt, cx, cy, dx, dy) {\n let pointBuffer = gl.createBuffer();\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n let texBuffer = gl.createBuffer();\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n let opacityBuffer = gl.createBuffer();\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n // 循环所有顺序拼图/平面\n for(let i = 0, len = list.length; i < len; i++) {\n let { isPuzzle, node, target, points } = list[i];\n let { __width: width, __height: height,\n __tx1: tx1, __ty1: ty1, __tx2: tx2, __ty2: ty2,\n __page: page, __bbox: bbox } = target;\n // 固定绑定纹理0号单元\n if(page.__update) {\n page.genTexture(gl);\n }\n bindTexture(gl, page.texture, 0);\n let bx = bbox[0], by = bbox[1];\n let opacity = node.__opacity;\n let matrix = node.__matrixEvent;\n let tw = tx2 - tx1, th = ty2 - ty1;\n // 先按照没有拆分拼图的情况求出节点的四个顶点坐标列表,可能有重复利用hash缓存\n let vtPoint = [], vtTex = [], vtOpacity = [];\n let pHash = [], tHash = [];\n if(isPuzzle) {\n // 拼接三角形,以起点为初始点链接其它所有顶点组成n-2个三角形\n let x0, y0, z0, w0;\n let p = points[0];\n let o = calPoint({\n x: bx + dx + p.px * width,\n y: by + dy + p.py * height,\n z: 0,\n w: 1,\n }, matrix);\n w0 = o.w;\n let t = convertCoords2Gl(o.x, o.y, o.z, w0, cx, cy, ppt);\n x0 = t.x; y0 = t.y; z0 = t.z;\n let tx0 = tx1 + p.px * tw, ty0 = ty1 + p.py * th;\n // 每次循环以第0个点为起点\n for(let j = 1, len = points.length; j < len - 1; j++) {\n vtPoint.push(x0);\n vtPoint.push(y0);\n vtPoint.push(z0);\n vtPoint.push(w0);\n vtTex.push(tx0);\n vtTex.push(ty0);\n vtOpacity.push(opacity);\n // 依次的2个相邻点\n for(let k = j; k < j + 2; k++) {\n let p = points[k];\n let x, y, z, w;\n let hashP = pHash[k];\n if(hashP) {\n x = hashP.x;\n y = hashP.y;\n z = hashP.z;\n w = hashP.w;\n }\n else {\n let o = calPoint({\n x: bx + dx + p.px * width,\n y: by + dy + p.py * height,\n z: 0,\n w: 1,\n }, matrix);\n w = o.w;\n let t = convertCoords2Gl(o.x, o.y, o.z, w, cx, cy, ppt);\n x = t.x; y = t.y; z = t.z;\n pHash[k] = {\n x,\n y,\n z,\n w,\n };\n }\n vtPoint.push(x);\n vtPoint.push(y);\n vtPoint.push(z);\n vtPoint.push(w);\n let tx, ty;\n let hashT = tHash[k];\n if(hashT) {\n tx = hashT.tx;\n ty = hashT.ty;\n }\n else {\n tx = tx1 + p.px * tw;\n ty = ty1 + p.py * th;\n tHash[k] = {\n tx,\n ty,\n };\n }\n vtTex.push(tx);\n vtTex.push(ty);\n vtOpacity.push(opacity);\n }\n }\n }\n else {\n let xa = bx + dx, ya = by + height + dy;\n let xb = bx + width + dx, yb = by + dy;\n let { x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3, x4, y4, z4, w4 } = calRectPoint(xa, ya, xb, yb, matrix);\n let t = convertCoords2Gl(x1, y1, z1, w1, cx, cy, ppt);\n x1 = t.x; y1 = t.y; z1 = t.z;\n t = convertCoords2Gl(x2, y2, z2, w2, cx, cy, ppt);\n x2 = t.x; y2 = t.y; z2 = t.z;\n t = convertCoords2Gl(x3, y3, z3, w3, cx, cy, ppt);\n x3 = t.x; y3 = t.y; z3 = t.z;\n t = convertCoords2Gl(x4, y4, z4, w4, cx, cy, ppt);\n x4 = t.x; y4 = t.y; z4 = t.z;\n vtPoint[0] = x1;\n vtPoint[1] = y1;\n vtPoint[2] = z1;\n vtPoint[3] = w1;\n vtPoint[4] = x4;\n vtPoint[5] = y4;\n vtPoint[6] = z4;\n vtPoint[7] = w4;\n vtPoint[8] = x2;\n vtPoint[9] = y2;\n vtPoint[10] = z2;\n vtPoint[11] = w2;\n vtPoint[12] = x4;\n vtPoint[13] = y4;\n vtPoint[14] = z4;\n vtPoint[15] = w4;\n vtPoint[16] = x2;\n vtPoint[17] = y2;\n vtPoint[18] = z2;\n vtPoint[19] = w2;\n vtPoint[20] = x3;\n vtPoint[21] = y3;\n vtPoint[22] = z3;\n vtPoint[23] = w3;\n vtTex[0] = tx1;\n vtTex[1] = ty1;\n vtTex[2] = tx1;\n vtTex[3] = ty2;\n vtTex[4] = tx2;\n vtTex[5] = ty1;\n vtTex[6] = tx1;\n vtTex[7] = ty2;\n vtTex[8] = tx2;\n vtTex[9] = ty1;\n vtTex[10] = tx2;\n vtTex[11] = ty2;\n vtOpacity[0] = opacity;\n vtOpacity[1] = opacity;\n vtOpacity[2] = opacity;\n vtOpacity[3] = opacity;\n vtOpacity[4] = opacity;\n vtOpacity[5] = opacity;\n }\n // 顶点buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtPoint), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_position, 4, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtTex), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(vtOpacity), gl.STATIC_DRAW);\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, vtOpacity.length);\n }\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.disableVertexAttribArray(a_opacity);\n}\n\nexport default {\n initShaders,\n convertCoords2Gl,\n createTexture,\n bindTexture,\n drawTextureCache,\n drawBlur,\n drawOverflow,\n drawMask,\n drawMbm,\n drawCm,\n drawDropShadow,\n drawDropShadowMerge,\n drawTex2Cache,\n drawCache2Tex,\n drawSameSize,\n drawOitPlane,\n};\n","import Page from './Page';\nimport webgl from '../gl/webgl';\nimport inject from '../util/inject';\n\nclass CanvasPage extends Page {\n constructor(renderMode, ctx, size, number) {\n super(renderMode, ctx, size, number);\n this.__offscreen = inject.getOffscreenCanvas(size, size, null, number);\n }\n\n genTexture(gl) {\n if(this.__update) {\n this.__update = false;\n let t = this.texture;\n if(t) {\n gl.deleteTexture(t);\n }\n this.texture = webgl.createTexture(gl, this.__offscreen.canvas, 0, null, null); // 默认0单元\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n get offscreen() {\n return this.__offscreen;\n }\n\n get canvas() {\n return this.__offscreen.canvas;\n }\n\n get ctx() {\n return this.__offscreen.ctx;\n }\n\n get update() {\n return this.__update;\n }\n\n set update(v) {\n this.__update = v;\n }\n\n static getInstance(renderMode, ctx, rootId, size, excludePage) {\n return super.getInstance(renderMode, ctx, rootId, size, this, excludePage);\n }\n}\n\nexport default CanvasPage;\n","import Cache from './Cache';\nimport CanvasPage from './CanvasPage';\nimport inject from '../util/inject';\nimport painter from '../util/painter';\nimport tf from '../style/transform';\nimport enums from '../util/enums';\nimport css from '../style/css';\nimport mx from '../math/matrix';\n\nconst {\n STYLE_KEY: {\n TRANSFORM_ORIGIN,\n TRANSFORM,\n },\n} = enums;\nconst { spreadFilter } = css;\nconst { isE } = mx;\n\nclass CanvasCache extends Cache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n\n clear() {\n if(super.clear()) {\n this.__available = false;\n let page = this.__page, ctx = page.ctx;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(this.__x, this.__y, this.__width, this.__height);\n return true;\n }\n }\n\n reset(bbox, x1, y1) {\n return super.reset(bbox, x1, y1, CanvasPage);\n }\n\n get canvas() {\n return this.__page.canvas;\n }\n\n get ctx() {\n return this.__page.ctx;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, x1, y1, excludePage) {\n return super.getInstance(renderMode, ctx, rootId, bbox, x1, y1, this, CanvasPage, excludePage);\n }\n\n /**\n * 复制cache的一块出来单独作为cacheFilter,尺寸边距保持一致,用浏览器原生ctx.filter滤镜\n * @param cache\n * @param filter\n */\n static genFilter(cache, filter) {\n let { x, y, size, canvas, x1, y1, width, height, bbox } = cache;\n let oldX1 = bbox[0];\n bbox = spreadFilter(bbox, filter);\n let d = oldX1 - bbox[0];\n let widthNew = bbox[2] - bbox[0];\n let heightNew = bbox[3] - bbox[1];\n let offscreen = inject.getOffscreenCanvas(widthNew, heightNew, null, 'filter');\n offscreen.ctx.filter = painter.canvasFilter(filter);\n offscreen.ctx.drawImage(canvas, x, y, width, height, d, d, width, height);\n offscreen.ctx.filter = 'none';\n offscreen.bbox = bbox;\n // 单独的离屏,其dx/dy要重算\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.size = size;\n offscreen.x1 = x1;\n offscreen.y1 = y1;\n offscreen.dx = -bbox[0];\n offscreen.dy = -bbox[1];\n offscreen.dbx = cache.dbx + d;\n offscreen.dby = cache.dby + d;\n offscreen.width = widthNew;\n offscreen.height = heightNew;\n return offscreen;\n }\n\n static genMask(target, node, callback) {\n let cacheMask = genSingle(target, 'mask1');\n let list = [];\n let { [TRANSFORM]: transform, [TRANSFORM_ORIGIN]: tfo } = node.__computedStyle;\n let next = node.next;\n let isClip = next.__clip;\n while(next && next.__mask) {\n list.push(next);\n next = next.next;\n }\n let { x, y, ctx, dbx, dby } = cacheMask;\n let inverse = tf.calMatrixByOrigin(transform, tfo[0] + x + dbx, tfo[1] + y + dby);\n if(isE(inverse)) {\n inverse = null;\n }\n // 先将mask本身绘制到cache上,再设置模式绘制dom本身\n list.forEach(item => {\n callback(item, cacheMask, inverse);\n });\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = isClip ? 'source-out' : 'source-in';\n CanvasCache.drawCache(target, cacheMask);\n ctx.globalCompositeOperation = 'source-over';\n return cacheMask;\n }\n\n\n static drawCache(source, target) {\n let { x: tx, y: ty, x1, y1, ctx, dbx, dby } = target;\n let { x, y, canvas, x1: x2, y1: y2, dbx: dbx2, dby: dby2, width, height } = source;\n let ox = tx + x2 - x1 + dbx - dbx2;\n let oy = ty + y2 - y1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n }\n}\n\n// 根据一个共享cache的信息,生成一个独立的离屏canvas,一般是filter,mask用,可能尺寸会发生变化\nfunction genSingle(cache, message, bboxNew) {\n let { size, x1, y1, bbox } = cache;\n bboxNew = bboxNew || bbox;\n let width = bboxNew[2] - bboxNew[0];\n let height = bboxNew[3] - bboxNew[1];\n let dx = bboxNew[0] - bbox[0];\n let dy = bboxNew[1] - bbox[1];\n let offscreen = inject.getOffscreenCanvas(width, height, null, message);\n offscreen.x = 0;\n offscreen.y = 0;\n offscreen.bbox = bboxNew;\n offscreen.size = size;\n offscreen.x1 = x1;\n offscreen.y1 = y1;\n offscreen.dx = -bboxNew[0];\n offscreen.dy = -bboxNew[1];\n offscreen.dbx = cache.dbx - dx;\n offscreen.dby = cache.dby - dy;\n offscreen.width = width;\n offscreen.height = height;\n return offscreen;\n}\n\nexport default CanvasCache;\n","import Cache from '../refresh/Cache';\nimport CanvasCache from '../refresh/CanvasCache';\nimport CanvasPage from '../refresh/CanvasPage';\n\nconst HASH = {};\n\nclass ImgWebglCache extends CanvasCache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, pos, x1, y1);\n }\n\n release() {\n if(this.__enabled) {\n let key = this.key;\n // 一定有\n let o = HASH[key];\n o.count--;\n if(!o.count) {\n this.clear();\n delete HASH[key];\n this.__page.del(this.__pos);\n this.__page = null;\n }\n this.__enabled = false;\n return true;\n }\n }\n\n get count() {\n return HASH[this.key].count;\n }\n\n static getInstance(renderMode, ctx, rootId, bbox, loadImg, x1, y1) {\n let key = rootId + ',' + loadImg.width + ' ' + loadImg.height + ' ' + loadImg.src;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count++;\n let w = bbox[2] - bbox[0], h = bbox[3] - bbox[1];\n let cache = o.cache;\n let res = new ImgWebglCache(renderMode, ctx, rootId, w, h, bbox, cache.page, cache.pos, x1, y1);\n res.key = key;\n return res;\n }\n let cache = Cache.getInstance(renderMode, ctx, rootId, bbox, x1, y1, this, CanvasPage, null);\n // 超限为空\n if(cache) {\n cache.key = key;\n if(cache) {\n HASH[key] = {\n cache,\n count: 1,\n };\n return cache;\n }\n }\n }\n}\n\nexport default ImgWebglCache;\n","import Dom from './Dom';\nimport mode from '../refresh/mode';\nimport painter from '../util/painter';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport enums from '../util/enums';\nimport unit from '../style/unit';\nimport image from '../style/image';\nimport border from '../style/border';\nimport level from '../refresh/level';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport ImgWebglCache from '../gl/ImgWebglCache';\n\nconst {\n STYLE_KEY: {\n WIDTH,\n HEIGHT,\n DISPLAY,\n BORDER_RIGHT_WIDTH,\n BORDER_LEFT_WIDTH,\n BORDER_TOP_LEFT_RADIUS,\n BORDER_TOP_RIGHT_RADIUS,\n BORDER_BOTTOM_RIGHT_RADIUS,\n BORDER_BOTTOM_LEFT_RADIUS,\n VISIBILITY,\n MARGIN_RIGHT,\n MARGIN_LEFT,\n PADDING_RIGHT,\n PADDING_LEFT,\n FONT_SIZE,\n FLEX_BASIS,\n },\n} = enums;\nconst { AUTO, PX, PERCENT, REM, VW, VH, VMAX, VMIN } = unit;\nconst { canvasPolygon, svgPolygon } = painter;\nconst { isFunction } = util;\n\nclass Img extends Dom {\n constructor(tagName, props) {\n super(tagName, props);\n let src = this.props.src;\n let loadImg = this.__loadImg = {\n src,\n };\n // 空url用错误图代替\n if(!src) {\n loadImg.error = true;\n }\n else {\n let ca = inject.IMG[src];\n if(!ca) {\n inject.measureImg(src, null);\n }\n else if(ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = loadImg.__width = ca.width;\n loadImg.height = loadImg.__height = ca.height;\n }\n }\n }\n\n /**\n * 覆盖xom的方法,在__layout()3个分支中会首先被调用\n * 当样式中固定宽高时,图片按样式尺寸,加载后重新绘制即可\n * 只固定宽高一个时,加载完要计算缩放比,重新布局绘制\n * 都没有固定,按照图片尺寸,重新布局绘制\n * 这里计算非固定的情况,将其改为固定供布局渲染使用,未加载完成为0\n */\n __preLayout(data, isInline) {\n let res = super.__preLayout(data, false);\n let loadImg = this.__loadImg;\n // 可能已提前加载好了,或有缓存,为减少刷新直接使用\n let src = loadImg.src;\n if(src) {\n let cache = inject.IMG[src];\n if(!cache || cache.state === inject.LOADING) {\n if(!loadImg.loading) {\n this.__loadAndRefresh(loadImg, null);\n }\n }\n else if(cache && cache.state === inject.LOADED && cache.success) {\n loadImg.source = cache.source;\n loadImg.width = loadImg.__width = cache.width;\n loadImg.height = loadImg.__height = cache.height;\n }\n loadImg.cache = false;\n }\n if(res.fixedWidth && res.fixedHeight) {\n return res;\n }\n if(loadImg.error && !this.props.placeholder) {\n if(res.fixedWidth) {\n res.h = res.w;\n }\n else if(res.fixedHeight) {\n res.w = res.h;\n }\n else {\n res.w = res.h = 32;\n }\n }\n else if(loadImg.source) {\n if(res.fixedWidth) {\n res.h = res.w * loadImg.height / loadImg.width;\n }\n else if(res.fixedHeight) {\n res.w = res.h * loadImg.width / loadImg.height;\n }\n else {\n res.w = loadImg.width;\n res.h = loadImg.height;\n }\n }\n else {\n res.w = res.h = 0;\n }\n res.fixedWidth = true;\n res.fixedHeight = true;\n return res;\n }\n\n __addGeom(tagName, props) {\n props = util.hash2arr(props);\n this.__virtualDom.children.push({\n type: 'item',\n tagName,\n props,\n });\n }\n\n // img根据加载情况更新__hasContent,同时识别是否仅有图片内容本身,多个相同图片视为同一个资源\n calContent(__currentStyle, __computedStyle) {\n let res = super.calContent(__currentStyle, __computedStyle);\n let {\n __loadImg: loadImg,\n } = this;\n if(!res) {\n loadImg.onlyImg = true;\n if(__computedStyle[VISIBILITY] !== 'hidden' && (__computedStyle[WIDTH] || __computedStyle[HEIGHT])\n && loadImg.source) {\n res = true;\n }\n }\n else {\n loadImg.onlyImg = false;\n }\n return res;\n }\n\n render(renderMode, ctx, dx = 0, dy = 0) {\n let res = super.render(renderMode, ctx, dx, dy);\n let {\n width, height, __isDestroyed,\n props: {\n placeholder,\n },\n __computedStyle: {\n [DISPLAY]: display,\n [BORDER_TOP_LEFT_RADIUS]: borderTopLeftRadius,\n [BORDER_TOP_RIGHT_RADIUS]: borderTopRightRadius,\n [BORDER_BOTTOM_RIGHT_RADIUS]: borderBottomRightRadius,\n [BORDER_BOTTOM_LEFT_RADIUS]: borderBottomLeftRadius,\n [VISIBILITY]: visibility,\n },\n virtualDom,\n __loadImg: loadImg,\n } = this;\n if(__isDestroyed || display === 'none' || visibility === 'hidden' || renderMode === mode.WEBGL) {\n return res;\n }\n let originX, originY;\n originX = res.x3 + dx;\n originY = res.y3 + dy;\n // 根据配置以及占位图显示error\n let source = loadImg.source;\n if(loadImg.error && !placeholder && Img.showError) {\n let strokeWidth = Math.min(width, height) * 0.02;\n let stroke = '#CCC';\n let fill = '#DDD';\n let cx = originX + width * 0.7;\n let cy = originY + height * 0.3;\n let r = strokeWidth * 5;\n let pts = [\n [originX + width * 0.15, originY + height * 0.7],\n [originX + width * 0.3, originY + height * 0.4],\n [originX + width * 0.5, originY + height * 0.6],\n [originX + width * 0.6, originY + height * 0.5],\n [originX + width * 0.9, originY + height * 0.8],\n [originX + width * 0.15, originY + height * 0.8]\n ];\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n ctx.strokeStyle = stroke;\n ctx.lineWidth = strokeWidth;\n ctx.fillStyle = fill;\n ctx.beginPath();\n ctx.moveTo(originX, originY);\n ctx.lineTo(originX + width, originY);\n ctx.lineTo(originX + width, originY + height);\n ctx.lineTo(originX, originY + height);\n ctx.lineTo(originX, originY);\n ctx.stroke();\n ctx.closePath();\n ctx.beginPath();\n let points = geom.ellipsePoints(cx, cy, r, r);\n painter.canvasPolygon(ctx, points, 0, 0);\n ctx.fill();\n ctx.closePath();\n ctx.beginPath();\n ctx.moveTo(pts[0][0], pts[0][1]);\n for(let i = 1, len = pts.length; i < len; i++) {\n let point = pts[i];\n ctx.lineTo(point[0], point[1]);\n }\n ctx.lineTo(pts[0][0], pts[0][1]);\n ctx.fill();\n ctx.closePath();\n }\n else if(renderMode === mode.SVG) {\n this.__addGeom('rect', [\n ['x', originX],\n ['y', originY],\n ['width', width],\n ['height', height],\n ['stroke', stroke],\n ['stroke-width', strokeWidth],\n ['fill', 'rgba(0,0,0,0)']\n ]);\n this.__addGeom('circle', [\n ['cx', cx],\n ['cy', cy],\n ['r', r],\n ['fill', fill],\n ]);\n let s = '';\n for(let i = 0, len = pts.length; i < len; i++) {\n let point = pts[i];\n if(i) {\n s += ' ';\n }\n s += point[0] + ',' + point[1];\n }\n this.__addGeom('polygon', [\n ['points', s],\n ['fill', fill]\n ]);\n }\n }\n else if(source) {\n // 圆角需要生成一个mask\n let list = border.calRadius(originX, originY, width, height,\n borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius);\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n // 有border-radius需模拟遮罩裁剪\n if(list) {\n ctx.save();\n ctx.beginPath();\n canvasPolygon(ctx, list, dx, dy);\n ctx.clip();\n ctx.closePath();\n ctx.drawImage(source, originX, originY, width, height);\n ctx.restore();\n }\n else {\n ctx.drawImage(source, originX, originY, width, height);\n }\n }\n else if(renderMode === mode.SVG) {\n // img没有变化无需diff,直接用上次的vd\n if(loadImg.cache) {\n loadImg.cache.cache = true;\n virtualDom.children = [loadImg.cache];\n // 但是还是要校验是否有borderRadius变化,引发img的圆角遮罩\n if(!virtualDom.cache && list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF'],\n ],\n }\n ],\n };\n let id = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n }\n return;\n }\n // 缩放图片,无需考虑原先矩阵,xom里对父层已经变换过了\n let matrix;\n if(width !== loadImg.width || height !== loadImg.height) {\n matrix = image.matrixResize(loadImg.width, loadImg.height, width, height, originX, originY, width, height);\n }\n let props = [\n ['xlink:href', loadImg.error ? placeholder : loadImg.src],\n ['x', originX],\n ['y', originY],\n ['width', loadImg.width],\n ['height', loadImg.height]\n ];\n if(list) {\n let d = svgPolygon(list);\n let v = {\n tagName: 'clipPath',\n props: [],\n children: [\n {\n type: 'item',\n tagName: 'path',\n props: [\n ['d', d],\n ['fill', '#FFF']\n ],\n }\n ],\n };\n let id = ctx.add(v);\n this.__cacheDefs.push(v);\n virtualDom.conClip = 'url(#' + id + ')';\n delete virtualDom.cache;\n }\n if(matrix && !mx.isE(matrix)) {\n props.push(['transform', 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')']);\n }\n let vd = {\n type: 'img',\n tagName: 'image',\n props,\n };\n virtualDom.children = [vd];\n loadImg.cache = vd;\n }\n }\n return res;\n }\n\n __isRealInline() {\n return false;\n }\n\n // overwrite\n __tryLayInline(w, total) {\n let { currentStyle: {\n [WIDTH]: width,\n [HEIGHT]: height,\n [MARGIN_LEFT]: marginLeft,\n [MARGIN_RIGHT]: marginRight,\n [PADDING_LEFT]: paddingLeft,\n [PADDING_RIGHT]: paddingRight,\n }, computedStyle: {\n [BORDER_LEFT_WIDTH]: borderLeftWidth,\n [BORDER_RIGHT_WIDTH]: borderRightWidth,\n } } = this;\n if(width.u !== AUTO) {\n w -= this.__calSize(width, total, true);\n }\n else {\n let loadImg = this.__loadImg;\n // 加载成功计算缩放后的宽度\n if(loadImg.source) {\n if(height.u === PX) {\n w -= loadImg.width * height.v / loadImg.height;\n }\n else if(height.u === PERCENT) {\n w -= loadImg.width * height.v * total * 0.01 / loadImg.height;\n }\n else if(height.u === REM) {\n w -= loadImg.width * height.v * this.root.computedStyle[FONT_SIZE] / loadImg.height;\n }\n else if(height.u === VW) {\n w -= loadImg.width * height.v * this.root.width * 0.01 / loadImg.height;\n }\n else if(height.u === VH) {\n w -= loadImg.width * height.v * this.root.height * 0.01 / loadImg.height;\n }\n else if(height.u === VMAX) {\n w -= height.v * Math.max(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else if(height.u === VMIN) {\n w -= height.v * Math.min(this.root.width, this.root.height) * 0.01 / loadImg.height;\n }\n else {\n w -= loadImg.width;\n }\n }\n }\n // 减去水平mbp\n w -= this.__calSize(marginRight, total, true);\n w -= this.__calSize(paddingRight, total, true);\n w -= borderRightWidth;\n w -= this.__calSize(marginLeft, total, true);\n w -= this.__calSize(paddingLeft, total, true);\n w -= borderLeftWidth;\n return w;\n }\n\n __calBasis(isDirectionRow, isAbs, isColumn, data, isDirectChild) {\n this.__computeReflow();\n let b = 0;\n let min = 0;\n let max = 0;\n let { currentStyle, computedStyle, __loadImg } = this;\n let { w, h } = data;\n // 计算需考虑style的属性\n let {\n [FLEX_BASIS]: flexBasis,\n [WIDTH]: width,\n [HEIGHT]: height,\n } = currentStyle;\n let main = isDirectionRow ? width : height;\n let cross = isDirectionRow ? height : width;\n // basis3种情况:auto、固定、content,只区分固定和其它\n let isFixed = [PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(flexBasis.u) > -1;\n if(isFixed) {\n b = max = min = this.__calSize(flexBasis, isDirectionRow ? w : h, true);\n }\n else if(([PX, PERCENT, REM, VW, VH, VMAX, VMIN].indexOf(main.u) > -1)) {\n b = max = min = this.__calSize(main, isDirectionRow ? w : h, true);\n }\n // auto和content固定尺寸比例计算\n else if(__loadImg.source || __loadImg.error) {\n let res = this.__preLayout(data);\n if(cross.u !== AUTO) {\n cross = this.__calSize(cross, isDirectionRow ? h : w, true);\n let ratio = res.w / res.h;\n b = max = min = isDirectionRow ? cross * ratio : cross / ratio;\n }\n else {\n b = max = min = isDirectionRow ? res.w : res.h;\n }\n }\n // 直接item的mpb影响basis\n return this.__addMBP(isDirectionRow, w, currentStyle, computedStyle, [b, min, max], isDirectChild);\n }\n\n __loadAndRefresh(loadImg, cb) {\n let self = this;\n // 先清空之前可能的\n if(loadImg.source || loadImg.error) {\n loadImg.source = null;\n }\n loadImg.loading = true;\n let root = this.__root, ctx = root.ctx;\n let placeholder = this.props.placeholder, computedStyle = this.__computedStyle;\n let width = computedStyle[WIDTH], height = computedStyle[HEIGHT];\n // 再测量,可能瞬间完成替换掉上面的\n inject.measureImg(loadImg.src, data => {\n // 还需判断url,防止重复加载时老的替换新的,失败走error绘制\n if(data.url === loadImg.src) {\n loadImg.cache && (loadImg.cache.cache = false);\n loadImg.loading = false;\n function reload() {\n let { __currentStyle: { [WIDTH]: width, [HEIGHT]: height } } = self;\n if(width.u !== AUTO && height.u !== AUTO) {\n root.__addUpdate(self, null, level.REPAINT, null, null, null, cb);\n }\n else {\n root.__addUpdate(self, null, level.REFLOW, null, null, null, cb);\n }\n }\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n }\n else if(placeholder) {\n loadImg.error = true;\n inject.measureImg(placeholder, data => {\n if(data.success) {\n loadImg.source = data.source;\n loadImg.width = data.width;\n loadImg.height = data.height;\n if(computedStyle[DISPLAY] !== 'none' && !self.__isDestroyed) {\n reload();\n }\n }\n }, {\n ctx,\n root,\n width,\n height,\n });\n return;\n }\n else {\n loadImg.error = true;\n }\n // 可见状态进行刷新操作,visibility某些情况需要刷新,可能宽高未定义要重新布局\n if(computedStyle[DISPLAY] !== 'none' && !self.__isDestroyed) {\n reload();\n }\n }\n });\n }\n\n updateSrc(v, cb) {\n let loadImg = this.__loadImg;\n // 相等或空且当前error直接返回\n if(v === loadImg.src || this.__isDestroyed || !v && loadImg.error) {\n loadImg.src = v;\n inject.measureImg(v, null);\n if(isFunction(cb)) {\n cb();\n }\n return;\n }\n loadImg.src = v;\n this.__loadAndRefresh(loadImg, cb);\n }\n\n appendChild() {\n inject.error('Img can not appendChild.');\n }\n\n get src() {\n return this.__loadImg.src;\n }\n\n set src(v) {\n this.updateSrc(v, null);\n }\n\n get isReplaced() {\n return true;\n }\n\n static showError = true;\n\n static toWebglCache(gl, root, src, x1, y1, cb) {\n if(!gl || !src) {\n return;\n }\n let loadImg = {\n src,\n };\n let ca = inject.IMG[src];\n if(!ca) {\n inject.measureImg(src, function(ca) {\n loadImg.source = ca.source;\n loadImg.width = loadImg.__width = ca.width;\n loadImg.height = loadImg.__height = ca.height;\n let res = ImgWebglCache.getInstance(mode.CANVAS, gl, root.__uuid, [x1, y1, x1 + loadImg.width, y1 + loadImg.height], loadImg, x1, y1);\n if(isFunction(cb)) {\n cb(res);\n }\n });\n }\n else if(ca.state === inject.LOADED) {\n loadImg.source = ca.source;\n loadImg.width = loadImg.__width = ca.width;\n loadImg.height = loadImg.__height = ca.height;\n let res = ImgWebglCache.getInstance(mode.CANVAS, gl, root.__uuid, [x1, y1, x1 + loadImg.width, y1 + loadImg.height], loadImg, x1, y1);\n if(isFunction(cb)) {\n cb(res);\n }\n }\n }\n}\n\nexport default Img;\n","class Defs {\n constructor(uuid) {\n this.id = uuid;\n this.count = 0;\n this.list = [];\n this.cacheHash = {}; // 每次svg渲染前重置,存储前次渲染不变的缓存id\n }\n add(data) {\n let uuid = this.count;\n let hash = this.cacheHash;\n while(hash.hasOwnProperty(uuid)) {\n uuid++;\n }\n this.count = uuid + 1;\n data.id = uuid;\n data.uuid = 'karas-defs-' + this.id + '-' + uuid;\n data.index = this.list.length;\n this.list.push(data);\n return data.uuid;\n }\n addCache(data) {\n data.index = this.list.length;\n this.list.push(data);\n this.cacheHash[data.id] = true;\n return data.uuid;\n }\n clear() {\n this.list = [];\n this.count = 0;\n this.cacheHash = {};\n }\n removeCache(data) {\n let list = this.list;\n let i = data.index;\n // 一般情况index即位置,但每次渲染过程中,可能会删掉一些,此时位置会往前,但index不变,因此遍历\n for(; i >= 0; i--) {\n if(list[i] === data) {\n list.splice(i, 1);\n return;\n }\n }\n }\n\n get value() {\n return this.list;\n }\n\n static getInstance(uuid) {\n return new Defs(uuid);\n }\n}\n\nexport default Defs;\n","import util from './util';\nimport level from '../refresh/level';\n\nconst { joinVd, joinDef } = util;\nconst { NONE, TRANSFORM_ALL, OPACITY, FILTER, MIX_BLEND_MODE } = level;\n\nfunction diff(elem, ovd, nvd) {\n let cns = elem.childNodes;\n diffDefs(cns[0], ovd.defs, nvd.defs);\n // = i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinDef(nd[i]));\n }\n }\n}\n\nfunction diffDef(elem, od, nd) {\n if(od.tagName !== nd.tagName) {\n insertAdjacentHTML(elem, 'beforebegin', joinDef(nd));\n // elem.insertAdjacentHTML('beforebegin', joinDef(nd));\n elem.parentNode.removeChild(elem);\n }\n else {\n if(od.uuid !== nd.uuid) {\n elem.setAttribute('id', nd.uuid);\n }\n let op = {};\n for(let i = 0, len = (od.props || []).length; i < len; i++) {\n let prop = od.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nd.props || []).length; i < len; i++) {\n let prop = nd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n let cns = elem.childNodes;\n let ol = od.children.length;\n let nl = nd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, od.children[i], nd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nd.children[i]));\n }\n }\n }\n}\n\nfunction diffChild(elem, ovd, nvd) {\n if(ovd.type === 'dom') {\n if(nvd.type === 'dom') {\n diffD2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffD2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'text') {\n if(nvd.type === 'text') {\n diffT2T(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'geom') {\n if(nvd.type === 'dom') {\n diffG2D(elem, ovd, nvd);\n }\n else if(nvd.type === 'geom') {\n diffG2G(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n else if(ovd.type === 'img') {\n if(nvd.type === 'img') {\n diffItemSelf(elem, ovd, nvd);\n }\n else {\n replaceWith(elem, nvd);\n }\n }\n // 特殊情况,当有连续2个img,后面1个发生error时,其children内容不是type为img的图片,而是矢量图item,会进入此分支\n else if(ovd.type === 'item' && nvd.type === 'item') {\n diffItemSelf(elem, ovd, nvd);\n }\n}\n\nfunction diffX2X(elem, ovd, nvd) {\n let { transform, opacity, visibility, mask, overflow, filter, mixBlendMode, conClip } = nvd;\n if(ovd.transform !== transform) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(ovd.opacity !== opacity) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if(ovd.visibility !== visibility) {\n elem.setAttribute('visibility', visibility);\n }\n if(ovd.mask !== mask) {\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n }\n if(ovd.filter !== filter || ovd.mixBlendMode !== mixBlendMode) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('filter');\n }\n }\n if(ovd.overflow !== overflow) {\n if(overflow) {\n elem.setAttribute('clipPath', overflow);\n }\n else {\n elem.removeAttribute('overflow');\n }\n }\n if(ovd.conClip !== conClip) {\n if(conClip) {\n elem.childNodes[1].setAttribute('clip-path', conClip);\n }\n else {\n elem.childNodes[1].removeAttribute('clip-path');\n }\n }\n}\n\nfunction diffByLessLv(elem, ovd, nvd, lv) {\n let { transform, opacity, mask, filter, mixBlendMode } = nvd;\n if(lv === NONE) {\n return;\n }\n if(mask) {\n elem.setAttribute('mask', mask);\n }\n else {\n elem.removeAttribute('mask');\n }\n if(lv & TRANSFORM_ALL) {\n if(transform) {\n elem.setAttribute('transform', transform);\n }\n else {\n elem.removeAttribute('transform');\n }\n }\n if(lv & OPACITY) {\n if(opacity !== 1 && opacity !== undefined) {\n elem.setAttribute('opacity', opacity);\n }\n else {\n elem.removeAttribute('opacity');\n }\n }\n if((lv & FILTER) || (lv & MIX_BLEND_MODE)) {\n let s = (filter ? `filter:${filter};` : '') + (mixBlendMode ? `mix-blend-mode:${mixBlendMode};` : '');\n if(s) {\n elem.setAttribute('style', s);\n }\n else {\n elem.removeAttribute('style');\n }\n }\n}\n\nfunction diffD2D(elem, ovd, nvd, root) {\n // cache表明children无变化缓存,一定是REPAINT以下的,只需看自身的lv以及mask\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffD2G(elem, ovd, nvd) {\n diffX2X(elem, ovd, nvd);\n diffBb(elem.firstChild, ovd.bb, nvd.bb);\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n let lastChild = elem.lastChild;\n let cns = lastChild.childNodes;\n for(; i < Math.min(ol, nl); i++) {\n replaceWith(cns[i], nvd.children[i]);\n }\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffT2T(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let ol = ovd.children.length;\n let nl = nvd.children.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, ovd.children[i], nvd.children[i], true);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nvd.children[i]));\n }\n }\n}\n\nfunction diffG2D(elem, ovd, nvd) {\n diffD2G(elem, ovd, nvd);\n}\n\nfunction diffG2G(elem, ovd, nvd) {\n if(nvd.cache) {\n diffByLessLv(elem, ovd, nvd, nvd.lv);\n return;\n }\n // 无cache且= i; j--) {\n removeAt(lastChild, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(lastChild, cns, i, joinVd(nvd.children[i]));\n }\n }\n }\n}\n\nfunction diffBb(elem, obb, nbb) {\n let ol = obb.length;\n let nl = nbb.length;\n let i = 0;\n for(; i < Math.min(ol, nl); i++) {\n diffItem(elem, i, obb[i], nbb[i]);\n }\n let cns = elem.childNodes;\n if(i < ol) {\n for(let j = ol - 1; j >= i; j--) {\n removeAt(elem, cns, j);\n }\n }\n else if(i < nl) {\n for(; i < nl; i++) {\n insertAt(elem, cns, i, joinVd(nbb[i]));\n }\n }\n}\n\nfunction diffItem(elem, i, ovd, nvd, isText) {\n let cns = elem.childNodes;\n if(ovd.tagName !== nvd.tagName) {\n replaceWith(cns[i], nvd);\n }\n else {\n diffItemSelf(cns[i], ovd, nvd);\n if(isText && ovd.content !== nvd.content) {\n cns[i].innerHTML = nvd.content;\n }\n }\n}\n\nfunction diffItemSelf(elem, ovd, nvd) {\n if(nvd.cache) {\n return;\n }\n let op = {};\n for(let i = 0, len = (ovd.props || []).length; i < len; i++) {\n let prop = ovd.props[i];\n let [k, v] = prop;\n op[k] = v;\n }\n for(let i = 0, len = (nvd.props || []).length; i < len; i++) {\n let prop = nvd.props[i];\n let [k, v] = prop;\n // 已有不等更新,没有添加\n if(op.hasOwnProperty(k)) {\n if(op[k] !== v) {\n elem.setAttribute(k, v);\n }\n delete op[k];\n }\n else {\n elem.setAttribute(k, v);\n }\n }\n // 多余的删除\n Object.keys(op).forEach(i => {\n elem.removeAttribute(i);\n });\n}\n\nfunction replaceWith(elem, vd) {\n let res;\n if(Array.isArray(vd)) {\n res = '';\n vd.forEach(item => {\n res += joinVd(item);\n });\n }\n else {\n res = joinVd(vd);\n }\n insertAdjacentHTML(elem, 'beforebegin', res);\n // elem.insertAdjacentHTML('beforebegin', res);\n elem.parentNode.removeChild(elem);\n}\n\nfunction insertAt(elem, cns, index, html) {\n if(index >= cns.length) {\n insertAdjacentHTML(elem, 'beforeend', html);\n // elem.insertAdjacentHTML('beforeend', html);\n }\n else {\n insertAdjacentHTML(cns[index], 'beforebegin', html);\n // cns[index].insertAdjacentHTML('beforebegin', html);\n }\n}\n\nfunction removeAt(elem, cns, index) {\n if(cns[index]) {\n elem.removeChild(cns[index]);\n }\n}\n\nlet svg;\nfunction insertAdjacentHTML(elem, where, content) {\n if(elem.insertAdjacentHTML) {\n elem.insertAdjacentHTML(where, content);\n }\n else {\n switch(where) {\n case 'beforeend':\n elem.innerHTML += content;\n break;\n case 'beforebegin':\n svg = svg || document.createElement('svg');\n svg.innerHTML = content;\n elem.parentNode.insertBefore(svg.childNodes[0], elem);\n break;\n }\n }\n}\n\nexport default diff;\n","import inject from '../util/inject';\nimport painter from '../util/painter';\n\nconst { canvasPolygon } = painter;\n\n// 无cache时应用离屏时的优先级,从小到大,OFFSCREEN_MASK2是个特殊的\nconst OFFSCREEN_OVERFLOW = 0;\nconst OFFSCREEN_FILTER = 1;\nconst OFFSCREEN_MASK = 2;\nconst OFFSCREEN_BLEND = 3;\nconst OFFSCREEN_MASK2 = 4;\n\nfunction applyOffscreen(ctx, list, width, height) {\n list.sort(function(a, b) {\n if(a.lv === b.lv) {\n if(a.idx === b.idx) {\n return a.type - b.type;\n }\n return b.idx - a.idx;\n }\n return b.lv - a.lv;\n });\n list.forEach(item => {\n let { type, offscreen } = item;\n if(type === OFFSCREEN_OVERFLOW) {\n let { matrix, target, ctx: origin, x, y, offsetWidth, offsetHeight, list } = offscreen;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]);\n ctx.fillStyle = '#FFF';\n ctx.beginPath();\n if(list) {\n canvasPolygon(ctx, list);\n }\n else {\n ctx.rect(x, y, offsetWidth, offsetHeight);\n }\n ctx.fill();\n ctx.closePath();\n ctx.globalCompositeOperation = 'source-over';\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n }\n else if(type === OFFSCREEN_FILTER) {\n let { target, ctx: origin, filter } = offscreen;\n // 申请一个新的离屏,应用blur并绘制,如没有则降级,默认ctx.filter为'none'\n if(ctx.filter) {\n let apply = inject.getOffscreenCanvas(width, height, null, 'filter2');\n apply.ctx.filter = painter.canvasFilter(filter);\n if(width && height) {\n apply.ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n apply.ctx.filter = 'none';\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n if(width && height) {\n target.ctx.drawImage(apply.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n apply.ctx.setTransform(1, 0, 0, 1, 0, 0);\n apply.ctx.clearRect(0, 0, width, height);\n apply.release();\n }\n // 绘制回主画布,如果不支持则等同无filter原样绘制\n ctx = origin;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.globalAlpha = 1;\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n }\n else if(type === OFFSCREEN_MASK) {\n let { mask, isClip, target } = offscreen;\n if(isClip) {\n ctx = mask.ctx;\n ctx.globalCompositeOperation = 'source-out';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.release();\n }\n else {\n let target = offscreen.target;\n ctx = target.ctx;\n ctx.globalCompositeOperation = 'destination-in';\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(mask.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n mask.ctx.setTransform(1, 0, 0, 1, 0, 0);\n mask.ctx.clearRect(0, 0, width, height);\n mask.release();\n ctx = offscreen.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n }\n }\n else if(type === OFFSCREEN_BLEND) {\n let target = offscreen.target;\n ctx = offscreen.ctx;\n ctx.globalCompositeOperation = offscreen.mixBlendMode;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.globalAlpha = 1;\n if(width && height) {\n ctx.drawImage(target.canvas, 0, 0, width, height, 0, 0, width, height);\n }\n ctx.globalCompositeOperation = 'source-over';\n target.ctx.globalAlpha = 1;\n target.ctx.setTransform(1, 0, 0, 1, 0, 0);\n target.ctx.clearRect(0, 0, width, height);\n target.release();\n }\n // 特殊的mask节点汇总结束,还原ctx\n else if(type === OFFSCREEN_MASK2) {\n ctx = offscreen.ctx;\n }\n });\n return ctx;\n}\n\nexport default {\n OFFSCREEN_OVERFLOW,\n OFFSCREEN_FILTER,\n OFFSCREEN_MASK,\n OFFSCREEN_BLEND,\n OFFSCREEN_MASK2,\n applyOffscreen,\n};\n","const TOLERANCE = 1e-6;\n\n/**\n * 计算线性方程的根\n * y = ax + b\n * root = -b / a\n * @param {Array} coefs 系数 [b, a] 本文件代码中的系数数组都是从阶次由低到高排列\n */\nfunction getLinearRoot(coefs) {\n let result = [];\n let a = coefs[1];\n\n if (a !== 0) {\n result.push(-coefs[0] / a);\n }\n return result;\n}\n\n/**\n * 计算二次方程的根,一元二次方程求根公式\n * y = ax^2 + bx + c\n * root = (-b ± sqrt(b^2 - 4ac)) / 2a\n * @param {Array} coefs 系数,系数 [c, b, a]\n */\nfunction getQuadraticRoots(coefs) {\n let results = [];\n\n let a = coefs[2];\n let b = coefs[1] / a;\n let c = coefs[0] / a;\n let d = b * b - 4 * c;\n if (d > 0) {\n let e = Math.sqrt(d);\n results.push(0.5 * (-b + e));\n results.push(0.5 * (-b - e));\n } else if (d === 0) {\n // 两个相同的根,只要返回一个\n results.push(0.5 * -b);\n }\n return results;\n}\n\n/**\n * 计算一元三次方程的根\n * y = ax^3 + bx^2 + cx + d\n * 求根公式参见: https://baike.baidu.com/item/%E4%B8%80%E5%85%83%E4%B8%89%E6%AC%A1%E6%96%B9%E7%A8%8B%E6%B1%82%E6%A0%B9%E5%85%AC%E5%BC%8F/10721952?fr=aladdin\n * @param {Array} coefs 系数\n */\nfunction getCubicRoots(coefs) {\n let results = [];\n\n let c3 = coefs[3];\n let c2 = coefs[2] / c3;\n let c1 = coefs[1] / c3;\n let c0 = coefs[0] / c3;\n\n let a = (3 * c1 - c2 * c2) / 3;\n let b = (2 * c2 * c2 * c2 - 9 * c1 * c2 + 27 * c0) / 27;\n let offset = c2 / 3;\n let discrim = b * b / 4 + a * a * a / 27;\n let halfB = b / 2;\n\n if (Math.abs(discrim) <= TOLERANCE) {\n discrim = 0;\n }\n\n if (discrim > 0) {\n let e = Math.sqrt(discrim);\n let tmp;\n let root;\n\n tmp = -halfB + e;\n if (tmp >= 0)\n root = Math.pow(tmp, 1 / 3);\n else\n root = -Math.pow(-tmp, 1 / 3);\n\n tmp = -halfB - e;\n if (tmp >= 0)\n root += Math.pow(tmp, 1 / 3);\n else\n root -= Math.pow(-tmp, 1 / 3);\n\n results.push(root - offset);\n } else if (discrim < 0) {\n let distance = Math.sqrt(-a / 3);\n let angle = Math.atan2(Math.sqrt(-discrim), -halfB) / 3;\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n let sqrt3 = Math.sqrt(3);\n\n results.push(2 * distance * cos - offset);\n results.push(-distance * (cos + sqrt3 * sin) - offset);\n results.push(-distance * (cos - sqrt3 * sin) - offset);\n } else {\n let tmp;\n\n if (halfB >= 0)\n tmp = -Math.pow(halfB, 1 / 3);\n else\n tmp = Math.pow(-halfB, 1 / 3);\n\n results.push(2 * tmp - offset);\n // really should return next root twice, but we return only one\n results.push(-tmp - offset);\n }\n\n\n return results;\n}\n\n/**\n * 计算一元四次方程的根\n * 求根公式: https://baike.baidu.com/item/%E4%B8%80%E5%85%83%E4%B8%89%E6%AC%A1%E6%96%B9%E7%A8%8B%E6%B1%82%E6%A0%B9%E5%85%AC%E5%BC%8F/10721952?fr=aladdin\n * @param {Array} coefs 系数\n */\nfunction getQuarticRoots(coefs) {\n let results = [];\n\n let c4 = coefs[4];\n let c3 = coefs[3] / c4;\n let c2 = coefs[2] / c4;\n let c1 = coefs[1] / c4;\n let c0 = coefs[0] / c4;\n\n let resolveRoots = getCubicRoots([ 1, -c2, c3 * c1 - 4 * c0, -c3 * c3 * c0 + 4 * c2 * c0 - c1 * c1 ].reverse());\n\n let y = resolveRoots[0];\n let discrim = c3 * c3 / 4 - c2 + y;\n\n if (Math.abs(discrim) <= TOLERANCE) discrim = 0;\n\n if (discrim > 0) {\n let e = Math.sqrt(discrim);\n let t1 = 3 * c3 * c3 / 4 - e * e - 2 * c2;\n let t2 = (4 * c3 * c2 - 8 * c1 - c3 * c3 * c3) / (4 * e);\n let plus = t1 + t2;\n let minus = t1 - t2;\n\n if (Math.abs(plus) <= TOLERANCE) plus = 0;\n if (Math.abs(minus) <= TOLERANCE) minus = 0;\n\n if (plus >= 0) {\n let f = Math.sqrt(plus);\n\n results.push(-c3 / 4 + (e + f) / 2);\n results.push(-c3 / 4 + (e - f) / 2);\n }\n if (minus >= 0) {\n let f = Math.sqrt(minus);\n\n results.push(-c3 / 4 + (f - e) / 2);\n results.push(-c3 / 4 - (f + e) / 2);\n }\n } else if (discrim < 0) {\n // no roots\n } else {\n let t2 = y * y - 4 * c0;\n\n if (t2 >= -TOLERANCE) {\n if (t2 < 0) t2 = 0;\n\n t2 = 2 * Math.sqrt(t2);\n let t1 = 3 * c3 * c3 / 4 - 2 * c2;\n if (t1 + t2 >= TOLERANCE) {\n let d = Math.sqrt(t1 + t2);\n\n results.push(-c3 / 4 + d / 2);\n results.push(-c3 / 4 - d / 2);\n }\n if (t1 - t2 >= TOLERANCE) {\n let d = Math.sqrt(t1 - t2);\n\n results.push(-c3 / 4 + d / 2);\n results.push(-c3 / 4 - d / 2);\n }\n }\n }\n\n return results;\n}\n\n/**\n * 计算方程的根\n * @param {Array} coefs 系数按幂次方倒序\n */\nfunction getRoots(coefs) {\n let degree = coefs.length - 1;\n for(let i = degree; i >= 0; i--) {\n if(Math.abs(coefs[i]) < 1e-12) {\n degree--;\n }\n else {\n break;\n }\n }\n let result = [];\n switch (degree) {\n case 1:\n result = getLinearRoot(coefs);\n break;\n case 2:\n result = getQuadraticRoots(coefs);\n break;\n case 3:\n result = getCubicRoots(coefs);\n break;\n case 4:\n result = getQuarticRoots(coefs);\n }\n return result;\n}\n\nexport default {\n getRoots,\n};\n","import equation from './equation';\nimport vector from './vector';\n\nconst getRoots = equation.getRoots;\nconst { unitize3, crossProduct3, dotProduct3, isParallel3, length3 } = vector;\n\n// 两个三次方程组的数值解.9阶的多项式方程,可以最多有9个实根(两个S形曲线的情况)\n// 两个三次方程组无法解析表示,只能数值计算\n// 参考:https://mat.polsl.pl/sjpam/zeszyty/z6/Silesian_J_Pure_Appl_Math_v6_i1_str_155-176.pdf\nconst TOLERANCE = 1e-6;\nconst ACCURACY = 6;\n\n/**\n * 获取求导之后的系数\n * @param coefs\n */\nfunction getDerivativeCoefs(coefs) {\n let derivative = [];\n for(let i = 1; i < coefs.length; i++) {\n derivative.push(i * coefs[i]);\n }\n return derivative;\n}\n\n/**\n * 评估函数\n * @param x\n * @param coefs\n * @return {number}\n */\nfunction evaluate(x, coefs) {\n let result = 0;\n for(let i = coefs.length - 1; i >= 0; i--) {\n result = result * x + coefs[i];\n }\n return result;\n}\n\nfunction bisection(min, max, coefs) {\n let minValue = evaluate(min, coefs);\n let maxValue = evaluate(max, coefs);\n let result;\n if(Math.abs(minValue) <= TOLERANCE) {\n result = min;\n }\n else if(Math.abs(maxValue) <= TOLERANCE) {\n result = max;\n }\n else if(minValue * maxValue <= 0) {\n let tmp1 = Math.log(max - min);\n let tmp2 = Math.LN10 * ACCURACY;\n let iters = Math.ceil((tmp1 + tmp2) / Math.LN2);\n for(let i = 0; i < iters; i++) {\n result = 0.5 * (min + max);\n let value = evaluate(result, coefs);\n\n if(Math.abs(value) <= TOLERANCE) {\n break;\n }\n\n if(value * minValue < 0) {\n max = result;\n maxValue = value;\n }\n else {\n min = result;\n minValue = value;\n }\n }\n\n }\n return result;\n}\n\nfunction getRootsInInterval(min, max, coefs) {\n // console.log('getRootsInInterval', coefs);\n let roots = [];\n let root;\n let degree = coefs.length - 1;\n if(degree === 1) {\n root = bisection(min, max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n else {\n let derivativeCoefs = getDerivativeCoefs(coefs);\n let droots = getRootsInInterval(min, max, derivativeCoefs);\n\n if(droots.length > 0) {\n // find root on [min, droots[0]]\n root = bisection(min, droots[0], coefs);\n if(root != null) {\n roots.push(root);\n }\n // find root on [droots[i],droots[i+1]] for 0 <= i <= count-2\n for(let i = 0; i <= droots.length - 2; i++) {\n root = bisection(droots[i], droots[i + 1], coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n\n // find root on [droots[count-1],xmax]\n root = bisection(droots[droots.length - 1], max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n else {\n // polynomial is monotone on [min,max], has at most one root\n root = bisection(min, max, coefs);\n if(root != null) {\n roots.push(root);\n }\n }\n }\n return roots;\n}\n\n/**\n * 二阶贝塞尔曲线 与 二阶贝塞尔曲线 交点\n * @return {[]}\n */\nfunction intersectBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2, bx3, by3) {\n let c12, c11, c10;\n let c22, c21, c20;\n\n let result = [];\n\n c12 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n\n c11 = {\n x: 2 * ax2 - 2 * ax1,\n y: 2 * ay2 - 2 * ay1,\n };\n c10 = {x: ax1, y: ay1};\n c22 = {\n x: bx1 - 2 * bx2 + bx3,\n y: by1 - 2 * by2 + by3,\n };\n c21 = {\n x: 2 * bx2 - 2 * bx1,\n y: 2 * by2 - 2 * by1,\n };\n c20 = {x: bx1, y: by1};\n\n let coefs;\n\n if(c12.y === 0) {\n let v0 = c12.x * (c10.y - c20.y);\n let v1 = v0 - c11.x * c11.y;\n let v2 = v0 + v1;\n let v3 = c11.y * c11.y;\n\n coefs = [\n c12.x * c22.y * c22.y,\n 2 * c12.x * c21.y * c22.y,\n c12.x * c21.y * c21.y - c22.x * v3 - c22.y * v0 - c22.y * v1,\n -c21.x * v3 - c21.y * v0 - c21.y * v1,\n (c10.x - c20.x) * v3 + (c10.y - c20.y) * v1\n ].reverse();\n }\n else {\n let v0 = c12.x * c22.y - c12.y * c22.x;\n let v1 = c12.x * c21.y - c21.x * c12.y;\n let v2 = c11.x * c12.y - c11.y * c12.x;\n let v3 = c10.y - c20.y;\n let v4 = c12.y * (c10.x - c20.x) - c12.x * v3;\n let v5 = -c11.y * v2 + c12.y * v4;\n let v6 = v2 * v2;\n coefs = [\n v0 * v0,\n 2 * v0 * v1,\n (-c22.y * v6 + c12.y * v1 * v1 + c12.y * v0 * v4 + v0 * v5) / c12.y,\n (-c21.y * v6 + c12.y * v1 * v4 + v1 * v5) / c12.y,\n (v3 * v6 + v4 * v5) / c12.y\n ].reverse();\n }\n\n let roots = getRoots(coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n\n if(0 <= s && s <= 1) {\n let xRoots = getRoots([c12.x, c11.x, c10.x - c20.x - s * c21.x - s * s * c22.x].reverse());\n\n let yRoots = getRoots([c12.y, c11.y, c10.y - c20.y - s * c21.y - s * s * c22.y].reverse());\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n let x = c22.x * s * s + c21.x * s + c20.x;\n let y = c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n // result.push(c22.multiply(s * s).add(c21.multiply(s).add(c20)));\n break checkRoots;\n }\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let c13, c12, c11, c10; // 三阶系数\n let c23, c22, c21, c20;\n\n let result = [];\n\n c13 = {\n x: -ax1 + 3 * ax2 - 3 * ax3 + ax4,\n y: -ay1 + 3 * ay2 - 3 * ay3 + ay4,\n };\n\n c12 = {\n x: 3 * ax1 - 6 * ax2 + 3 * ax3,\n y: 3 * ay1 - 6 * ay2 + 3 * ay3,\n };\n\n c11 = {\n x: -3 * ax1 + 3 * ax2,\n y: -3 * ay1 + 3 * ay2,\n };\n\n c10 = {x: ax1, y: ay1};\n\n c23 = {\n x: -bx1 + 3 * bx2 - 3 * bx3 + bx4,\n y: -by1 + 3 * by2 - 3 * by3 + by4,\n };\n\n c22 = {\n x: 3 * bx1 - 6 * bx2 + 3 * bx3,\n y: 3 * by1 - 6 * by2 + 3 * by3,\n };\n\n c21 = {\n x: -3 * bx1 + 3 * bx2,\n y: -3 * by1 + 3 * by2,\n };\n\n c20 = {x: bx1, y: by1};\n\n let c10x2 = c10.x * c10.x;\n let c10x3 = c10.x * c10.x * c10.x;\n let c10y2 = c10.y * c10.y;\n let c10y3 = c10.y * c10.y * c10.y;\n let c11x2 = c11.x * c11.x;\n let c11x3 = c11.x * c11.x * c11.x;\n let c11y2 = c11.y * c11.y;\n let c11y3 = c11.y * c11.y * c11.y;\n let c12x2 = c12.x * c12.x;\n let c12x3 = c12.x * c12.x * c12.x;\n let c12y2 = c12.y * c12.y;\n let c12y3 = c12.y * c12.y * c12.y;\n let c13x2 = c13.x * c13.x;\n let c13x3 = c13.x * c13.x * c13.x;\n let c13y2 = c13.y * c13.y;\n let c13y3 = c13.y * c13.y * c13.y;\n let c20x2 = c20.x * c20.x;\n let c20x3 = c20.x * c20.x * c20.x;\n let c20y2 = c20.y * c20.y;\n let c20y3 = c20.y * c20.y * c20.y;\n let c21x2 = c21.x * c21.x;\n let c21x3 = c21.x * c21.x * c21.x;\n let c21y2 = c21.y * c21.y;\n let c22x2 = c22.x * c22.x;\n let c22x3 = c22.x * c22.x * c22.x;\n let c22y2 = c22.y * c22.y;\n let c23x2 = c23.x * c23.x;\n let c23x3 = c23.x * c23.x * c23.x;\n let c23y2 = c23.y * c23.y;\n let c23y3 = c23.y * c23.y * c23.y;\n\n let coefs = [-c13x3 * c23y3 + c13y3 * c23x3 - 3 * c13.x * c13y2 * c23x2 * c23.y +\n 3 * c13x2 * c13.y * c23.x * c23y2,\n -6 * c13.x * c22.x * c13y2 * c23.x * c23.y + 6 * c13x2 * c13.y * c22.y * c23.x * c23.y + 3 * c22.x * c13y3 * c23x2 -\n 3 * c13x3 * c22.y * c23y2 - 3 * c13.x * c13y2 * c22.y * c23x2 + 3 * c13x2 * c22.x * c13.y * c23y2,\n -6 * c21.x * c13.x * c13y2 * c23.x * c23.y - 6 * c13.x * c22.x * c13y2 * c22.y * c23.x + 6 * c13x2 * c22.x * c13.y * c22.y * c23.y +\n 3 * c21.x * c13y3 * c23x2 + 3 * c22x2 * c13y3 * c23.x + 3 * c21.x * c13x2 * c13.y * c23y2 - 3 * c13.x * c21.y * c13y2 * c23x2 -\n 3 * c13.x * c22x2 * c13y2 * c23.y + c13x2 * c13.y * c23.x * (6 * c21.y * c23.y + 3 * c22y2) + c13x3 * (-c21.y * c23y2 -\n 2 * c22y2 * c23.y - c23.y * (2 * c21.y * c23.y + c22y2)),\n c11.x * c12.y * c13.x * c13.y * c23.x * c23.y - c11.y * c12.x * c13.x * c13.y * c23.x * c23.y + 6 * c21.x * c22.x * c13y3 * c23.x +\n 3 * c11.x * c12.x * c13.x * c13.y * c23y2 + 6 * c10.x * c13.x * c13y2 * c23.x * c23.y - 3 * c11.x * c12.x * c13y2 * c23.x * c23.y -\n 3 * c11.y * c12.y * c13.x * c13.y * c23x2 - 6 * c10.y * c13x2 * c13.y * c23.x * c23.y - 6 * c20.x * c13.x * c13y2 * c23.x * c23.y +\n 3 * c11.y * c12.y * c13x2 * c23.x * c23.y - 2 * c12.x * c12y2 * c13.x * c23.x * c23.y - 6 * c21.x * c13.x * c22.x * c13y2 * c23.y -\n 6 * c21.x * c13.x * c13y2 * c22.y * c23.x - 6 * c13.x * c21.y * c22.x * c13y2 * c23.x + 6 * c21.x * c13x2 * c13.y * c22.y * c23.y +\n 2 * c12x2 * c12.y * c13.y * c23.x * c23.y + c22x3 * c13y3 - 3 * c10.x * c13y3 * c23x2 + 3 * c10.y * c13x3 * c23y2 +\n 3 * c20.x * c13y3 * c23x2 + c12y3 * c13.x * c23x2 - c12x3 * c13.y * c23y2 - 3 * c10.x * c13x2 * c13.y * c23y2 +\n 3 * c10.y * c13.x * c13y2 * c23x2 - 2 * c11.x * c12.y * c13x2 * c23y2 + c11.x * c12.y * c13y2 * c23x2 - c11.y * c12.x * c13x2 * c23y2 +\n 2 * c11.y * c12.x * c13y2 * c23x2 + 3 * c20.x * c13x2 * c13.y * c23y2 - c12.x * c12y2 * c13.y * c23x2 -\n 3 * c20.y * c13.x * c13y2 * c23x2 + c12x2 * c12.y * c13.x * c23y2 - 3 * c13.x * c22x2 * c13y2 * c22.y +\n c13x2 * c13.y * c23.x * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c13x2 * c22.x * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c13x3 * (-2 * c21.y * c22.y * c23.y - c20.y * c23y2 - c22.y * (2 * c21.y * c23.y + c22y2) - c23.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n 6 * c11.x * c12.x * c13.x * c13.y * c22.y * c23.y + c11.x * c12.y * c13.x * c22.x * c13.y * c23.y + c11.x * c12.y * c13.x * c13.y * c22.y * c23.x -\n c11.y * c12.x * c13.x * c22.x * c13.y * c23.y - c11.y * c12.x * c13.x * c13.y * c22.y * c23.x - 6 * c11.y * c12.y * c13.x * c22.x * c13.y * c23.x -\n 6 * c10.x * c22.x * c13y3 * c23.x + 6 * c20.x * c22.x * c13y3 * c23.x + 6 * c10.y * c13x3 * c22.y * c23.y + 2 * c12y3 * c13.x * c22.x * c23.x -\n 2 * c12x3 * c13.y * c22.y * c23.y + 6 * c10.x * c13.x * c22.x * c13y2 * c23.y + 6 * c10.x * c13.x * c13y2 * c22.y * c23.x +\n 6 * c10.y * c13.x * c22.x * c13y2 * c23.x - 3 * c11.x * c12.x * c22.x * c13y2 * c23.y - 3 * c11.x * c12.x * c13y2 * c22.y * c23.x +\n 2 * c11.x * c12.y * c22.x * c13y2 * c23.x + 4 * c11.y * c12.x * c22.x * c13y2 * c23.x - 6 * c10.x * c13x2 * c13.y * c22.y * c23.y -\n 6 * c10.y * c13x2 * c22.x * c13.y * c23.y - 6 * c10.y * c13x2 * c13.y * c22.y * c23.x - 4 * c11.x * c12.y * c13x2 * c22.y * c23.y -\n 6 * c20.x * c13.x * c22.x * c13y2 * c23.y - 6 * c20.x * c13.x * c13y2 * c22.y * c23.x - 2 * c11.y * c12.x * c13x2 * c22.y * c23.y +\n 3 * c11.y * c12.y * c13x2 * c22.x * c23.y + 3 * c11.y * c12.y * c13x2 * c22.y * c23.x - 2 * c12.x * c12y2 * c13.x * c22.x * c23.y -\n 2 * c12.x * c12y2 * c13.x * c22.y * c23.x - 2 * c12.x * c12y2 * c22.x * c13.y * c23.x - 6 * c20.y * c13.x * c22.x * c13y2 * c23.x -\n 6 * c21.x * c13.x * c21.y * c13y2 * c23.x - 6 * c21.x * c13.x * c22.x * c13y2 * c22.y + 6 * c20.x * c13x2 * c13.y * c22.y * c23.y +\n 2 * c12x2 * c12.y * c13.x * c22.y * c23.y + 2 * c12x2 * c12.y * c22.x * c13.y * c23.y + 2 * c12x2 * c12.y * c13.y * c22.y * c23.x +\n 3 * c21.x * c22x2 * c13y3 + 3 * c21x2 * c13y3 * c23.x - 3 * c13.x * c21.y * c22x2 * c13y2 - 3 * c21x2 * c13.x * c13y2 * c23.y +\n c13x2 * c22.x * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c13x2 * c13.y * c23.x * (6 * c20.y * c22.y + 3 * c21y2) +\n c21.x * c13x2 * c13.y * (6 * c21.y * c23.y + 3 * c22y2) + c13x3 * (-2 * c20.y * c22.y * c23.y - c23.y * (2 * c20.y * c22.y + c21y2) -\n c21.y * (2 * c21.y * c23.y + c22y2) - c22.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n c11.x * c21.x * c12.y * c13.x * c13.y * c23.y + c11.x * c12.y * c13.x * c21.y * c13.y * c23.x + c11.x * c12.y * c13.x * c22.x * c13.y * c22.y -\n c11.y * c12.x * c21.x * c13.x * c13.y * c23.y - c11.y * c12.x * c13.x * c21.y * c13.y * c23.x - c11.y * c12.x * c13.x * c22.x * c13.y * c22.y -\n 6 * c11.y * c21.x * c12.y * c13.x * c13.y * c23.x - 6 * c10.x * c21.x * c13y3 * c23.x + 6 * c20.x * c21.x * c13y3 * c23.x +\n 2 * c21.x * c12y3 * c13.x * c23.x + 6 * c10.x * c21.x * c13.x * c13y2 * c23.y + 6 * c10.x * c13.x * c21.y * c13y2 * c23.x +\n 6 * c10.x * c13.x * c22.x * c13y2 * c22.y + 6 * c10.y * c21.x * c13.x * c13y2 * c23.x - 3 * c11.x * c12.x * c21.x * c13y2 * c23.y -\n 3 * c11.x * c12.x * c21.y * c13y2 * c23.x - 3 * c11.x * c12.x * c22.x * c13y2 * c22.y + 2 * c11.x * c21.x * c12.y * c13y2 * c23.x +\n 4 * c11.y * c12.x * c21.x * c13y2 * c23.x - 6 * c10.y * c21.x * c13x2 * c13.y * c23.y - 6 * c10.y * c13x2 * c21.y * c13.y * c23.x -\n 6 * c10.y * c13x2 * c22.x * c13.y * c22.y - 6 * c20.x * c21.x * c13.x * c13y2 * c23.y - 6 * c20.x * c13.x * c21.y * c13y2 * c23.x -\n 6 * c20.x * c13.x * c22.x * c13y2 * c22.y + 3 * c11.y * c21.x * c12.y * c13x2 * c23.y - 3 * c11.y * c12.y * c13.x * c22x2 * c13.y +\n 3 * c11.y * c12.y * c13x2 * c21.y * c23.x + 3 * c11.y * c12.y * c13x2 * c22.x * c22.y - 2 * c12.x * c21.x * c12y2 * c13.x * c23.y -\n 2 * c12.x * c21.x * c12y2 * c13.y * c23.x - 2 * c12.x * c12y2 * c13.x * c21.y * c23.x - 2 * c12.x * c12y2 * c13.x * c22.x * c22.y -\n 6 * c20.y * c21.x * c13.x * c13y2 * c23.x - 6 * c21.x * c13.x * c21.y * c22.x * c13y2 + 6 * c20.y * c13x2 * c21.y * c13.y * c23.x +\n 2 * c12x2 * c21.x * c12.y * c13.y * c23.y + 2 * c12x2 * c12.y * c21.y * c13.y * c23.x + 2 * c12x2 * c12.y * c22.x * c13.y * c22.y -\n 3 * c10.x * c22x2 * c13y3 + 3 * c20.x * c22x2 * c13y3 + 3 * c21x2 * c22.x * c13y3 + c12y3 * c13.x * c22x2 +\n 3 * c10.y * c13.x * c22x2 * c13y2 + c11.x * c12.y * c22x2 * c13y2 + 2 * c11.y * c12.x * c22x2 * c13y2 -\n c12.x * c12y2 * c22x2 * c13.y - 3 * c20.y * c13.x * c22x2 * c13y2 - 3 * c21x2 * c13.x * c13y2 * c22.y +\n c12x2 * c12.y * c13.x * (2 * c21.y * c23.y + c22y2) + c11.x * c12.x * c13.x * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c21.x * c13x2 * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c12x3 * c13.y * (-2 * c21.y * c23.y - c22y2) +\n c10.y * c13x3 * (6 * c21.y * c23.y + 3 * c22y2) + c11.y * c12.x * c13x2 * (-2 * c21.y * c23.y - c22y2) +\n c11.x * c12.y * c13x2 * (-4 * c21.y * c23.y - 2 * c22y2) + c10.x * c13x2 * c13.y * (-6 * c21.y * c23.y - 3 * c22y2) +\n c13x2 * c22.x * c13.y * (6 * c20.y * c22.y + 3 * c21y2) + c20.x * c13x2 * c13.y * (6 * c21.y * c23.y + 3 * c22y2) +\n c13x3 * (-2 * c20.y * c21.y * c23.y - c22.y * (2 * c20.y * c22.y + c21y2) - c20.y * (2 * c21.y * c23.y + c22y2) -\n c21.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n -c10.x * c11.x * c12.y * c13.x * c13.y * c23.y + c10.x * c11.y * c12.x * c13.x * c13.y * c23.y + 6 * c10.x * c11.y * c12.y * c13.x * c13.y * c23.x -\n 6 * c10.y * c11.x * c12.x * c13.x * c13.y * c23.y - c10.y * c11.x * c12.y * c13.x * c13.y * c23.x + c10.y * c11.y * c12.x * c13.x * c13.y * c23.x +\n c11.x * c11.y * c12.x * c12.y * c13.x * c23.y - c11.x * c11.y * c12.x * c12.y * c13.y * c23.x + c11.x * c20.x * c12.y * c13.x * c13.y * c23.y +\n c11.x * c20.y * c12.y * c13.x * c13.y * c23.x + c11.x * c21.x * c12.y * c13.x * c13.y * c22.y + c11.x * c12.y * c13.x * c21.y * c22.x * c13.y -\n c20.x * c11.y * c12.x * c13.x * c13.y * c23.y - 6 * c20.x * c11.y * c12.y * c13.x * c13.y * c23.x - c11.y * c12.x * c20.y * c13.x * c13.y * c23.x -\n c11.y * c12.x * c21.x * c13.x * c13.y * c22.y - c11.y * c12.x * c13.x * c21.y * c22.x * c13.y - 6 * c11.y * c21.x * c12.y * c13.x * c22.x * c13.y -\n 6 * c10.x * c20.x * c13y3 * c23.x - 6 * c10.x * c21.x * c22.x * c13y3 - 2 * c10.x * c12y3 * c13.x * c23.x + 6 * c20.x * c21.x * c22.x * c13y3 +\n 2 * c20.x * c12y3 * c13.x * c23.x + 2 * c21.x * c12y3 * c13.x * c22.x + 2 * c10.y * c12x3 * c13.y * c23.y - 6 * c10.x * c10.y * c13.x * c13y2 * c23.x +\n 3 * c10.x * c11.x * c12.x * c13y2 * c23.y - 2 * c10.x * c11.x * c12.y * c13y2 * c23.x - 4 * c10.x * c11.y * c12.x * c13y2 * c23.x +\n 3 * c10.y * c11.x * c12.x * c13y2 * c23.x + 6 * c10.x * c10.y * c13x2 * c13.y * c23.y + 6 * c10.x * c20.x * c13.x * c13y2 * c23.y -\n 3 * c10.x * c11.y * c12.y * c13x2 * c23.y + 2 * c10.x * c12.x * c12y2 * c13.x * c23.y + 2 * c10.x * c12.x * c12y2 * c13.y * c23.x +\n 6 * c10.x * c20.y * c13.x * c13y2 * c23.x + 6 * c10.x * c21.x * c13.x * c13y2 * c22.y + 6 * c10.x * c13.x * c21.y * c22.x * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c23.y + 6 * c10.y * c20.x * c13.x * c13y2 * c23.x + 2 * c10.y * c11.y * c12.x * c13x2 * c23.y -\n 3 * c10.y * c11.y * c12.y * c13x2 * c23.x + 2 * c10.y * c12.x * c12y2 * c13.x * c23.x + 6 * c10.y * c21.x * c13.x * c22.x * c13y2 -\n 3 * c11.x * c20.x * c12.x * c13y2 * c23.y + 2 * c11.x * c20.x * c12.y * c13y2 * c23.x + c11.x * c11.y * c12y2 * c13.x * c23.x -\n 3 * c11.x * c12.x * c20.y * c13y2 * c23.x - 3 * c11.x * c12.x * c21.x * c13y2 * c22.y - 3 * c11.x * c12.x * c21.y * c22.x * c13y2 +\n 2 * c11.x * c21.x * c12.y * c22.x * c13y2 + 4 * c20.x * c11.y * c12.x * c13y2 * c23.x + 4 * c11.y * c12.x * c21.x * c22.x * c13y2 -\n 2 * c10.x * c12x2 * c12.y * c13.y * c23.y - 6 * c10.y * c20.x * c13x2 * c13.y * c23.y - 6 * c10.y * c20.y * c13x2 * c13.y * c23.x -\n 6 * c10.y * c21.x * c13x2 * c13.y * c22.y - 2 * c10.y * c12x2 * c12.y * c13.x * c23.y - 2 * c10.y * c12x2 * c12.y * c13.y * c23.x -\n 6 * c10.y * c13x2 * c21.y * c22.x * c13.y - c11.x * c11.y * c12x2 * c13.y * c23.y - 2 * c11.x * c11y2 * c13.x * c13.y * c23.x +\n 3 * c20.x * c11.y * c12.y * c13x2 * c23.y - 2 * c20.x * c12.x * c12y2 * c13.x * c23.y - 2 * c20.x * c12.x * c12y2 * c13.y * c23.x -\n 6 * c20.x * c20.y * c13.x * c13y2 * c23.x - 6 * c20.x * c21.x * c13.x * c13y2 * c22.y - 6 * c20.x * c13.x * c21.y * c22.x * c13y2 +\n 3 * c11.y * c20.y * c12.y * c13x2 * c23.x + 3 * c11.y * c21.x * c12.y * c13x2 * c22.y + 3 * c11.y * c12.y * c13x2 * c21.y * c22.x -\n 2 * c12.x * c20.y * c12y2 * c13.x * c23.x - 2 * c12.x * c21.x * c12y2 * c13.x * c22.y - 2 * c12.x * c21.x * c12y2 * c22.x * c13.y -\n 2 * c12.x * c12y2 * c13.x * c21.y * c22.x - 6 * c20.y * c21.x * c13.x * c22.x * c13y2 - c11y2 * c12.x * c12.y * c13.x * c23.x +\n 2 * c20.x * c12x2 * c12.y * c13.y * c23.y + 6 * c20.y * c13x2 * c21.y * c22.x * c13.y + 2 * c11x2 * c11.y * c13.x * c13.y * c23.y +\n c11x2 * c12.x * c12.y * c13.y * c23.y + 2 * c12x2 * c20.y * c12.y * c13.y * c23.x + 2 * c12x2 * c21.x * c12.y * c13.y * c22.y +\n 2 * c12x2 * c12.y * c21.y * c22.x * c13.y + c21x3 * c13y3 + 3 * c10x2 * c13y3 * c23.x - 3 * c10y2 * c13x3 * c23.y +\n 3 * c20x2 * c13y3 * c23.x + c11y3 * c13x2 * c23.x - c11x3 * c13y2 * c23.y - c11.x * c11y2 * c13x2 * c23.y +\n c11x2 * c11.y * c13y2 * c23.x - 3 * c10x2 * c13.x * c13y2 * c23.y + 3 * c10y2 * c13x2 * c13.y * c23.x - c11x2 * c12y2 * c13.x * c23.y +\n c11y2 * c12x2 * c13.y * c23.x - 3 * c21x2 * c13.x * c21.y * c13y2 - 3 * c20x2 * c13.x * c13y2 * c23.y + 3 * c20y2 * c13x2 * c13.y * c23.x +\n c11.x * c12.x * c13.x * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c12x3 * c13.y * (-2 * c20.y * c23.y - 2 * c21.y * c22.y) +\n c10.y * c13x3 * (6 * c20.y * c23.y + 6 * c21.y * c22.y) + c11.y * c12.x * c13x2 * (-2 * c20.y * c23.y - 2 * c21.y * c22.y) +\n c12x2 * c12.y * c13.x * (2 * c20.y * c23.y + 2 * c21.y * c22.y) + c11.x * c12.y * c13x2 * (-4 * c20.y * c23.y - 4 * c21.y * c22.y) +\n c10.x * c13x2 * c13.y * (-6 * c20.y * c23.y - 6 * c21.y * c22.y) + c20.x * c13x2 * c13.y * (6 * c20.y * c23.y + 6 * c21.y * c22.y) +\n c21.x * c13x2 * c13.y * (6 * c20.y * c22.y + 3 * c21y2) + c13x3 * (-2 * c20.y * c21.y * c22.y - c20y2 * c23.y -\n c21.y * (2 * c20.y * c22.y + c21y2) - c20.y * (2 * c20.y * c23.y + 2 * c21.y * c22.y)),\n -c10.x * c11.x * c12.y * c13.x * c13.y * c22.y + c10.x * c11.y * c12.x * c13.x * c13.y * c22.y + 6 * c10.x * c11.y * c12.y * c13.x * c22.x * c13.y -\n 6 * c10.y * c11.x * c12.x * c13.x * c13.y * c22.y - c10.y * c11.x * c12.y * c13.x * c22.x * c13.y + c10.y * c11.y * c12.x * c13.x * c22.x * c13.y +\n c11.x * c11.y * c12.x * c12.y * c13.x * c22.y - c11.x * c11.y * c12.x * c12.y * c22.x * c13.y + c11.x * c20.x * c12.y * c13.x * c13.y * c22.y +\n c11.x * c20.y * c12.y * c13.x * c22.x * c13.y + c11.x * c21.x * c12.y * c13.x * c21.y * c13.y - c20.x * c11.y * c12.x * c13.x * c13.y * c22.y -\n 6 * c20.x * c11.y * c12.y * c13.x * c22.x * c13.y - c11.y * c12.x * c20.y * c13.x * c22.x * c13.y - c11.y * c12.x * c21.x * c13.x * c21.y * c13.y -\n 6 * c10.x * c20.x * c22.x * c13y3 - 2 * c10.x * c12y3 * c13.x * c22.x + 2 * c20.x * c12y3 * c13.x * c22.x + 2 * c10.y * c12x3 * c13.y * c22.y -\n 6 * c10.x * c10.y * c13.x * c22.x * c13y2 + 3 * c10.x * c11.x * c12.x * c13y2 * c22.y - 2 * c10.x * c11.x * c12.y * c22.x * c13y2 -\n 4 * c10.x * c11.y * c12.x * c22.x * c13y2 + 3 * c10.y * c11.x * c12.x * c22.x * c13y2 + 6 * c10.x * c10.y * c13x2 * c13.y * c22.y +\n 6 * c10.x * c20.x * c13.x * c13y2 * c22.y - 3 * c10.x * c11.y * c12.y * c13x2 * c22.y + 2 * c10.x * c12.x * c12y2 * c13.x * c22.y +\n 2 * c10.x * c12.x * c12y2 * c22.x * c13.y + 6 * c10.x * c20.y * c13.x * c22.x * c13y2 + 6 * c10.x * c21.x * c13.x * c21.y * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c22.y + 6 * c10.y * c20.x * c13.x * c22.x * c13y2 + 2 * c10.y * c11.y * c12.x * c13x2 * c22.y -\n 3 * c10.y * c11.y * c12.y * c13x2 * c22.x + 2 * c10.y * c12.x * c12y2 * c13.x * c22.x - 3 * c11.x * c20.x * c12.x * c13y2 * c22.y +\n 2 * c11.x * c20.x * c12.y * c22.x * c13y2 + c11.x * c11.y * c12y2 * c13.x * c22.x - 3 * c11.x * c12.x * c20.y * c22.x * c13y2 -\n 3 * c11.x * c12.x * c21.x * c21.y * c13y2 + 4 * c20.x * c11.y * c12.x * c22.x * c13y2 - 2 * c10.x * c12x2 * c12.y * c13.y * c22.y -\n 6 * c10.y * c20.x * c13x2 * c13.y * c22.y - 6 * c10.y * c20.y * c13x2 * c22.x * c13.y - 6 * c10.y * c21.x * c13x2 * c21.y * c13.y -\n 2 * c10.y * c12x2 * c12.y * c13.x * c22.y - 2 * c10.y * c12x2 * c12.y * c22.x * c13.y - c11.x * c11.y * c12x2 * c13.y * c22.y -\n 2 * c11.x * c11y2 * c13.x * c22.x * c13.y + 3 * c20.x * c11.y * c12.y * c13x2 * c22.y - 2 * c20.x * c12.x * c12y2 * c13.x * c22.y -\n 2 * c20.x * c12.x * c12y2 * c22.x * c13.y - 6 * c20.x * c20.y * c13.x * c22.x * c13y2 - 6 * c20.x * c21.x * c13.x * c21.y * c13y2 +\n 3 * c11.y * c20.y * c12.y * c13x2 * c22.x + 3 * c11.y * c21.x * c12.y * c13x2 * c21.y - 2 * c12.x * c20.y * c12y2 * c13.x * c22.x -\n 2 * c12.x * c21.x * c12y2 * c13.x * c21.y - c11y2 * c12.x * c12.y * c13.x * c22.x + 2 * c20.x * c12x2 * c12.y * c13.y * c22.y -\n 3 * c11.y * c21x2 * c12.y * c13.x * c13.y + 6 * c20.y * c21.x * c13x2 * c21.y * c13.y + 2 * c11x2 * c11.y * c13.x * c13.y * c22.y +\n c11x2 * c12.x * c12.y * c13.y * c22.y + 2 * c12x2 * c20.y * c12.y * c22.x * c13.y + 2 * c12x2 * c21.x * c12.y * c21.y * c13.y -\n 3 * c10.x * c21x2 * c13y3 + 3 * c20.x * c21x2 * c13y3 + 3 * c10x2 * c22.x * c13y3 - 3 * c10y2 * c13x3 * c22.y + 3 * c20x2 * c22.x * c13y3 +\n c21x2 * c12y3 * c13.x + c11y3 * c13x2 * c22.x - c11x3 * c13y2 * c22.y + 3 * c10.y * c21x2 * c13.x * c13y2 -\n c11.x * c11y2 * c13x2 * c22.y + c11.x * c21x2 * c12.y * c13y2 + 2 * c11.y * c12.x * c21x2 * c13y2 + c11x2 * c11.y * c22.x * c13y2 -\n c12.x * c21x2 * c12y2 * c13.y - 3 * c20.y * c21x2 * c13.x * c13y2 - 3 * c10x2 * c13.x * c13y2 * c22.y + 3 * c10y2 * c13x2 * c22.x * c13.y -\n c11x2 * c12y2 * c13.x * c22.y + c11y2 * c12x2 * c22.x * c13.y - 3 * c20x2 * c13.x * c13y2 * c22.y + 3 * c20y2 * c13x2 * c22.x * c13.y +\n c12x2 * c12.y * c13.x * (2 * c20.y * c22.y + c21y2) + c11.x * c12.x * c13.x * c13.y * (6 * c20.y * c22.y + 3 * c21y2) +\n c12x3 * c13.y * (-2 * c20.y * c22.y - c21y2) + c10.y * c13x3 * (6 * c20.y * c22.y + 3 * c21y2) +\n c11.y * c12.x * c13x2 * (-2 * c20.y * c22.y - c21y2) + c11.x * c12.y * c13x2 * (-4 * c20.y * c22.y - 2 * c21y2) +\n c10.x * c13x2 * c13.y * (-6 * c20.y * c22.y - 3 * c21y2) + c20.x * c13x2 * c13.y * (6 * c20.y * c22.y + 3 * c21y2) +\n c13x3 * (-2 * c20.y * c21y2 - c20y2 * c22.y - c20.y * (2 * c20.y * c22.y + c21y2)),\n -c10.x * c11.x * c12.y * c13.x * c21.y * c13.y + c10.x * c11.y * c12.x * c13.x * c21.y * c13.y + 6 * c10.x * c11.y * c21.x * c12.y * c13.x * c13.y -\n 6 * c10.y * c11.x * c12.x * c13.x * c21.y * c13.y - c10.y * c11.x * c21.x * c12.y * c13.x * c13.y + c10.y * c11.y * c12.x * c21.x * c13.x * c13.y -\n c11.x * c11.y * c12.x * c21.x * c12.y * c13.y + c11.x * c11.y * c12.x * c12.y * c13.x * c21.y + c11.x * c20.x * c12.y * c13.x * c21.y * c13.y +\n 6 * c11.x * c12.x * c20.y * c13.x * c21.y * c13.y + c11.x * c20.y * c21.x * c12.y * c13.x * c13.y - c20.x * c11.y * c12.x * c13.x * c21.y * c13.y -\n 6 * c20.x * c11.y * c21.x * c12.y * c13.x * c13.y - c11.y * c12.x * c20.y * c21.x * c13.x * c13.y - 6 * c10.x * c20.x * c21.x * c13y3 -\n 2 * c10.x * c21.x * c12y3 * c13.x + 6 * c10.y * c20.y * c13x3 * c21.y + 2 * c20.x * c21.x * c12y3 * c13.x + 2 * c10.y * c12x3 * c21.y * c13.y -\n 2 * c12x3 * c20.y * c21.y * c13.y - 6 * c10.x * c10.y * c21.x * c13.x * c13y2 + 3 * c10.x * c11.x * c12.x * c21.y * c13y2 -\n 2 * c10.x * c11.x * c21.x * c12.y * c13y2 - 4 * c10.x * c11.y * c12.x * c21.x * c13y2 + 3 * c10.y * c11.x * c12.x * c21.x * c13y2 +\n 6 * c10.x * c10.y * c13x2 * c21.y * c13.y + 6 * c10.x * c20.x * c13.x * c21.y * c13y2 - 3 * c10.x * c11.y * c12.y * c13x2 * c21.y +\n 2 * c10.x * c12.x * c21.x * c12y2 * c13.y + 2 * c10.x * c12.x * c12y2 * c13.x * c21.y + 6 * c10.x * c20.y * c21.x * c13.x * c13y2 +\n 4 * c10.y * c11.x * c12.y * c13x2 * c21.y + 6 * c10.y * c20.x * c21.x * c13.x * c13y2 + 2 * c10.y * c11.y * c12.x * c13x2 * c21.y -\n 3 * c10.y * c11.y * c21.x * c12.y * c13x2 + 2 * c10.y * c12.x * c21.x * c12y2 * c13.x - 3 * c11.x * c20.x * c12.x * c21.y * c13y2 +\n 2 * c11.x * c20.x * c21.x * c12.y * c13y2 + c11.x * c11.y * c21.x * c12y2 * c13.x - 3 * c11.x * c12.x * c20.y * c21.x * c13y2 +\n 4 * c20.x * c11.y * c12.x * c21.x * c13y2 - 6 * c10.x * c20.y * c13x2 * c21.y * c13.y - 2 * c10.x * c12x2 * c12.y * c21.y * c13.y -\n 6 * c10.y * c20.x * c13x2 * c21.y * c13.y - 6 * c10.y * c20.y * c21.x * c13x2 * c13.y - 2 * c10.y * c12x2 * c21.x * c12.y * c13.y -\n 2 * c10.y * c12x2 * c12.y * c13.x * c21.y - c11.x * c11.y * c12x2 * c21.y * c13.y - 4 * c11.x * c20.y * c12.y * c13x2 * c21.y -\n 2 * c11.x * c11y2 * c21.x * c13.x * c13.y + 3 * c20.x * c11.y * c12.y * c13x2 * c21.y - 2 * c20.x * c12.x * c21.x * c12y2 * c13.y -\n 2 * c20.x * c12.x * c12y2 * c13.x * c21.y - 6 * c20.x * c20.y * c21.x * c13.x * c13y2 - 2 * c11.y * c12.x * c20.y * c13x2 * c21.y +\n 3 * c11.y * c20.y * c21.x * c12.y * c13x2 - 2 * c12.x * c20.y * c21.x * c12y2 * c13.x - c11y2 * c12.x * c21.x * c12.y * c13.x +\n 6 * c20.x * c20.y * c13x2 * c21.y * c13.y + 2 * c20.x * c12x2 * c12.y * c21.y * c13.y + 2 * c11x2 * c11.y * c13.x * c21.y * c13.y +\n c11x2 * c12.x * c12.y * c21.y * c13.y + 2 * c12x2 * c20.y * c21.x * c12.y * c13.y + 2 * c12x2 * c20.y * c12.y * c13.x * c21.y +\n 3 * c10x2 * c21.x * c13y3 - 3 * c10y2 * c13x3 * c21.y + 3 * c20x2 * c21.x * c13y3 + c11y3 * c21.x * c13x2 - c11x3 * c21.y * c13y2 -\n 3 * c20y2 * c13x3 * c21.y - c11.x * c11y2 * c13x2 * c21.y + c11x2 * c11.y * c21.x * c13y2 - 3 * c10x2 * c13.x * c21.y * c13y2 +\n 3 * c10y2 * c21.x * c13x2 * c13.y - c11x2 * c12y2 * c13.x * c21.y + c11y2 * c12x2 * c21.x * c13.y - 3 * c20x2 * c13.x * c21.y * c13y2 +\n 3 * c20y2 * c21.x * c13x2 * c13.y,\n c10.x * c10.y * c11.x * c12.y * c13.x * c13.y - c10.x * c10.y * c11.y * c12.x * c13.x * c13.y + c10.x * c11.x * c11.y * c12.x * c12.y * c13.y -\n c10.y * c11.x * c11.y * c12.x * c12.y * c13.x - c10.x * c11.x * c20.y * c12.y * c13.x * c13.y + 6 * c10.x * c20.x * c11.y * c12.y * c13.x * c13.y +\n c10.x * c11.y * c12.x * c20.y * c13.x * c13.y - c10.y * c11.x * c20.x * c12.y * c13.x * c13.y - 6 * c10.y * c11.x * c12.x * c20.y * c13.x * c13.y +\n c10.y * c20.x * c11.y * c12.x * c13.x * c13.y - c11.x * c20.x * c11.y * c12.x * c12.y * c13.y + c11.x * c11.y * c12.x * c20.y * c12.y * c13.x +\n c11.x * c20.x * c20.y * c12.y * c13.x * c13.y - c20.x * c11.y * c12.x * c20.y * c13.x * c13.y - 2 * c10.x * c20.x * c12y3 * c13.x +\n 2 * c10.y * c12x3 * c20.y * c13.y - 3 * c10.x * c10.y * c11.x * c12.x * c13y2 - 6 * c10.x * c10.y * c20.x * c13.x * c13y2 +\n 3 * c10.x * c10.y * c11.y * c12.y * c13x2 - 2 * c10.x * c10.y * c12.x * c12y2 * c13.x - 2 * c10.x * c11.x * c20.x * c12.y * c13y2 -\n c10.x * c11.x * c11.y * c12y2 * c13.x + 3 * c10.x * c11.x * c12.x * c20.y * c13y2 - 4 * c10.x * c20.x * c11.y * c12.x * c13y2 +\n 3 * c10.y * c11.x * c20.x * c12.x * c13y2 + 6 * c10.x * c10.y * c20.y * c13x2 * c13.y + 2 * c10.x * c10.y * c12x2 * c12.y * c13.y +\n 2 * c10.x * c11.x * c11y2 * c13.x * c13.y + 2 * c10.x * c20.x * c12.x * c12y2 * c13.y + 6 * c10.x * c20.x * c20.y * c13.x * c13y2 -\n 3 * c10.x * c11.y * c20.y * c12.y * c13x2 + 2 * c10.x * c12.x * c20.y * c12y2 * c13.x + c10.x * c11y2 * c12.x * c12.y * c13.x +\n c10.y * c11.x * c11.y * c12x2 * c13.y + 4 * c10.y * c11.x * c20.y * c12.y * c13x2 - 3 * c10.y * c20.x * c11.y * c12.y * c13x2 +\n 2 * c10.y * c20.x * c12.x * c12y2 * c13.x + 2 * c10.y * c11.y * c12.x * c20.y * c13x2 + c11.x * c20.x * c11.y * c12y2 * c13.x -\n 3 * c11.x * c20.x * c12.x * c20.y * c13y2 - 2 * c10.x * c12x2 * c20.y * c12.y * c13.y - 6 * c10.y * c20.x * c20.y * c13x2 * c13.y -\n 2 * c10.y * c20.x * c12x2 * c12.y * c13.y - 2 * c10.y * c11x2 * c11.y * c13.x * c13.y - c10.y * c11x2 * c12.x * c12.y * c13.y -\n 2 * c10.y * c12x2 * c20.y * c12.y * c13.x - 2 * c11.x * c20.x * c11y2 * c13.x * c13.y - c11.x * c11.y * c12x2 * c20.y * c13.y +\n 3 * c20.x * c11.y * c20.y * c12.y * c13x2 - 2 * c20.x * c12.x * c20.y * c12y2 * c13.x - c20.x * c11y2 * c12.x * c12.y * c13.x +\n 3 * c10y2 * c11.x * c12.x * c13.x * c13.y + 3 * c11.x * c12.x * c20y2 * c13.x * c13.y + 2 * c20.x * c12x2 * c20.y * c12.y * c13.y -\n 3 * c10x2 * c11.y * c12.y * c13.x * c13.y + 2 * c11x2 * c11.y * c20.y * c13.x * c13.y + c11x2 * c12.x * c20.y * c12.y * c13.y -\n 3 * c20x2 * c11.y * c12.y * c13.x * c13.y - c10x3 * c13y3 + c10y3 * c13x3 + c20x3 * c13y3 - c20y3 * c13x3 -\n 3 * c10.x * c20x2 * c13y3 - c10.x * c11y3 * c13x2 + 3 * c10x2 * c20.x * c13y3 + c10.y * c11x3 * c13y2 +\n 3 * c10.y * c20y2 * c13x3 + c20.x * c11y3 * c13x2 + c10x2 * c12y3 * c13.x - 3 * c10y2 * c20.y * c13x3 - c10y2 * c12x3 * c13.y +\n c20x2 * c12y3 * c13.x - c11x3 * c20.y * c13y2 - c12x3 * c20y2 * c13.y - c10.x * c11x2 * c11.y * c13y2 +\n c10.y * c11.x * c11y2 * c13x2 - 3 * c10.x * c10y2 * c13x2 * c13.y - c10.x * c11y2 * c12x2 * c13.y + c10.y * c11x2 * c12y2 * c13.x -\n c11.x * c11y2 * c20.y * c13x2 + 3 * c10x2 * c10.y * c13.x * c13y2 + c10x2 * c11.x * c12.y * c13y2 +\n 2 * c10x2 * c11.y * c12.x * c13y2 - 2 * c10y2 * c11.x * c12.y * c13x2 - c10y2 * c11.y * c12.x * c13x2 + c11x2 * c20.x * c11.y * c13y2 -\n 3 * c10.x * c20y2 * c13x2 * c13.y + 3 * c10.y * c20x2 * c13.x * c13y2 + c11.x * c20x2 * c12.y * c13y2 - 2 * c11.x * c20y2 * c12.y * c13x2 +\n c20.x * c11y2 * c12x2 * c13.y - c11.y * c12.x * c20y2 * c13x2 - c10x2 * c12.x * c12y2 * c13.y - 3 * c10x2 * c20.y * c13.x * c13y2 +\n 3 * c10y2 * c20.x * c13x2 * c13.y + c10y2 * c12x2 * c12.y * c13.x - c11x2 * c20.y * c12y2 * c13.x + 2 * c20x2 * c11.y * c12.x * c13y2 +\n 3 * c20.x * c20y2 * c13x2 * c13.y - c20x2 * c12.x * c12y2 * c13.y - 3 * c20x2 * c20.y * c13.x * c13y2 + c12x2 * c20y2 * c12.y * c13.x\n ].reverse();\n\n let roots = getRootsInInterval(0, 1, coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n let xRoots = getRoots([c13.x, c12.x, c11.x, c10.x - c20.x - s * c21.x - s * s * c22.x - s * s * s * c23.x].reverse());\n let yRoots = getRoots([c13.y,\n c12.y,\n c11.y,\n c10.y - c20.y - s * c21.y - s * s * c22.y - s * s * s * c23.y].reverse());\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n let x = c23.x * s * s * s + c22.x * s * s + c21.x * s + c20.x;\n let y = c23.y * s * s * s + c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n break checkRoots;\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let c12, c11, c10;\n let c23, c22, c21, c20;\n let result = [];\n\n c12 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n\n c11 = {\n x: 2 * ax2 - 2 * ax1,\n y: 2 * ay2 - 2 * ay1,\n };\n c10 = {x: ax1, y: ay1};\n\n c23 = {\n x: -bx1 + 3 * bx2 - 3 * bx3 + bx4,\n y: -by1 + 3 * by2 - 3 * by3 + by4,\n };\n\n c22 = {\n x: 3 * bx1 - 6 * bx2 + 3 * bx3,\n y: 3 * by1 - 6 * by2 + 3 * by3,\n };\n\n c21 = {\n x: -3 * bx1 + 3 * bx2,\n y: -3 * by1 + 3 * by2,\n };\n\n c20 = {x: bx1, y: by1};\n\n let c10x2 = c10.x * c10.x;\n let c10y2 = c10.y * c10.y;\n let c11x2 = c11.x * c11.x;\n let c11y2 = c11.y * c11.y;\n let c12x2 = c12.x * c12.x;\n let c12y2 = c12.y * c12.y;\n let c20x2 = c20.x * c20.x;\n let c20y2 = c20.y * c20.y;\n let c21x2 = c21.x * c21.x;\n let c21y2 = c21.y * c21.y;\n let c22x2 = c22.x * c22.x;\n let c22y2 = c22.y * c22.y;\n let c23x2 = c23.x * c23.x;\n let c23y2 = c23.y * c23.y;\n\n let coefs = [\n -2 * c12.x * c12.y * c23.x * c23.y + c12x2 * c23y2 + c12y2 * c23x2,\n -2 * c12.x * c12.y * c22.x * c23.y - 2 * c12.x * c12.y * c22.y * c23.x + 2 * c12y2 * c22.x * c23.x +\n 2 * c12x2 * c22.y * c23.y,\n -2 * c12.x * c21.x * c12.y * c23.y - 2 * c12.x * c12.y * c21.y * c23.x - 2 * c12.x * c12.y * c22.x * c22.y +\n 2 * c21.x * c12y2 * c23.x + c12y2 * c22x2 + c12x2 * (2 * c21.y * c23.y + c22y2),\n 2 * c10.x * c12.x * c12.y * c23.y + 2 * c10.y * c12.x * c12.y * c23.x + c11.x * c11.y * c12.x * c23.y +\n c11.x * c11.y * c12.y * c23.x - 2 * c20.x * c12.x * c12.y * c23.y - 2 * c12.x * c20.y * c12.y * c23.x -\n 2 * c12.x * c21.x * c12.y * c22.y - 2 * c12.x * c12.y * c21.y * c22.x - 2 * c10.x * c12y2 * c23.x -\n 2 * c10.y * c12x2 * c23.y + 2 * c20.x * c12y2 * c23.x + 2 * c21.x * c12y2 * c22.x -\n c11y2 * c12.x * c23.x - c11x2 * c12.y * c23.y + c12x2 * (2 * c20.y * c23.y + 2 * c21.y * c22.y),\n 2 * c10.x * c12.x * c12.y * c22.y + 2 * c10.y * c12.x * c12.y * c22.x + c11.x * c11.y * c12.x * c22.y +\n c11.x * c11.y * c12.y * c22.x - 2 * c20.x * c12.x * c12.y * c22.y - 2 * c12.x * c20.y * c12.y * c22.x -\n 2 * c12.x * c21.x * c12.y * c21.y - 2 * c10.x * c12y2 * c22.x - 2 * c10.y * c12x2 * c22.y +\n 2 * c20.x * c12y2 * c22.x - c11y2 * c12.x * c22.x - c11x2 * c12.y * c22.y + c21x2 * c12y2 +\n c12x2 * (2 * c20.y * c22.y + c21y2),\n 2 * c10.x * c12.x * c12.y * c21.y + 2 * c10.y * c12.x * c21.x * c12.y + c11.x * c11.y * c12.x * c21.y +\n c11.x * c11.y * c21.x * c12.y - 2 * c20.x * c12.x * c12.y * c21.y - 2 * c12.x * c20.y * c21.x * c12.y -\n 2 * c10.x * c21.x * c12y2 - 2 * c10.y * c12x2 * c21.y + 2 * c20.x * c21.x * c12y2 -\n c11y2 * c12.x * c21.x - c11x2 * c12.y * c21.y + 2 * c12x2 * c20.y * c21.y,\n -2 * c10.x * c10.y * c12.x * c12.y - c10.x * c11.x * c11.y * c12.y - c10.y * c11.x * c11.y * c12.x +\n 2 * c10.x * c12.x * c20.y * c12.y + 2 * c10.y * c20.x * c12.x * c12.y + c11.x * c20.x * c11.y * c12.y +\n c11.x * c11.y * c12.x * c20.y - 2 * c20.x * c12.x * c20.y * c12.y - 2 * c10.x * c20.x * c12y2 +\n c10.x * c11y2 * c12.x + c10.y * c11x2 * c12.y - 2 * c10.y * c12x2 * c20.y -\n c20.x * c11y2 * c12.x - c11x2 * c20.y * c12.y + c10x2 * c12y2 + c10y2 * c12x2 +\n c20x2 * c12y2 + c12x2 * c20y2].reverse();\n\n let roots = getRootsInInterval(0, 1, coefs);\n // console.log(roots);\n\n for(let i = 0; i < roots.length; i++) {\n let s = roots[i];\n let xRoots = getRoots([c12.x,\n c11.x,\n c10.x - c20.x - s * c21.x - s * s * c22.x - s * s * s * c23.x].reverse());\n let yRoots = getRoots([c12.y,\n c11.y,\n c10.y - c20.y - s * c21.y - s * s * c22.y - s * s * s * c23.y].reverse());\n //\n // console.log('xRoots', xRoots);\n //\n // console.log('yRoots', yRoots);\n\n if(xRoots.length > 0 && yRoots.length > 0) {\n let TOLERANCE = 1e-4;\n\n checkRoots:\n for(let j = 0; j < xRoots.length; j++) {\n let xRoot = xRoots[j];\n\n if(0 <= xRoot && xRoot <= 1) {\n for(let k = 0; k < yRoots.length; k++) {\n if(Math.abs(xRoot - yRoots[k]) < TOLERANCE) {\n\n let x = c23.x * s * s * s + c22.x * s * s + c21.x * s + c20.x;\n let y = c23.y * s * s * s + c22.y * s * s + c21.y * s + c20.y;\n result.push({x, y, t: xRoot});\n break checkRoots;\n }\n }\n }\n }\n }\n }\n return result;\n}\n\nfunction intersectBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3, bx1, by1, bx2, by2) {\n let c2, c1, c0;\n let cl, n;\n let result = [];\n\n let minbx = Math.min(bx1, bx2);\n let minby = Math.min(by1, by2);\n let maxbx = Math.max(bx1, bx2);\n let maxby = Math.max(by1, by2);\n\n const dot = (a, b) => a.x * b.x + a.y * b.y;\n const lerp = (a, b, t) => ({\n x: a.x - (a.x - b.x) * t,\n y: a.y - (a.y - b.y) * t,\n t,\n });\n\n c2 = {\n x: ax1 - 2 * ax2 + ax3,\n y: ay1 - 2 * ay2 + ay3,\n };\n c1 = {\n x: -2 * ax1 + 2 * ax2,\n y: -2 * ay1 + 2 * ay2,\n };\n c0 = {x: ax1, y: ay1};\n\n n = {x: by1 - by2, y: bx2 - bx1};\n cl = bx1 * by2 - bx2 * by1;\n\n // console.log('intersectBezier2Line', n, c0, c1, c2, cl);\n\n let coefs = [dot(n, c2), dot(n, c1), dot(n, c0) + cl].reverse();\n\n // console.log('intersectBezier2Line coefs', coefs);\n\n let roots = getRoots(coefs);\n\n // console.log('intersectBezier2Line roots', roots);\n\n for(let i = 0; i < roots.length; i++) {\n let t = roots[i];\n\n if(0 <= t && t <= 1) {\n let p4 = lerp({x: ax1, y: ay1}, {x: ax2, y: ay2}, t);\n let p5 = lerp({x: ax2, y: ay2}, {x: ax3, y: ay3}, t);\n\n let p6 = lerp(p4, p5, t);\n // console.log('p4, p5, p6', p4, p5, p6);\n\n if(bx1 === bx2) {\n if(minby <= p6.y && p6.y <= maxby) {\n result.push(p6);\n }\n }\n else if(by1 === by2) {\n if(minbx <= p6.x && p6.x <= maxbx) {\n result.push(p6);\n }\n }\n else if(p6.x >= minbx && p6.y >= minby && p6.x <= maxbx && p6.y <= maxby) {\n result.push(p6);\n }\n }\n }\n return result;\n}\n\n\n/**\n *\n * (-P1+3P2-3P3+P4)t^3 + (3P1-6P2+3P3)t^2 + (-3P1+3P2)t + P1\n * /\\ /\\ /\\ /\\\n * || || || ||\n * c3 c2 c1 c0\n */\nfunction intersectBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4, bx1, by1, bx2, by2) {\n let c3, c2, c1, c0;\n let cl, n;\n let result = [];\n\n let minbx = Math.min(bx1, bx2);\n let minby = Math.min(by1, by2);\n let maxbx = Math.max(bx1, bx2);\n let maxby = Math.max(by1, by2);\n\n const dot = (a, b) => a.x * b.x + a.y * b.y;\n const lerp = (a, b, t) => ({\n x: a.x - (a.x - b.x) * t,\n y: a.y - (a.y - b.y) * t,\n t,\n });\n\n c3 = {\n x: -ax1 + 3 * ax2 - 3 * ax3 + ax4,\n y: -ay1 + 3 * ay2 - 3 * ay3 + ay4,\n };\n c2 = {\n x: 3 * ax1 - 6 * ax2 + 3 * ax3,\n y: 3 * ay1 - 6 * ay2 + 3 * ay3,\n };\n c1 = {\n x: -3 * ax1 + 3 * ax2,\n y: -3 * ay1 + 3 * ay2,\n };\n c0 = {x: ax1, y: ay1};\n\n n = {x: by1 - by2, y: bx2 - bx1};\n cl = bx1 * by2 - bx2 * by1;\n\n let coefs = [\n cl + dot(n, c0),\n dot(n, c1),\n dot(n, c2),\n dot(n, c3),\n ];\n\n let roots = getRoots(coefs);\n\n for(let i = 0; i < roots.length; i++) {\n let t = roots[i];\n\n if(0 <= t && t <= 1) {\n let p5 = lerp({x: ax1, y: ay1}, {x: ax2, y: ay2}, t);\n let p6 = lerp({x: ax2, y: ay2}, {x: ax3, y: ay3}, t);\n let p7 = lerp({x: ax3, y: ay3}, {x: ax4, y: ay4}, t);\n let p8 = lerp(p5, p6, t);\n let p9 = lerp(p6, p7, t);\n let p10 = lerp(p8, p9, t);\n\n if(bx1 === bx2) {\n if(minby <= p10.y && p10.y <= maxby) {\n result.push(p10);\n }\n }\n else if(by1 === by2) {\n if(minbx <= p10.x && p10.x <= maxbx) {\n result.push(p10);\n }\n }\n else if(p10.x >= minbx && p10.y >= minby && p10.x <= maxbx && p10.y <= maxby) {\n result.push(p10);\n }\n }\n }\n return result;\n}\n\n/**\n * 3d直线交点,允许误差,传入4个顶点坐标\n * limitToFiniteSegment可传0、1、2、3,默认0是不考虑点是否在传入的顶点组成的线段上\n * 1为限制在p1/p2线段,2为限制在p3/p4线段,3为都限制\n */\nfunction intersectLineLine3(p1, p2, p3, p4, limitToFiniteSegment = 0, tolerance = 1e-9) {\n let p13 = subtractPoint(p1, p3);\n let p43 = subtractPoint(p4, p3);\n let p21 = subtractPoint(p2, p1);\n let d1343 = p13.x * p43.x + p13.y * p43.y + p13.z * p43.z;\n let d4321 = p43.x * p21.x + p43.y * p21.y + p43.z * p21.z;\n let d1321 = p13.x * p21.x + p13.y * p21.y + p13.z * p21.z;\n let d4343 = p43.x * p43.x + p43.y * p43.y + p43.z * p43.z;\n let d2121 = p21.x * p21.x + p21.y * p21.y + p21.z * p21.z;\n let denom = d2121 * d4343 - d4321 * d4321;\n if(Math.abs(denom) < tolerance) {\n return;\n }\n let numer = d1343 * d4321 - d1321 * d4343;\n let mua = numer / denom;\n let mub = (d1343 + d4321 * mua) / d4343;\n let pa = {\n x: p1.x + mua * p21.x,\n y: p1.y + mua * p21.y,\n z: p1.z + mua * p21.z,\n };\n let pb = {\n x: p3.x + mub * p43.x,\n y: p3.y + mub * p43.y,\n z: p3.z + mub * p43.z,\n };\n let distance = distanceTo(pa, pb);\n if(distance > tolerance) {\n return;\n }\n let intersectPt = divide(addPoint(pa, pb), 2);\n if(!limitToFiniteSegment) {\n return intersectPt;\n }\n let paramA = closestParam(intersectPt, p1, p2);\n let paramB = closestParam(intersectPt, p3, p4);\n if(paramA < 0 && Math.abs(paramA) < 1e-9) {\n paramA = 0;\n }\n else if(paramA > 1 && paramA - 1 < 1e-9) {\n paramA = 1;\n }\n if(paramB < 0 && Math.abs(paramB) < 1e-9) {\n paramB = 0;\n }\n else if(paramB > 1 && paramB - 1 < 1e-9) {\n paramB = 1;\n }\n intersectPt.pa = paramA;\n intersectPt.pb = paramB;\n if(limitToFiniteSegment === 1 && paramA >= 0 && paramA <= 1) {\n return intersectPt;\n }\n if(limitToFiniteSegment === 2 && paramB >= 0 && paramB <= 1) {\n return intersectPt;\n }\n if(limitToFiniteSegment === 3 && paramA >= 0 && paramA <= 1 && paramB >= 0 && paramB <= 1) {\n return intersectPt;\n }\n}\n\nfunction subtractPoint(p1, p2) {\n return {\n x: p1.x - p2.x,\n y: p1.y - p2.y,\n z: p1.z - p2.z,\n };\n}\n\nfunction distanceTo(a, b) {\n return Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2) + Math.pow(a.z - b.z, 2));\n}\n\nfunction addPoint(a, b) {\n return {\n x: a.x + b.x,\n y: a.y + b.y,\n z: a.z + b.z,\n };\n}\n\nfunction divide(p, t) {\n let n = 1 / t;\n return {\n x: p.x * n,\n y: p.y * n,\n z: p.z * n,\n };\n}\n\nfunction closestParam(p, from, to) {\n let startToP = subtractPoint(p, from);\n let startToEnd = subtractPoint(to, from);\n let startEnd2 = dotProduct3(startToEnd, startToEnd);\n let startEnd_startP = dotProduct3(startToEnd, startToP);\n return startEnd_startP / startEnd2;\n}\n\n/**\n * 平面相交线,传入2个平面的各3个顶点,返回2点式\n */\nfunction intersectPlanePlane(p1, p2, p3, p4, p5, p6) {\n let v1 = unitize3(\n p2.x - p1.x,\n p2.y - p1.y,\n p2.z - p1.z,\n ), v2 = unitize3(\n p3.x - p1.x,\n p3.y - p1.y,\n p3.z - p1.z,\n ), v4 = unitize3(\n p5.x - p4.x,\n p5.y - p4.y,\n p5.z - p4.z,\n ), v5 = unitize3(\n p6.x - p4.x,\n p6.y - p4.y,\n p6.z - p4.z,\n );\n let v3 = unitize3(crossProduct3(v1.x, v1.y, v1.z, v2.x, v2.y, v2.z));\n let v6 = unitize3(crossProduct3(v4.x, v4.y, v4.z, v5.x, v5.y, v5.z));\n if(isParallel3(v3, v6)) {\n return null;\n }\n let normal = crossProduct3(v6.x, v6.y, v6.z, v3.x, v3.y, v3.z);\n let p7 = addPoint(v1, v4);\n // planeC\n let v9 = unitize3(normal.x, normal.y, normal.z);\n // 3平面相交\n let a1 = v3.x, b1 = v3.y, c1 = v3.z, d1 = -a1 * p1.x - b1 * p1.y - c1 * p1.z;\n let a2 = v6.x, b2 = v6.y, c2 = v6.z, d2 = -a2 * p4.x - b2 * p4.y - c2 * p4.z;\n let a3 = v9.x, b3 = v9.y, c3 = v9.z, d3 = -a3 * p7.x - b3 * p7.y - c3 * p7.z;\n let mb = [-d1, -d2, -d3];\n let det = a1 * (b2 * c3 - c2 * b3) - b1 * (a2 * c3 - c2 * a3) + c1 * (a2 * b3 - b2 * a3);\n if(Math.abs(det) < 1e-9) {\n return null;\n }\n let invDet = 1 / det;\n let v11 = invDet * (b2 * c3 - c2 * b3);\n let v12 = invDet * (c1 * b3 - b1 * c3);\n let v13 = invDet * (b1 * c2 - c1 * b2);\n let v21 = invDet * (c2 * a3 - a2 * c3);\n let v22 = invDet * (a1 * c3 - c1 * a3);\n let v23 = invDet * (c1 * a2 - a1 * c2);\n let v31 = invDet * (a2 * b3 - b2 * a3);\n let v32 = invDet * (b1 * a3 - a1 * b3);\n let v33 = invDet * (a1 * b2 - b1 * a2);\n let x = v11 * mb[0] + v12 * mb[1] + v13 * mb[2];\n let y = v21 * mb[0] + v22 * mb[1] + v23 * mb[2];\n let z = v31 * mb[0] + v32 * mb[1] + v33 * mb[2];\n let point = { x, y, z };\n return [\n point,\n addPoint(point, v9),\n ];\n}\n\n// 点是否在线段上,注意误差\nfunction pointOnLine3(p, p1, p2) {\n let v1x = p1.x - p.x, v1y = p1.y - p.y, v1z = p1.z - p.z;\n let v2x = p2.x - p.x, v2y = p2.y - p.y, v2z = p2.z - p.z;\n let c = crossProduct3(v1x, v1y, v1z, v2x, v2y, v2z);\n return length3(c.x, c.y, c.z) < 1e-9;\n}\n\nexport default {\n intersectBezier2Line, // 二阶贝塞尔曲线 与 直线\n intersectBezier3Line, // 三阶贝塞尔曲线 与 直线\n intersectBezier2Bezier2, // 二阶贝塞尔曲线 与 二阶贝塞尔曲线\n intersectBezier3Bezier3, // 三阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectBezier2Bezier3, // 二阶贝塞尔曲线 与 三阶贝塞尔曲线\n intersectLineLine3,\n intersectPlanePlane,\n pointOnLine3,\n}\n","import isec from '../math/isec';\nimport geom from '../math/geom';\nimport vector from '../math/vector';\n\nconst { intersectPlanePlane, intersectLineLine3, pointOnLine3 } = isec;\nconst { isRectsOverlap, getPlainNormalEquation } = geom;\nconst { isZero3 } = vector;\n\n// 设置新拼图的x/y/z投影数据和bbox数据,原本平面矩形也算一个拼图\nfunction shadow(puzzle) {\n let points = puzzle.points;\n let xShadow = [\n {\n y: points[0].y,\n z: points[0].z,\n },\n ];\n outer:\n for(let i = 1, len = points.length; i < len; i++) {\n let p = points[i];\n for(let j = 0; j < i; j++) {\n let o = points[j];\n if(p.y === o.y && p.z === o.z) {\n continue outer;\n }\n }\n xShadow.push({\n y: p.y,\n z: p.z,\n });\n }\n // 顶点和bbox,每个轴投影都要\n puzzle.xShadow = [];\n puzzle.xBbox = [];\n for(let j = 0, len = xShadow.length; j < len; j++) {\n let a = xShadow[j];\n puzzle.xShadow.push(a);\n if(j === 0) {\n puzzle.xBbox[0] = a.z;\n puzzle.xBbox[1] = a.y;\n puzzle.xBbox[2] = a.z;\n puzzle.xBbox[3] = a.y;\n }\n else {\n puzzle.xBbox[0] = Math.min(puzzle.xBbox[0], a.z);\n puzzle.xBbox[1] = Math.min(puzzle.xBbox[1], a.y);\n puzzle.xBbox[2] = Math.max(puzzle.xBbox[2], a.z);\n puzzle.xBbox[3] = Math.max(puzzle.xBbox[3], a.y);\n }\n }\n // y/z类似\n let yShadow = [\n {\n x: points[0].x,\n z: points[0].z,\n },\n ];\n outer:\n for(let i = 1, len = points.length; i < len; i++) {\n let p = points[i];\n for(let j = 0; j < i; j++) {\n let o = points[j];\n if(p.x === o.x && p.z === o.z) {\n continue outer;\n }\n }\n yShadow.push({\n x: p.x,\n z: p.z,\n });\n }\n puzzle.yShadow = [];\n puzzle.yBbox = [];\n for(let j = 0, len = yShadow.length; j < len; j++) {\n let a = yShadow[j];\n puzzle.yShadow.push(a);\n if(j === 0) {\n puzzle.yBbox[0] = a.x;\n puzzle.yBbox[1] = a.z;\n puzzle.yBbox[2] = a.x;\n puzzle.yBbox[3] = a.z;\n }\n else {\n puzzle.yBbox[0] = Math.min(puzzle.yBbox[0], a.x);\n puzzle.yBbox[1] = Math.min(puzzle.yBbox[1], a.z);\n puzzle.yBbox[2] = Math.max(puzzle.yBbox[2], a.x);\n puzzle.yBbox[3] = Math.max(puzzle.yBbox[3], a.z);\n }\n }\n let zShadow = [\n {\n x: points[0].x,\n y: points[0].y,\n },\n ];\n outer:\n for(let i = 1, len = points.length; i < len; i++) {\n let p = points[i];\n for(let j = 0; j < i; j++) {\n let o = points[j];\n if(p.x === o.x && p.y === o.y) {\n continue outer;\n }\n }\n zShadow.push({\n x: p.x,\n y: p.y,\n });\n }\n puzzle.zShadow = [];\n puzzle.zBbox = [];\n for(let j = 0, len = zShadow.length; j < len; j++) {\n let a = zShadow[j];\n puzzle.zShadow.push(a);\n if(j === 0) {\n puzzle.zBbox[0] = a.x;\n puzzle.zBbox[1] = a.y;\n puzzle.zBbox[2] = a.x;\n puzzle.zBbox[3] = a.y;\n }\n else {\n puzzle.zBbox[0] = Math.min(puzzle.zBbox[0], a.x);\n puzzle.zBbox[1] = Math.min(puzzle.zBbox[1], a.y);\n puzzle.zBbox[2] = Math.max(puzzle.zBbox[2], a.x);\n puzzle.zBbox[3] = Math.max(puzzle.zBbox[3], a.y);\n }\n }\n}\n\n// 多个平面相交切割,每个平面有[3,]个顶点,且有index索引额外信息\nfunction splitQuadrilateralPlane(list) {\n let uuid = 0;\n let length = list.length;\n if(length < 2) {\n return;\n }\n // 先每个四边形计算x/y/z轴上的投影,可能是四边形也可能重合三角形或直线\n let xList = [];\n for(let i = 0; i < length; i++) {\n let item = list[i];\n shadow(item);\n item.uuid = uuid++;\n item.plane = item;\n let xShadow = item.xShadow;\n for(let i = 0, len = xShadow.length; i < len; i++) {\n // 只有2个点防重,x投影特殊需要,线段排序列表\n if(len === 2 && i === 1) {\n break;\n }\n let a = xShadow[i];\n let b = xShadow[(i + 1) % len];\n if(a.z > b.z) {\n [a, b] = [b, a];\n }\n xList.push({\n belong: item,\n y1: a.y,\n z1: a.z,\n y2: b.y,\n z2: b.z,\n });\n }\n }\n /**\n * 从侧面观看投影,即x轴,按照深度z顺序,每个平面可形成2或4条线(y/z坐标),用扫描线算法求交\n * 处在扫描线活动范围下的2个线段,如果属于2个不同平面,继续\n * 再检测面的x/y/z是否bbox重叠,3个都重叠是2个四边面空间重叠的必要条件,以此前提甄选\n * 再用平面相交公式求得相交线,查看双方顶点是否都存在于此条线上且范围内,都有则真正相交,开始拆分\n */\n let eventHash = {};\n for(let i = 0, len = xList.length; i < len; i++) {\n let seg = xList[i];\n let o = eventHash[seg.z1] = eventHash[seg.z1] || [];\n o.push(seg);\n o = eventHash[seg.z2] = eventHash[seg.z2] || [];\n o.push(seg);\n }\n // z排序,不用管y\n let eventList = [];\n for(let i in eventHash) {\n if(eventHash.hasOwnProperty(i)) {\n let o = eventHash[i];\n eventList.push({\n z: i,\n list: o,\n });\n }\n }\n eventList.sort(function(a, b) {\n return a.z - b.z;\n });\n const HISTORY = {}; // 求过的2个平面记录,只求1次防重\n let ael = []; // 当前扫描线活动边\n for(let i = 0, elLen = eventList.length; i < elLen; i++) {\n let { z, list } = eventList[i];\n for(let j = 0, length = list.length; j < length; j++) {\n let seg = list[j];\n // 第1次进是start,第2次是end\n if(seg.isVisited) {\n let j = ael.indexOf(seg);\n if(j > -1) {\n ael.splice(j, 1);\n }\n }\n else {\n if(ael.length) {\n for(let j = 0, len = ael.length; j < len; j++) {\n let item = ael[j];\n let pa = seg.belong, pb = item.belong;\n // 属于不同的平面才能相交\n if(pa.plane === pb.plane) {\n continue;\n }\n // 如果面被拆分过,忽略掉\n if(pa.isDeleted) {\n break;\n }\n if(pb.isDeleted) {\n continue;\n }\n // 无论结果如何,这2个拼图都记录下防止重复检测\n let key = pa.uuid > pb.uuid ? (pb.uuid + ',' + pa.uuid) : (pa.uuid + ',' + pb.uuid);\n if(HISTORY.hasOwnProperty(key)) {\n continue;\n }\n HISTORY[key] = true;\n // 所属的2个面进行x/y/z上的bbox重叠验证,是屏幕真相交的前提必要条件\n if(isRectsOverlap(pa.xBbox, pb.xBbox, false)\n && isRectsOverlap(pa.yBbox, pb.yBbox, false)\n && isRectsOverlap(pa.zBbox, pb.zBbox, false)) {\n let pointsA = pa.points, pointsB = pb.points;\n // 真正求交\n let line = intersectPlanePlane(\n pointsA[0], pointsA[1], pointsA[2],\n pointsB[0], pointsB[1], pointsB[2]\n );\n if(!line || line.length !== 2) {\n continue;\n }\n // 这条线一定和2个四边形有2/4个不同交点,分别用每条边和直线求交点,2个是四边形a内切割b,4个是a和b恰好互相切割\n // 被切割后的puzzle解法相同,只是变成了多边形,n>=3\n let resA = [], resB = [];\n for(let i = 0, len = pointsA.length; i < len; i++) {\n let r = intersectLineLine3(\n pointsA[i], pointsA[(i + 1) % len],\n line[0], line[1], 1\n );\n if(r) {\n r.i = i;\n resA.push(r);\n }\n }\n for(let i = 0, len = pointsB.length; i < len; i++) {\n let r = intersectLineLine3(\n pointsB[i], pointsB[(i + 1) % len],\n line[0], line[1], 1\n );\n if(r) {\n r.i = i;\n resB.push(r);\n }\n }\n // res只可能是2和0,2个res组合只有3种可能,其它则是精度误差忽略,切割的交点在边的索引和下个索引之间的边上\n if(resA.length === 2 && resB.length === 2\n || resA.length === 2 && !resB.length\n || !resA.length && resB.length === 2) {\n let puzzle = [], t1, t2;\n // 2个都需要切割,各自判断\n if(resA.length) {\n t1 = splitPlaneByLine(pa, resA);\n }\n if(resB.length) {\n t2 = splitPlaneByLine(pb, resB);\n }\n // 误差导致切割数量不对,要么一个不被切割另外一个被切为2,要么都被切2,不会出现被切但数量不对\n if(t1 && t2 && t1.length !== t2.length) {\n continue;\n }\n if(t1 && t1.length > 1) {\n pa.puzzle = pa.puzzle || [];\n pa.puzzle = pa.puzzle.concat(t1);\n pa.isDeleted = true;\n puzzle = puzzle.concat(t1);\n }\n if(t2 && t2.length > 1) {\n pb.puzzle = pb.puzzle || [];\n pb.puzzle = pb.puzzle.concat(t2);\n pb.isDeleted = true;\n puzzle = puzzle.concat(t2);\n }\n // 新的拼图需考虑加入到eventList的合适位置,可能是新增的扫描事件\n for(let j = 0, len = puzzle.length; j < len; j++) {\n let item = puzzle[j];\n shadow(item);\n item.uuid = uuid++;\n let xBbox = item.xBbox;\n if(xBbox[2] <= z) {\n continue;\n }\n let xShadow = item.xShadow;\n for(let j = 0, len = xShadow.length; j < len; j++) {\n // 只有2个点防重,x投影特殊需要,线段排序列表\n if(len === 2 && j === 1) {\n break;\n }\n let a = xShadow[j];\n let b = xShadow[(j + 1) % len];\n if(a.z > b.z) {\n [a, b] = [b, a];\n }\n // 和初始化不一样多判断下,最大值比当前还小的是无效的事件,已经扫过了\n if(b.z <= z) {\n continue;\n }\n let seg = {\n belong: item,\n y1: a.y,\n z1: a.z,\n y2: b.y,\n z2: b.z,\n };\n // 最小值比当前z小,被访问过isVisited\n if(seg.z1 <= z) {\n seg.isVisited = true;\n // 等于才加入当前事件列表\n if(seg.z1 === z) {\n list.push(seg);\n length++;\n }\n }\n // 最大值加入事件列表,=z忽略,注意判断可能z所属的扫描坐标不存在\n if(seg.z2 > z) {\n for(let j = i + 1; j < elLen; j++) {\n let item = eventList[j];\n let z = item.z;\n if(seg.z2 === z) {\n item.list.push(seg);\n break;\n }\n else if(seg.z2 > z || j === elLen - 1) {\n eventList.splice(j, 0, {\n z: seg.z2,\n list: [seg],\n });\n elLen++;\n break;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n seg.isVisited = true;\n ael.push(seg);\n }\n }\n }\n}\n\nfunction scan(eventList) {\n let ael = [], hash = {};\n for(let i = 0, len = eventList.length; i < len; i++) {\n let { k, list } = eventList[i];\n // 先一遍循环,把刚进入的puzzle初始化放入ael,这样同时初始化的就不会有遗漏\n for(let i = 0, len = list.length; i < len; i++) {\n let puzzle = list[i].puzzle;\n // 首次进入初始化数据\n if(!puzzle.isStart) {\n puzzle.isStart = true;\n puzzle.count = 2;\n ael.push(puzzle);\n }\n }\n let willEnd = [];\n // 再一遍循环,检查同区域点集合\n for(let i = 0, len = list.length; i < len; i++) {\n let p = list[i], puzzle = p.puzzle;\n // 遍历已存在的puzzle,和当前puzzle视为同区域集合,存数据\n for(let i = 0, len = ael.length; i < len; i++) {\n let item = ael[i];\n if(puzzle === item || puzzle.plane === item.plane) {\n continue;\n }\n let key = puzzle.uuid > item.uuid ? (item.uuid + ',' + puzzle.uuid) : (puzzle.uuid + ',' + item.uuid);\n // 一定是第1次视为start\n let o = hash[key] = hash[key] || [];\n o.push(k);\n }\n // 归零时离开,延迟处理,依然是防止同时离开的puzzle不会有遗漏\n if(!--puzzle.count) {\n willEnd.push(puzzle);\n }\n }\n for(let j = 0, len = willEnd.length; j < len; j++) {\n let p = willEnd[j], uuid = p.uuid;\n p.isStart = false;\n let i = ael.indexOf(p);\n ael.splice(i, 1);\n // 离开检查hash,如有则视为end\n for(let k in hash) {\n if(hash.hasOwnProperty(k)) {\n if(k.indexOf(uuid + ',') === 0 || k.indexOf(',' + uuid) > -1) {\n let o = hash[k];\n if(o.length < 2) {\n o.push(k);\n }\n }\n }\n }\n }\n }\n return hash;\n}\n\nfunction splitPlaneByLine(puzzle, res) {\n if(checkIsec(puzzle.points.length, res)) {\n return;\n }\n let plane = puzzle.plane, points = puzzle.points, i1 = -1, i2 = -1;\n let p0 = plane.points[0], p1 = plane.points[1], p2 = plane.points[2], p3 = plane.points[3];\n // 交点一定在边上,不在边上的不切割\n for(let i = 0, len = points.length; i < len; i++) {\n let p1 = points[i], p2 = points[(i + 1) % len];\n let r1 = pointOnLine3(res[0], p1, p2);\n let r2 = pointOnLine3(res[1], p1, p2);\n if(r1) {\n i1 = i;\n }\n if(r2) {\n i2 = i;\n }\n }\n // 看是否相邻以及是否是原有顶点,不同情况不同拆分,切割也不能在同一条边上\n if(i1 > -1 && i2 > -1 && i1 !== i2) {\n let onVertex1 = isZero3(points[i1], res[0]) ? i1 : -1;\n if(!onVertex1 && points[i1 + 1]) {\n onVertex1 = isZero3(points[i1 + 1], res[0]) ? (i1 + 1) : -1;\n }\n let onVertex2 = isZero3(points[i2], res[1]) ? i2 : -1;\n if(!onVertex2 && points[i2 + 1]) {\n onVertex2 = isZero3(points[i2 + 1], res[1]) ? (i2 + 1) : -1;\n }\n // 如果是相邻顶点,或者只有1个顶点但恰好2点在同边则失效\n if(Math.abs(i1 - i2) <= 1) {\n if(onVertex1 > -1 && onVertex2 > -1) {\n return;\n }\n else if(onVertex1 > -1) {\n if(onVertex1 === i2) {\n return;\n }\n }\n else if(onVertex2 > -1) {\n if(onVertex2 === i2) {\n return;\n }\n }\n }\n // 原本矩形经过任意matrix变换后一定还是个平行四边形(相对所在平面),4个顶点坐标已知\n // 然后交点坐标已知,也一定在这个平面上,求得相对于左上角顶点即原点的百分比坐标,分母为宽或高\n // 其实就是求拆分后的拼图,某个点对应于原本矩形纹理的百分比坐标\n // 先求得平行四边形的2个邻边的向量,然后求交点和向量所在直线与边的交点即可得出\n let va = plane.va, vb = plane.vb;\n if(!va) {\n va = plane.va = {\n x: p0.x - p1.x,\n y: p0.y - p1.y,\n z: p0.z - p1.z,\n };\n }\n if(!vb) {\n vb = plane.vb = {\n x: p1.x - p2.x,\n y: p1.y - p2.y,\n z: p1.z - p2.z,\n };\n }\n let hash = [], r0, r1;\n // n边形(n一定>=3),会被分为a、b两个多边形\n plane.puzzle = plane.puzzle || [];\n let puzzle = [];\n let a = {\n plane,\n node: plane.node,\n target: plane.target,\n isPuzzle: true,\n points: [],\n };\n for(let i = 0; i <= i1; i++) {\n let r = hash[i] = getPercentXY(points[i], va, vb, p0, p1, p3);\n if(r) {\n a.points.push(r);\n }\n }\n // 第1个交点如果在顶点上忽略,前面循环考虑了\n if(onVertex1 === -1) {\n r0 = getPercentXY(res[0], va, vb, p0, p1, p3);\n if(r0) {\n a.points.push(r0);\n }\n }\n // 第2个即便在顶点上也包含,后面循环没考虑\n r1 = getPercentXY(res[1], va, vb, p0, p1, p3);\n if(r1) {\n a.points.push(r1);\n }\n for(let i = i2 + 1, len = points.length; i < len; i++) {\n let r = hash[i] = getPercentXY(points[i], va, vb, p0, p1, p3);\n if(r) {\n a.points.push(r);\n }\n }\n if(a.points.length > 2) {\n puzzle.push(a);\n }\n // b部分同上\n let b = {\n plane,\n node: plane.node,\n target: plane.target,\n isPuzzle: true,\n points: [],\n };\n // 复用数据但不能相同引用\n if(r0) {\n b.points.push(Object.assign({}, r0));\n }\n else {\n r0 = getPercentXY(res[0], va, vb, p0, p1, p3);\n if(r0) {\n b.points.push(r0);\n }\n }\n for(let i = i1 + 1; i <= i2; i++) {\n let r = hash[i] = hash[i] || getPercentXY(points[i], va, vb, p0, p1, p3);\n if(r) {\n b.points.push(r);\n }\n }\n if(onVertex2 === -1) {\n if(r1) {\n b.points.push(Object.assign({}, r1));\n }\n else {\n r1 = getPercentXY(res[1], va, vb, p0, p1, p3);\n if(r1) {\n b.points.push(r1);\n }\n }\n }\n if(b.points.length > 2) {\n puzzle.push(b);\n }\n // 只返回新增的\n return puzzle;\n }\n}\n\n// 已知空间平行四边形顶点和其面上一点,求相对于左上角顶点即原点的百分比坐标,四边形宽高即分母\nfunction getPercentXY(p, va, vb, p0, p1, p3) {\n let pa = {\n x: p.x + va.x,\n y: p.y + va.y,\n z: p.z + va.z,\n }, pb = {\n x: p.x + vb.x,\n y: p.y + vb.y,\n z: p.z + vb.z,\n };\n let ipx = intersectLineLine3(p0, p1, p, pb, 3);\n let ipy = intersectLineLine3(p0, p3, p, pa, 3);\n if(ipx && ipy) {\n return {\n x: p.x,\n y: p.y,\n z: p.z,\n px: (ipx.x - p0.x) / (p1.x - p0.x),\n py: (ipy.y - p0.y) / (p3.y - p1.y),\n };\n }\n}\n\n// 检测相交线是否有效,不能和puzzle的边重合\nfunction checkIsec(len, res) {\n let a = res[0], b = res[1];\n // 共边索引\n if(a.i === b.i) {\n return true;\n }\n if(a.i > b.i) {\n let t = a;\n a = b;\n b = t;\n }\n // 临边如果小的索引为1或大的索引为0\n if(b.i - a.i === 1) {\n if(Math.abs(a.pa - 1) < 1e-9 || b.pa < 1e-9) {\n return true;\n }\n }\n // 刚好隔边则必须同时索引为1和0\n if(b.i - a.i === 2) {\n if(Math.abs(a.pa - 1) < 1e-9 && b.pa < 1e-9) {\n return true;\n }\n }\n // 首尾临边\n if(b.i === len - 1 && a.i === 0) {\n if(Math.abs(b.pa - 1) < 1e-9 || a.pa < 1e-9) {\n return true;\n }\n }\n // 首尾隔边\n if(b.i === len - 1 && a.i === 1 || b.i === len - 2 && a.i === 0) {\n if(Math.abs(b.pa - 1) < 1e-9 && a.pa < 1e-9) {\n return true;\n }\n }\n return false;\n}\n\n// 将拼图按z顺序排好,渲染从z小的开始,拼图已经完全不相交(3d空间)\nfunction sortPuzzleZ(list) {\n if(list.length < 2) {\n return list;\n }\n // 用扫描线遍历一遍正视图,可以找到2个拼图在投影重合部分,有开始和结束,取x/y中间值,\n // 比较此点在2个平面上的z大小可以得出这2个拼图真正的z先后次序,如果相等则特殊处理,和不重合逻辑一样,\n // 不重合的话,取最大最小值z的平均比较即可,平均值可避免起点终点相同无法比较\n let eventHashX = {}, eventHashY = {}, puzzleHash = {};\n for(let i = 0, len = list.length; i < len; i++) {\n let puzzle = list[i], xBbox = puzzle.xBbox, yBbox = puzzle.yBbox;\n puzzleHash[puzzle.uuid] = puzzle;\n let start = xBbox[0], end = xBbox[2];\n let o = eventHashX[start] = eventHashX[start] || [];\n o.push(puzzle);\n o = eventHashX[end] = eventHashX[end] || [];\n o.push(puzzle);\n start = yBbox[0];\n end = yBbox[2];\n o = eventHashY[start] = eventHashY[start] || [];\n o.push(puzzle);\n o = eventHashY[end] = eventHashY[end] || [];\n o.push(puzzle);\n puzzle.cz = (xBbox[0] + xBbox[2]) * 0.5;\n }\n let eventListX = [], eventListY = [];\n for(let i in eventHashX) {\n if(eventHashX.hasOwnProperty(i)) {\n let o = eventHashX[i];\n eventListX.push({\n k: i,\n list: o,\n });\n }\n }\n for(let i in eventHashY) {\n if(eventHashY.hasOwnProperty(i)) {\n let o = eventHashY[i];\n eventListY.push({\n k: i,\n list: o,\n });\n }\n }\n eventListX.sort(function(a, b) {\n return a.k - b.k;\n });\n eventListY.sort(function(a, b) {\n return a.k - b.k;\n });\n // 每个点作为事件,触发时所属拼图count--,首次拼图视为start,当count为0时拼图视为end\n // 这样2个(或多个)拼图同时都在start状态下(count > 0)的点就是重合区域点集合\n let hashX = scan(eventHashX), hashY = scan(eventHashY);\n // 取中值x/y,比较2个puzzle所在平面的值为x/y的点的z坐标大小\n let zHash = {};\n for(let i in hashX) {\n if(hashX.hasOwnProperty(i)) {\n let listX = hashX[i], listY = hashY[i], k = i.splice(',');\n let pa = puzzleHash[k[0]], pb = puzzleHash[k[1]];\n let cx = (listX[0] + listX[1]) * 0.5, cy = (listY[0] + listY[1]) * 0.5;\n let { a: a1, b: b1, c: c1, d: d1 } = getPlainNormalEquation(pa.points);\n let { a: a2, b: b2, c: c2, d: d2 } = getPlainNormalEquation(pb.points);\n let z1 = c1 ? ((-d1 - a1 * cx - b1 * cy) / c1) : 0;\n let z2 = c2 ? ((-d2 - a2 * cx - b2 * cy) / c2) : 0;\n if(Math.abs(z1 - z2) > 1e-9) {\n zHash[i] = z1 - z2;\n }\n }\n }\n list.sort(function(a, b) {\n let key = a.uuid > b.uuid ? (b.uuid + ',' + a.uuid) : (a.uuid + ',' + b.uuid);\n // 有重合的区域,除非相等,否则可以直接得出结果\n if(zHash.hasOwnProperty(key)) {\n return zHash[key];\n }\n // 无重合或者相等的,对比z中点\n return a.cz - b.cz;\n });\n return list;\n}\n\nexport default {\n splitQuadrilateralPlane,\n sortPuzzleZ,\n};\n","import Page from '../refresh/Page';\nimport webgl from './webgl';\n\nclass TexturePage extends Page {\n constructor(renderMode, gl, size, number) {\n super(renderMode, gl, size, number);\n this.gl = gl;\n this.texture = webgl.createTexture(gl, null, 0, size, size); // 默认0单元\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n\n static getInstance(renderMode, gl, rootId, size, excludePage) {\n return super.getInstance(renderMode, gl, rootId, size, this, excludePage);\n }\n}\n\nexport default TexturePage;\n","import Cache from '../refresh/Cache';\nimport TexturePage from './TexturePage';\n\n/**\n * 一个fbo离屏纹理,mock成cache,当webgl需要局部根节点汇总时生成,即cacheTotal,\n * 基于此纹理进行filter、mask等后处理渲染\n */\nclass TextureCache extends Cache {\n constructor(renderMode, gl, rootId, w, h, bbox, page, pos, x1, y1) {\n super(renderMode, gl, rootId, w, h, bbox, page, pos, x1, y1);\n this.gl = gl;\n }\n\n update() {\n // 直接生成的texture不需要更新,覆盖掉不调用\n }\n\n clear() {\n if(super.clear()) {\n let page = this.__page, gl = page.gl, size = page.__size;\n // 尺寸必须对上才行\n let data = new Uint8Array(this.__width * this.__height * 4);\n gl.bindTexture(gl.TEXTURE_2D, page.texture);\n // 注意y镜像和原点左下\n gl.texSubImage2D(gl.TEXTURE_2D, 0, this.__x, size - this.__y - this.__height,\n this.__width, this.__height, gl.RGBA, gl.UNSIGNED_BYTE, data);\n gl.bindTexture(gl.TEXTURE_2D, null);\n }\n }\n\n reset(bbox, x1, y1) {\n return super.reset(bbox, x1, y1, TexturePage);\n }\n\n static getInstance(renderMode, gl, rootId, bbox, x1, y1, excludePage) {\n return super.getInstance(renderMode, gl, rootId, bbox, x1, y1, this, TexturePage, excludePage);\n }\n}\n\nexport default TextureCache;\n","import CanvasCache from './CanvasCache';\nimport inject from '../util/inject';\n\nconst HASH = {};\n\n/**\n * 相同的图片且尺寸相同时,复用一个source,如果尺寸和原图相等直接用,否则生成一个离屏canvas\n */\nclass ImgCanvasCache extends CanvasCache {\n constructor(renderMode, ctx, rootId, w, h, bbox, page, x1, y1) {\n super(renderMode, ctx, rootId, w, h, bbox, page, null, x1, y1);\n }\n\n __init(w, h, bbox, page, pos, x1, y1) {\n this.__width = w;\n this.__height = h;\n this.__bbox = bbox;\n this.__page = page;\n // 相等就不生成新的离屏canvas,直接用原始资源比如节点内容\n if(page.width === w && page.height === h) {\n this.__canvas = page.source;\n }\n // 不等则一个url只生成一份OffscreenCanvas\n else {\n let key = this.key = w + ' ' + h + ' ' + page.src;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count++;\n this.__canvas = o.canvas;\n }\n else {\n let offscreenCanvas = inject.getOffscreenCanvas(w, h, null, null);\n let ctx = offscreenCanvas.ctx;\n ctx.globalAlpha = 1;\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.drawImage(page.source, 0, 0, w, h);\n this.__canvas = offscreenCanvas.canvas;\n HASH[key] = {\n canvas: offscreenCanvas.canvas,\n count: 1,\n };\n }\n }\n this.__x = 0;\n this.__y = 0;\n this.__enabled = true;\n this.__available = true;\n this.__appendData(x1, y1);\n }\n\n clear() {\n if(this.__available) {\n this.__available = false;\n return true;\n }\n }\n\n release() {\n if(this.__enabled) {\n this.clear();\n let key = this.key;\n if(HASH.hasOwnProperty(key)) {\n let o = HASH[key];\n o.count--;\n if(!o.count) {\n delete HASH[key];\n }\n }\n this.__enabled = false;\n this.__page = null;\n return true;\n }\n }\n\n reset(bbox, x1, y1) {\n this.release();\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n this.__init(w, h, bbox, this.__page, null, x1, y1);\n }\n\n get canvas() {\n return this.__canvas;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get size() {}\n\n static getInstance(renderMode, ctx, rootId, bbox, loadImg, x1, y1) {\n let w = Math.ceil(bbox[2] - bbox[0]);\n let h = Math.ceil(bbox[3] - bbox[1]);\n let n = Math.max(w, h);\n if(n <= 0) {\n return;\n }\n return new ImgCanvasCache(renderMode, ctx, rootId, w, h, bbox, loadImg, x1, y1);\n }\n}\n\nexport default ImgCanvasCache;\n","import CanvasCache from './CanvasCache';\nimport offscreen from './offscreen';\nimport mode from './mode';\nimport Page from './Page';\nimport Text from '../node/Text';\nimport Dom from '../node/Dom';\nimport Img from '../node/Img';\nimport Geom from '../node/geom/Geom';\nimport mx from '../math/matrix';\nimport geom from '../math/geom';\nimport level from './level';\nimport painter from '../util/painter';\nimport util from '../util/util';\nimport inject from '../util/inject';\nimport tf from '../style/transform';\nimport mbm from '../style/mbm';\nimport enums from '../util/enums';\nimport webgl from '../gl/webgl';\nimport oit from '../gl/oit';\nimport TextureCache from '../gl/TextureCache';\nimport blur from '../math/blur';\nimport vertexBlur from '../gl/filter/blur.vert';\nimport fragmentBlur from '../gl/filter/blur.frag';\nimport ImgCanvasCache from './ImgCanvasCache';\nimport ImgWebglCache from '../gl/ImgWebglCache';\n\nconst {\n OFFSCREEN_OVERFLOW,\n OFFSCREEN_FILTER,\n OFFSCREEN_MASK,\n OFFSCREEN_BLEND,\n OFFSCREEN_MASK2,\n applyOffscreen,\n} = offscreen;\n\nconst {\n STYLE_KEY: {\n DISPLAY,\n OPACITY,\n VISIBILITY,\n FILTER,\n OVERFLOW,\n MIX_BLEND_MODE,\n FILL,\n TRANSFORM,\n TRANSFORM_ORIGIN,\n PERSPECTIVE,\n PERSPECTIVE_ORIGIN,\n TRANSFORM_STYLE,\n BACKFACE_VISIBILITY,\n },\n} = enums;\nconst {\n NONE,\n TRANSFORM_ALL,\n OPACITY: OP,\n FILTER: FT,\n REPAINT,\n MIX_BLEND_MODE: MBM,\n PERSPECTIVE: PPT,\n CACHE,\n MASK,\n} = level;\nconst { isE, inverse, multiply, calRectPoint } = mx;\nconst { mbmName } = mbm;\nconst { assignMatrix, transformBbox } = util;\nconst {\n drawTextureCache,\n createTexture,\n bindTexture,\n drawCache2Tex,\n drawTex2Cache,\n} = webgl;\n\nconst DOM_RENDER = Dom.prototype.render;\nconst IMG_RENDER = Img.prototype.render;\nconst GEOM_RENDER = Geom.prototype.render;\n\nfunction getCache(list) {\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(item && item.available) {\n return item;\n }\n }\n}\n\n/**\n * 生成一个节点及其子节点所包含的矩形范围盒,canvas和webgl的最大尺寸限制不一样,由外部传入\n * 如果某个子节点超限,则视为整个超限,超限返回空\n * isPpt为webgl下有perspective的节点,需考虑透视\n */\nfunction genBboxTotal(node, __structs, index, total, lv, isPpt) {\n let { __cache } = node;\n assignMatrix(node.__matrixEvent, mx.identity());\n node.__opacity = 1;\n // 先将局部根节点的bbox算好,可能没内容是空\n let bboxTotal;\n if(__cache && __cache.available) {\n bboxTotal = __cache.bbox;\n }\n else {\n bboxTotal = node.bbox;\n }\n bboxTotal = bboxTotal.slice(0);\n // 局部根节点如有perspective,则计算pm,这里不会出现嵌套,因为每个出现都会生成局部根节点\n // 分2种情况,普通父ppt和自身有ppt情况,自身不能视为E,被绘入主画布时注意特殊处理\n // 自身ppt需将ppt提炼出来,然后node重新忽略ppt\n let pm;\n if(isPpt) {\n pm = node.__perspectiveMatrix || node.__selfPerspectiveMatrix;\n }\n if(node.__selfPerspective) {\n let bbox = transformBbox(bboxTotal, multiply(pm, node.__matrix), 0, 0);\n mergeBbox(bboxTotal, bbox);\n }\n let top = node;\n for(let i = index + 1, len = index + total + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n if(node.__limitCache) {\n inject.warn('Bbox of Text(' + index + ')' + ' is oversize'\n + node.offsetWidth + ', ' + node.offsetHeight);\n return;\n }\n let bbox = node.bbox, p = node.__domParent, matrix = p.__matrixEvent;\n if((bbox[2] - bbox[0]) && (bbox[3] - bbox[1])) {\n if(!isE(matrix)) {\n bbox = transformBbox(bbox, matrix, 0, 0);\n }\n mergeBbox(bboxTotal, bbox);\n }\n continue;\n }\n if(node.__limitCache) {\n inject.warn('Bbox of ' + node.tagName + '(' + index + ')' + ' is oversize'\n + node.offsetWidth + ', ' + node.offsetHeight);\n return;\n }\n let {\n __computedStyle: __computedStyle2,\n __mask,\n } = node;\n // 跳过display:none元素和它的所有子节点和mask,本身是mask除外\n if(__computedStyle2[DISPLAY] === 'none' || i !== index && __mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache: __cache2,\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n } = node;\n let p = node.__domParent;\n node.__opacity = __computedStyle2[OPACITY] * p.__opacity;\n let m = node.__matrix;\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 只有webgl且ppt情况才有pm,直接子节点才考虑预乘\n if(pm && p === top) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(__computedStyle2[BACKFACE_VISIBILITY] === 'hidden') {\n let x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let bbox;\n // 子元素有cacheTotal优先使用\n let target = getCache([__cacheMask2, __cacheFilter2, __cacheTotal2, __cache2]);\n if(target) {\n if(target !== __cache2) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n bbox = target.bbox;\n }\n else {\n bbox = node.bbox; // 不能用filterBbox,子元素继承根节点的,如果有filter会是cacheFilter的bbox\n }\n if((bbox[2] - bbox[0]) && (bbox[3] - bbox[1])) {\n // 老的不变,新的会各自重新生成,根据matrixEvent合并bboxTotal\n bbox = transformBbox(bbox, m, 0, 0);\n mergeBbox(bboxTotal, bbox);\n }\n }\n if((bboxTotal[2] - bboxTotal[0] <= 0) || (bboxTotal[3] - bboxTotal[1] <= 0)) {\n return;\n }\n return bboxTotal;\n}\n\nfunction mergeBbox(bbox, t) {\n bbox[0] = Math.min(bbox[0], t[0]);\n bbox[1] = Math.min(bbox[1], t[1]);\n bbox[2] = Math.max(bbox[2], t[2]);\n bbox[3] = Math.max(bbox[3], t[3]);\n}\n\n/**\n * 生成局部根节点离屏缓存,超限时除外\n * cache是每个节点自身的缓存,且共享离屏canvas\n * cacheTotal是基础\n * cacheFilter基于total\n * cacheMask基于filter\n * cacheBlend基于mask\n */\nfunction genTotal(renderMode, ctx, root, node, index, lv, total, __structs, width, height) {\n let __cacheTotal = node.__cacheTotal;\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n let { __x1: x1, __y1: y1, __offsetWidth, __offsetHeight } = node;\n let bboxTotal = genBboxTotal(node, __structs, index, total, lv, false);\n if(!bboxTotal) {\n return;\n }\n\n // img节点特殊对待,如果只包含图片内容本身,多个相同引用可复用图片\n if(node instanceof Img && node.__loadImg.onlyImg) {\n __cacheTotal = node.__cacheTotal = ImgCanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, node.__loadImg, x1, y1);\n return __cacheTotal;\n }\n\n // 生成cacheTotal,获取偏移dx/dy,连带考虑overflow:hidden的情况,当hidden尺寸一致无效时可忽略\n // 否则用一个单独临时的离屏获取包含hidden的结果,再绘入total\n let w, h, dx, dy, dbx, dby, tx, ty;\n let overflow = node.__computedStyle[OVERFLOW], isOverflow;\n if((x1 !== bboxTotal[0]\n || y1 !== bboxTotal[1]\n || __offsetWidth !== (bboxTotal[2] - bboxTotal[0])\n || __offsetHeight !== (bboxTotal[3] - bboxTotal[1])) && overflow === 'hidden') {\n // geom可能超限,不能直接用bbox\n bboxTotal = [x1, y1, x1 + __offsetWidth, y1 + __offsetHeight];\n w = __offsetWidth;\n h = __offsetHeight;\n dx = -x1;\n dy = -y1;\n dbx = 0;\n dby = 0;\n tx = 0;\n ty = 0;\n isOverflow = true;\n __cacheTotal = inject.getOffscreenCanvas(w, h, 'overflow', null);\n }\n else {\n w = bboxTotal[2] - bboxTotal[0];\n h = bboxTotal[3] - bboxTotal[1];\n __cacheTotal = node.__cacheTotal = CanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, x1, y1, null);\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n if(w || h) {\n inject.warn('CanvasCache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + w + ', ' + h);\n }\n return;\n }\n __cacheTotal.__available = true;\n dx = __cacheTotal.dx;\n dy = __cacheTotal.dy;\n dbx = __cacheTotal.dbx;\n dby = __cacheTotal.dby;\n tx = __cacheTotal.x;\n ty = __cacheTotal.y;\n\n // 离屏画布的坐标和尺寸信息存储\n root.__env = {\n x: __cacheTotal.x,\n y: __cacheTotal.y,\n width: __cacheTotal.page.width,\n height: __cacheTotal.page.height,\n };\n }\n let ctxTotal = __cacheTotal.ctx;\n\n /**\n * 再次遍历每个节点,以局部根节点左上角为基准原点,将所有节点绘制上去\n * 每个子节点的opacity有父继承计算在上面循环已经做好了,直接获取\n * 但matrixEvent可能需要重算,因为原点不一定是根节点的原点,影响tfo\n * 另外每个节点的refreshLevel需要设置REPAINT\n * 这样cacheTotal取消时子节点需确保重新计算一次matrix/opacity/filter,保证下次和父元素继承正确\n */\n let matrixList = [];\n let parentMatrix = null;\n let lastMatrix = null;\n let lastLv = lv;\n // 和外面没cache的类似,mask生成hash记录\n let maskStartHash = [];\n let offscreenHash = [];\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, ctxTotal, dx, dy);\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n else {\n let __computedStyle2 = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle2[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal: __cacheTotal2,\n __cacheFilter: __cacheFilter2,\n __cacheMask: __cacheMask2,\n } = node;\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [VISIBILITY]: visibility,\n } = __computedStyle2;\n let mh = maskStartHash[i];\n if(mh) {\n let { idx, hasMask, offscreenMask } = mh;\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx: ctxTotal, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctxTotal = target.ctx;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 特殊渲染的matrix,局部根节点为原点考虑,当需要计算时(不为E)再计算\n let m;\n if(i !== index && (!isE(parentMatrix) || !isE(transform))) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1 + tx, tfo[1] + dby + node.__y1 - y1 + ty);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n // 子元素有cacheTotal优先使用\n let target = i > index && getCache([__cacheMask2, __cacheFilter2, __cacheTotal2]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let opacity = ctxTotal.globalAlpha = node.__opacity;\n if(opacity > 0) {\n if(m) {\n ctxTotal.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctxTotal.setTransform(1, 0, 0, 1, 0, 0);\n }\n let mixBlendMode = __computedStyle2[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctxTotal.globalCompositeOperation = mbmName(mixBlendMode);\n }\n CanvasCache.drawCache(target, __cacheTotal);\n ctxTotal.globalCompositeOperation = 'source-over';\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n else {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = i > index && node.__calOffscreen(ctxTotal, __computedStyle2);\n if(offscreen) {\n ctxTotal = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n if(visibility === 'visible') {\n let opacity = ctxTotal.globalAlpha = node.__opacity;\n if(opacity > 0) {\n if(m) {\n ctxTotal.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n }\n else {\n ctxTotal.setTransform(1, 0, 0, 1, 0, 0);\n }\n node.render(renderMode, ctxTotal, dx, dy);\n }\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n let oh = offscreenHash[i];\n if(oh) {\n ctxTotal = applyOffscreen(ctxTotal, oh, width, height, false);\n }\n }\n }\n }\n\n // overflow写回整体离屏\n if(isOverflow) {\n let t = node.__cacheTotal = CanvasCache.getInstance(renderMode, ctx, root.__uuid, bboxTotal, x1, y1, null);\n t.__available = true;\n t.ctx.drawImage(__cacheTotal.canvas, t.x, t.y);\n __cacheTotal.release();\n __cacheTotal = t;\n }\n\n root.__env = null;\n return __cacheTotal;\n}\n\n// 从cacheTotal生成overflow、filter和mask,一定有cacheTotal才会进\nfunction genTotalOther(renderMode, __structs, __cacheTotal, node, hasMask, width, height) {\n let {\n __computedStyle,\n __cacheFilter,\n __cacheMask,\n } = node;\n let {\n [FILTER]: filter,\n } = __computedStyle;\n let target = __cacheTotal, needGen;\n if(filter && filter.length) {\n if(!__cacheFilter|| !__cacheFilter.available || needGen) {\n target = node.__cacheFilter = CanvasCache.genFilter(target, filter);\n needGen = true;\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n target = node.__cacheMask = CanvasCache.genMask(target, node, function(item, cacheMask, inverse) {\n // 和外面没cache的类似,mask生成hash记录,这里mask节点一定是个普通无cache的独立节点\n let maskStartHash = {};\n let offscreenHash = {};\n let { dx, dy, dbx, dby, x: tx, y: ty, ctx, x1, y1 } = cacheMask;\n let struct = item.__struct, root = item.__root, structs = root.__structs;\n let index = structs.indexOf(struct);\n let {\n total,\n lv,\n } = struct;\n let matrixList = [];\n let parentMatrix = null;\n let lastMatrix = null;\n let opacityList = [];\n let parentOpacity = 1;\n let lastOpacity = 1;\n let lastLv = lv;\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text\n if(node instanceof Text) {\n node.render(renderMode, ctx, dx, dy);\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, true);\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n if(maskStartHash.hasOwnProperty(i)) {\n let { idx, hasMask, offscreenMask } = maskStartHash[i];\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctx = target.ctx;\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastOpacity;\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 计算临时的matrix,先以此节点为局部根节点原点,后面考虑逆矩阵\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [OPACITY]: opacity, // 和genTotal不同,局部根节点opacity生效不为1\n } = __computedStyle;\n if(i !== index) {\n opacity *= parentOpacity;\n }\n node.__opacity = lastOpacity = opacity;\n // 特殊渲染的matrix,局部根节点为原点且考虑根节点自身的transform\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1 + tx, tfo[1] + dby + node.__y1 - y1 + ty);\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n }\n lastMatrix = m;\n if(m) {\n // 很多情况mask和target相同matrix,可简化计算\n if(util.equalArr(m, inverse)) {\n m = mx.identity();\n }\n else if(inverse) {\n inverse = mx.inverse(inverse);\n m = mx.multiply(inverse, m);\n }\n }\n else if(!isE(inverse)) {\n m = mx.inverse(inverse);\n }\n m = m || mx.identity();\n assignMatrix(node.__matrixEvent, m);\n // 特殊渲染的matrix,局部根节点为原点考虑,本节点需inverse反向\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n ctx.globalAlpha = opacity;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n else {\n ctx.globalCompositeOperation = 'source-over';\n }\n let { x, y, canvas, width, height, x1: x2, y1: y2, dbx: dbx2, dby: dby2 } = target;\n let ox = tx + x2 - x1 + dbx - dbx2;\n let oy = ty + y2 - y1 + dby - dby2;\n ctx.drawImage(canvas, x, y, width, height, ox, oy, width, height);\n ctx.globalCompositeOperation = 'source-over';\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height, false);\n }\n }\n // 等于将外面bbox计算和渲染合一的过程,但不需要bbox本身的内容\n else {\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = node.__calOffscreen(ctx, __computedStyle);\n if(offscreen) {\n ctx = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n ctx.globalAlpha = opacity;\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, ctx, dx, dy);\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n if(offscreenHash.hasOwnProperty(i)) {\n ctx = applyOffscreen(ctx, offscreenHash[i], width, height);\n }\n }\n }\n }\n });\n }\n return target;\n}\n\n/**\n * canvas/webgl支持任意节点为mask,不像svg仅单节点\n * hasMask的num是指遮罩对象后面的兄弟节点数,需要换算成包含子节点的总数\n * @param __structs\n * @param start\n * @param hasMask\n */\nfunction countMaskNum(__structs, start, hasMask) {\n let count = 0;\n while(hasMask--) {\n let total = __structs[start].total;\n count += total || 0;\n start += total || 0;\n // total不算自身,所以还得+1\n count++;\n start++;\n }\n return count;\n}\n\n// webgl不太一样,使用fbo离屏绘制到一个纹理上进行汇总\nfunction genFrameBufferWithTexture(gl, texture, width, height) {\n let frameBuffer = gl.createFramebuffer();\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n // let check = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\n // if(check !== gl.FRAMEBUFFER_COMPLETE) {\n // inject.error('Framebuffer object is incomplete: ' + check.toString());\n // }\n // 离屏窗口0开始\n gl.viewport(0, 0, width, height);\n // gl.clearColor(0, 0, 0, 0);\n // gl.clear(gl.COLOR_BUFFER_BIT);\n return frameBuffer;\n}\n\n/**\n * 局部根节点复合图层生成,汇总所有子节点到一颗局部树上的位图缓存,包含超限特殊情况\n * 即便只有自己一个也要返回,因为webgl生成total的原因是有类似filter/mask等必须离屏处理的东西\n * 传入isPpt的时候,说明是有perspective的节点在前置分割处理完毕之后,进行的渲染,需预乘pm透视矩阵\n * 传入pptNode/oitHash的时候,说明是透视节点下某个preserve3d的子节点,其渲染需要考虑其子节点平面拆分,预处理\n */\nfunction genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total,\n __structs, W, H, isPpt, pptNode, oitHash) {\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n\n let top = node;\n let { __x1: x1, __y1: y1, __offsetWidth, __offsetHeight } = node;\n let bboxTotal = genBboxTotal(node, __structs, index, total, lv, isPpt);\n if(!bboxTotal) {\n return;\n }\n\n // overflow:hidden和canvas一样特殊考虑\n let w, h, dx, dy, cx, cy, texture, frameBuffer;\n let overflow = node.__computedStyle[OVERFLOW];\n if(overflow === 'hidden' && (x1 !== bboxTotal[0]\n || y1 !== bboxTotal[1]\n || __offsetWidth !== (bboxTotal[2] - bboxTotal[0])\n || __offsetHeight !== (bboxTotal[3] - bboxTotal[1]))) {\n // geom可能超限,不能直接用bbox\n bboxTotal = [x1, y1, x1 + __offsetWidth, y1 + __offsetHeight];\n w = __offsetWidth;\n h = __offsetHeight;\n }\n else {\n w = bboxTotal[2] - bboxTotal[0];\n h = bboxTotal[3] - bboxTotal[1];\n }\n if(__cacheTotal) {\n __cacheTotal.reset(bboxTotal, x1, y1);\n }\n else {\n __cacheTotal = TextureCache.getInstance(renderMode, gl, root.__uuid, bboxTotal, x1, y1, null);\n }\n if(!__cacheTotal || !__cacheTotal.__enabled) {\n if(w || h) {\n inject.warn('TextureCache of ' + node.tagName + '(' + index + ')' + ' is oversize: '\n + w + ', ' + h);\n }\n return;\n }\n __cacheTotal.__available = true;\n node.__cacheTotal = __cacheTotal;\n cx = w * 0.5;\n cy = h * 0.5;\n dx = -bboxTotal[0];\n dy = -bboxTotal[1];\n\n // 需要重新计算,因为bbox里是原本位置,这里是新的位置\n let pm, ppt;\n if(isPpt) {\n if(pptNode.__perspectiveMatrix) {\n let {\n [PERSPECTIVE]: perspective,\n [PERSPECTIVE_ORIGIN]: perspectiveOrigin,\n } = pptNode.__computedStyle;\n pm = tf.calPerspectiveMatrix(perspective, x1 + dx + perspectiveOrigin[0], y1 + dy + perspectiveOrigin[1]);\n }\n else {\n let {\n [TRANSFORM_ORIGIN]: perspectiveOrigin,\n } = pptNode.__computedStyle;\n pm = tf.calPerspectiveMatrix(pptNode.__selfPerspective, x1 + dx + perspectiveOrigin[0], y1 + dy + perspectiveOrigin[1]);\n }\n }\n if(oitHash) {\n if(pptNode.__perspectiveMatrix) {\n let {\n [PERSPECTIVE]: perspective,\n } = pptNode.__computedStyle;\n ppt = perspective;\n }\n else {\n ppt = pptNode.__selfPerspective;\n }\n }\n\n let page = __cacheTotal.__page, size = page.__size;\n // 先绘制到一张单独的纹理,防止children中和cacheTotal重复texture不能绘制\n texture = createTexture(gl, null, 0, w, h);\n frameBuffer = genFrameBufferWithTexture(gl, texture, w, h);\n gl.viewport(0, 0, w, h);\n\n // 离屏画布的原点和尺寸信息存储\n root.__env = {\n x: dx,\n y: dy,\n width: w,\n height: h,\n node,\n };\n\n // fbo绘制对象纹理不用绑定单元,剩下的纹理绘制用0号\n let lastPage, list = [];\n let cacheTotal = __cacheTotal;\n for(let i = index, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n // 先看text,visibility会在内部判断,display会被parent判断\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __opacity,\n __matrixEvent,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n // 再看total缓存/cache,都没有的是无内容的Xom节点\n else {\n let __computedStyle = node.__computedStyle;\n if(i > index) {\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [MIX_BLEND_MODE]: mixBlendMode,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __domParent: p,\n __selfPerspective: ppt2,\n __opacity: opacity,\n } = node;\n // 特殊渲染的matrix,局部根节点为原点考虑,和bbox以节点自身主画布参考系不同\n let m;\n if(i > index) {\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n }\n if(ppt2) {\n let t = tf.calPerspectiveMatrix(ppt2, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n m = multiply(t, m);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 有透视还得预乘透视\n else if(pm) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n }\n // 有oit平面拆分的优先考虑,其一定没有mbm;否则走普通渲染逻辑\n let oit = oitHash && oitHash[i];\n if(oit) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n // 只求子节点的matrix即可\n for(let j = i + 1, len = i + (total || 0) + 1; j < len; j++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[j];\n if(!(node instanceof Text)) {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n j += (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n continue;\n }\n let p = node.__domParent;\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 + dx, tfo[1] + node.__y1 + dy);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n // 有透视还得预乘透视\n else if(pm) {\n m = multiply(pm, m);\n }\n assignMatrix(node.__matrixEvent, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n j += (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n }\n }\n }\n webgl.drawOitPlane(gl, __structs, oit, ppt, cx, cy, dx, dy);\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n }\n }\n else {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = i > index ? getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]) : __cache;\n if(target) {\n if(opacity > 0) {\n // 局部的mbm和主画布一样,先刷新当前fbo,然后把后面这个mbm节点绘入一个新的等画布尺寸的fbo中,再进行2者mbm合成\n if(i > index && mixBlendMode !== 'normal') {\n if(list.length) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n let res = genMbmWebgl(gl, texture, target, mixBlendMode, node.__opacity, m, dx, dy, cx, cy, size, size);\n if(res) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.deleteTexture(texture);\n texture = res.texture;\n frameBuffer = res.frameBuffer;\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n }\n lastPage = null;\n }\n else {\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: target, opacity: node.__opacity, matrix: m });\n }\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if((!target || target === __cache) && opacity > 0) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n }\n }\n }\n }\n }\n\n // 删除fbo恢复\n drawTextureCache(gl, list, cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n // 汇入集合\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, page.texture, 0);\n gl.viewport(0, 0, size, size);\n drawTex2Cache(gl, gl.program, cacheTotal, texture, w, h);\n gl.deleteTexture(texture);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.bindTexture(gl.TEXTURE_2D, null);\n gl.viewport(0, 0, W, H);\n\n root.__env = null;\n return __cacheTotal;\n}\n\nfunction genPptWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total, __structs, W, H) {\n if(__cacheTotal && __cacheTotal.available) {\n return __cacheTotal;\n }\n\n let top = node;\n let mergeHash = [], mergeList = [];\n let isFlat = top.__computedStyle[TRANSFORM_STYLE] === 'flat', isTopFlat = isFlat;\n // 将产生transformStyle变化的节点记下来,直接子节点如果是flat也记下来,这样除了根节点下一直preserve3d的其它都被记录\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n lv,\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM_STYLE]: transformStyle,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent: p,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n // flat变化的局部子节点,或者flat根的直接子节点,生成局部根,已生成过的不用再生成\n if(total && !target && (transformStyle !== p.__computedStyle[TRANSFORM_STYLE]\n || p === top && transformStyle === 'flat')) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n mergeHash[j] = {\n isFlat,\n };\n isFlat = transformStyle === 'flat';\n // 变化的则生成新的局部子节点汇总,记录flat情况\n mergeList.push({\n i,\n lv,\n total,\n node,\n isFlat,\n });\n }\n // 子cache可以跳过,因为flat肯定先前执行\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n let mh = mergeHash[i];\n if(mh) {\n isFlat = mh.isFlat;\n }\n }\n }\n // 排序依旧是子节点先,但同层级不用倒序(没有mask影响)\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return a.i - b.i;\n }\n return b.lv - a.lv;\n });\n // 根节点特殊处理,如果是flat就是flat但直接子节点后续渲染仍需要透视,如果是3d就要切分\n if(!isTopFlat) {\n mergeList.push({\n i: index,\n lv,\n total,\n node,\n isFlat: isTopFlat,\n });\n }\n // 变为preserve3d的子节点需要对其子节点进行平面拆分,记录这个子节点索引和拆分信息\n let oitHash = [];\n for(let i = 0, len = mergeList.length; i < len; i++) {\n let { i: index, lv, total, node, isFlat } = mergeList[i];\n // flat汇集临时cacheTotal\n if(isFlat) {\n genTotalWebgl(renderMode, node.__cacheTotal, gl, root, node, index, lv, total || 0,\n __structs, W, H, null, top, oitHash);\n }\n // preserve3d需要以此节点为局部根E,所有子节点四边形面在3d空间下求交拆分,暂时不绘制,等上层flat调用绘制投影\n else {\n let top = node, x0 = node.__x1, y0 = node.__y1, planeList = [];\n if(node.__hasContent) {\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n let o = {\n index,\n node,\n target,\n points: [\n { x: 0, y: 0, z: 0 },\n { x: node.__offsetWidth, y: 0, z: 0 },\n { x: node.__offsetWidth, y: node.__offsetHeight, z: 0 },\n { x: 0, y: node.__offsetHeight, z: 0 },\n ],\n };\n planeList.push(o);\n }\n for(let i = index + 1, len = index + (total || 0) + 1; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n } = node.__domParent;\n let { x1: x, y1: y, __width: width, __height: height } = __cache;\n let xa = x - x0, ya = y - y0;\n let xb = x + width - x0, yb = y + height - y0;\n let { x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 } = calRectPoint(xa, ya, xb, yb, __matrixEvent);\n let o = {\n index: i,\n node,\n target: __cache,\n points: [\n { x: x1, y: y1, z: z1 },\n { x: x2, y: y2, z: z2 },\n { x: x3, y: y3, z: z3 },\n { x: x4, y: y4, z: z4 },\n ],\n };\n planeList.push(o);\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n if(__computedStyle[DISPLAY] === 'none' || node.__mask) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = __computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent: p,\n __selfPerspective: ppt,\n } = node;\n // 当前局部根为原点坐标系下的matrix,只求交用\n let m;\n if(!isE(transform)) {\n m = tf.calMatrixByOrigin(transform, tfo[0] + node.__x1 - x0, tfo[1] + node.__y1 - y0);\n }\n if(ppt) {\n let t = tf.calPerspectiveMatrix(ppt, tfo[0] + node.__x1 - x0, tfo[1] + node.__y1 - y0);\n m = multiply(t, m);\n }\n if(p !== top) {\n m = multiply(p.__matrixEvent, m);\n }\n assignMatrix(node.__matrixEvent, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target) {\n let { x1: x, y1: y, __width: width, __height: height } = target;\n // 坐标计算还是以局部根为原点\n let xa = x - x0, ya = y - y0;\n let xb = x + width - x0, yb = y + height - y0;\n let { x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4 } = calRectPoint(xa, ya, xb, yb, m);\n let o = {\n index: i,\n node,\n target,\n points: [\n { x: x1, y: y1, z: z1 },\n { x: x2, y: y2, z: z2 },\n { x: x3, y: y3, z: z3 },\n { x: x4, y: y4, z: z4 },\n ],\n };\n planeList.push(o);\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n }\n }\n // 有2个以上面才会求相交\n if(planeList.length > 1) {\n oit.splitQuadrilateralPlane(planeList);\n }\n // 没拆分的直接存入,拆分的存有效拼图\n let list = [];\n for(let i = 0, len = planeList.length; i < len; i++) {\n let plane = planeList[i];\n let puzzle = plane.puzzle;\n if(puzzle && puzzle.length) {\n for(let i = 0, len = puzzle.length; i < len; i++) {\n let p = puzzle[i];\n if(!p.isDeleted) {\n list.push(p);\n }\n }\n }\n else {\n list.push(plane);\n }\n }\n // 按z排序,远的先绘制\n oitHash[index] = oit.sortPuzzleZ(list);\n }\n }\n // 最后一次循环绘制到局部根节点上,类似genTotalWebgl()逻辑,但要考虑ppt透视\n return genTotalWebgl(renderMode, __cacheTotal, gl, root, node, index, lv, total,\n __structs, W, H, true, node, oitHash);\n}\n\nfunction genFilterWebgl(renderMode, gl, node, cache, filter, W, H) {\n let { x1, y1, width, height, bbox } = cache;\n let target = cache;\n filter.forEach(item => {\n let { k, v } = item;\n if(k === 'blur' && v > 0) {\n let res = genBlurWebgl(renderMode, gl, target, v);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'dropShadow') {\n let res = genDropShadowWebgl(renderMode, gl, target, v);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'hueRotate') {\n let rotation = geom.d2r(v % 360);\n let cosR = Math.cos(rotation);\n let sinR = Math.sin(rotation);\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.213 + cosR * 0.787 - sinR * 0.213, 0.715 - cosR * 0.715 - sinR * 0.715, 0.072 - cosR * 0.072 + sinR * 0.928, 0, 0,\n 0.213 - cosR * 0.213 + sinR * 0.143, 0.715 + cosR * 0.285 + sinR * 0.140, 0.072 - cosR * 0.072 - sinR * 0.283, 0, 0,\n 0.213 - cosR * 0.213 - sinR * 0.787, 0.715 - cosR * 0.715 + sinR * 0.715, 0.072 + cosR * 0.928 + sinR * 0.072, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'saturate' && v !== 100) {\n let amount = v * 0.01;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.213 + 0.787 * amount, 0.715 - 0.715 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 + 0.285 * amount, 0.072 - 0.072 * amount, 0, 0,\n 0.213 - 0.213 * amount, 0.715 - 0.715 * amount, 0.072 + 0.928 * amount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'brightness' && v !== 100) {\n let b = v * 0.01;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n b, 0, 0, 0, 0,\n 0, b, 0, 0, 0,\n 0, 0, b, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'grayscale' && v > 0) {\n v = Math.min(v, 100);\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.2126 + 0.7874 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 + 0.2848 * oneMinusAmount, 0.0722 - 0.0722 * oneMinusAmount, 0, 0,\n 0.2126 - 0.2126 * oneMinusAmount, 0.7152 - 0.7152 * oneMinusAmount, 0.0722 + 0.9278 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'contrast' && v !== 100) {\n let amount = v * 0.01;\n let o = -0.5 * amount + 0.5;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'sepia' && v > 0) {\n v = Math.min(v, 100);\n let oneMinusAmount = 1 - v * 0.01;\n if(oneMinusAmount < 0) {\n oneMinusAmount = 0;\n }\n else if(oneMinusAmount > 1) {\n oneMinusAmount = 1;\n }\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n 0.393 + 0.607 * oneMinusAmount, 0.769 - 0.769 * oneMinusAmount, 0.189 - 0.189 * oneMinusAmount, 0, 0,\n 0.349 - 0.349 * oneMinusAmount, 0.686 + 0.314 * oneMinusAmount, 0.168 - 0.168 * oneMinusAmount, 0, 0,\n 0.272 - 0.272 * oneMinusAmount, 0.534 - 0.534 * oneMinusAmount, 0.131 + 0.869 * oneMinusAmount, 0, 0,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n else if(k === 'invert' && v > 0) {\n v = Math.min(v, 100);\n let o = v * 0.01;\n let amount = 1 - 2 * o;\n let res = genColorMatrixWebgl(renderMode, gl, target, [\n amount, 0, 0, 0, o,\n 0, amount, 0, 0, o,\n 0, 0, amount, 0, o,\n 0, 0, 0, 1, 0,\n ], width, height, x1, y1, bbox);\n if(res) {\n if(target !== cache) {\n target.release();\n }\n target = res;\n }\n }\n });\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.viewport(0, 0, W, H);\n return node.__cacheFilter = target;\n}\n\nfunction genBlurShader(gl, sigma, d) {\n let key = 'programBlur,' + sigma + ',' + d;\n if(gl.hasOwnProperty(key)) {\n return gl[key];\n }\n let weights = blur.gaussianWeight(sigma, d);\n let vert = '';\n let frag = '';\n let r = Math.floor(d * 0.5);\n for(let i = 0; i < r; i++) {\n let c = (r - i) * 0.01;\n vert += `v_texCoordsBlur[${i}] = a_texCoords + vec2(-${c}, -${c}) * u_direction;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i}]) * ${weights[i]};`;\n }\n vert += `v_texCoordsBlur[${r}] = a_texCoords;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${r}]) * ${weights[r]};`;\n for(let i = 0; i < r; i++) {\n let c = (i + 1) * 0.01;\n vert += `v_texCoordsBlur[${i + r + 1}] = a_texCoords + vec2(${c}, ${c}) * u_direction;`;\n frag += `gl_FragColor += texture2D(u_texture, v_texCoordsBlur[${i + r + 1}]) * ${weights[i + r + 1]};`;\n }\n vert = vertexBlur.replace('[3]', '[' + d + ']').replace(/}$/, vert + '}');\n frag = fragmentBlur.replace('[3]', '[' + d + ']').replace(/}$/, frag + '}');\n return gl[key] = webgl.initShaders(gl, vert, frag);\n}\n\n/**\n * https://www.w3.org/TR/2018/WD-filter-effects-1-20181218/#feGaussianBlurElement\n * 根据cacheTotal生成cacheFilter,按照css规范的优化方法执行3次,避免卷积核d扩大3倍性能慢\n * 规范的优化方法对d的值分奇偶优化,这里再次简化,d一定是奇数,即卷积核大小\n * 先动态生成gl程序,默认3核源码示例已注释,根据sigma获得d(一定奇数),再计算权重\n * 然后将d尺寸和权重拼接成真正程序并编译成program,再开始绘制\n */\nfunction genBlurWebgl(renderMode, gl, cache, sigma) {\n let { x1, y1, bbox, width, height } = cache;\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n // 防止超限,webgl最大纹理尺寸限制\n if(width > Page.MAX + spread || height > Page.MAX + spread) {\n inject.warn('Filter blur is oversize');\n return;\n }\n let bboxNew = bbox.slice(0);\n bboxNew[0] -= spread;\n bboxNew[1] -= spread;\n bboxNew[2] += spread;\n bboxNew[3] += spread;\n // 写到一个tex中方便后续处理\n let w = width + spread * 2, h = height + spread * 2;\n let tex = createTexture(gl, null, 0, w, h);\n let frameBuffer = genFrameBufferWithTexture(gl, tex, w, h);\n drawCache2Tex(gl, gl.program, cache, w, h, spread);\n // 生成blur,同尺寸复用fbo\n let program = genBlurShader(gl, sigma, d);\n tex = webgl.drawBlur(gl, program, tex, w, h);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 写回一个cache中\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bboxNew, x1, y1, null);\n target.__available = true;\n let page = target.__page, size = page.__size, texture = page.texture;\n frameBuffer = genFrameBufferWithTexture(gl, texture, size, size);\n drawTex2Cache(gl, gl.program, target, tex, w, h);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n return target;\n}\n\nfunction genColorMatrixWebgl(renderMode, gl, cache, m) {\n let { x1, y1, bbox } = cache;\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bbox.slice(0), x1, y1, cache.__page);\n target.__available = true;\n let page = target.__page, size = page.__size;\n let frameBuffer = genFrameBufferWithTexture(gl, target.__page.texture, size, size);\n webgl.drawCm(gl, gl.programCm, target, cache, m, size * 0.5, size);\n // 切回\n gl.useProgram(gl.program);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n return target;\n}\n\nfunction genMaskWebgl(renderMode, gl, root, node, cache, W, H, i, lv, __structs) {\n let { x1, y1, width, height, bbox, dbx, dby } = cache;\n let bboxNew = bbox.slice(0);\n // 结果不能和源同page纹理,一定符合尺寸要求,不会比源大\n let __cacheMask = TextureCache.getInstance(renderMode, gl, root.__uuid, bboxNew, x1, y1, cache.__page);\n __cacheMask.__available = true;\n node.__cacheMask = __cacheMask;\n // 先求得被遮罩的matrix,用作inverse给mask计算,以被遮罩左上角为原点\n let {\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n } = node.__computedStyle;\n let inverse;\n if(isE(transform)) {\n inverse = mx.identity();\n }\n else {\n inverse = tf.calMatrixByOrigin(transform, tfo[0], tfo[1]);\n }\n inverse = mx.inverse(inverse);\n // 将所有mask绘入一个单独纹理中,尺寸和原点与被遮罩相同\n gl.viewport(0, 0, width, height);\n let texture = createTexture(gl, null, 0, width, height);\n let cx = width * 0.5, cy = height * 0.5;\n let frameBuffer = genFrameBufferWithTexture(gl, texture, width, height);\n let next = node.next;\n let isClip = next.__clip;\n let lastPage, list = [];\n let dx = -x1 + dbx, dy = -y1 + dby;\n while(next && next.__mask && next.__clip === isClip) {\n let total = __structs[i].total || 0;\n let matrixList = [];\n let parentMatrix;\n let lastMatrix;\n let opacityList = [];\n let parentOpacity = 1;\n let lastOpacity;\n let lastLv = lv;\n let index = i;\n for(let len = i + (total || 0) + 1; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n if(node instanceof Text) {\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n __opacity,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n else {\n let __limitCache = node.__limitCache;\n let computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点和mask\n if(computedStyle[DISPLAY] === 'none' || __limitCache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [OPACITY]: opacity,\n [VISIBILITY]: visibility,\n [TRANSFORM]: transform,\n [TRANSFORM_ORIGIN]: tfo,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = computedStyle;\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,根节点是第一个特殊处理\n if(i === index) {}\n else if(lv > lastLv) {\n parentMatrix = lastMatrix;\n if(isE(parentMatrix)) {\n parentMatrix = null;\n }\n matrixList.push(parentMatrix);\n parentOpacity = lastOpacity;\n opacityList.push(parentOpacity);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n opacityList.splice(-diff);\n parentOpacity = opacityList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 不考虑mbm\n let m;\n if(isE(transform)) {\n m = mx.identity();\n }\n else {\n m = tf.calMatrixByOrigin(transform, tfo[0] + dbx + node.__x1 - x1, tfo[1] + dby + node.__y1 - y1);\n }\n if(!isE(parentMatrix)) {\n m = multiply(parentMatrix, m);\n }\n lastMatrix = m;\n lastOpacity = parentOpacity * opacity;\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target && (target !== __cache || visibility === 'visible')) {\n m = mx.multiply(inverse, m);\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n }\n lastPage = p;\n list.push({ cache: target, opacity: lastOpacity, matrix: m });\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if(!target || target === __cache) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, dx, dy);\n lastPage = null;\n node.render(renderMode, gl, dx, dy);\n gl.useProgram(gl.program);\n }\n }\n }\n }\n next = next.__next;\n }\n // 绘制到fbo的纹理对象上并删除fbo恢复\n drawTextureCache(gl, list, cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.bindTexture(gl.TEXTURE_2D, null);\n let program;\n if(isClip) {\n program = gl.programClip;\n }\n else {\n program = gl.programMask;\n }\n let page = __cacheMask.__page, size = page.size, tex = page.texture;\n frameBuffer = genFrameBufferWithTexture(gl, tex, size, size);\n webgl.drawMask(gl, program, __cacheMask, cache, texture, size * 0.5, size);\n // 切换回主程序\n gl.useProgram(gl.program);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n gl.viewport(0, 0, W, H);\n return __cacheMask;\n}\n\n/**\n * webgl的dropShadow只生成阴影部分,模糊复用blur,然后进行拼合\n * 复用blur时生成的模糊是临时的,和主程序模糊不一样,需区分\n */\nfunction genDropShadowWebgl(renderMode, gl, cache, v) {\n let { x1, y1, bbox, width, height } = cache;\n // 先根据x/y/color生成单色阴影\n let [x, y, sigma, , color] = v;\n let d = blur.kernelSize(sigma);\n let max = Math.max(15, gl.getParameter(gl.MAX_VARYING_VECTORS));\n while(d > max) {\n d -= 2;\n }\n let spread = blur.outerSizeByD(d);\n // 防止超限,webgl最大纹理尺寸限制\n if(width > Page.MAX + spread || height > Page.MAX + spread) {\n inject.warn('Filter dropShadow is oversize');\n return;\n }\n let w = width + spread * 2, h = height + spread * 2;\n let tex1 = createTexture(gl, null, 0, w, h);\n let frameBuffer = genFrameBufferWithTexture(gl, tex1, w, h);\n gl.useProgram(gl.programDs);\n webgl.drawDropShadow(gl, gl.programDs, frameBuffer, cache, color, width, w, height, h);\n // 生成模糊的阴影\n if(sigma) {\n let program = genBlurShader(gl, sigma, d);\n tex1 = webgl.drawBlur(gl, program, tex1, w, h);\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // cache绘制到一个单独的tex上\n let tex2 = createTexture(gl, null, 0, width, height);\n frameBuffer = genFrameBufferWithTexture(gl, tex2, width, height);\n drawCache2Tex(gl, gl.program, cache, width, height, 0);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 原图tex2和模糊阴影tex1合成\n let bboxNew = bbox.slice(0);\n bboxNew[0] += x;\n bboxNew[1] += y;\n bboxNew[2] += x;\n bboxNew[3] += y;\n bboxNew[0] -= spread;\n bboxNew[1] -= spread;\n bboxNew[2] += spread;\n bboxNew[3] += spread;\n let bboxMerge = bbox.slice(0);\n mergeBbox(bboxMerge, bboxNew);\n let target = TextureCache.getInstance(renderMode, gl, cache.__rootId, bboxMerge, x1, y1, null);\n target.__available = true;\n let page = target.__page, size = page.__size;\n frameBuffer = genFrameBufferWithTexture(gl, page.texture, size, size);\n let dx1 = bboxNew[0] - bboxMerge[0], dy1 = bboxNew[1] - bboxMerge[1];\n let dx2 = bbox[0] - bboxMerge[0], dy2 = bbox[1] - bboxMerge[1];\n webgl.drawDropShadowMerge(gl, target, size, tex1, dx1, dy1, w, h, tex2, dx2, dy2, width, height);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n bindTexture(gl, null, 0);\n gl.deleteTexture(tex1);\n gl.deleteTexture(tex2);\n return target;\n}\n\n/**\n * 生成blendMode混合fbo纹理结果,原本是所有元素向画布或一个fbo记A进行绘制,当出现mbm时,进入到这里,\n * 先生成一个新的fbo记B,之前的绘制都先到B上,再把后续元素绘制到一个同尺寸的fbo纹理上,\n * 两者进行mbm混合,返回到A上\n */\nfunction genMbmWebgl(gl, texture, cache, mbm, opacity, matrix, dx, dy, cx, cy, width, height) {\n // 后续绘制到同尺寸纹理上\n let tex = createTexture(gl, null, 0, width, height);\n let frameBuffer = genFrameBufferWithTexture(gl, tex, width, height);\n drawTextureCache(gl, [{ cache, opacity, matrix }], cx, cy, dx, dy);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 获取对应的mbm程序\n let program;\n mbm = mbmName(mbm);\n if(mbm === 'multiply') {\n program = gl.programMbmMp;\n }\n else if(mbm === 'screen') {\n program = gl.programMbmSr;\n }\n else if(mbm === 'overlay') {\n program = gl.programMbmOl;\n }\n else if(mbm === 'darken') {\n program = gl.programMbmDk;\n }\n else if(mbm === 'lighten') {\n program = gl.programMbmLt;\n }\n else if(mbm === 'color-dodge') {\n program = gl.programMbmCd;\n }\n else if(mbm === 'color-burn') {\n program = gl.programMbmCb;\n }\n else if(mbm === 'hard-light') {\n program = gl.programMbmHl;\n }\n else if(mbm === 'soft-light') {\n program = gl.programMbmSl;\n }\n else if(mbm === 'difference') {\n program = gl.programMbmDf;\n }\n else if(mbm === 'exclusion') {\n program = gl.programMbmEx;\n }\n else if(mbm === 'hue') {\n program = gl.programMbmHue;\n }\n else if(mbm === 'saturation') {\n program = gl.programMbmSt;\n }\n else if(mbm === 'color') {\n program = gl.programMbmCl;\n }\n else if(mbm === 'luminosity') {\n program = gl.programMbmLm;\n }\n gl.useProgram(program);\n // 生成新的fbo,将混合结果绘入\n let resTex = createTexture(gl, null, 0, width, height);\n let resFrameBuffer = genFrameBufferWithTexture(gl, resTex, width, height);\n webgl.drawMbm(gl, program, texture, tex);\n gl.useProgram(gl.program);\n return {\n texture: resTex,\n frameBuffer: resFrameBuffer,\n };\n}\n\nfunction renderSvg(renderMode, ctx, root, isFirst, rlv) {\n let { __structs, width, height } = root;\n // mask节点很特殊,本身有matrix会影响,本身没改变但对象节点有改变也需要计算逆矩阵应用顶点\n let maskEffectHash = [];\n if(!isFirst) {\n // 先遍历一遍收集完全不变的defs,缓存起来id,随后再执行遍历渲染生成新的,避免掉重复的id\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n let __cacheDefs = node.__cacheDefs;\n let __refreshLevel = node.__refreshLevel;\n // 只要涉及到matrix和opacity就影响mask\n let hasEffectMask = hasMask && (__refreshLevel >= REPAINT || (__refreshLevel & (TRANSFORM_ALL | OP)));\n if(hasEffectMask) {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // mask索引遍历时处理,暂存遮罩对象的刷新lv\n maskEffectHash[end - 1] = __refreshLevel;\n }\n // >=REPAINT重绘生成走render()跳过这里\n if(__refreshLevel < REPAINT) {\n // 特殊的mask判断,遮罩对象影响这个mask了,除去filter、遮罩对象无TRANSFORM变化外都可缓存\n let mh = maskEffectHash[i];\n if(mh) {\n if(!(__refreshLevel & TRANSFORM_ALL) && mh < REPAINT && !(mh & TRANSFORM_ALL)) {\n __cacheDefs.forEach(item => {\n ctx.addCache(item);\n });\n }\n }\n // 去除特殊的filter,普通节点或不影响的mask在 {\n ctx.addCache(item);\n });\n }\n }\n }\n }\n let maskHash = [];\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let matrixList = [];\n let parentMatrix;\n let vdList = [];\n let parentVd;\n let lastLv = 0;\n let lastRefreshLv = 0;\n let lastNode;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n let computedStyle, __refreshLevel, __cacheDefs, __cacheTotal;\n if(node instanceof Text) {\n computedStyle = node.computedStyle;\n __refreshLevel = lastRefreshLv;\n }\n else {\n computedStyle = node.__computedStyle;\n __cacheDefs = node.__cacheDefs;\n __refreshLevel = node.__refreshLevel;\n __cacheTotal = node.__cacheTotal;\n }\n lastRefreshLv = __refreshLevel;\n node.__refreshLevel = NONE;\n let display = computedStyle[DISPLAY];\n // 将随后的若干个mask节点范围存下来\n if(hasMask && display !== 'none') {\n let start = i + (total || 0) + 1;\n let end = start + hasMask;\n // svg限制了只能Geom单节点,不可能是Dom,所以end只有唯一\n maskHash[end - 1] = {\n index: i,\n start,\n end,\n isClip: __structs[start].node.__clip, // 第一个节点是clip为准\n };\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树,Root节点第一个特殊处理\n if(lv < lastLv) {\n let diff = lastLv - lv;\n matrixList.splice(-diff);\n parentMatrix = matrixList[lv - 1];\n vdList.splice(-diff);\n parentVd = vdList[lv - 1];\n }\n else if(lv > lastLv) {\n matrixList.push(parentMatrix = lastNode.__matrix);\n let vd = lastNode.__virtualDom;\n vdList.push(vd);\n parentVd = vd;\n }\n lastNode = node;\n lastLv = lv;\n let virtualDom;\n // svg小刷新等级时直接修改vd,这样Geom不再感知\n if(__refreshLevel < REPAINT && !(node instanceof Text)) {\n virtualDom = node.__virtualDom;\n // total可以跳过所有孩子节点省略循环\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n virtualDom.cache = true;\n }\n else {\n __cacheTotal && (__cacheTotal.available = true);\n virtualDom = node.__virtualDom = util.extend({}, virtualDom);\n // dom要清除children缓存,geom和img无需\n if(node instanceof Dom && !(node instanceof Img)) {\n virtualDom.children = [];\n }\n // 还得判断,和img加载混在一起时,触发刷新如果display:none,则还有cacheTotal\n if(display === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += hasMask;\n }\n }\n else {\n delete virtualDom.cache;\n }\n }\n if(__refreshLevel & TRANSFORM_ALL) {\n let matrix = node.__matrix;\n if(!matrix || isE(matrix)) {\n delete virtualDom.transform;\n }\n else {\n virtualDom.transform = 'matrix(' + util.joinArr(mx.m2m6(matrix), ',') + ')';\n }\n if(parentMatrix && matrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(node.__matrixEvent, matrix);\n }\n if(__refreshLevel & OP) {\n let opacity = computedStyle[OPACITY];\n if(opacity === 1) {\n delete virtualDom.opacity;\n }\n else {\n virtualDom.opacity = opacity;\n }\n }\n if(__refreshLevel & FT) {\n let filter = computedStyle[FILTER];\n let s = painter.svgFilter(filter);\n if(s) {\n virtualDom.filter = s;\n }\n else {\n delete virtualDom.filter;\n }\n }\n if(__refreshLevel & MBM) {\n let mixBlendMode = computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n virtualDom.mixBlendMode = mbmName(mixBlendMode);\n }\n else {\n delete virtualDom.mixBlendMode;\n }\n }\n virtualDom.lv = __refreshLevel;\n }\n else {\n // >=REPAINT会调用render,重新生成defsCache,text没有这个东西\n if(!(node instanceof Text)) {\n node.__cacheDefs.splice(0);\n let matrix = node.__matrix;\n if(parentMatrix) {\n matrix = multiply(parentMatrix, matrix);\n }\n assignMatrix(node.__matrixEvent, matrix);\n }\n node.render(renderMode, ctx, 0, 0);\n virtualDom = node.__virtualDom;\n // svg mock,每次都生成,每个节点都是局部根,更新时自底向上清除\n if(!(node instanceof Text)) {\n node.__cacheTotal = node.__cacheTotal || {\n available: true,\n release() {\n this.available = false;\n delete virtualDom.cache;\n },\n __offsetY() {},\n };\n node.__cacheTotal.available = true;\n }\n // 渲染后更新取值\n display = computedStyle[DISPLAY];\n if(display === 'none') {\n i += total || 0;\n i += hasMask || 0;\n }\n }\n /**\n * mask会在join时过滤掉,这里将假设正常渲染的vd的内容获取出来组成defs的mask内容\n * 另外最初遍历时记录了会影响的mask,在=REPAINT始终重新设置\n * 本身有matrix也需要重设\n */\n let mh = maskHash[i];\n if(mh && (maskEffectHash[i]\n || __refreshLevel >= REPAINT\n || (__refreshLevel & (TRANSFORM_ALL | OP)))) {\n let { index, start, end, isClip } = mh;\n let target = __structs[index];\n let dom = target.node;\n let mChildren = [];\n // clip模式时,先添加兜底整个白色使得全部都可见,mask本身变反色(黑色)\n if(isClip) {\n mChildren.push({\n type: 'item',\n tagName: 'path',\n props: [\n ['d', `M0,0L${width},0L${width},${height}L0,${height}L0,0`],\n ['fill', 'rgba(255,255,255,1)'],\n ['stroke-width', 0],\n ],\n });\n }\n for(let j = start; j < end; j++) {\n let node = __structs[j].node;\n let { computedStyle: { [DISPLAY]: display, [VISIBILITY]: visibility, [FILL]: fill },\n virtualDom: { children, opacity } } = node;\n if(display !== 'none' && visibility !== 'hidden') {\n // 引用相同无法diff,需要clone\n children = util.clone(children);\n mChildren = mChildren.concat(children);\n for(let k = 0, len = children.length; k < len; k++) {\n let { tagName, props } = children[k];\n if(tagName === 'path') {\n if(isClip) {\n for(let j = 0, len = props.length; j < len; j++) {\n let item = props[j];\n if(item[0] === 'fill') {\n item[1] = util.int2invert(fill[0]);\n }\n }\n }\n let matrix = node.matrix;\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n // path没有transform属性,在vd上,需要弥补\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`]);\n // path没有opacity属性,在vd上,需要弥补\n if(!util.isNil(opacity) && opacity !== 1) {\n props.push(['opacity', opacity]);\n }\n }\n // img可能有matrix属性,需判断\n else if(tagName === 'image') {\n let hasTransform = -1;\n for(let m = 0, len = props.length; m < len; m++) {\n if(props[m][0] === 'transform') {\n hasTransform = m;\n break;\n }\n }\n if(hasTransform === -1) {\n let ivs = inverse(dom.matrix);\n if(!isE(ivs)) {\n props.push(['transform', `matrix(${util.joinArr(mx.m2m6(ivs), ',')})`]);\n }\n }\n else {\n let matrix = props[hasTransform][1].match(/[\\d.]+/g).map(i => parseFloat(i));\n let ivs = inverse(dom.matrix);\n matrix = multiply(ivs, matrix);\n props[hasTransform][1] = `matrix(${util.joinArr(mx.m2m6(matrix), ',')})`;\n }\n }\n }\n }\n }\n // 清掉上次的\n for(let i = __cacheDefs.length - 1; i >= 0; i--) {\n let item = __cacheDefs[i];\n if(item.tagName === 'mask') {\n __cacheDefs.splice(i, 1);\n ctx.removeCache(item);\n }\n }\n let o = {\n tagName: 'mask',\n props: [],\n children: mChildren,\n };\n let id = ctx.add(o);\n __cacheDefs.push(o);\n id = 'url(#' + id + ')';\n dom.virtualDom.mask = id;\n }\n // mask不入children\n if(parentVd && !node.__mask) {\n parentVd.children.push(virtualDom);\n }\n if(i === 0) {\n parentMatrix = node.__matrix;\n parentVd = virtualDom;\n }\n }\n}\n\nfunction renderWebgl(renderMode, gl, root, isFirst, rlv) {\n if(isFirst) {\n Page.init(gl.getParameter(gl.MAX_TEXTURE_SIZE));\n }\n let { __structs, width, height } = root;\n let cx = width * 0.5, cy = height * 0.5;\n // 栈代替递归,存父节点的matrix/opacity,matrix为E时存null省略计算\n let lastRefreshLevel = NONE;\n let mergeList = [];\n let hasMbm; // 是否有混合模式出现\n /**\n * 先一遍先序遍历每个节点绘制到自己__cache上,排除Text和已有的缓存以及局部根缓存,\n * 根据refreshLevel进行等级区分,可能是=REPAINT,REFLOW布局已前置处理完。\n * 首次绘制没有catchTotal等,后续则可能会有,在= REPAINT || (rlv & (CACHE | FT | PPT | MASK))) {\n // 记录transformStyle,出现ppt时有用,同时ts为flat后同一ppt上下文影响继承显示\n let flatList = [], flatExtendList = [];\n let parentFlat = false, parentExtendFlat = false;\n let lastFlat = false, lastExtendFlat = false;\n let pptNodeList = [];\n let parentPptNode = null;\n let lastPptNode = null;\n let lastLv = 0;\n // 节点开始有ppt得记录,后续孩子中如果有flat的,得强制生成cacheTotal\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n node.__index = i; // 生成total需要\n // Text特殊处理,webgl中先渲染为bitmap,再作为贴图绘制,缓存交由text内部判断,直接调用渲染纹理方法\n if(node instanceof Text) {\n if(lastRefreshLevel >= REPAINT) {\n let bbox = node.bbox, x = node.__x, y = node.__y;\n let __cache = node.__cache;\n if(__cache) {\n __cache.reset(bbox, x, y);\n }\n else {\n __cache = CanvasCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, x, y, null);\n }\n if(__cache && __cache.enabled) {\n __cache.__bbox = bbox;\n __cache.__available = true;\n node.__cache = __cache;\n node.render(mode.CANVAS, __cache.ctx, __cache.dx, __cache.dy);\n }\n else {\n __cache && __cache.release();\n node.__limitCache = true;\n }\n }\n continue;\n }\n let __computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let perspective = __computedStyle[PERSPECTIVE];\n let isFlat = __computedStyle[TRANSFORM_STYLE] === 'flat';\n // 特殊,新的ppt上下文节点启用新值,否则还是老的\n let isExtendFlat = parentExtendFlat || isFlat;\n let pptNode = perspective ? node : null;\n // root第一个特殊处理\n if(lv === 0) {\n parentFlat = parentExtendFlat = isFlat;\n if(perspective) {\n parentPptNode = node;\n }\n }\n // lv变大说明是child,相等是sibling,变小可能是parent或另一棵子树\n else if(lv > lastLv) {\n parentFlat = lastFlat;\n flatList.push(isFlat);\n parentExtendFlat = lastExtendFlat;\n flatExtendList.push(isFlat);\n parentPptNode = lastPptNode || parentPptNode;\n pptNodeList.push(pptNode || parentPptNode);\n }\n // 变小出栈索引需注意,可能不止一层,多层计算diff层级\n else if(lv < lastLv) {\n let diff = lastLv - lv;\n flatList.splice(-diff);\n parentFlat = flatList[lv - 1];\n flatExtendList.splice(-diff);\n parentExtendFlat = flatExtendList[lv - 1];\n pptNodeList.splice(-diff);\n parentPptNode = pptNodeList[lv - 1];\n }\n // 不变是同级兄弟,无需特殊处理 else {}\n lastLv = lv;\n // 根据refreshLevel优化计算\n let {\n __refreshLevel,\n __currentStyle,\n __cacheTotal,\n } = node;\n node.__refreshLevel = NONE;\n /**\n * lv=REPAINT那里,小变化不动\n * 当有遮罩时,如果被遮罩节点本身无变更,需要检查其next的遮罩节点有无变更,\n * 但其实不用检查,因为next变更一定会清空cacheMask,只要检查cacheMask即可\n * 如果没有或无效,直接添加,无视节点本身变化,后面防重即可\n */\n if(!__refreshLevel) {\n }\n else if(__refreshLevel < REPAINT) {\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n let isMbm = (__refreshLevel & MBM) && mixBlendMode !== 'normal';\n let need = node.__cacheAsBitmap || hasMask;\n if(!need && (__refreshLevel & (FT | CACHE))) {\n let filter = __computedStyle[FILTER];\n if(filter && filter.length) {\n need = true;\n }\n }\n if(!need && (__refreshLevel & (PPT | CACHE))) {\n let __domParent = node.__domParent;\n let isPpt = !isE(__domParent && __domParent.__perspectiveMatrix) || node.__selfPerspectiveMatrix;\n if(isPpt) {\n need = true;\n }\n }\n if(isMbm) {\n hasMbm = true;\n }\n // 这里和canvas不一样,前置cacheAsBitmap条件变成或条件之一,新的ppt层级且画中画需要新的fbo\n if(need) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt: total && perspective || node.__selfPerspectiveMatrix,\n });\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n if(__refreshLevel === NONE && hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n /**\n * >=REPAINT重新渲染,并根据结果判断是否离屏限制错误\n * Geom没有子节点无需汇总局部根,Dom中Img也是,它们的局部根等于自身的cache,其它符合条件的Dom需要生成\n */\n else {\n let hasContent = node.calContent(__currentStyle, __computedStyle), onlyImg;\n // 有内容先以canvas模式绘制到离屏画布上,自定义渲染设置无内容不实现即可跳过\n if(hasContent) {\n let bbox = node.bbox, __cache = node.__cache, x1 = node.__x1, y1 = node.__y1;\n // 单图特殊对待缓存\n if(node instanceof Img) {\n let loadImg = node.__loadImg;\n if(loadImg.onlyImg && !loadImg.error && loadImg.source) {\n onlyImg = true;\n __cache = node.__cache = ImgWebglCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, loadImg, x1, y1);\n }\n }\n if(!onlyImg) {\n if(__cache) {\n __cache.reset(bbox, x1, y1);\n }\n else {\n __cache = CanvasCache.getInstance(mode.CANVAS, gl, root.__uuid, bbox, x1, y1, null);\n }\n }\n if(__cache && __cache.enabled) {\n __cache.__bbox = bbox;\n __cache.__available = true;\n node.__cache = __cache;\n if(!onlyImg || __cache.count === 1) {\n node.render(mode.CANVAS, __cache.ctx, __cache.dx, __cache.dy);\n }\n }\n else {\n __cache && __cache.release();\n node.__limitCache = true;\n return;\n }\n }\n else {\n node.__limitCache = false;\n }\n let {\n [OVERFLOW]: overflow,\n [FILTER]: filter,\n [MIX_BLEND_MODE]: mixBlendMode,\n [PERSPECTIVE]: perspective,\n } = __computedStyle;\n let isMbm = mixBlendMode !== 'normal';\n let isPpt = total && perspective || node.__selfPerspectiveMatrix;\n let isOverflow = overflow === 'hidden' && total;\n let isFilter = filter && filter.length;\n if(isMbm) {\n hasMbm = true;\n }\n if(node.__cacheAsBitmap\n || hasMask\n || isFilter\n || isOverflow\n || isPpt) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt,\n });\n }\n }\n lastRefreshLevel = __refreshLevel;\n lastFlat = isFlat;\n lastExtendFlat = isExtendFlat;\n lastPptNode = pptNode;\n }\n }\n // 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n // 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return b.i - a.i;\n }\n return b.lv - a.lv;\n });\n // ppt只有嵌套才需要生成,最下面的孩子节点的ppt无需,因此记录一个hash存index,\n // 同时因为是后序遍历,孩子先存所有父亲的index即可保证父亲才能生成cacheTotal\n for(let ii = 0, len = mergeList.length; ii < len; ii++) {\n let {\n i,\n lv,\n total,\n node,\n hasMask,\n isPpt,\n } = mergeList[ii];\n let {\n __computedStyle,\n } = node;\n let {\n [FILTER]: filter,\n } = __computedStyle;\n // 有ppt的,向上查找所有父亲index记录,可能出现重复记得提前跳出\n let {\n __limitCache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n } = node;\n if(__limitCache) {\n return;\n }\n let needGen;\n // 可能没变化,比如被遮罩节点、filter变更等\n if(!__cacheTotal || !__cacheTotal.available) {\n let res;\n if(isPpt) {\n res = genPptWebgl(renderMode, __cacheTotal, gl, root, node, i, lv, total || 0,\n __structs, width, height);\n }\n else {\n res = genTotalWebgl(renderMode, __cacheTotal, gl, root, node, i, lv, total || 0,\n __structs, width, height, null, null, null);\n }\n if(!res) {\n return;\n }\n __cacheTotal = res;\n needGen = true;\n }\n // 即使超限,也有total结果\n let target = __cacheTotal;\n if(filter.length) {\n if(!__cacheFilter || !__cacheFilter.available || needGen) {\n let res = genFilterWebgl(renderMode, gl, node, target, filter, width, height);\n if(res) {\n target = res;\n needGen = true;\n }\n }\n }\n if(hasMask && (!__cacheMask || !__cacheMask.available || needGen)) {\n genMaskWebgl(renderMode, gl, root, node, target, width, height, i + (total || 0) + 1, lv, __structs);\n }\n }\n }\n /**\n * 最后先序遍历一次应用__cacheTotal即可,没有的用__cache,以及剩下的超尺寸的和Text\n * 由于mixBlendMode的存在,需先申请个fbo纹理,所有绘制默认向该纹理绘制,最后fbo纹理再进入主画布\n * 前面循环时有记录是否出现mbm,只有出现才申请,否则不浪费直接输出到主画布\n * 超尺寸的不绘制并给出警告,实现会扰乱逻辑且很少会出现这种情况\n */\n let frameBuffer, texture;\n if(hasMbm) {\n texture = createTexture(gl, null, 0, width, height);\n bindTexture(gl, null, 0);\n frameBuffer = genFrameBufferWithTexture(gl, texture, width, height);\n gl.bindFramebuffer(gl.FRAMEBUFFER, frameBuffer);\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);\n }\n let lastPage, list = [];\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n total,\n hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n // text特殊之处,__config部分是复用parent的\n let __cache = node.__cache;\n if(__cache && __cache.available) {\n let {\n __matrixEvent,\n __opacity,\n } = node.__domParent;\n let p = __cache.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n }\n lastPage = p;\n list.push({ cache: __cache, opacity: __opacity, matrix: __matrixEvent });\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n let {\n [OPACITY]: opacity,\n [MIX_BLEND_MODE]: mixBlendMode,\n [VISIBILITY]: visibility,\n [BACKFACE_VISIBILITY]: backfaceVisibility,\n } = __computedStyle;\n let {\n __cache,\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent,\n __matrix,\n __selfPerspectiveMatrix,\n } = node;\n let m = __matrix;\n if(__selfPerspectiveMatrix) {\n m = multiply(__selfPerspectiveMatrix, m);\n }\n if(__domParent) {\n let op = __domParent.__opacity;\n if(op !== 1) {\n opacity *= __domParent.__opacity;\n }\n let pm = __domParent.__perspectiveMatrix, me = __domParent.__matrixEvent;\n if(pm && pm.length) {\n m = multiply(__domParent.__perspectiveMatrix, m);\n }\n if(me && me.length) {\n m = multiply(__domParent.__matrixEvent, m);\n }\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n if(visibility === 'hidden' && !total) {\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n // 后面不可见,只有rotateX和rotateY翻转导致的0/5/10位的cos值为负,同时转2次抵消10位是正\n if(backfaceVisibility === 'hidden') {\n let m = node.__matrix, x = m[5] < 0 && m[10] < 0, y = m[0] < 0 && m[10] < 0;\n if(x || y) {\n i += total || 0;\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n }\n // total和自身cache的尝试,visibility不可见时没有cache\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal, __cache]);\n if(target) {\n if(opacity > 0) {\n // 有mbm则需要混合之前的纹理和新纹理到fbo上面,连续的mbm则依次交替绘制到画布或离屏fbo上\n if(mixBlendMode !== 'normal') {\n if(list.length) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n lastPage = null;\n }\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n let res = genMbmWebgl(gl, texture, target, mixBlendMode, opacity, m, 0, 0, cx, cy, width, height);\n if(res) {\n gl.deleteTexture(texture);\n texture = res.texture;\n frameBuffer = res.frameBuffer;\n }\n }\n else {\n let p = target.__page;\n if(lastPage && lastPage !== p) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n }\n lastPage = p;\n list.push({ cache: target, opacity, matrix: m });\n }\n }\n if(target !== __cache) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n // webgl特殊的外部钩子,比如粒子组件自定义渲染时调用\n if((!target || target === __cache) && opacity > 0) {\n let render = node.render;\n if(render !== DOM_RENDER && render !== IMG_RENDER && render !== GEOM_RENDER) {\n drawTextureCache(gl, list.splice(0), cx, cy, 0, 0);\n lastPage = null;\n node.render(renderMode, gl, 0, 0);\n gl.useProgram(gl.program);\n }\n }\n }\n }\n drawTextureCache(gl, list, cx, cy, 0, 0);\n // 有mbm时将汇总的fbo绘入主画布,否则本身就是到主画布无需多余操作\n if(hasMbm) {\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, null, 0);\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n gl.deleteFramebuffer(frameBuffer);\n // 顶点buffer\n let pointBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, pointBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n -1, -1,\n -1, 1,\n 1, -1,\n -1, 1,\n 1, -1,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_position = gl.getAttribLocation(gl.program, 'a_position');\n gl.vertexAttribPointer(a_position, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_position);\n // 纹理buffer\n let texBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, texBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n 0, 0,\n 0, 1,\n 1, 0,\n 0, 1,\n 1, 0,\n 1, 1,\n ]), gl.STATIC_DRAW);\n let a_texCoords = gl.getAttribLocation(gl.program, 'a_texCoords');\n gl.vertexAttribPointer(a_texCoords, 2, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_texCoords);\n // opacity buffer\n let opacityBuffer = gl.createBuffer();\n gl.bindBuffer(gl.ARRAY_BUFFER, opacityBuffer);\n gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, 1, 1, 1, 1]), gl.STATIC_DRAW);\n let a_opacity = gl.getAttribLocation(gl.program, 'a_opacity');\n gl.vertexAttribPointer(a_opacity, 1, gl.FLOAT, false, 0, 0);\n gl.enableVertexAttribArray(a_opacity);\n // 纹理单元\n bindTexture(gl, texture, 0);\n let u_texture = gl.getUniformLocation(gl.program, 'u_texture');\n gl.uniform1i(u_texture, 0);\n gl.drawArrays(gl.TRIANGLES, 0, 6);\n gl.deleteBuffer(pointBuffer);\n gl.deleteBuffer(texBuffer);\n gl.deleteBuffer(opacityBuffer);\n gl.disableVertexAttribArray(a_position);\n gl.disableVertexAttribArray(a_texCoords);\n gl.deleteTexture(texture);\n }\n}\n\nfunction renderCanvas(renderMode, ctx, root, isFirst, rlv) {\n let { __structs, width, height } = root;\n let mergeList = [];\n /**\n * 先一遍先序遍历收集cacheAsBitmap的节点,说明这棵子树需要缓存,可能出现嵌套,深层级优先、后面优先\n * 可能遇到已有缓存没变化的,这时候不要收集忽略掉,没有缓存的走后面遍历普通渲染\n * 第一次强制进入,后续不包含cache变更且= REPAINT || (rlv & (CACHE | FT | MASK))) {\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // 排除Text,要么根节点直接绘制,要么被局部根节点汇总,自身并不缓存(fillText比位图更快)\n if(node instanceof Text) {\n continue;\n }\n let __computedStyle = node.__computedStyle;\n // 跳过display:none元素和它的所有子节点\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n continue;\n }\n // 根据refreshLevel优化计算,处理其样式\n let {\n __refreshLevel,\n __cacheTotal,\n } = node;\n node.__refreshLevel = NONE;\n // filter变化需重新生成,cacheTotal本身就存在要判断下;CACHE取消重新生成则无需判断\n // img在只有自身的情况下自动生成并特殊对待,多个相同引用的img使用同一份资源\n let need = node.__cacheAsBitmap &&\n ((__refreshLevel & (CACHE | FT)) || __refreshLevel >= REPAINT);\n if(!need && node instanceof Img) {\n let hasContent = node.calContent(node.__currentStyle, node.__computedStyle);\n let loadImg = node.__loadImg;\n if(loadImg.onlyImg && hasContent) {\n need = true;\n }\n }\n if(need) {\n mergeList.push({\n i,\n lv,\n total,\n node,\n hasMask,\n });\n }\n // total可以跳过所有孩子节点省略循环,filter/mask等的强制前提是有total\n if(__cacheTotal && __cacheTotal.available) {\n i += (total || 0);\n if(__refreshLevel === NONE && hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n }\n }\n }\n /**\n * 根据收集的需要合并局部根的索引,尝试合并,按照层级从大到小,索引从大到小的顺序,\n * 这样保证子节点在前,后节点在前,后节点是为了mask先应用自身如filter之后再进行遮罩\n */\n if(mergeList.length) {\n mergeList.sort(function(a, b) {\n if(a.lv === b.lv) {\n return b.i - a.i;\n }\n return b.lv - a.lv;\n });\n mergeList.forEach(item => {\n let { i, lv, total, node, hasMask } = item;\n let __cacheTotal = genTotal(renderMode, ctx, root, node, i, lv, total || 0, __structs, width, height);\n if(__cacheTotal) {\n genTotalOther(renderMode, __structs, __cacheTotal, node, hasMask, width, height);\n }\n });\n }\n /**\n * 最后先序遍历一次并应用__cacheTotal即可,没有的普通绘制,以及剩下的超尺寸的和Text\n * 特殊离屏和cacheAsBitmap的离屏都已经产生了cacheTotal,除非超限\n * 离屏功能的数据结构和算法逻辑非常复杂,需用到下面2个hash,来完成一些filter、mask等离屏才能完成的绘制\n * 其中overflow、filter、mix-blend-mode是对自身及子节点,mask则是对自身和后续next遮罩节点\n * 一个节点在Xom渲染中申请离屏canvas,是按照一定顺序来的,且多个离屏后面的有前面的ctx引用,第一个则引用最初非离屏的ctx\n * 这个顺序在应用离屏时以反向顺序开始,这样最后ctx被还原到最初的ctx\n * mask是个十分特殊的离屏,因为除了自身外,next节点也需要汇总到另外一个离屏上,为了逻辑一致性\n * 所有离屏应用的索引都以最后一个节点的索引为准,即有mask时以最后一个mask,无mask则以自身节点的最后一个(+total)为索引\n * 由于存在普通非cache绘制,所以依然要用到栈代替递归计算matrix\n */\n let maskStartHash = [];\n let offscreenHash = [];\n let lastOpacity = -1;\n for(let i = 0, len = __structs.length; i < len; i++) {\n let {\n node,\n lv,\n total,\n hasMask,\n } = __structs[i];\n // text如果display不可见,parent会直接跳过,不会走到这里,这里一定是直接绘制到root的,visibility在其内部判断\n if(node instanceof Text) {\n node.render(renderMode, ctx, 0, 0);\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n else {\n let __computedStyle = node.__computedStyle;\n // none跳过这棵子树,判断下最后一个节点的离屏应用即可\n if(__computedStyle[DISPLAY] === 'none') {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, true);\n lastOpacity = -1;\n }\n continue;\n }\n let {\n __cacheTotal,\n __cacheFilter,\n __cacheMask,\n __domParent,\n __matrix,\n } = node;\n // 遮罩对象申请了个离屏,其第一个mask申请另外一个离屏mask2,开始聚集所有mask元素的绘制,\n // 这是一个十分特殊的逻辑,保存的index是最后一个节点的索引,OFFSCREEN_MASK2是最低优先级,\n // 这样当mask本身有filter时优先自身,然后才是OFFSCREEN_MASK2\n let msh = maskStartHash[i];\n if(msh) {\n let { idx, hasMask, offscreenMask } = msh;\n let target = inject.getOffscreenCanvas(width, height, null, 'mask2');\n offscreenMask.mask = target; // 应用mask用到\n offscreenMask.isClip = node.__clip;\n // 定位到最后一个mask元素上的末尾\n let j = i + (total || 0) + 1;\n while(--hasMask) {\n let { total } = __structs[j];\n j += (total || 0) + 1;\n }\n j--;\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx, lv, type: OFFSCREEN_MASK, offscreen: offscreenMask });\n list.push({ idx: j, lv, type: OFFSCREEN_MASK2, offscreen: {\n ctx, // 保存等待OFFSCREEN_MASK2时还原\n target,\n }});\n ctx = target.ctx;\n }\n // 设置opacity/matrix,根节点是没有父节点的不计算继承值\n let opacity = __computedStyle[OPACITY];\n let m = __matrix;\n if(__domParent) {\n let op = __domParent.__opacity;\n if(op !== 1) {\n opacity *= __domParent.__opacity;\n }\n let me = __domParent.__matrixEvent;\n if(me && me.length) {\n m = multiply(me, m);\n }\n }\n node.__opacity = opacity;\n assignMatrix(node.__matrixEvent, m);\n // 有cache声明从而有total的可以直接绘制并跳过子节点索,total生成可能会因超限而失败\n let target = getCache([__cacheMask, __cacheFilter, __cacheTotal]);\n if(target) {\n i += (total || 0);\n if(hasMask) {\n i += countMaskNum(__structs, i + 1, hasMask);\n }\n if(lastOpacity !== opacity) {\n ctx.globalAlpha = opacity;\n lastOpacity = opacity;\n }\n if(opacity > 0) {\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n let mixBlendMode = __computedStyle[MIX_BLEND_MODE];\n if(mixBlendMode !== 'normal') {\n ctx.globalCompositeOperation = mbmName(mixBlendMode);\n }\n let { x, y, canvas, x1, y1, dbx, dby, width: w, height: h } = target;\n ctx.drawImage(canvas, x, y, w, h, x1 - dbx, y1 - dby, w, h);\n // total应用后记得设置回来\n ctx.globalCompositeOperation = 'source-over';\n }\n // 父超限但子有total的时候,i此时已经增加到了末尾,也需要检查\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n // 没有cacheTotal是普通节点绘制\n else {\n // 如果有离屏则先申请替换ctx\n let offscreenBlend, offscreenMask, offscreenFilter, offscreenOverflow;\n let offscreen = node.__calOffscreen(ctx, __computedStyle);\n if(offscreen) {\n ctx = offscreen.ctx;\n offscreenBlend = offscreen.offscreenBlend;\n offscreenMask = offscreen.offscreenMask;\n offscreenFilter = offscreen.offscreenFilter;\n offscreenOverflow = offscreen.offscreenOverflow;\n }\n // 节点自身渲染\n if(lastOpacity !== opacity) {\n ctx.globalAlpha = opacity;\n lastOpacity = opacity;\n }\n if(opacity > 0) {\n ctx.setTransform(m[0], m[1], m[4], m[5], m[12], m[13]);\n node.render(renderMode, ctx, 0, 0);\n }\n // 这里离屏顺序和xom里返回的一致,和下面应用离屏时的list相反\n if(offscreenBlend) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_BLEND, offscreen: offscreenBlend });\n }\n // 被遮罩的节点要为第一个遮罩和最后一个遮罩的索引打标,被遮罩的本身在一个离屏canvas,遮罩的元素在另外一个\n // 最后一个遮罩索引因数量不好计算,放在maskStartHash做\n if(offscreenMask) {\n let j = i + (total || 0);\n maskStartHash[j + 1] = {\n idx: i,\n hasMask,\n offscreenMask,\n };\n }\n // filter造成的离屏,需要将后续一段孩子节点区域的ctx替换,并在结束后应用结果,再替换回来\n if(offscreenFilter) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_FILTER, offscreen: offscreenFilter });\n }\n // overflow:hidden的离屏,最后孩子进行截取\n if(offscreenOverflow) {\n let j = i + (total || 0);\n if(hasMask) {\n j += countMaskNum(__structs, j + 1, hasMask);\n }\n let list = offscreenHash[j] = offscreenHash[j] || [];\n list.push({ idx: i, lv, type: OFFSCREEN_OVERFLOW, offscreen: offscreenOverflow });\n }\n // 离屏应用,按照lv从大到小即子节点在前先应用,同一个节点多个效果按offscreen优先级从小到大来,\n // 由于mask特殊索引影响,所有离屏都在最后一个mask索引判断,此时mask本身优先结算,以index序大到小判断\n let oh = offscreenHash[i];\n if(oh) {\n ctx = applyOffscreen(ctx, oh, width, height, false);\n lastOpacity = -1;\n }\n }\n }\n }\n}\n\nexport default {\n renderCanvas,\n renderSvg,\n renderWebgl,\n};\n\n","export default {\n alpha: true,\n antialias: true,\n premultipliedAlpha: true,\n preserveDrawingBuffer: true,\n depth: true,\n // stencil: true,\n};\n","import Xom from './Xom';\nimport Dom from './Dom';\nimport Text from './Text';\nimport Component from './Component';\nimport Defs from './Defs';\nimport Geom from './geom/Geom';\nimport builder from './builder';\nimport util from '../util/util';\nimport domDiff from '../util/diff';\nimport unit from '../style/unit';\nimport geom from '../math/geom';\nimport enums from '../util/enums';\nimport inject from '../util/inject';\nimport Event from '../util/Event';\nimport frame from '../animate/frame';\nimport Controller from '../animate/Controller';\nimport mode from '../refresh/mode';\nimport change from '../refresh/change';\nimport level from '../refresh/level';\nimport struct from '../refresh/struct';\nimport reflow from '../refresh/reflow';\nimport webgl from '../gl/webgl';\nimport ca from '../gl/ca';\nimport vertex from '../gl/main.vert';\nimport fragment from '../gl/main.frag';\nimport vertexMask from '../gl/mask.vert';\nimport fragmentMask from '../gl/mask.frag';\nimport fragmentClip from '../gl/clip.frag';\nimport vertexOverflow from '../gl/overflow.vert';\nimport fragmentOverflow from '../gl/overflow.frag';\nimport vertexCm from '../gl/filter/cm.vert';\nimport fragmentCm from '../gl/filter/cm.frag';\nimport vertexDs from '../gl/filter/drops.vert'\nimport fragmentDs from '../gl/filter/drops.frag';\nimport vertexMbm from '../gl/mbm/mbm.vert';\nimport fragmentMultiply from '../gl/mbm/multiply.frag';\nimport fragmentScreen from '../gl/mbm/screen.frag';\nimport fragmentOverlay from '../gl/mbm/overlay.frag';\nimport fragmentDarken from '../gl/mbm/darken.frag';\nimport fragmentLighten from '../gl/mbm/lighten.frag';\nimport fragmentColorDodge from '../gl/mbm/color-dodge.frag';\nimport fragmentColorBurn from '../gl/mbm/color-burn.frag';\nimport fragmentHardLight from '../gl/mbm/hard-light.frag';\nimport fragmentSoftLight from '../gl/mbm/soft-light.frag';\nimport fragmentDifference from '../gl/mbm/difference.frag';\nimport fragmentExclusion from '../gl/mbm/exclusion.frag';\nimport fragmentHue from '../gl/mbm/hue.frag';\nimport fragmentSaturation from '../gl/mbm/saturation.frag';\nimport fragmentColor from '../gl/mbm/color.frag';\nimport fragmentLuminosity from '../gl/mbm/luminosity.frag';\nimport vertexSs from '../gl/ss.vert';\nimport fragmentSs from '../gl/ss.frag';\n\nconst {\n STYLE_KEY: {\n TOP,\n RIGHT,\n BOTTOM,\n LEFT,\n POSITION,\n DISPLAY,\n VISIBILITY,\n COLOR,\n WIDTH,\n HEIGHT,\n Z_INDEX,\n POINTER_EVENTS,\n WRITING_MODE,\n TEXT_STROKE_COLOR,\n TEXT_STROKE_WIDTH,\n TEXT_STROKE_OVER,\n MATRIX,\n TRANSFORM,\n OPACITY,\n MIX_BLEND_MODE,\n },\n} = enums;\nconst { isNil, isFunction } = util;\nconst { PX, INHERIT } = unit;\nconst {\n getLevel,\n isRepaint,\n NONE,\n FILTER: FT,\n PERSPECTIVE: PPT,\n REPAINT,\n REFLOW,\n REBUILD,\n CACHE,\n TRANSFORM: TF,\n TRANSFORM_ALL,\n OPACITY: OP,\n MIX_BLEND_MODE: MBM,\n MASK,\n} = level;\nconst { isGeom } = change;\nconst { renderCanvas, renderSvg, renderWebgl } = struct;\n\nconst ROOT_DOM_NAME = {\n canvas: 'canvas',\n svg: 'svg',\n webgl: 'canvas',\n};\n\nfunction getDom(dom) {\n if(util.isString(dom) && dom) {\n let o = document.querySelector(dom);\n if(!o) {\n throw new Error('Can not find dom of selector: ' + dom);\n }\n return o;\n }\n if(!dom) {\n throw new Error('Can not find dom: ' + dom);\n }\n return dom;\n}\n\nfunction renderProp(k, v) {\n let s = Array.isArray(v) ? util.joinSourceArray(v) : util.stringify(v);\n if(k === 'className') {\n k = 'class';\n }\n else if(k === 'style') {\n return '';\n }\n return ' ' + k + '=\"' + util.encodeHtml(s, true) + '\"';\n}\n\nconst EVENT_LIST = ['click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'touchstart', 'touchmove', 'touchend', 'touchcancel'];\n\nfunction initEvent(dom, Root) {\n let list = [];\n EVENT_LIST.forEach(type => {\n function cb(e) {\n let root = dom.__root;\n if(root && root instanceof Root) {\n if(['touchend', 'touchcancel', 'touchmove'].indexOf(type) > -1) {\n let target = root.__touchstartTarget;\n let event = root.__wrapEvent(e);\n event.target = target;\n while(target) {\n target.__emitEvent(event, null, true);\n target = target.__domParent;\n }\n }\n else {\n root.__cb(e);\n }\n }\n }\n dom.addEventListener(type, cb);\n list.push({ type, cb });\n });\n return list;\n}\n\nfunction removeEvent(dom, list) {\n list.forEach(item => {\n dom.removeEventListener(item.type, item.cb);\n });\n}\n\nlet uuid = 0;\n\nclass Root extends Dom {\n constructor(tagName, props, children) {\n super(tagName, props, children);\n this.__dom = null; // 真实DOM引用\n this.__mw = 0; // 记录最大宽高,防止尺寸变化清除不完全\n this.__mh = 0;\n // this.__scx = 1; // 默认缩放,css改变canvas/svg缩放后影响事件坐标,有值手动指定,否则自动计算\n // this.__scy = 1;\n this.__task = [];\n this.__ref = {};\n this.__freeze = false;\n this.__animateController = new Controller();\n Event.mix(this);\n this.__uuid = uuid++;\n this.__rlv = REBUILD; // 每次刷新最大lv\n this.__lastUpdateP = null; // 每帧addUpdate都会向上检查,很多时候同级无需继续,第一次检查暂存parent对象\n builder.buildRoot(this, this.__children);\n this.__env = null; // 生成cacheTotal时会覆盖这个信息,得知当前离屏画布信息\n }\n\n __initProps() {\n let w = this.props.width;\n if(!isNil(w)) {\n let value = parseFloat(w) || 0;\n if(value > 0) {\n this.__width = value;\n }\n }\n let h = this.props.height;\n if(!isNil(h)) {\n let value = parseFloat(h) || 0;\n if(value > 0) {\n this.__height = value;\n }\n }\n }\n\n __genHtml(domName) {\n let res = `<${domName}`;\n // 拼接处理属性\n Object.keys(this.props).forEach(k => {\n let v = this.props[k];\n // 忽略事件\n if(!/^on[a-zA-Z]/.test(k)) {\n res += renderProp(k, v);\n }\n });\n res += `>${domName}>`;\n return res;\n }\n\n __wrapEvent(e) {\n let x, y;\n // 触摸结束取消特殊没有touches\n if(['touchend', 'touchcancel'].indexOf(e.type) === -1) {\n let { dom, __scx, __scy } = this;\n let { x: x2, y: y2, left, top, width, height } = dom.getBoundingClientRect();\n x = x2 || left || 0;\n y = y2 || top || 0;\n let { clientX, clientY } = e.touches ? e.touches[0] : e;\n x = clientX - x;\n y = clientY - y;\n // 外边的scale影响元素事件响应,根据倍数计算真实的坐标,优先手动指定,否则自动计算\n if(!isNil(__scx)) {\n x /= __scx;\n }\n else {\n x *= this.__width / width;\n }\n if(!isNil(__scy)) {\n y /= __scy;\n }\n else {\n y *= this.__height / height;\n }\n }\n return {\n event: e,\n stopPropagation() {\n this.__stopPropagation = true;\n e.stopPropagation();\n },\n stopImmediatePropagation() {\n this.__stopPropagation = true;\n this.__stopImmediatePropagation = true;\n e.stopImmediatePropagation();\n },\n preventDefault() {\n e.preventDefault();\n },\n x,\n y,\n __hasEmitted: false,\n };\n }\n\n // 类似touchend/touchcancel/touchmove这种无需判断是否发生于元素上,直接响应\n __cb(e) {\n if(e.type === 'touchmove' && !this.__touchstartTarget) {\n return;\n }\n let data = this.__wrapEvent(e);\n this.__emitEvent(data, null, false);\n return data;\n }\n\n /**\n * 添加到真实Dom上,优先已存在的同名canvas/svg节点,没有则dom下生成新的\n * @param dom\n */\n appendTo(dom) {\n dom = getDom(dom);\n this.__isDestroyed = false;\n this.__initProps();\n let tagName = this.tagName;\n let domName = ROOT_DOM_NAME[tagName];\n // OffscreenCanvas兼容,包含worker的\n if(typeof window !== 'undefined' && window.OffscreenCanvas && (dom instanceof window.OffscreenCanvas)\n || typeof self !== 'undefined' && self.OffscreenCanvas && (dom instanceof self.OffscreenCanvas)) {\n this.__dom = dom;\n this.__width = dom.width;\n this.__height = dom.height;\n }\n // 已有root节点\n else if(dom.nodeName.toLowerCase() === domName) {\n this.__dom = dom;\n if(this.__width) {\n dom.setAttribute('width', this.__width);\n }\n if(this.__height) {\n dom.setAttribute('height', this.__height);\n }\n }\n // 没有canvas/svg节点则生成一个新的\n else {\n this.__dom = dom.querySelector(domName);\n if(!this.__dom) {\n dom.innerHTML = this.__genHtml(domName);\n this.__dom = dom.querySelector(domName);\n }\n // 老的销毁\n else {\n let old = this.__dom.__root;\n if(old && old instanceof Root) {\n old.destroy();\n }\n }\n }\n // 没有设置width/height则采用css计算形式\n if(!this.__width || !this.__height) {\n let domCss = window.getComputedStyle(dom, null);\n if(!this.__width) {\n this.__width = parseFloat(domCss.getPropertyValue('width')) || 0;\n dom.setAttribute('width', this.width);\n }\n if(!this.__height) {\n this.__height = parseFloat(domCss.getPropertyValue('height')) || 0;\n dom.setAttribute('height', this.height);\n }\n }\n // 最终无宽高给出警告\n if(!this.__width || !this.__height) {\n inject.warn('Karas render target with a width or height of 0.')\n }\n let params = Object.assign({}, ca, this.props.contextAttributes);\n // 只有canvas有ctx,svg用真实dom\n if(tagName === 'canvas') {\n this.__ctx = this.__dom.getContext('2d', params);\n this.__renderMode = mode.CANVAS;\n }\n else if(tagName === 'svg') {\n this.__defs = this.dom.__defs || Defs.getInstance(this.__uuid);\n this.__renderMode = mode.SVG;\n }\n else if(tagName === 'webgl') {\n // 优先手动指定,再自动判断,最后兜底\n let gl, webgl2 = this.props.webgl2;\n if(!isNil(webgl2)) {\n if(webgl2) {\n gl = this.__dom.getContext('webgl2', params);\n }\n if(!gl) {\n gl = this.__dom.getContext('webgl', params);\n }\n this.__ctx = gl;\n }\n else {\n gl = this.__ctx = this.__dom.getContext('webgl2', params)\n || this.__dom.getContext('webgl', params);\n }\n this.__initShader(gl);\n this.__renderMode = mode.WEBGL;\n }\n this.draw(true);\n this.__eventCbList = initEvent(this.__dom, Root);\n this.__dom.__root = this;\n }\n\n __initShader(gl) {\n gl.program = webgl.initShaders(gl, vertex, fragment);\n gl.programMask = webgl.initShaders(gl, vertexMask, fragmentMask);\n gl.programClip = webgl.initShaders(gl, vertexMask, fragmentClip);\n gl.programOverflow = webgl.initShaders(gl, vertexOverflow, fragmentOverflow);\n gl.programCm = webgl.initShaders(gl, vertexCm, fragmentCm);\n gl.programDs = webgl.initShaders(gl, vertexDs, fragmentDs);\n gl.programMbmMp = webgl.initShaders(gl, vertexMbm, fragmentMultiply);\n gl.programMbmSr = webgl.initShaders(gl, vertexMbm, fragmentScreen);\n gl.programMbmOl = webgl.initShaders(gl, vertexMbm, fragmentOverlay);\n gl.programMbmDk = webgl.initShaders(gl, vertexMbm, fragmentDarken);\n gl.programMbmLt = webgl.initShaders(gl, vertexMbm, fragmentLighten);\n gl.programMbmCd = webgl.initShaders(gl, vertexMbm, fragmentColorDodge);\n gl.programMbmCb = webgl.initShaders(gl, vertexMbm, fragmentColorBurn);\n gl.programMbmHl = webgl.initShaders(gl, vertexMbm, fragmentHardLight);\n gl.programMbmSl = webgl.initShaders(gl, vertexMbm, fragmentSoftLight);\n gl.programMbmDf = webgl.initShaders(gl, vertexMbm, fragmentDifference);\n gl.programMbmEx = webgl.initShaders(gl, vertexMbm, fragmentExclusion);\n gl.programMbmHue = webgl.initShaders(gl, vertexMbm, fragmentHue);\n gl.programMbmSt = webgl.initShaders(gl, vertexMbm, fragmentSaturation);\n gl.programMbmCl = webgl.initShaders(gl, vertexMbm, fragmentColor);\n gl.programMbmLm = webgl.initShaders(gl, vertexMbm, fragmentLuminosity);\n gl.programSs = webgl.initShaders(gl, vertexSs, fragmentSs);\n gl.useProgram(gl.program);\n }\n\n __reLayout() {\n let {\n renderMode,\n width,\n height,\n } = this;\n this.__checkRoot(renderMode, width, height);\n let wm = this.__currentStyle[WRITING_MODE];\n let isUpright = wm.v && wm.v.indexOf('vertical') === 0;\n // 布局分为两步,普通流和定位流,互相递归\n this.__layout({\n x: 0,\n y: 0,\n w: width,\n h: height,\n isUpright,\n }, false, false, false);\n // 绝对布局需要从根开始保存相对坐标系的容器引用,并根据relative/absolute情况变更\n this.__layoutAbs(this, {\n x: 0,\n y: 0,\n w: width,\n h: height,\n isUpright,\n }, null);\n this.__structs = this.__structure(0, 0);\n }\n\n draw(isFirst) {\n let { isDestroyed, renderMode, ctx, defs } = this;\n if(isDestroyed) {\n return;\n }\n this.__lastUpdateP = null;\n // 首次递归测量整树的继承,后续更改各自更新机制做,防止每次整树遍历;root检查首次直接做,后续在checkUpdate()中插入\n if(isFirst) {\n this.__reLayout();\n }\n // freeze()冻住不渲染,但第一次不能生效\n if(this.props.noRender || !isFirst && this.__freeze) {\n return;\n }\n let rlv = this.__rlv;\n if(renderMode === mode.CANVAS) {\n this.__clearCanvas(ctx);\n renderCanvas(renderMode, ctx, this, isFirst, rlv);\n }\n // svg的特殊diff需要\n else if(renderMode === mode.SVG) {\n defs.clear();\n renderSvg(renderMode, defs, this, isFirst, rlv);\n let nvd = this.virtualDom;\n nvd.defs = defs.value;\n let dom = this.__dom;\n if(dom.__vd) {\n // console.log(this.dom.__vd);\n // console.log(nvd);\n domDiff(dom, dom.__vd, nvd);\n }\n else {\n dom.innerHTML = util.joinVirtualDom(nvd);\n }\n dom.__vd = nvd;\n dom.__defs = defs;\n }\n else if(renderMode === mode.WEBGL) {\n this.__clearWebgl(ctx);\n renderWebgl(renderMode, ctx, this, isFirst, rlv);\n }\n this.emit(Event.REFRESH, rlv);\n this.__rlv = NONE;\n }\n\n destroy() {\n this.__destroy();\n this.__animateController.__destroy();\n let n = this.dom;\n if(n) {\n removeEvent(n, this.__eventCbList || []);\n n.__root = null;\n }\n let gl = this.ctx;\n if(this.renderMode === mode.WEBGL) {\n [\n 'program',\n 'programMask',\n 'programClip',\n 'programOverflow',\n 'programCm',\n 'programDs',\n 'programMbmMp',\n 'programMbmSr',\n 'programMbmOl',\n 'programMbmDk',\n 'programMbmLt',\n 'programMbmCd',\n 'programMbmCb',\n 'programMbmHl',\n 'programMbmSl',\n 'programMbmDf',\n 'programMbmEx',\n 'programMbmHue',\n 'programMbmSt',\n 'programMbmCl',\n 'programMbmLm',\n ].forEach(k => {\n let p = gl[k];\n gl.deleteShader(p.vertexShader);\n gl.deleteShader(p.fragmentShader);\n gl.deleteProgram(p);\n });\n for(let i in gl) {\n if(i.indexOf('programBlur,') === 0) {\n let p = gl[i];\n gl.deleteShader(p.vertexShader);\n gl.deleteShader(p.fragmentShader);\n gl.deleteProgram(p);\n }\n }\n }\n }\n\n scale(x = 1, y = x) {\n this.__scx = x;\n this.__scy = y;\n }\n\n resize(w, h, cb) {\n let self = this;\n if(w !== self.width || h !== self.height) {\n self.__width = w;\n self.__height = h;\n self.updateStyle({\n width: w,\n height: h,\n }, cb);\n }\n else if(isFunction(cb)) {\n cb(-1);\n }\n }\n\n getTargetAtPoint(x, y, includeIgnore) {\n function scan(vd, x, y, path, zPath) {\n let { __x1, __y1, offsetWidth, offsetHeight, matrixEvent, children, zIndexChildren,\n computedStyle: { [DISPLAY]: display, [POINTER_EVENTS]: pointerEvents } } = vd;\n if(!includeIgnore && display === 'none') {\n return;\n }\n if(Array.isArray(zIndexChildren)) {\n for(let i = 0, len = children.length; i < len; i++) {\n children[i].__index__ = i;\n }\n for(let i = zIndexChildren.length - 1; i >= 0; i--) {\n let item = zIndexChildren[i];\n if(item instanceof karas.Text) {\n continue;\n }\n let path2 = path.slice();\n path2.push(item.__index__);\n let zPath2 = zPath.slice();\n zPath2.push(i);\n let res = scan(item, x, y, path2, zPath2);\n if(res) {\n return res;\n }\n }\n }\n if(!includeIgnore && pointerEvents === 'none') {\n return;\n }\n let inThis = geom.pointInQuadrilateral(\n x, y,\n __x1, __y1,\n __x1 + offsetWidth, __y1,\n __x1 + offsetWidth, __y1 + offsetHeight,\n __x1, __y1 + offsetHeight,\n matrixEvent\n );\n if(inThis) {\n return {\n target: vd,\n path,\n zPath,\n };\n }\n }\n return scan(this, x, y, [], []);\n }\n\n /**\n * 每次刷新前检查root节点的样式,有些固定的修改无效,有些继承的作为根初始化\n * @param renderMode\n * @param width\n * @param height\n * @private\n */\n __checkRoot(renderMode, width, height) {\n let { dom, currentStyle, computedStyle } = this;\n // canvas/svg作为根节点一定是block或flex,不会是inline\n if(['flex', 'block'].indexOf(currentStyle[DISPLAY]) === -1) {\n computedStyle[DISPLAY] = currentStyle[DISPLAY] = 'block';\n }\n // 同理position不能为absolute\n if(currentStyle[POSITION] === 'absolute') {\n computedStyle[POSITION] = currentStyle[POSITION] = 'static';\n }\n // 根节点满宽高\n currentStyle[WIDTH] = { v: width, u: PX };\n currentStyle[HEIGHT] = { v: height, u: PX };\n computedStyle[WIDTH] = width;\n computedStyle[HEIGHT] = height;\n // 可能调用resize()导致变更,要重设,canvas无论离屏与否都可使用直接赋值,svg则按dom属性api\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n if(dom.width !== width) {\n dom.width = width;\n }\n if(dom.height !== height) {\n dom.height = height;\n }\n }\n else if(renderMode === mode.SVG) {\n dom.setAttribute('width', width);\n dom.setAttribute('height', height);\n }\n }\n\n /**\n * 添加更新,分析repaint/reflow和上下影响,异步刷新\n */\n __addUpdate(node, keys, focus, addDom, removeDom, aniParams, cb) {\n if(node instanceof Component) {\n node = node.shadowRoot;\n }\n let {\n __computedStyle: computedStyle,\n __currentStyle: currentStyle,\n __cacheStyle: cacheStyle,\n __cacheProps,\n __mask,\n __domParent,\n } = node;\n let hasZ, hasVisibility, hasColor, hasDisplay, hasTsColor, hasTsWidth, hasTsOver;\n // 可能无keys但有aniParams,多防御一下,比如steps动画\n let lv = focus || (aniParams && keys && keys.length ? aniParams.lv : NONE);\n // 清空对应改变的cacheStyle\n if(keys) {\n if(aniParams) {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n cacheStyle[k] = undefined;\n }\n hasZ = aniParams.hasZ;\n hasColor = aniParams.hasColor;\n hasTsColor = aniParams.hasTsColor;\n hasTsWidth = aniParams.hasTsWidth;\n hasTsOver = aniParams.hasTsOver;\n }\n else {\n for(let i = 0, len = keys.length; i < len; i++) {\n let k = keys[i];\n if(node instanceof Geom && isGeom(node.tagName, k)) {\n lv |= REPAINT;\n __cacheProps[k] = undefined;\n }\n else {\n // repaint置空,如果reflow会重新生成空的\n cacheStyle[k] = undefined;\n // TRBL变化只对relative/absolute起作用,其它忽视\n if((k === TOP || k === RIGHT || k === BOTTOM || k === LEFT)\n && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) === -1) {\n continue;\n }\n // 细化等级\n lv |= getLevel(k);\n if(k === DISPLAY) {\n hasDisplay = true;\n }\n else if(k === Z_INDEX) {\n hasZ = node !== this && ['relative', 'absolute'].indexOf(computedStyle[POSITION]) > -1;\n }\n else if(k === VISIBILITY) {\n hasVisibility = true;\n }\n else if(k === COLOR) {\n hasColor = true;\n }\n else if(k === TEXT_STROKE_COLOR) {\n hasTsColor = true;\n }\n else if(k === TEXT_STROKE_WIDTH) {\n hasTsWidth = true;\n }\n else if(k === TEXT_STROKE_OVER) {\n hasTsOver = true;\n }\n }\n }\n }\n }\n // 没有变化,add/remove强制focus\n // 本身节点为none,变更无效,此时没有display变化,add/remove在操作时已经判断不会进入\n if(lv === NONE || computedStyle[DISPLAY] === 'none' && !hasDisplay) {\n if(cb && isFunction(cb)) {\n cb();\n }\n return;\n }\n // transform变化清空重算,比较特殊,MATRIX的cache需手动清理\n if(lv & TF) {\n cacheStyle[MATRIX] = computedStyle[TRANSFORM] = undefined;\n }\n // mask需清除遮罩对象的缓存\n let hasRelease, hasMask = lv & MASK;\n if(__mask || hasMask) {\n let prev = node.__prev;\n while(prev && (prev.__mask)) {\n prev = prev.__prev;\n }\n if(prev && (prev instanceof Xom || prev instanceof Component && prev.shadowRoot instanceof Xom)) {\n prev.__refreshLevel |= CACHE | MASK;\n prev.__struct.hasMask = prev.__hasMask = __mask;\n if(prev.__cacheMask) {\n hasRelease = prev.__cacheMask.release() || hasRelease;\n }\n }\n }\n // aniParams在动画引擎提前计算好了\n let isRp = aniParams && aniParams.isRepaint || isRepaint(lv);\n if(isRp) {\n // dom在>=REPAINT时total失效,svg的Geom比较特殊\n let need = lv >= REPAINT;\n if(need) {\n if(node.__cache) {\n hasRelease = node.__cache.release() || hasRelease;\n }\n node.__calStyle(lv, currentStyle, computedStyle, cacheStyle);\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n // < REPAINT特殊的优化computedStyle计算\n else {\n if(lv & PPT) {\n node.__calPerspective(currentStyle, computedStyle, cacheStyle);\n }\n if(lv & TRANSFORM_ALL) {\n // 特殊的ppt需清空cacheTotal\n let o = node.__selfPerspectiveMatrix;\n node.__calMatrix(lv, currentStyle, computedStyle, cacheStyle, aniParams && aniParams.optimize);\n let n = node.__selfPerspectiveMatrix;\n if(!util.equalArr(o, n)) {\n need = true;\n }\n }\n if(lv & OP) {\n computedStyle[OPACITY] = currentStyle[OPACITY];\n }\n if(lv & FT) {\n node.__calFilter(currentStyle, computedStyle, cacheStyle);\n }\n if(lv & MBM) {\n computedStyle[MIX_BLEND_MODE] = currentStyle[MIX_BLEND_MODE];\n }\n }\n // 影响子继承REPAINT的变化,如果被cache住需要清除\n if(hasVisibility || hasColor || hasTsColor || hasTsWidth || hasTsOver) {\n for(let __structs = this.__structs,\n __struct = node.__struct,\n i = __structs.indexOf(__struct) + 1,\n len = i + (__struct.total || 0); i < len; i++) {\n let {\n node,\n total,\n } = __structs[i];\n // text的style指向parent,不用管\n if(node instanceof Text) {\n continue;\n }\n let currentStyle = node.__currentStyle, cacheStyle = node.__cacheStyle;\n let need;\n if(hasVisibility && currentStyle[VISIBILITY].u === INHERIT) {\n need = true;\n cacheStyle[VISIBILITY] = undefined;\n }\n else if(hasColor && currentStyle[COLOR].u === INHERIT) {\n need = true;\n cacheStyle[COLOR] = undefined;\n }\n else if(hasTsColor && currentStyle[TEXT_STROKE_COLOR].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_COLOR] = undefined;\n }\n else if(hasTsWidth && currentStyle[TEXT_STROKE_WIDTH].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_WIDTH] = undefined;\n }\n else if(hasTsOver && currentStyle[TEXT_STROKE_OVER].u === INHERIT) {\n need = true;\n cacheStyle[TEXT_STROKE_OVER] = undefined;\n }\n if(need) {\n node.__refreshLevel |= REPAINT;\n node.clearCache();\n node.__calStyle(REPAINT, currentStyle, node.__computedStyle, cacheStyle);\n }\n // 不为inherit此子树可跳过,因为不影响\n else {\n i += total || 0;\n }\n }\n }\n // perspective也特殊只清空total的cache,和>=REPAINT清空total共用\n if(need || (lv & PPT)) {\n if(node.__cacheTotal) {\n hasRelease = node.__cacheTotal.release() || hasRelease;\n }\n }\n // mask无论如何都要清除,除非是opacity\n if(node.__hasMask) {\n if(need || (lv ^ OP) || (lv & PPT)) {\n if(node.__cacheMask) {\n hasRelease = node.__cacheMask.release() || hasRelease;\n }\n if(node.__cacheFilter) {\n hasRelease = node.__cacheFilter.release() || hasRelease;\n }\n }\n }\n // 特殊的filter清除cache\n else if((need || (lv & (FT | PPT))) && node.__cacheFilter) {\n hasRelease = node.__cacheFilter.release() || hasRelease;\n }\n // 向上清除cache汇总缓存信息,过程中可能会出现重复,根据refreshLevel判断,reflow已经自己清过了\n if(__domParent !== this.__lastUpdateP) {\n let p = __domParent;\n this.__lastUpdateP = p; // 同层级避免重复进入查找,每次draw()重设\n while(p) {\n if(p.__refreshLevel & (CACHE | REPAINT | REFLOW)) {\n break;\n }\n p.__refreshLevel |= CACHE;\n if(p.__cacheTotal) {\n hasRelease = p.__cacheTotal.release() || hasRelease;\n }\n if(p.__cacheFilter) {\n hasRelease = p.__cacheFilter.release() || hasRelease;\n }\n if(p.__cacheMask) {\n hasRelease = p.__cacheMask.release() || hasRelease;\n }\n p = p.__domParent;\n }\n // 清除parent的zIndexChildren缓存,强制所有孩子重新渲染\n if(hasZ && __domParent) {\n __domParent.__zIndexChildren = null;\n __domParent.__updateStruct();\n if(this.__renderMode === mode.SVG) {\n hasRelease = node.__cacheTotal.release() || hasRelease;\n reflow.clearSvgCache(__domParent);\n }\n }\n }\n }\n else {\n let top = reflow.checkTop(this, node, addDom, removeDom);\n if(top === this) {\n this.__reLayout();\n }\n // 布局影响next的所有节点,重新layout的w/h数据使用之前parent暂存的,x使用parent,y使用prev或者parent的\n else {\n reflow.checkNext(this, top, node, hasZ, addDom, removeDom);\n }\n if(removeDom) {\n let temp = node;\n while(temp.isShadowRoot) {\n temp = temp.__host;\n temp.__destroy();\n }\n node.__destroy();\n }\n }\n node.__refreshLevel |= lv;\n // 有被清除的cache则设置到Root上\n if(hasRelease) {\n lv |= CACHE;\n }\n if(addDom || removeDom) {\n this.__rlv |= REBUILD;\n }\n else {\n this.__rlv |= lv;\n }\n if(cb && !isFunction(cb)) {\n cb = null;\n }\n this.__frameDraw(cb);\n }\n\n // 异步进行root刷新操作,多次调用缓存结果,刷新成功后回调\n __frameDraw(cb) {\n if(!this.__task.length) {\n frame.nextFrame(() => {\n });\n frame.__rootTask.push(() => {\n // 需要先获得累积的刷新回调再刷新,防止refresh触发事件中再次调用刷新\n let list = this.__task.splice(0);\n this.draw(false);\n list.forEach(item => {\n item && item();\n });\n });\n this.__task.push(cb);\n }\n else if(cb) {\n this.__task.push(cb);\n }\n }\n\n __clearCanvas(ctx) {\n // 可能会调整宽高,所以每次清除用最大值\n this.__mw = Math.max(this.__mw, this.width);\n this.__mh = Math.max(this.__mh, this.height);\n // 清除前得恢复默认matrix,防止每次布局改变了属性\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.clearRect(0, 0, this.__mw, this.__mh);\n }\n\n __clearWebgl(ctx) {\n ctx.clearColor(0, 0, 0, 0);\n ctx.clear(ctx.COLOR_BUFFER_BIT);\n }\n\n freeze() {\n this.__freeze = true;\n }\n\n unFreeze() {\n this.__freeze = false;\n }\n\n get dom() {\n return this.__dom;\n }\n\n get uuid() {\n return this.__uuid;\n }\n\n get renderMode() {\n return this.__renderMode;\n }\n\n get ctx() {\n return this.__ctx;\n }\n\n get defs() {\n return this.__defs;\n }\n\n get ref() {\n return this.__ref;\n }\n\n get animateController() {\n return this.__animateController;\n }\n}\n\nexport default Root;\n","import equation from './equation';\n\n/**\n * 二阶贝塞尔曲线范围框\n * @param x0\n * @param y0\n * @param x1\n * @param y1\n * @param x2\n * @param y2\n * @returns {number[]}\n * https://www.iquilezles.org/www/articles/bezierbbox/bezierbbox.htm\n */\nfunction bboxBezier2(x0, y0, x1, y1, x2, y2) {\n let minX = Math.min(x0, x2);\n let minY = Math.min(y0, y2);\n let maxX = Math.max(x0, x2);\n let maxY = Math.max(y0, y2);\n // 控制点位于边界内部时,边界就是范围框,否则计算导数获取极值\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY) {\n let tx = (x0 - x1) / (x0 - 2 * x1 + x2);\n if(tx < 0) {\n tx = 0;\n }\n else if(tx > 1) {\n tx = 1;\n }\n let ty = (y0 - y1) / (y0 - 2 * y1 + y2);\n if(ty < 0) {\n ty = 0;\n }\n else if(ty > 1) {\n ty = 1;\n }\n let sx = 1 - tx;\n let sy = 1 - ty;\n let qx = sx * sx * x0 + 2 * sx * tx * x1 + tx * tx * x2;\n let qy = sy * sy * y0 + 2 * sy * ty * y1 + ty * ty * y2;\n minX = Math.min(minX, qx);\n minY = Math.min(minY, qy);\n maxX = Math.max(maxX, qx);\n maxY = Math.max(maxY, qy);\n }\n return [minX, minY, maxX, maxY];\n}\n\n/**\n * 同上三阶的\n */\nfunction bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3) {\n let minX = Math.min(x0, x3);\n let minY = Math.min(y0, y3);\n let maxX = Math.max(x0, x3);\n let maxY = Math.max(y0, y3);\n if(x1 < minX || y1 < minY || x1 > maxX || y1 > maxY || x2 < minX || y2 < minY || x2 > maxX || y2 > maxY) {\n let cx = -x0 + x1;\n let cy = -y0 + y1;\n let bx = x0 - 2 * x1 + x2;\n let by = y0 - 2 * y1 + y2;\n let ax = -x0 + 3 * x1 - 3 * x2 + x3;\n let ay = -y0 + 3 * y1 - 3 * y2 + y3;\n let hx = bx * bx - ax * cx;\n let hy = by * by - ay * cy;\n if(hx > 0) {\n hx = Math.sqrt(hx);\n let t = (-bx - hx) / ax;\n // 2次项系数为0注意降级为一元一次方程\n if(ax && t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n t = ax ? ((-bx + hx) / ax) : (-cx * 0.5 / bx);\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * x0 + 3 * s * s * t * x1 + 3 * s * t * t * x2 + t * t * t * x3;\n minX = Math.min(minX, q);\n maxX = Math.max(maxX, q);\n }\n }\n if(hy > 0) {\n hy = Math.sqrt(hy);\n let t = (-by - hy) / ay;\n if(ay && t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n t = ay ? ((-by + hy) / ay) : (-cy * 0.5 / by);\n if(t > 0 && t < 1) {\n let s = 1 - t;\n let q = s * s * s * y0 + 3 * s * s * t * y1 + 3 * s * t * t * y2 + t * t * t * y3;\n minY = Math.min(minY, q);\n maxY = Math.max(maxY, q);\n }\n }\n }\n return [minX, minY, maxX, maxY];\n}\n\nfunction bboxBezier(x0, y0, x1, y1, x2, y2, x3, y3) {\n let len = arguments.length;\n if(Array.isArray(x0)) {\n let l = x0.length;\n let arr = x0;\n [x0, y0] = arr[0];\n [x1, y1] = arr[1];\n len = 4;\n if(l >= 3) {\n [x2, y2] = arr[2];\n len = 6;\n }\n if(l >= 4) {\n [x3, y3] = arr[3];\n len = 8;\n }\n }\n if(len === 4) {\n let a = Math.min(x0, x1);\n let b = Math.min(y0, y1);\n let c = Math.max(x0, x1);\n let d = Math.max(y0, y1);\n return [a, b, c, d];\n }\n if(len === 6) {\n return bboxBezier2(x0, y0, x1, y1, x2, y2);\n }\n if(len === 8) {\n return bboxBezier3(x0, y0, x1, y1, x2, y2, x3, y3);\n }\n}\n\n\n/**\n * 范数 or 模\n */\nfunction norm(v) {\n let order = v.length;\n let sum = v.reduce((a, b) => Math.pow(a, order) + Math.pow(b, order));\n return Math.pow(sum, 1 / order);\n}\n\n// https://zhuanlan.zhihu.com/p/130247362\nfunction simpson38(derivativeFunc, l, r) {\n let f = derivativeFunc;\n let middleL = (2 * l + r) / 3;\n let middleR = (l + 2 * r) / 3;\n return (f(l) + 3 * f(middleL) + 3 * f(middleR) + f(r)) * (r - l) / 8;\n}\n\n/**\n * bezier 曲线的长度\n * @param derivativeFunc 微分函数\n * @param l 左点\n * @param r 右点\n * @param eps 精度\n * @return {*} number\n */\nfunction adaptiveSimpson38(derivativeFunc, l, r, eps = 0.001) {\n let f = derivativeFunc;\n let mid = (l + r) / 2;\n let st = simpson38(f, l, r);\n let sl = simpson38(f, l, mid);\n let sr = simpson38(f, mid, r);\n let ans = sl + sr - st;\n if(Math.abs(ans) <= 15 * eps) {\n return sl + sr + ans / 15;\n }\n return adaptiveSimpson38(f, l, mid, eps / 2) + adaptiveSimpson38(f, mid, r, eps / 2);\n}\n\n/**\n * bezier 曲线的长度\n * @param points 曲线的起止点 和 控制点\n * @param startT 计算长度的起点,满足 0 <= startT <= endT <= 1\n * @param endT 计算长度的终点\n * @return {*} number\n */\nfunction bezierLength(points, startT = 0, endT = 1) {\n if(points.length === 6) {\n points = [\n [points[0], points[1]],\n [points[2], points[3]],\n [points[4], points[5]],\n ];\n }\n else if(points.length === 8) {\n points = [\n [points[0], points[1]],\n [points[2], points[3]],\n [points[4], points[5]],\n [points[6], points[7]],\n ];\n }\n if(points.length === 2) {\n let [x1, y1] = points[0], [x2, y2] = points[1];\n return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));\n }\n let derivativeFunc = t => norm(at(t, points));\n return adaptiveSimpson38(derivativeFunc, startT, endT);\n}\n\n/**\n * 3 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at3(t, points, order = 1) {\n let [p0, p1, p2, p3] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let [x3, y3] = p3;\n let x = 0;\n let y = 0;\n // 3阶导数就是常数了,大于3阶的都是0\n if(order === 0) {\n x = Math.pow((1 - t), 3) * x0 + 3 * t * Math.pow((1 - t), 2) * x1 + 3 * (1 - t) * Math.pow(t, 2) * x2 + Math.pow(t, 3) * x3;\n y = Math.pow((1 - t), 3) * y0 + 3 * t * Math.pow((1 - t), 2) * y1 + 3 * (1 - t) * Math.pow(t, 2) * y2 + Math.pow(t, 3) * y3;\n }\n else if(order === 1) {\n x = 3 * ((1 - t) * (1 - t) * (x1 - x0) + 2 * (1 - t) * t * (x2 - x1) + t * t * (x3 - x2));\n y = 3 * ((1 - t) * (1 - t) * (y1 - y0) + 2 * (1 - t) * t * (y2 - y1) + t * t * (y3 - y2));\n }\n else if(order === 2) {\n x = 6 * (x2 - 2 * x1 + x0) * (1 - t) + 6 * (x3 - 2 * x2 + x1) * t;\n y = 6 * (y2 - 2 * y1 + y0) * (1 - t) + 6 * (y3 - 2 * y2 + y1) * t;\n }\n else if(order === 3) {\n x = 6 * (x3 - 3 * x2 + 3 * x1 - x0);\n y = 6 * (y3 - 3 * y2 + 3 * y1 - y0);\n }\n return [x, y];\n}\n\n/**\n * 2 阶 bezier 曲线的 order 阶导数在 t 位置时候的 (x, y) 的值\n */\nfunction at2(t, points, order = 1) {\n let [p0, p1, p2] = points;\n let [x0, y0] = p0;\n let [x1, y1] = p1;\n let [x2, y2] = p2;\n let x = 0;\n let y = 0;\n if(order === 0) {\n x = Math.pow((1 - t), 2) * x0 + 2 * t * (1 - t) * x1 + Math.pow(t, 2) * x2;\n y = Math.pow((1 - t), 2) * y0 + 2 * t * (1 - t) * y1 + Math.pow(t, 2) * y2;\n }\n else if(order === 1) {\n x = 2 * (1 - t) * (x1 - x0) + 2 * t * (x2 - x1);\n y = 2 * (1 - t) * (y1 - y0) + 2 * t * (y2 - y1);\n }\n else if(order === 2) {\n x = 2 * (x2 - 2 * x1 + x0);\n y = 2 * (y2 - 2 * y1 + y0);\n }\n return [x, y];\n}\n\nfunction at(t, points, derivativeOrder = 1) {\n if(points.length === 4) {\n return at3(t, points, derivativeOrder);\n }\n else if(points.length === 3) {\n return at2(t, points, derivativeOrder);\n }\n}\n\nfunction pointAtBezier(points, percent, maxIteration, eps) {\n let length = bezierLength(points, 0, 1);\n return pointAtBezierWithLength(points, length, percent, maxIteration, eps);\n}\n\nfunction pointAtBezierWithLength(points, length, percent = 1, maxIteration = 20, eps = 0.001) {\n let derivativeFunc = t => norm(at(t, points));\n let targetLen = length * percent;\n let approachLen = length;\n let approachT = percent;\n let preApproachT = approachT;\n for(let i = 0; i < maxIteration; i++) {\n approachLen = simpson38(derivativeFunc, 0, approachT);\n let d = approachLen - targetLen;\n if(Math.abs(d) < eps) {\n break;\n }\n // Newton 法\n let derivative1 = norm(at(approachT, points, 1)); // 1 阶导数\n let derivative2 = norm(at(approachT, points, 2)); // 2 阶导数\n let numerator = d * derivative1;\n let denominator = d * derivative2 + derivative1 * derivative1;\n approachT = approachT - numerator / denominator;\n if(Math.abs(approachT - preApproachT) < eps) {\n break;\n }\n else {\n preApproachT = approachT;\n }\n }\n return at(approachT, points, 0);\n}\n\nfunction sliceBezier(points, t) {\n if(!Array.isArray(points) || points.length < 3) {\n return points;\n }\n let x1, y1, x2, y2, x3, y3, x4, y4;\n let pts0 = points[0], pts1 = points[1], pts2 = points[2], pts3 = points[3];\n if(!pts0 || !pts1 || !pts2) {\n return points;\n }\n if(Array.isArray(pts0)) {\n x1 = pts0[0]; y1 = pts0[1];\n }\n else {\n x1 = pts0.x; y1 = pts0.y;\n }\n if(Array.isArray(pts1)) {\n x2 = pts1[0]; y2 = pts1[1];\n }\n else {\n x2 = pts1.x; y2 = pts1.y;\n }\n if(Array.isArray(pts2)) {\n x3 = pts2[0]; y3 = pts2[1];\n }\n else {\n x3 = pts2.x; y3 = pts2.y;\n }\n let x12 = (x2 - x1) * t + x1;\n let y12 = (y2 - y1) * t + y1;\n let x23 = (x3 - x2) * t + x2;\n let y23 = (y3 - y2) * t + y2;\n let x123 = (x23 - x12) * t + x12;\n let y123 = (y23 - y12) * t + y12;\n if(points.length === 4) {\n if(Array.isArray(pts3)) {\n x4 = pts3[0]; y4 = pts3[1];\n }\n else {\n x4 = pts3.x; y4 = pts3.y;\n }\n let x34 = (x4 - x3) * t + x3;\n let y34 = (y4 - y3) * t + y3;\n let x234 = (x34 - x23) * t + x23;\n let y234 = (y34 - y23) * t + y23;\n let x1234 = (x234 - x123) * t + x123;\n let y1234 = (y234 - y123) * t + y123;\n return [[x1, y1], [x12, y12], [x123, y123], [x1234, y1234]];\n }\n else if(points.length === 3) {\n return [[x1, y1], [x12, y12], [x123, y123]];\n }\n}\n\nfunction sliceBezier2Both(points, start = 0, end = 1) {\n if(!Array.isArray(points) || points.length < 3) {\n return;\n }\n start = Math.max(start, 0);\n end = Math.min(end, 1);\n if(start === 0 && end === 1) {\n return points;\n }\n if(end < 1) {\n points = sliceBezier(points, end);\n }\n if(start > 0) {\n if(end < 1) {\n start = start / end;\n }\n points = sliceBezier(points.slice(0).reverse(), (1 - start)).reverse();\n }\n return points;\n}\n\nfunction pointAtByT(points, t = 0) {\n if(points.length === 4) {\n return pointAtByT3(points, t);\n }\n else if(points.length === 3) {\n return pointAtByT2(points, t);\n }\n}\n\nfunction pointAtByT2(points, t) {\n let x = points[0][0] * (1 - t) * (1 - t)\n + 2 * points[1][0] * t * (1 - t)\n + points[2][0] * t * t;\n let y = points[0][1] * (1 - t) * (1 - t)\n + 2 * points[1][1] * t * (1 - t)\n + points[2][1] * t * t;\n return [x, y];\n}\n\nfunction pointAtByT3(points, t) {\n let x = points[0][0] * (1 - t) * (1 - t) * (1 - t)\n + 3 * points[1][0] * t * (1 - t) * (1 - t)\n + 3 * points[2][0] * t * t * (1 - t)\n + points[3][0] * t * t * t;\n let y = points[0][1] * (1 - t) * (1 - t) * (1 - t)\n + 3 * points[1][1] * t * (1 - t) * (1 - t)\n + 3 * points[2][1] * t * t * (1 - t)\n + points[3][1] * t * t * t;\n return [x, y];\n}\n\n// 已知曲线和上面一点获得t\nfunction getPointT(points, x, y) {\n if(points.length === 4) {\n return getPointT3(points, x, y);\n }\n else if(points.length === 3) {\n return getPointT2(points, x, y);\n }\n}\n\nfunction getPointT2(points, x, y) {\n // x/y都需要求,以免其中一个无解,过滤掉[0, 1]之外的\n let tx = equation.getRoots([\n points[0][0] - x,\n 2 * (points[1][0] - points[0][0]),\n points[2][0] + points[0][0] - 2 * points[1][0],\n ]).filter(i => i >= 0 && i <= 1);\n let ty = equation.getRoots([\n points[0][1] - y,\n 2 * (points[1][1] - points[0][1]),\n points[2][1] + points[0][1] - 2 * points[1][1],\n ]).filter(i => i >= 0 && i <= 1);\n // 可能有多个解,x和y要匹配上,这里最多x和y各2个总共4个解\n let t = [];\n for(let i = 0, len = tx.length; i < len; i++) {\n let x = tx[i];\n for(let j = 0, len = ty.length; j < len; j++) {\n let y = ty[j];\n let diff = Math.abs(x - y);\n // 必须小于一定误差\n if(diff < 1e-10) {\n t.push({\n x,\n y,\n diff,\n });\n }\n }\n }\n t.sort(function(a, b) {\n return a.diff - b.diff;\n });\n if(t.length > 2) {\n t.splice(2);\n }\n // 取均数\n t = t.map(item => (item.x + item.y) * 0.5);\n let res = [];\n t.forEach(t => {\n let xt = points[0][0] * Math.pow(1 - t, 2)\n + 2 * points[1][0] * t * (1 - t)\n + points[2][0] * t * t;\n let yt = points[0][1] * Math.pow(1 - t, 2)\n + 2 * points[1][1] * t * (1 - t)\n + points[2][1] * t * t;\n // 计算误差忽略\n if(Math.abs(xt - x) < 1e-10 && Math.abs(yt - y) < 1e-10) {\n res.push(t);\n }\n });\n return res;\n}\n\nfunction getPointT3(points, x, y) {\n let tx = equation.getRoots([\n points[0][0] - x,\n 3 * (points[1][0] - points[0][0]),\n 3 * (points[2][0] + points[0][0] - 2 * points[1][0]),\n points[3][0] - points[0][0] + 3 * points[1][0] - 3 * points[2][0],\n ]).filter(i => i >= 0 && i <= 1);\n let ty = equation.getRoots([\n points[0][1] - y,\n 3 * (points[1][1] - points[0][1]),\n 3 * (points[2][1] + points[0][1] - 2 * points[1][1]),\n points[3][1] - points[0][1] + 3 * points[1][1] - 3 * points[2][1],\n ]).filter(i => i >= 0 && i <= 1);\n // 可能有多个解,x和y要匹配上,这里最多x和y各3个总共9个解\n let t = [];\n for(let i = 0, len = tx.length; i < len; i++) {\n let x = tx[i];\n for(let j = 0, len = ty.length; j < len; j++) {\n let y = ty[j];\n let diff = Math.abs(x - y);\n // 必须小于一定误差\n if(diff < 1e-10) {\n t.push({\n x,\n y,\n diff,\n });\n }\n }\n }\n t.sort(function(a, b) {\n return a.diff - b.diff;\n });\n if(t.length > 3) {\n t.splice(3);\n }\n // 取均数\n t = t.map(item => (item.x + item.y) * 0.5);\n let res = [];\n t.forEach(t => {\n let xt = points[0][0] * Math.pow(1 - t, 3)\n + 3 * points[1][0] * t * Math.pow(1 - t, 2)\n + 3 * points[2][0] * t * t * (1 - t)\n + points[3][0] * Math.pow(t, 3);\n let yt = points[0][1] * Math.pow(1 - t, 3)\n + 3 * points[1][1] * t * Math.pow(1 - t, 2)\n + 3 * points[2][1] * t * t * (1 - t)\n + points[3][1] * Math.pow(t, 3);\n // 计算误差忽略\n if(Math.abs(xt - x) < 1e-10 && Math.abs(yt - y) < 1e-10) {\n res.push(t);\n }\n });\n return res;\n}\n\nfunction bezierSlope(points, t) {\n if(points.length === 2) {\n let [x1, y1] = points[0];\n let [x2, y2] = points[1];\n if(x1 === x2) {\n return Infinity;\n }\n return (y2 - y1) / (x2 - x1);\n }\n if(points.length === 3) {\n return bezier2Slope(points, t);\n }\n if(points.length === 4) {\n return bezier3Slope(points, t);\n }\n}\n\nfunction bezier2Slope(points, t) {\n let [\n [x0, y0],\n [x1, y1],\n [x2, y2],\n ] = points;\n let x = 2 * (x0 - 2 * x1 + x2) * t + 2 * x1 - 2 * x0;\n if(x === 0) {\n return Infinity;\n }\n return (2 * (y0 - 2 * y1 + y2) * t + 2 * y1 - 2 * y0) / x;\n}\n\nfunction bezier3Slope(points, t) {\n let [\n [x0, y0],\n [x1, y1],\n [x2, y2],\n [x3, y3],\n ] = points;\n let x = 3 * (-x0 + 3 * x1 - 3 * x2 + x3) * t * t\n + 2 * (3 * x0 - 6 * x1 + 3 * x2) * t\n + 3 * x1 - 3 * x0;\n if(x === 0) {\n return Infinity;\n }\n return (3 * (-y0 + 3 * y1 - 3 * y2 + y3) * t * t\n + 2 * (3 * y0 - 6 * y1 + 3 * y2) * t\n + 3 * y1 - 3 * y0) / x;\n}\n\nexport default {\n bboxBezier,\n bezierLength,\n pointAtBezier,\n pointAtBezierWithLength,\n sliceBezier,\n sliceBezier2Both,\n pointAtByT,\n getPointT,\n bezierSlope,\n};\n","import Geom from './Geom';\nimport mode from '../../refresh/mode';\nimport painter from '../../util/painter';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport bezier from '../../math/bezier';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction reBuild(target, origin, base, isMulti) {\n if(isMulti) {\n return target.map(item => origin + item * base);\n }\n else {\n return origin + target * base;\n }\n}\n\nfunction reBuildC(target, originX, originY, width, height, isMulti) {\n if(isMulti) {\n if(target) {\n return target.map(item => reBuildC(item, originX, originY, width, height));\n }\n }\n else {\n if(target && target.length >= 2) {\n return [\n originX + target[0] * width,\n originY + target[1] * height,\n ];\n }\n }\n return [];\n}\n\nfunction curveNum(controlA, controlB) {\n let num = 0;\n if(controlA && controlA.length >= 2) {\n num++;\n }\n if(controlB && controlB.length >= 2) {\n num += 2;\n }\n return num;\n}\n\nfunction getNewPoint(xa, ya, xb, yb, controlA, controlB, num, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return [xa, ya, xb, yb, controlA, controlB];\n }\n if(start === end) {\n return [];\n }\n if(start > end) {\n [start, end] = [end, start];\n }\n start = Math.max(0, start);\n end = Math.min(1, end);\n if(num === 3) {\n [[xa, ya], controlA, controlB, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlA, controlB, [xb, yb]], start, end);\n }\n else if(num === 2) {\n [[xa, ya], controlB, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlB, [xb, yb]], start, end);\n }\n else if(num === 1) {\n [[xa, ya], controlA, [xb, yb]] = bezier.sliceBezier2Both([[xa, ya], controlA, [xb, yb]], start, end);\n }\n else {\n let a = xb - xa;\n let b = yb - ya;\n xa += a * start;\n ya += b * start;\n xb += a * (1 - end);\n yb += b * (1 - end);\n }\n return [xa, ya, xb, yb, controlA, controlB];\n}\n\nclass Line extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // xa,ya和xb,yb表明线段的首尾坐标,control表明控制点坐标\n if(this.isMulti) {\n this.__xa = [0];\n this.__ya = [0];\n this.__xb = [1];\n this.__yb = [1];\n this.__controlA = [[]];\n this.__controlB = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.xa)) {\n this.__xa = props.xa.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.xa)) {\n this.__xa = [parseFloat(props.xa) || 0];\n }\n if(Array.isArray(props.ya)) {\n this.__ya = props.ya.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.ya)) {\n this.__ya = [parseFloat(props.ya) || 0];\n }\n if(Array.isArray(props.xb)) {\n this.__xb = props.xb.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.xb)) {\n this.__xb = [parseFloat(props.xb) || 0];\n }\n if(Array.isArray(props.yb)) {\n this.__yb = props.yb.map(i => parseFloat(i) || 0);\n }\n else if(!isNil(props.yb)) {\n this.__yb = [parseFloat(props.yb) || 0];\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB.map(item => {\n if(Array.isArray(item)) {\n return item;\n }\n return [];\n });\n }\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => parseFloat(i) || 0);\n for(let i = this.__start.length; i < this.__xa.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = parseFloat(props.start) || 0;\n this.__start = this.__xa.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n });\n for(let i = this.__end.length; i < this.__xa.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = this.__xa.map(() => v);\n }\n }\n else {\n this.__xa = this.__ya = this.__start = 0;\n this.__xb = this.__yb = this.__end = 1;\n this.__controlA = [];\n this.__controlB = [];\n if(!isNil(props.xa)) {\n this.__xa = parseFloat(props.xa) || 0;\n }\n if(!isNil(props.ya)) {\n this.__ya = parseFloat(props.ya) || 0;\n }\n if(!isNil(props.xb)) {\n this.__xb = parseFloat(props.xb) || 0;\n }\n if(!isNil(props.yb)) {\n this.__yb = parseFloat(props.yb) || 0;\n }\n if(!isNil(props.start)) {\n this.__start = parseFloat(props.start) || 0;\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = v;\n }\n if(Array.isArray(props.controlA)) {\n this.__controlA = props.controlA;\n }\n if(Array.isArray(props.controlB)) {\n this.__controlB = props.controlB;\n }\n }\n }\n\n __buildCache(originX, originY, focus) {\n let { width, height, __cacheProps, isMulti } = this;\n let rebuild;\n ['xa', 'xb'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originX, width, isMulti);\n }\n });\n ['ya', 'yb'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuild(this[k], originY, height, isMulti);\n }\n });\n ['controlA', 'controlB'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = reBuildC(this[k], originX, originY, width, height, isMulti);\n }\n });\n ['start', 'end'].forEach(k => {\n if(isNil(__cacheProps[k]) || focus) {\n rebuild = true;\n __cacheProps[k] = this[k];\n }\n });\n return rebuild;\n }\n\n render(renderMode, ctx, dx2, dy2) {\n let res = super.render(renderMode, ctx, dx2, dy2);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n let {\n x3,\n y3,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps, isMulti } = this;\n let rebuild = this.__buildCache(x3, y3);\n if(rebuild && renderMode === mode.SVG) {\n let d = '';\n if(isMulti) {\n __cacheProps.xa.forEach((xa, i) => {\n let xb = __cacheProps.xb[i];\n let ya = __cacheProps.ya[i];\n let yb = __cacheProps.yb[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n d += painter.svgLine(xa, ya, xb, yb, ca, cb, curve);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { xa, ya, xb, yb, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, yb, controlA, controlB] = getNewPoint(xa, ya, xb, yb, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n d = painter.svgLine(xa, ya, xb, yb, controlA, controlB, curve);\n }\n __cacheProps.d = d;\n }\n if(renderMode === mode.CANVAS || renderMode === mode.WEBGL) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(strokeWidth > 0 && stroke !== 'none') {\n this.__preSetCanvas(renderMode, ctx, {\n stroke,\n strokeWidth,\n strokeDasharray: strokeDasharrays[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n });\n if(isStrokeRE) {\n ctx.strokeStyle = stroke.v[0];\n }\n ctx.beginPath();\n if(isMulti) {\n __cacheProps.xa.forEach((xa, i) => {\n let xb = __cacheProps.xb[i];\n let ya = __cacheProps.ya[i];\n let yb = __cacheProps.yb[i];\n let ca = __cacheProps.controlA[i];\n let cb = __cacheProps.controlB[i];\n let start = __cacheProps.start[i];\n let end = __cacheProps.end[i];\n let curve = curveNum(ca, cb);\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, ya, ca, cb] = getNewPoint(xa, ya, xb, ya, ca, cb, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, ca, cb, curve, dx, dy);\n });\n }\n else {\n let curve = curveNum(__cacheProps.controlA, __cacheProps.controlB);\n let { xa, ya, xb, yb, controlA, controlB, start, end } = __cacheProps;\n if(start !== 0 || end !== 1) {\n [xa, ya, xb, yb, controlA, controlB] = getNewPoint(xa, ya, xb, yb, controlA, controlB, curve, start, end, __cacheProps.len);\n }\n painter.canvasLine(ctx, xa, ya, xb, yb, controlA, controlB, curve, dx, dy);\n }\n ctx.stroke();\n ctx.closePath();\n }\n });\n }\n else if(renderMode === mode.SVG) {\n strokes.forEach((stroke, i) => {\n let strokeWidth = strokeWidths[i];\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n let props = [\n ['d', __cacheProps.d],\n ['fill', 'none'],\n ['stroke', isStrokeRE ? stroke.v[0] : (stroke.v || stroke)],\n ['stroke-width', strokeWidth]\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStrs[i], strokeLinecaps[i], strokeLinejoins[i], strokeMiterlimits[i]);\n this.addGeom('path', props);\n });\n }\n return res;\n }\n\n get xa() {\n return this.getProps('xa');\n }\n\n get ya() {\n return this.getProps('ya');\n }\n\n get xb() {\n return this.getProps('xb');\n }\n\n get yb() {\n return this.getProps('yb');\n }\n\n get controlA() {\n return this.getProps('controlA');\n }\n\n get controlB() {\n return this.getProps('controlB');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.__buildCache(originX, originY);\n let { xa, ya, xb, yb, controlA, controlB } = __cacheProps;\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n if(!isMulti) {\n xa = [xa];\n xb = [xb];\n ya = [ya];\n yb = [yb];\n controlA = [controlA];\n controlB = [controlB];\n }\n xa.forEach((xa, i) => {\n let y1 = ya[i];\n let x2 = xb[i];\n let y2 = yb[i];\n let ca = controlA[i];\n let cb = controlB[i];\n if((isNil(ca) || ca.length < 2) && (isNil(cb) || cb.length < 2)) {\n bbox[0] = Math.min(bbox[0], xa - half);\n bbox[0] = Math.min(bbox[0], x2 - half);\n bbox[1] = Math.min(bbox[1], y1 - half);\n bbox[1] = Math.min(bbox[1], y2 - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[2] = Math.max(bbox[2], x2 + half);\n bbox[3] = Math.max(bbox[3], y1 + half);\n bbox[3] = Math.max(bbox[3], y2 + half);\n }\n else if(isNil(ca) || ca.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, y1, cb[0], cb[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else if(isNil(cb) || cb.length < 2) {\n let bezierBox = bezier.bboxBezier(xa, y1, ca[0], ca[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else {\n let bezierBox = bezier.bboxBezier(xa, y1, ca[0], ca[1], cb[0], cb[1], x2, y2);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[0] = Math.min(bbox[0], bezierBox[2] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[3] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[0] + half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[1] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n });\n return bbox;\n }\n}\n\nexport default Line;\n","class Point {\n constructor(x, y) {\n if(Array.isArray(x)) {\n [x, y] = x;\n }\n this.x = x;\n this.y = y;\n }\n\n toString() {\n // return this.x.toFixed(1).replace('.0', '') + ',' + this.y.toFixed(1).replace('.0', '');\n return this.x + ',' + this.y;\n }\n\n equal(o) {\n return this === o || this.x === o.x && this.y === o.y;\n }\n\n // 排序,要求a在b左即x更小,x相等a在b下,符合返回false,不符合则true\n static compare(a, b) {\n if(a.x > b.x) {\n return true;\n }\n return a.x === b.x && a.y > b.y;\n }\n}\n\nexport default Point;\n","import bezier from '../bezier';\n\nclass Segment {\n constructor(coords, belong) {\n this.coords = coords;\n this.belong = belong; // 属于source多边形还是clip多边形,0和1区别\n this.calBbox();\n this.myFill = [false, false]; // 自己的上下内外性\n this.otherFill = [false, false]; // 对方的上下内外性\n this.myCoincide = 0; // 自己重合次数\n this.otherCoincide = 0; // 对方重合次数\n this.isVisited = false; // 扫描求交时用到\n this.isDeleted = false; // 相交裁剪老的线段会被删除\n }\n\n calBbox() {\n let coords = this.coords, l = coords.length;\n if(l === 2) {\n let a = coords[0], b = coords[1];\n let x1 = Math.min(a.x, b.x);\n let y1 = Math.min(a.y, b.y);\n let x2 = Math.max(a.x, b.x);\n let y2 = Math.max(a.y, b.y);\n this.bbox = [x1, y1, x2, y2];\n }\n else {\n let arr = coords.map(item => [item.x, item.y]);\n this.bbox = bezier.bboxBezier(arr);\n }\n }\n\n // 线段边逆序\n reverse() {\n this.coords.reverse();\n }\n\n equal(o) {\n let ca = this.coords, cb = o.coords;\n if(ca.length !== cb.length) {\n return false;\n }\n for(let i = 0, len = ca.length; i < len; i++) {\n if(!ca[i].equal(cb[i])) {\n return false;\n }\n }\n return true;\n }\n\n toHash() {\n return this.coords.map(item => item.toString()).join(' ');\n }\n\n toString() {\n return this.toHash()\n + ' ' + this.belong\n + ' ' + this.myCoincide\n + '' + this.otherCoincide\n + ' ' + this.myFill.map(i => i ? 1 : 0).join('')\n + this.otherFill.map(i => i ? 1 : 0).join('');\n }\n}\n\nexport default Segment;\n","import Point from './Point';\nimport isec from '../isec';\nimport bezier from '../bezier';\n\nconst EPS = 1e-9;\nconst EPS2 = 1 - (1e-9);\n\nfunction getIntersectionLineLine(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2, d) {\n let toSource = (\n (bx2 - bx1) * (ay1 - by1) - (by2 - by1) * (ax1 - bx1)\n ) / d;\n let toClip = (\n (ax2 - ax1) * (ay1 - by1) - (ay2 - ay1) * (ax1 - bx1)\n ) / d;\n // 非顶点相交才是真相交\n if(toSource > EPS && toSource < EPS2 && toClip > EPS && toClip < EPS2) {\n let ox = ax1 + toSource * (ax2 - ax1);\n let oy = ay1 + toSource * (ay2 - ay1);\n return [{\n point: new Point(ox, oy),\n toSource,\n toClip,\n }];\n }\n}\n\nfunction getIntersectionBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2) {\n let res = isec.intersectBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2);\n if(res.length) {\n res = res.map(item => {\n let toClip;\n // toClip是直线上的距离,可以简化为只看x或y,选择差值比较大的防止精度问题\n if(Math.abs(bx2 - bx1) >= Math.abs(by2 - by1)) {\n toClip = Math.abs((item.x - bx1) / (bx2 - bx1));\n }\n else {\n toClip = Math.abs((item.y - by1) / (by2 - by1));\n }\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([[bx1, by1], [bx2, by2]]);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3) {\n let res = isec.intersectBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n\n let res = isec.intersectBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip: toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2) {\n let res = isec.intersectBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2);\n if(res.length) {\n res = res.map(item => {\n // toClip是直线上的距离,可以简化为只看x或y,选择差值比较大的防止精度问题\n let toClip;\n if(Math.abs(bx2 - bx1) >= Math.abs(by2 - by1)) {\n toClip = Math.abs((item.x - bx1) / (bx2 - bx1));\n }\n else {\n toClip = Math.abs((item.y - by1) / (by2 - by1));\n }\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n [ax4, ay4],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n ]);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip,\n };\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\nfunction getIntersectionBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4) {\n let res = isec.intersectBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(res.length) {\n res = res.map(item => {\n // toClip是另一条曲线的距离,需根据交点和曲线方程求t\n let toClip = bezier.getPointT([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], item.x, item.y);\n // 防止误差无值\n if(toClip.length) {\n toClip = toClip[0];\n if(item.t > EPS && item.t < EPS2 && toClip > EPS && toClip < EPS2) {\n // 还要判断斜率,相等也忽略(小于一定误差)\n let k1 = bezier.bezierSlope([\n [ax1, ay1],\n [ax2, ay2],\n [ax3, ay3],\n [ax4, ay4],\n ], item.t);\n let k2 = bezier.bezierSlope([\n [bx1, by1],\n [bx2, by2],\n [bx3, by3],\n [bx4, by4],\n ], toClip);\n // 忽略方向,180°也是平行,Infinity相减为NaN\n if(Math.abs((Math.abs(k1) - Math.abs(k2)) || 0) < EPS) {\n return;\n }\n return {\n point: new Point(item.x, item.y),\n toSource: item.t, // source是曲线直接用t\n toClip: toClip,\n };\n }\n }\n }).filter(i => i);\n if(res.length) {\n return res;\n }\n }\n}\n\n// 两条线可能多个交点,将交点按原本线段的方向顺序排序\nfunction sortIntersection(res, isSource) {\n return res.sort(function(a, b) {\n if(isSource) {\n return a.toSource - b.toSource;\n }\n return a.toClip - b.toClip;\n }).map(item => {\n return {\n point: item.point,\n t: isSource ? item.toSource : item.toClip,\n };\n }).filter(item => item.t > EPS && item.t < EPS2);\n}\n\nexport default {\n getIntersectionLineLine,\n getIntersectionBezier2Line,\n getIntersectionBezier2Bezier2,\n getIntersectionBezier2Bezier3,\n getIntersectionBezier3Line,\n getIntersectionBezier3Bezier3,\n sortIntersection,\n};\n","import geom from '../geom';\nimport vector from '../vector';\nimport bezier from '../bezier';\nimport equation from '../equation';\nimport Point from './Point';\nimport Segment from './Segment';\nimport intersect from './intersect';\n\nconst {\n getIntersectionLineLine,\n getIntersectionBezier2Line,\n getIntersectionBezier2Bezier2,\n getIntersectionBezier2Bezier3,\n getIntersectionBezier3Line,\n getIntersectionBezier3Bezier3,\n sortIntersection,\n} = intersect;\n\nclass Polygon {\n constructor(regions, index) {\n this.index = index; // 属于source多边形还是clip多边形,0和1区别\n let segments = [];\n // 多边形有>=1个区域,一般是1个\n if(!Array.isArray(regions)) {\n return;\n }\n regions.forEach(vertices => {\n // 每个区域有>=2条线段,组成封闭区域,1条肯定不行,2条必须是曲线\n if(!Array.isArray(vertices) || vertices.length < 2) {\n return;\n }\n if(vertices.length === 2 && vertices[1].length <= 2) {\n return;\n }\n let startPoint = new Point(vertices[0]), firstPoint = startPoint;\n // 根据多边形有向边,生成线段,不保持原有向,统一左下作为线段起点,如果翻转则记录个值标明\n for(let i = 1, len = vertices.length; i < len; i++) {\n let curr = vertices[i], l = curr.length;\n // 闭合区域,首尾顶点重复统一\n let endPoint = new Point(curr[l - 2], curr[l - 1]);\n let seg;\n if(l === 2) {\n // 长度为0的直线忽略\n if(startPoint.equal(endPoint)) {\n continue;\n }\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n startPoint,\n ] : [\n startPoint,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n // 曲线需确保x单调性,如果非单调,则切割为单调的多条\n else if(l === 4) {\n // 长度为0的曲线忽略\n if(startPoint.equal(endPoint) && startPoint.x === curr[0] && startPoint.y === curr[1]) {\n continue;\n }\n let cPoint = new Point(curr[0], curr[1]);\n let t = getBezierMonotonicity([startPoint, cPoint, endPoint], true);\n if(t) {\n let points = [\n [startPoint.x, startPoint.y],\n [curr[0], curr[1]],\n [endPoint.x, endPoint.y],\n ];\n let curve1 = bezier.sliceBezier(points, t[0]);\n let curve2 = bezier.sliceBezier2Both(points, t[0], 1);\n let p1 = new Point(curve1[1]), p2 = new Point(curve1[2]), p3 = new Point(curve2[1]);\n let coords = Point.compare(startPoint, p2) ? [\n p2,\n p1,\n startPoint,\n ] : [\n startPoint,\n p1,\n p2,\n ];\n segments.push(new Segment(coords, index));\n coords = Point.compare(p2, endPoint) ? [\n endPoint,\n p3,\n p2,\n ] : [\n p2,\n p3,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n else {\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n cPoint,\n startPoint,\n ] : [\n startPoint,\n cPoint,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n }\n // 3阶可能有2个单调改变t点\n else if(l === 6) {\n // 降级为2阶曲线\n if(curr[0] === curr[2] && curr[1] === curr[3]) {\n curr.splice(2, 2);\n i--;\n continue;\n }\n // 长度为0的曲线忽略\n if(startPoint.equal(endPoint)\n && startPoint.x === curr[0] && startPoint.y === curr[1]\n && startPoint.x === curr[2] && startPoint.y === curr[3]) {\n continue;\n }\n let cPoint1 = new Point(curr[0], curr[1]), cPoint2 = new Point(curr[2], curr[3]);\n let t = getBezierMonotonicity([startPoint, cPoint1, cPoint2, endPoint], true);\n if(t) {\n let points = [\n [startPoint.x, startPoint.y],\n [curr[0], curr[1]],\n [curr[2], curr[3]],\n [endPoint.x, endPoint.y],\n ];\n let lastPoint = startPoint, lastT = 0;\n t.forEach(t => {\n let curve = bezier.sliceBezier2Both(points, lastT, t);\n let p1 = new Point(curve[1]), p2 = new Point(curve[2]), p3 = new Point(curve[3]);\n let coords = Point.compare(lastPoint, p3) ? [\n p3,\n p2,\n p1,\n lastPoint,\n ] : [\n lastPoint,\n p1,\n p2,\n p3,\n ];\n segments.push(new Segment(coords, index));\n lastT = t;\n lastPoint = p3;\n });\n let curve = bezier.sliceBezier2Both(points, lastT, 1);\n let p1 = new Point(curve[1]), p2 = new Point(curve[2]);\n let coords = Point.compare(lastPoint, endPoint) ? [\n endPoint,\n p2,\n p1,\n lastPoint,\n ] : [\n lastPoint,\n p1,\n p2,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n else {\n let coords = Point.compare(startPoint, endPoint) ? [\n endPoint,\n cPoint2,\n cPoint1,\n startPoint,\n ] : [\n startPoint,\n cPoint1,\n cPoint2,\n endPoint,\n ];\n seg = new Segment(coords, index);\n }\n }\n segments.push(seg);\n // 终点是下条边的起点\n startPoint = endPoint;\n }\n // 强制要求闭合,非闭合自动连直线到开始点闭合\n if(!startPoint.equal(firstPoint)) {\n let coords = Point.compare(startPoint, firstPoint) ? [\n firstPoint,\n startPoint,\n ] : [\n startPoint,\n firstPoint,\n ];\n segments.push(new Segment(coords, index));\n }\n });\n this.segments = segments;\n }\n\n // 根据y坐标排序,生成有序线段列表,再扫描求交\n selfIntersect() {\n let list = genHashXList(this.segments);\n this.segments = findIntersection(list, false, false, false);\n }\n\n toString() {\n return this.segments.map(item => item.toString());\n }\n\n reset(index) {\n this.index = index;\n this.segments.forEach(seg => {\n seg.belong = index;\n seg.otherCoincide = 0;\n seg.otherFill[0] = seg.otherFill[1] = false;\n });\n return this;\n }\n\n // 2个非自交的多边形互相判断相交,依旧是扫描线算法,2个多边形统一y排序,但要分别出属于哪个多边形,因为只和对方测试相交\n static intersect2(polyA, polyB, isIntermediateA, isIntermediateB) {\n if(!polyA.segments.length || !polyB.segments.length) {\n return;\n }\n\n let list = genHashXList(polyA.segments.concat(polyB.segments));\n let segments = findIntersection(list, true, isIntermediateA, isIntermediateB);\n polyA.segments = segments.filter(item => item.belong === 0);\n polyB.segments = segments.filter(item => item.belong === 1);\n }\n\n /**\n * 以Bentley-Ottmann算法为原理,为每个顶点设计事件,按x升序、y升序遍历所有顶点的事件\n * 每条线段边有2个顶点即2个事件,左下为start,右上为end\n * 同顶点优先end,start相同则对比线段谁后面的y更小(向量法),其实就是对比非共点部分的y大小\n * 维护一个活跃边列表ael,同样保证x升序、y升序,start事件线段进入ael,end离开\n * ael中相邻的线段说明上下相互接壤,接壤一侧则内外填充性一致\n * 最下面的边(含第一条)可直接得知下方填充性(下面没有了一定是多边形外部),再推测出上方\n * 其余的边根据自己下方相邻即可确定填充性\n */\n static annotate2(polyA, polyB, isIntermediateA, isIntermediateB) {\n let list = genHashXYList(polyA.segments.concat(polyB.segments));\n let aelA = [], aelB = [], hashA = {}, hashB = {};\n // 算法3遍循环,先注释a多边形的边自己内外性,再b的边自己内外性,最后一起注释对方的内外性\n // 因数据结构合在一起,所以2遍循环可以完成,先注释a和b的自己,再一遍对方\n list.forEach(item => {\n let { isStart, seg } = item;\n let belong = seg.belong;\n // 连续操作时,已有的中间结果可以跳过\n if(belong === 0 && isIntermediateA || belong === 1 && isIntermediateB) {\n return;\n }\n let ael = belong === 0 ? aelA : aelB, hash = belong === 0 ? hashA : hashB;\n if(isStart) {\n // 自己重合的线段只考虑第一条,其它剔除\n if(seg.myCoincide) {\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n // console.error(seg.toString(), ael.length)\n // 下面没有线段了,底部边,上方填充下方空白(除非是偶次重复段,上下都空白,奇次和单线相同)\n if(!ael.length) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.push(seg);\n }\n else {\n // 插入到ael正确的位置,按照x升序、y升序\n let len = ael.length, top = ael[len - 1];\n let isAboveLast = segAboveCompare(seg, top);\n // 比ael栈顶还高在最上方\n if(isAboveLast) {\n seg.myFill[1] = top.myFill[0];\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0 ? !seg.myFill[1] : seg.myFill[1];\n }\n else {\n seg.myFill[0] = !seg.myFill[1];\n }\n ael.push(seg);\n }\n // 不高且只有1个则在最下方\n else if(len === 1) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.unshift(seg);\n }\n else {\n // 遍历,尝试对比是否在ael栈中相邻2条线段之间\n for(let i = len - 2; i >= 0; i--) {\n let curr = ael[i];\n let isAbove = segAboveCompare(seg, curr);\n if(isAbove) {\n seg.myFill[1] = curr.myFill[0];\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0 ? !seg.myFill[1] : seg.myFill[1];\n }\n else {\n seg.myFill[0] = !seg.myFill[1];\n }\n ael.splice(i + 1, 0, seg);\n break;\n }\n else if(i === 0) {\n if(seg.myCoincide) {\n seg.myFill[0] = seg.myCoincide % 2 === 0;\n }\n else {\n seg.myFill[0] = true;\n }\n ael.unshift(seg);\n }\n }\n }\n }\n // console.warn(seg.toString())\n }\n else {\n let i = ael.indexOf(seg);\n // 一般肯定有,重合线段会剔除不进ael\n if(i > -1) {\n ael.splice(i, 1);\n }\n }\n });\n // 注释对方,除了重合线直接使用双方各自的注释拼接,普通线两边的对方内外性相同,根据是否在里面inside确定结果\n // inside依旧看自己下方的线段上方情况,不同的是要看下方的线和自己belong是否相同,再确定取下方above的值\n let ael = [], hash = {};\n list.forEach(item => {\n let { isStart, seg } = item;\n let belong = seg.belong;\n if(isStart) {\n // 自重合或者它重合统一只保留第一条线\n if(seg.myCoincide || seg.otherCoincide) {\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n // console.error(seg.toString(), ael.length)\n let inside = false;\n if(!ael.length) {\n inside = false;\n ael.push(seg);\n }\n else {\n let len = ael.length, top = ael[len - 1];\n let isAboveLast = segAboveCompare(seg, top);\n if(isAboveLast) {\n if(top.belong === belong) {\n inside = top.otherFill[0];\n }\n else {\n inside = top.myFill[0];\n }\n ael.push(seg);\n }\n else if(len === 1) {\n // inside = false;\n ael.unshift(seg);\n }\n else {\n for(let i = len - 2; i >= 0; i--) {\n let curr = ael[i];\n let isAbove = segAboveCompare(seg, curr);\n if(isAbove) {\n // 如果在自己的下方线和自己同色,则取下方线的另外色上填充\n if(curr.belong === belong) {\n inside = curr.otherFill[0];\n }\n // 否则取下方线的下方色上填充\n else {\n inside = curr.myFill[0];\n }\n ael.splice(i + 1, 0, seg);\n break;\n }\n else if(i === 0) {\n // inside = false;\n ael.unshift(seg);\n }\n }\n }\n }\n // 重合线的otherFill直接引用指向对方myFill,不能普通计算\n if(!seg.otherCoincide) {\n seg.otherFill[0] = inside;\n seg.otherFill[1] = inside;\n }\n // console.warn(seg.toString(), inside)\n }\n else {\n let i = ael.indexOf(seg);\n if(i > -1) {\n ael.splice(i, 1);\n }\n }\n });\n }\n}\n\nfunction findIntersection(list, compareBelong, isIntermediateA, isIntermediateB) {\n // 从左到右扫描,按x坐标排序,相等按y,边会进入和离开扫描线各1次,在扫描线中的边为活跃边,维护1个活跃边列表,新添加的和老的求交\n let ael = [], delList = [], segments = [];\n while(list.length) {\n if(delList.length) {\n delList.splice(0).forEach(seg => {\n let i = ael.indexOf(seg);\n ael.splice(i, 1);\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n });\n }\n\n let { x, arr } = list[0];\n while(arr.length) {\n let seg = arr.shift();\n // 被切割的老线段无效\n if(seg.isDeleted) {\n continue;\n }\n let belong = seg.belong, bboxA = seg.bbox;\n // 第2次访问边是离开活动,考虑删除\n if(seg.isVisited) {\n // console.warn(x, seg.toString());\n // console.log(ael.map(item => item.toString()));\n // 可能是垂线不能立刻删除,所以等到下次活动x再删除,因为会出现极端情况刚进来就出去,和后面同y的重合\n if(bboxA[0] !== bboxA[2] || seg.coords.length !== 2) {\n let i = ael.indexOf(seg);\n ael.splice(i, 1);\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n }\n else {\n delList.push(seg);\n }\n seg.isVisited = false; // 还原以备后面逻辑重复利用\n // console.log(ael.map(item => item.toString()));\n }\n // 第1次访问边一定是进入活动,求交\n else {\n // console.error(x, seg.toString(), ael.length);\n // console.log(ael.map(item => item.toString()));\n // 和asl里的边求交,如果被分割,新生成的存入asl和hash,老的线段无需再进入asl\n if(ael.length) {\n let coordsA = seg.coords, lenA = coordsA.length;\n let { x: ax1, y: ay1 } = coordsA[0];\n let { x: ax2, y: ay2 } = coordsA[1];\n for(let i = 0; i < ael.length; i++) {\n let item = ael[i];\n // 被切割的老线段无效,注意seg切割过程中可能变成删除\n if(item.isDeleted || seg.isDeleted) {\n continue;\n }\n // 互交所属belong不同才进行检测,自交则不检查belong\n if(compareBelong && item.belong === belong) {\n continue;\n }\n // bbox相交才考虑真正计算,加速\n let bboxB = item.bbox, coordsB = item.coords, lenB = coordsB.length;\n let isSourceReverted = false; // 求交可能a、b线主从互换\n if(isRectsOverlap(bboxA, bboxB, lenA, lenB)) {\n // 完全重合简化,同矩形的线myFill共享,对方矩形互换otherFill\n if(lenA === lenB && seg.equal(item)) {\n if(compareBelong) {\n // 因为一定不自交,所以重合线不会被分割\n seg.otherCoincide++;\n item.otherCoincide++;\n seg.otherFill = item.myFill;\n item.otherFill = seg.myFill;\n }\n else {\n seg.myCoincide++;\n item.myCoincide++;\n seg.myFill = item.myFill;\n }\n continue;\n }\n let { x: bx1, y: by1 } = coordsB[0];\n let { x: bx2, y: by2 } = coordsB[1];\n let inters, overs;\n // a是直线\n if(lenA === 2) {\n // b是直线\n if(lenB === 2) {\n let d = (by2 - by1) * (ax2 - ax1) - (bx2 - bx1) * (ay2 - ay1);\n // 平行检查是否重合,否则求交\n if(d === 0) {\n // 垂线特殊,y=kx+b没法求\n if(ax1 === ax2) {\n if(ax1 === bx1 && ax2 === bx2) {\n overs = checkOverlapLine(ax1, ay1, ax2, ay2, seg,\n bx1, by1, bx2, by2, item, true);\n }\n }\n else {\n let b1 = (ay2 - ay1) * ax1 / (ax2 - ax1) + ay1;\n let b2 = (by2 - by1) * bx1 / (bx2 - bx1) + by1;\n if(b1 === b2) {\n overs = checkOverlapLine(ax1, ay1, ax2, ay2, seg,\n bx1, by1, bx2, by2, item, false);\n }\n }\n }\n else {\n inters = getIntersectionLineLine(ax1, ay1, ax2, ay2,\n bx1, by1, bx2, by2, d);\n }\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Line(bx1, by1, bx2, by2, bx3, by3,\n ax1, ay1, ax2, ay2);\n isSourceReverted = true;\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier3Line(bx1, by1, bx2, by2, bx3, by3, bx4, by4,\n ax1, ay1, ax2, ay2);\n isSourceReverted = true;\n }\n }\n }\n // a是曲线\n else {\n let { x: ax3, y: ay3 } = coordsA[2];\n // a是2阶曲线\n if(lenA === 3) {\n // b是直线\n if(lenB === 2) {\n inters = getIntersectionBezier2Line(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2);\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Bezier2(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3);\n if(!inters) {\n overs = checkOverlapBezier(seg, item);\n }\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier2Bezier3(ax1, ay1, ax2, ay2, ax3, ay3,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n }\n }\n }\n // a是3阶曲线\n else {\n let { x: ax4, y: ay4 } = coordsA[3];\n // b是直线\n if(lenB === 2) {\n inters = getIntersectionBezier3Line(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2);\n }\n // b是曲线\n else {\n let { x: bx3, y: by3 } = coordsB[2];\n // b是2阶曲线\n if(lenB === 3) {\n inters = getIntersectionBezier2Bezier3(bx1, by1, bx2, by2, bx3, by3,\n ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4);\n isSourceReverted = true;\n }\n // b是3阶曲线\n else {\n let { x: bx4, y: by4 } = coordsB[3];\n inters = getIntersectionBezier3Bezier3(ax1, ay1, ax2, ay2, ax3, ay3, ax4, ay4,\n bx1, by1, bx2, by2, bx3, by3, bx4, by4);\n if(!inters) {\n overs = checkOverlapBezier(seg, item);\n }\n }\n }\n }\n }\n // 有重合的,重合线段已经求好,直接使用\n if(overs) {\n activeNewSeg(segments, list, ael, x, overs.ra);\n activeNewSeg(segments, list, ael, x, overs.rb);\n seg.isDeleted = item.isDeleted = true;\n ael.splice(i, 1);\n break;\n }\n // 有交点,确保原先线段方向顺序(x升序、y升序),各自依次切割,x右侧新线段也要存入list\n else if(inters && inters.length) {\n // console.log('inters', i, inters);\n let pa = sortIntersection(inters, !isSourceReverted);\n // console.log(pa);\n let ra = sliceSegment(seg, pa, isIntermediateA && belong === 0);\n // console.log(ra.map(item => item.toString()));\n let pb = sortIntersection(inters, isSourceReverted);\n // console.log(pb);\n let rb = sliceSegment(item, pb, isIntermediateB && belong === 1);\n // console.log(rb.map(item => item.toString()));\n // 新切割的线段继续按照坐标存入列表以及ael,为后续求交\n activeNewSeg(segments, list, ael, x, ra);\n activeNewSeg(segments, list, ael, x, rb);\n // 老的线段被删除无效了,踢出ael,防止seg没被分割\n if(rb.length) {\n ael.splice(i, 1);\n }\n break;\n }\n }\n }\n }\n // 不相交切割才进入ael\n if(!seg.isDeleted) {\n ael.push(seg);\n seg.isVisited = true;\n }\n // console.log(ael.map(item => item.toString()));\n }\n }\n list.shift();\n }\n // 最后面的线\n delList.forEach(seg => {\n if(!seg.isDeleted) {\n segments.push(seg);\n }\n });\n // 最后再过滤一遍,因为新生成的切割线可能会被再次切割变成删除的无效线段\n return segments.filter(item => !item.isDeleted);\n}\n\n// 给定交点列表分割线段,ps需排好顺序从头到尾,isSelf标明是否自相交阶段,false是和对方交点切割\nfunction sliceSegment(seg, ps, isIntermediate) {\n let res = [];\n if(!ps.length) {\n return res;\n }\n let belong = seg.belong, coords = seg.coords, len = coords.length;\n let startPoint = coords[0];\n let lastT = 0;\n // 多个点可能截取多条,最后一条保留只修改数据,其它新生成\n ps.forEach(item => {\n let point = item.point, t = item.t;\n let ns;\n if(len === 2) {\n ns = new Segment([\n startPoint,\n point,\n ], belong);\n }\n else if(len === 3) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, t);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n point,\n ], belong);\n }\n else if(len === 4) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, t);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n new Point(c[2][0], c[2][1]),\n point,\n ], belong);\n }\n // 连续操作的中间结果已有自己内外性,截取时需继承\n if(isIntermediate) {\n ns.myFill[0] = seg.myFill[0];\n ns.myFill[1] = seg.myFill[1];\n }\n startPoint = point;\n res.push(ns);\n lastT = t;\n });\n // 最后一条\n let ns;\n if(len === 2) {\n ns = new Segment([\n startPoint,\n coords[1],\n ], belong);\n }\n else if(len === 3) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, 1);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n coords[2],\n ], belong);\n }\n else if(len === 4) {\n let c = bezier.sliceBezier2Both(coords.map(item => [item.x, item.y]), lastT, 1);\n ns = new Segment([\n startPoint,\n new Point(c[1][0], c[1][1]),\n new Point(c[2][0], c[2][1]),\n coords[3],\n ], belong);\n }\n if(isIntermediate) {\n ns.myFill[0] = seg.myFill[0];\n ns.myFill[1] = seg.myFill[1];\n }\n res.push(ns);\n // 老的打标失效删除\n seg.isDeleted = true;\n return res;\n}\n\n// 相交的线段slice成多条后,老的删除,新的考虑添加进扫描列表和活动边列表,根据新的是否在范围内\nfunction activeNewSeg(segments, list, ael, x, ns) {\n ns.forEach(seg => {\n let bbox = seg.bbox, x1 = bbox[0], x2 = bbox[2];\n // console.log(seg.toString(), x1, x2, x);\n // 活跃x之前无相交判断意义,除了竖线,出现活跃前只可能一方为竖线截断另一方的左边部分\n if(x2 <= x && x1 !== x2 && seg.coords.length !== 2) {\n segments.push(seg);\n return;\n }\n // 按顺序放在list的正确位置,可能x1已经过去不需要加入了,但要考虑ael\n let i = 0;\n if(x1 < x) {\n seg.isVisited = true;\n ael.push(seg);\n }\n else {\n for(let len = list.length; i < len; i++) {\n let item = list[i];\n let lx = item.x;\n if(x1 === lx) {\n item.arr.push(seg);\n break;\n }\n // 新的插入\n if(x1 < lx) {\n let temp = {\n x: x1,\n arr: [seg],\n };\n list.splice(i, 0, temp);\n break;\n }\n }\n }\n // x2一定会加入\n for(let len = list.length; i < len; i++) {\n let item = list[i];\n let lx = item.x;\n if(x2 === lx) {\n // 访问过的尽可能排在前面早出栈,减少对比次数\n item.arr.unshift(seg);\n break;\n }\n if(x2 < lx) {\n let temp = {\n x: x2,\n arr: [seg],\n };\n list.splice(i, 0, temp);\n break;\n }\n }\n });\n}\n\n// 按x升序将所有线段组成一个垂直扫描线列表,求交用,y方向不用管\nfunction genHashXList(segments) {\n let hashX = {};\n segments.forEach(seg => {\n let bbox = seg.bbox, min = bbox[0], max = bbox[2];\n putHashX(hashX, min, seg);\n putHashX(hashX, max, seg);\n });\n let list = [];\n Object.keys(hashX).forEach(x => list.push({\n x: parseFloat(x),\n arr: hashX[x],\n }));\n return list.sort(function(a, b) {\n return a.x - b.x;\n });\n}\n\n// 每个线段会放2次,开始点和结束点,哪怕x相同,第1次是开始用push,第2次结束unshift,这样离开时排在前面\nfunction putHashX(hashX, x, seg) {\n let list = hashX[x] = hashX[x] || [];\n if(seg.isVisited) {\n list.unshift(seg);\n seg.isVisited = false;\n }\n else {\n list.push(seg);\n seg.isVisited = true;\n }\n}\n\n// 按x升序将所有线段组成一个垂直扫描线列表,y方向也需要判断\nfunction genHashXYList(segments) {\n let hashXY = {};\n segments.forEach(seg => {\n let coords = seg.coords, l = coords.length;\n let start = coords[0], end = coords[l - 1];\n putHashXY(hashXY, start.x, start.y, seg, true);\n putHashXY(hashXY, end.x, end.y, seg, false);\n });\n let listX = [];\n Object.keys(hashXY).forEach(x => {\n let hashY = hashXY[x];\n let listY = [];\n Object.keys(hashY).forEach(y => {\n let arr = hashY[y].sort(function(a, b) {\n // end优先于start先触发\n if(a.isStart !== b.isStart) {\n return a.isStart ? 1 : -1;\n }\n // start点相同看谁在上谁在下,下方在前,比y极大值,因为start相同又不相交,所以上方的y极值更大\n if(a.isStart) {\n return segAboveCompare(a.seg, b.seg) ? 1 : -1;\n }\n // end点相同无所谓,其不参与运算,因为每次end线段先出栈ael\n });\n // console.log(x, y, arr.map(item => item.isStart + ', ' + item.seg.toString()));\n listY.push({\n y: parseFloat(y),\n arr,\n })\n });\n listX.push({\n x: parseFloat(x),\n arr: listY.sort(function(a, b) {\n return a.y - b.y;\n }),\n });\n });\n listX.sort(function(a, b) {\n return a.x - b.x;\n });\n let list = [];\n listX.forEach(item => {\n item.arr.forEach(item => {\n list = list.concat(item.arr);\n });\n });\n return list;\n}\n\nfunction putHashXY(hashXY, x, y, seg, isStart) {\n let hash = hashXY[x] = hashXY[x] || {};\n let list = hash[y] = hash[y] || [];\n list.push({\n isStart,\n seg,\n });\n}\n\n// pt在线段left -> right的上方或线上\nfunction pointAboveOrOnLine(pt, left, right) {\n let { x, y } = pt;\n let { x: x1, y: y1 } = left;\n let { x: x2, y: y2 } = right;\n return vector.crossProduct(x1 - x, y1 - y, x2 - x, y2 - y) >= 0;\n}\n\n// a是否在b的上边,取x相同部分看y大小,只有start点事件时才判断\nfunction segAboveCompare(segA, segB) {\n let ca = segA.coords, cb = segB.coords;\n let la = ca.length, lb = cb.length;\n let a1 = ca[0], b1 = cb[0];\n // 两条直线用向量积判断,注意开始点是否相同即可\n if(la === 2 && lb === 2) {\n let a2 = ca[1], b2 = cb[1];\n if(a1.equal(b1)) {\n return pointAboveOrOnLine(a2, b1, b2);\n }\n else {\n return pointAboveOrOnLine(a1, b1, b2);\n }\n }\n // a是竖线的话看另一条在左还是右,左的话a在下,否则在上,因为此时只可能是左和a尾相连或右和a首相连\n if(la === 2 && a1.x === ca[1].x) {\n return b1.x >= a1.x;\n }\n // 如果有曲线,取二者x共同的区域部分[x1, x3],以及区域中点x2,这3个点不可能都重合,一定会有某点的y比较大小\n let x1 = Math.max(a1.x, b1.x), x3 = Math.min(ca[la - 1].x, cb[lb - 1].x), x2 = x1 + (x3 - x1) * 0.5;\n if(a1 !== b1) {\n let y1 = getYByX(ca, x1), y2 = getYByX(cb, x1);\n if(y1 !== y2) {\n return y1 > y2;\n }\n }\n if(ca[la - 1] !== cb[lb - 1]) {\n let y1 = getYByX(ca, x3), y2 = getYByX(cb, x3);\n if(y1 !== y2) {\n return y1 > y2;\n }\n }\n let y1 = getYByX(ca, x2), y2 = getYByX(cb, x2);\n if(y1 !== y2) {\n return y1 > y2;\n }\n}\n\n// 获取曲线单调性t值,有结果才返回\nfunction getBezierMonotonicity(coords, isX) {\n if(coords.length === 3) {\n let t = isX\n ? (coords[0].x - coords[1].x) / (coords[0].x - 2 * coords[1].x + coords[2].x)\n : (coords[0].y - coords[1].y) / (coords[0].y - 2 * coords[1].y + coords[2].y);\n if(t > 0 && t < 1) {\n return [t];\n }\n }\n else if(coords.length === 4) {\n let t = equation.getRoots([\n isX\n ? 3 * (coords[1].x - coords[0].x)\n : 3 * (coords[1].y - coords[0].y),\n isX\n ? 6 * (coords[2].x + coords[0].x - 2 * coords[1].x)\n : 6 * (coords[2].y + coords[0].y - 2 * coords[1].y),\n isX\n ? 3 * (coords[3].x + 3 * coords[1].x - coords[0].x - 3 * coords[2].x)\n : 3 * (coords[3].y + 3 * coords[1].y - coords[0].y - 3 * coords[2].y)\n ]).filter(i => i > 0 && i < 1);\n if(t.length) {\n return t.sort(function(a, b) {\n return a - b;\n });\n }\n }\n}\n\n// 根据x的值解得t后获取y,由于线段已经x单调,所以解只会有1个而非多个\nfunction getYByX(coords, x) {\n let len = coords.length;\n if(x === coords[0].x) {\n return coords[0].y;\n }\n if(x === coords[len - 1].x) {\n return coords[len - 1].y;\n }\n if(len === 2) {\n if(coords[0].y === coords[1].y) {\n return coords[0].y;\n }\n let p = (x - coords[0].x) / (coords[1].x - coords[0].x);\n return coords[0].y + p * (coords[1].y - coords[0].y);\n }\n else if(len === 3) {\n let t = equation.getRoots([\n coords[0].x - x,\n 2 * (coords[1].x - coords[0].x),\n coords[2].x + coords[0].x - 2 * coords[1].x,\n ]).filter(i => i >= 0 && i <= 1);\n let pts = coords.map(item => [item.x, item.y]);\n return bezier.pointAtByT(pts, t[0])[1];\n }\n else if(len === 4) {\n let t = equation.getRoots([\n coords[0].x - x,\n 3 * (coords[1].x - coords[0].x),\n 3 * (coords[2].x + coords[0].x - 2 * coords[1].x),\n coords[3].x + 3 * coords[1].x - coords[0].x - 3 * coords[2].x\n ]).filter(i => i >= 0 && i <= 1);\n let pts = coords.map(item => [item.x, item.y]);\n return bezier.pointAtByT(pts, t[0])[1];\n }\n}\n\nfunction isRectsOverlap(bboxA, bboxB, lenA, lenB) {\n if(lenA === 2 && lenB === 2) {\n // 2条垂线特殊考虑,此时x范围都是0,只能比较y\n if(bboxA[0] === bboxA[2] && bboxB[0] === bboxB[2] && bboxA[0] === bboxA[2]) {\n if(bboxA[1] >= bboxB[3] || bboxB[1] >= bboxA[3]) {\n return false;\n }\n return true;\n }\n // 2条水平线也是\n if(bboxA[1] === bboxA[3] && bboxB[1] === bboxB[3] && bboxA[1] === bboxA[1]) {\n if(bboxA[0] >= bboxB[2] || bboxB[0] >= bboxA[2]) {\n return false;\n }\n return true;\n }\n }\n return geom.isRectsOverlap(bboxA, bboxB);\n}\n\nfunction checkOverlapLine(ax1, ay1, ax2, ay2, segA,\n bx1, by1, bx2, by2, segB, isY) {\n let ra = [], rb = [];\n let coordsA = segA.coords, coordsB = segB.coords;\n if(ax1 < bx1 && !isY || ay1 < by1 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsB[0],\n ], segA.belong));\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsB[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else if(ax2 === bx2 && !isY || ay2 === by2 && isY) {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n }\n }\n // 不会出现完全重合即ax2 == bx2\n else if(ax1 === bx1 && !isY || ay1 === by1 && isY) {\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segA.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsB[0],\n coordsB[1],\n ], segB.belong));\n }\n }\n // ax1 > bx1\n else {\n rb.push(new Segment([\n coordsB[0],\n coordsA[0],\n ], segB.belong));\n if(ax2 < bx2 && !isY || ay2 < by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n rb.push(new Segment([\n coordsA[1],\n coordsB[1],\n ], segB.belong));\n }\n else if(ax2 === bx2 && !isY || ay2 === by2 && isY) {\n ra.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsA[1],\n ], segB.belong));\n }\n else {\n ra.push(new Segment([\n coordsA[0],\n coordsB[1],\n ], segA.belong));\n rb.push(new Segment([\n coordsA[0],\n coordsB[1],\n ], segB.belong));\n ra.push(new Segment([\n coordsB[1],\n coordsA[1],\n ], segA.belong));\n }\n }\n return {\n ra,\n rb,\n };\n}\n\nfunction checkOverlapBezier(segA, segB) {\n let ca = segA.coords.map(item => [item.x, item.y]), la = ca.length;\n let cb = segB.coords.map(item => [item.x, item.y]), lb = cb.length;\n let firstA = ca[0], firstB = cb[0], lastA = ca[la - 1], lastB = cb[lb - 1];\n let t1 = bezier.getPointT(ca, firstB[0], firstB[1]);\n let t2 = bezier.getPointT(ca, lastB[0], lastB[1]);\n let t3 = bezier.getPointT(cb, firstA[0], firstA[1]);\n let t4 = bezier.getPointT(cb, lastA[0], lastA[1]);\n // console.warn(segA.toString());console.warn(segB.toString());\n // console.log(t1, t2, t3, t4);\n let l1 = t1.length, l2 = t2.length, l3 = t3.length, l4 = t4.length;\n /**\n * 重合有3种情况,对应4个t(每方各2个)的情况不同:\n * a. 一个包含另外一个,这样其中一方t为空,另一方t为2个即两个端点各1\n * b. 一对端点重合另外一侧包含,比上面的t多1个即空的那方t多1\n * c. 普通部分重合,每方各有1个t\n */\n let conditionA = l1 === 1 && l2 === 1 && l3 === 0 && l4 === 0 || l1 === 0 && l2 === 0 && l3 === 1 && l4 === 1;\n let conditionB = l1 === 1 && l2 === 1 && l3 + l4 === 1 || l1 + l2 === 1 && l3 === 1 && l4 === 1;\n let conditionC = l1 + l2 === 1 && l3 + l4 === 1;\n if(conditionA || conditionB || conditionC) {\n let startA = l1 ? t1[0] : 0;\n let endA = l2 ? t2[0] : 1;\n let a = bezier.sliceBezier2Both(ca, startA, endA);\n let startB = l3 ? t3[0] : 0;\n let endB = l4 ? t4[0] : 1;\n let b = bezier.sliceBezier2Both(cb, startB, endB);\n // console.log(startA, endA, startB, endB);\n // 确定重合之后就是截取,重合一定出现在左右的中间部分,这样只要分别判断左右两端是否需要各自裁剪即可\n if(equalBezier(a, b)) {\n let over = a.map(item => new Point(item));\n // console.log(over);\n let ra = [], rb = [];\n if(startA > 0) {\n let s = bezier.sliceBezier2Both(ca, 0, startA);\n let arr = [\n segA.coords[0],\n new Point(s[1]),\n segB.coords[0],\n ];\n if(la === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n ra.push(new Segment(arr, segA.belong));\n }\n ra.push(new Segment(over, segA.belong)); // 重合的部分\n if(endA < 1) {\n let s = bezier.sliceBezier2Both(ca, endA, 1);\n let arr = [\n segB.coords[lb - 1],\n new Point(s[1]),\n segA.coords[la - 1],\n ];\n if(la === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n ra.push(new Segment(arr, segA.belong));\n }\n if(startB > 0) {\n let s = bezier.sliceBezier2Both(cb, 0, startB);\n let arr = [\n segB.coords[0],\n new Point(s[1]),\n segA.coords[0],\n ];\n if(lb === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n rb.push(new Segment(arr, segB.belong));\n }\n rb.push(new Segment(over, segB.belong)); // 重合的部分\n if(endB < 1) {\n let s = bezier.sliceBezier2Both(cb, endB, 1);\n let arr = [\n segA.coords[la - 1],\n new Point(s[1]),\n segB.coords[lb - 1],\n ];\n if(lb === 4) {\n arr.splice(2, 0, new Point(s[2]));\n }\n rb.push(new Segment(arr, segB.belong));\n }\n // console.log(ra.map(item => item.toString()));\n // console.log(rb.map(item => item.toString()));\n return {\n ra,\n rb,\n };\n }\n }\n}\n\nfunction equalBezier(a, b) {\n for(let i = 0, len = a.length; i < len; i++) {\n let ai = a[i], bi = b[i];\n if(Math.abs(ai[0] - bi[0]) > 1e-9 || Math.abs(ai[1] - bi[1]) > 1e-9) {\n return false;\n }\n }\n return true;\n}\n\nexport default Polygon;\n","import geom from '../geom';\n\n// 新线段添加到某个链上后,要先检查是否能合其它链连起来,再检查闭合情况\nfunction join(res, chains, chain, index, pt, isHead) {\n for(let i = 0, len = chains.length; i < len; i++) {\n let item = chains[i];\n if(item !== chain) {\n let l = item.length;\n let head = item[0], tail = item[l - 1];\n let ptHead = head.coords[0];\n let coords = tail.coords, l2 = coords.length;\n let ptTail = coords[l2 - 1];\n if(pt.equal(ptHead)) {\n if(isHead) {\n item = reverse(chain).concat(item);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n else {\n item = chain.concat(item);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n }\n else if(pt.equal(ptTail)) {\n if(isHead) {\n item = item.concat(chain);\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n else {\n item = item.concat(reverse(chain));\n chains[i] = item;\n chains.splice(index, 1);\n return close(res, chains, item, i);\n }\n }\n }\n }\n // 无法和别的链接,也要检查自身闭合\n close(res, chains, chain, index);\n}\n\nfunction close(res, chains, chain, index) {\n let l = chain.length;\n let head = chain[0], tail = chain[l - 1];\n let ptHead = head.coords[0];\n let coords2 = tail.coords, l2 = coords2.length;\n let ptTail = coords2[l2 - 1];\n if(ptHead.equal(ptTail)) {\n chains.splice(index, 1);\n res.push(chain);\n }\n}\n\n// 整条链颠倒,包含每个线段自身颠倒\nfunction reverse(chain) {\n chain.forEach(item => item.reverse());\n return chain.reverse();\n}\n\nexport default function(list) {\n let chains = [], res = [];\n // 在对方内部的排在前面,这样会优先形成包含情况而不是交叉\n list.sort(function(a, b) {\n if(b.otherFill[0] && b.otherFill[1]) {\n return 1;\n }\n return -1;\n });\n outer:\n while(list.length) {\n let seg = list.shift(), coords = seg.coords, len = coords.length;\n let start = coords[0], end = coords[len - 1];\n let temp;\n // 尝试追加到某条链中,互相头尾链接可能有4种情况,其中2种会reverse线段首尾\n for(let i = 0, len = chains.length; i < len; i++) {\n let chain = chains[i], l = chain.length;\n let head = chain[0], tail = chain[l - 1];\n let ptHead = head.coords[0];\n let coords2 = tail.coords, l2 = coords2.length;\n let ptTail = coords2[l2 - 1];\n if(start.equal(ptTail)) {\n if(seg.belong !== tail.belong) {\n chain.push(seg);\n join(res, chains, chain, i, end, false);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 0};\n }\n }\n else if(start.equal(ptHead)) {\n if(seg.belong !== tail.belong) {\n seg.reverse();\n chain.unshift(seg);\n join(res, chains, chain, i, end, true);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 1};\n }\n }\n else if(end.equal(ptTail)) {\n if(seg.belong !== tail.belong) {\n seg.reverse();\n chain.push(seg);\n join(res, chains, chain, i, start, false);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 2};\n }\n }\n else if(end.equal(ptHead)) {\n if(seg.belong !== tail.belong) {\n chain.unshift(seg);\n join(res, chains, chain, i, start, true);\n continue outer;\n }\n else if(!temp) {\n temp = {i, t: 3};\n }\n }\n }\n // 如果没有优先添加对方的线段形成包含,则到这里检查是否有己方的进行链接\n if(temp) {\n if(temp.t === 0) {\n chains[temp.i].push(seg);\n join(res, chains, chains[temp.i], temp.i, end, false);\n }\n else if(temp.t === 1) {\n seg.reverse();\n chains[temp.i].unshift(seg);\n join(res, chains, chains[temp.i], temp.i, end, true);\n }\n else if(temp.t === 2) {\n seg.reverse();\n chains[temp.i].push(seg);\n join(res, chains, chains[temp.i], temp.i, start, false);\n }\n else if(temp.t === 3) {\n chains[temp.i].unshift(seg);\n join(res, chains, chains[temp.i], temp.i, start, true);\n }\n }\n // 找不到则生成新链\n else {\n chains.push([seg]);\n }\n }\n // 鞋带公式求得每个多边形的时钟序 https://zhuanlan.zhihu.com/p/401010594\n let v = res.map(item => {\n // let isInner = true, isOuter = true;\n let clockwise = true;\n let s = 0, lastX, lastY, minX, minY, maxX, maxY;\n item.forEach((seg, i) => {\n // 内部是指边的两侧都是对方填充说明在内部\n // if(!seg.otherFill[0] || !seg.otherFill[1]) {\n // isInner = false;\n // }\n // // 外部是指边的一侧为空\n // if(!seg.myFill[0] && !seg.otherFill[0] || !seg.myFill[1] && !seg.otherFill[1]) {}\n // else {\n // isOuter = false;\n // }\n let coords = seg.coords, len = coords.length, bbox = seg.bbox;\n if(i) {\n minX = Math.min(minX, bbox[0]);\n minY = Math.min(minY, bbox[1]);\n maxX = Math.max(maxX, bbox[2]);\n maxY = Math.max(maxY, bbox[3]);\n }\n else {\n minX = bbox[0];\n minY = bbox[1];\n maxX = bbox[2];\n maxY = bbox[3];\n }\n if(len === 2) {\n if(i) {\n s += lastX * coords[1].y - lastY * coords[1].x;\n }\n else {\n s += coords[0].x * coords[1].y - coords[0].y * coords[1].x;\n }\n lastX = coords[1].x;\n lastY = coords[1].y;\n }\n else if(len === 3) {\n if(i) {\n s += lastX * coords[2].y - lastY * coords[2].x;\n }\n else {\n s += coords[0].x * coords[1].y - coords[0].y * coords[2].x;\n }\n lastX = coords[2].x;\n lastY = coords[2].y;\n }\n else if(len === 4) {\n if(i) {\n s += lastX * coords[3].y - lastY * coords[3].x;\n }\n else {\n s += coords[0].x * coords[3].y - coords[0].y * coords[3].x;\n }\n lastX = coords[3].x;\n lastY = coords[3].y;\n }\n });\n // 首个顶点重合\n let first = item[0], coords = first.coords;\n s += lastX * coords[0].y - lastY * coords[0].x;\n if(s < 0) {\n clockwise = false;\n }\n return {\n // isInner,\n // isOuter,\n list: item,\n clockwise,\n bbox: [minX, minY, maxX, maxY],\n area: (maxX - minX) * (maxY - minY),\n };\n });\n v.forEach(item => {\n if(item.checked) {\n return;\n }\n let bbox = item.bbox;\n let list = [item];\n for(let i = 0, len = v.length; i < len; i++) {\n let item2 = v[i];\n if(item2 !== item) {\n // 互相包含则存入列表\n if(geom.isRectsInside(bbox, item2.bbox, true) || geom.isRectsInside(item2.bbox, bbox, true)) {\n list.push(item2);\n }\n }\n }\n // 按面积排序,最小的即最里面的在前面\n if(list.length > 1) {\n list.sort(function(a, b) {\n return a.area - b.area;\n });\n // 可能存在已经排过序的,例如外围a包含了内部的b和c,b和c互不相交,a和b已经调整过排序了,a和c再调整则a已经checked\n for(let i = 1, len = list.length;i < len; i++) {\n let item = list[i];\n if(item.checked) {\n let clockwise = item.clockwise;\n for(let j = i - 1; j >= 0; j--) {\n let item2 = list[j];\n item2.checked = true;\n if(item2.clockwise === clockwise) {\n reverse(item2.list);\n item2.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n clockwise = item.clockwise;\n for(let j = i + 1; j < len; j++) {\n let item2 = list[j];\n item2.checked = true;\n if(item2.clockwise === clockwise) {\n reverse(item2.list);\n item2.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n return;\n }\n }\n // 新的依次时钟序互相颠倒\n let clockwise = list[0].clockwise;\n list[0].checked = true;\n for(let i = 1, len = list.length;i < len; i++) {\n let item = list[i];\n item.checked = true;\n if(item.clockwise === clockwise) {\n reverse(item.list);\n item.clockwise = !clockwise;\n }\n clockwise = !clockwise;\n }\n }\n });\n return v.map(item => {\n let list = item.list.map(seg => {\n let coords = seg.coords, len = coords.length;\n if(len === 2) {\n return [coords[1].x, coords[1].y];\n }\n else if(len === 3) {\n return [coords[1].x, coords[1].y, coords[2].x, coords[2].y];\n }\n else if(len === 4) {\n return [coords[1].x, coords[1].y, coords[2].x, coords[2].y, coords[3].x, coords[3].y];\n }\n });\n // 首个顶点重合\n let first = item.list[0], coords = first.coords;\n list.unshift([coords[0].x, coords[0].y]);\n return list;\n });\n}\n","import Polygon from './Polygon';\nimport chain from './chain';\n\n// 多边形都是多个区域,重载支持外部传入1个区域则数组化\nfunction prefix(polygon) {\n if(!polygon || !Array.isArray(polygon) || !Array.isArray(polygon[0])) {\n return [];\n }\n if(Array.isArray(polygon[0][0])) {\n return polygon;\n }\n return [polygon];\n}\n\nfunction trivial(polygonA, polygonB) {\n let isIntermediateA = polygonA instanceof Polygon;\n let isIntermediateB = polygonB instanceof Polygon;\n // 生成多边形对象,相交线段拆分开来,曲线x单调性裁剪,重合线段标记\n let source;\n if(isIntermediateA) {\n source = polygonA.reset(0);\n }\n else {\n source = new Polygon(prefix(polygonA), 0);\n source.selfIntersect();\n }\n // console.log(source.toString());\n let clip;\n if(isIntermediateB) {\n clip = polygonB.reset(1);\n }\n else {\n clip = new Polygon(prefix(polygonB), 1);\n clip.selfIntersect();\n }\n // console.log(clip.toString());\n // console.log('----');\n // 两个多边形之间再次互相判断相交\n Polygon.intersect2(source, clip, isIntermediateA, isIntermediateB);\n // console.log(source.toString());\n // console.log(clip.toString());\n // console.log('====');\n Polygon.annotate2(source, clip, isIntermediateA, isIntermediateB);\n // console.log(source.toString());\n // console.log(clip.toString());\n return [source, clip];\n}\n\nconst INTERSECT = [\n 0, 0, 0, 1,\n 0, 0, 0, 1,\n 0, 0, 0, 1,\n 1, 1, 1, 0,\n], UNION = [\n 0, 1, 1, 1,\n 1, 0, 0, 0,\n 1, 0, 0, 0,\n 1, 0, 0, 0,\n], SUBTRACT = [\n 0, 0, 1, 0,\n 0, 0, 1, 0,\n 1, 1, 0, 1,\n 0, 0, 1, 0,\n], SUBTRACT_REV = [\n 0, 1, 0, 0,\n 1, 0, 1, 1,\n 0, 1, 0, 0,\n 0, 1, 0, 0,\n], XOR = [\n 0, 1, 1, 0,\n 1, 0, 0, 1,\n 1, 0, 0, 1,\n 0, 1, 1, 0,\n];\n\nfunction filter(segments, matrix) {\n let res = [], hash = {};\n segments.forEach(seg => {\n let { belong, myFill, otherFill, otherCoincide } = seg;\n if(otherCoincide) {\n // 对方重合线只出现一次\n let hc = seg.toHash();\n if(hash.hasOwnProperty(hc)) {\n return;\n }\n hash[hc] = true;\n }\n let i;\n if(belong) {\n i = (otherFill[0] ? 8 : 0)\n + (myFill[0] ? 4 : 0)\n + (otherFill[1] ? 2 : 0)\n + (myFill[1] ? 1 : 0);\n }\n else {\n i = (myFill[0] ? 8 : 0)\n + (otherFill[0] ? 4 : 0)\n + (myFill[1] ? 2 : 0)\n + (otherFill[1] ? 1 : 0);\n }\n if(matrix[i]) {\n res.push(seg);\n }\n });\n // console.log(res.map(item => item.toString()));\n return res;\n}\n\nexport default {\n intersect(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), INTERSECT);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n union(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), UNION);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n subtract(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), SUBTRACT);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n subtractRev(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), SUBTRACT_REV);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n xor(polygonA, polygonB, intermediate) {\n let [source, clip] = trivial(polygonA, polygonB);\n let list = filter(source.segments.concat(clip.segments), XOR);\n if(intermediate) {\n source.segments = list;\n return source;\n }\n return chain(list);\n },\n chain(polygon) {\n if(polygon instanceof Polygon) {\n return chain(polygon.segments);\n }\n return prefix(polygon);\n },\n};\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport bezier from '../../math/bezier';\nimport bo from '../../math/bo/index';\nimport mode from '../../refresh/mode';\n\nlet { intersect, union, subtract, subtract2, xor, chain } = bo;\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nclass Polyline extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 所有点的列表\n if(this.isMulti) {\n this.__points = [[]];\n this.__controls = [[]];\n this.__start = [0];\n this.__end = [1];\n if(Array.isArray(props.start)) {\n this.__start = props.start.map(i => parseFloat(i) || 0);\n for(let i = this.__start.length; i < this.__points.length; i++) {\n this.__start.push(0);\n }\n }\n else if(!isNil(props.start)) {\n let v = parseFloat(props.start) || 0;\n this.__start = this.__points.map(() => v);\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => {\n let v = parseFloat(i);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n });\n for(let i = this.__end.length; i < this.__points.length; i++) {\n this.__end.push(1);\n }\n }\n else if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = this.__points.map(() => v);\n }\n }\n else {\n this.__points = [];\n // 控制点\n this.__controls = [];\n this.__start = 0;\n this.__end = 1;\n if(!isNil(props.start)) {\n this.__start = parseFloat(props.start) || 0;\n }\n if(!isNil(props.end)) {\n let v = parseFloat(props.end);\n if(isNaN(v)) {\n v = 1;\n }\n this.__end = v;\n }\n }\n if(Array.isArray(props.controls)) {\n this.__controls = props.controls;\n }\n if(Array.isArray(props.points)) {\n this.__points = props.points;\n }\n if(props.booleanOperations) {\n this.__booleanOperations = props.booleanOperations;\n }\n }\n\n calContent(currentStyle, computedStyle) {\n let res = super.calContent(currentStyle, computedStyle);\n // 查看是否有顶点\n if(res && !this.__hasXomContent) {\n let { currentProps: { points }, isMulti } = this;\n if(isMulti) {\n for(let i = 0, len = points.length; i < len; i++) {\n if(points.length) {\n return true;\n }\n }\n }\n else {\n if(points.length) {\n return true;\n }\n }\n }\n return res;\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n return points.map(item => {\n if(!Array.isArray(item)) {\n return;\n }\n let len = item.length;\n if(isControl) {\n if(len !== 0 && len !== 2 && len !== 4) {\n return;\n }\n }\n else {\n if(len !== 0 && len !== 2) {\n return;\n }\n }\n let res = [];\n for(let i = 0; i < len; i++) {\n if(i % 2 === 0) {\n res.push(originX + item[i] * width);\n }\n else {\n res.push(originY + item[i] * height);\n }\n }\n return res;\n });\n }\n\n // 供polygon覆盖,后处理booleanOperations\n __reprocessing(list, isMulti) {\n if(!isMulti || list.length < 2) {\n return list;\n }\n let bo = this.booleanOperations, len = list.length;\n if(!bo) {\n return list;\n }\n if(!Array.isArray(bo)) {\n let old = bo;\n bo = [bo];\n for(let i = 1; i < len - 1; i++) {\n bo.push(old);\n }\n }\n if(Array.isArray(bo) && bo.length) {\n let res = [], temp = list[0];\n for(let i = 1; i < len; i++) {\n let op = (bo[i - 1] || '').toString().toLowerCase();\n let cur = list[i];\n if(['intersect', 'intersection', 'union', 'subtract', 'subtract2', 'diff', 'difference', 'xor'].indexOf(op) === -1) {\n res = res.concat(chain(temp));\n temp = cur || [];\n continue;\n }\n switch(op) {\n case 'intersect':\n case 'intersection':\n temp = intersect(temp, cur, true);\n break;\n case 'union':\n temp = union(temp, cur, true);\n break;\n case 'subtract':\n case 'diff':\n case 'difference':\n temp = subtract(temp, cur, true);\n break;\n case 'subtract2':\n temp = subtract2(temp, cur, true);\n break;\n case 'xor':\n temp = xor(temp, cur, true);\n break;\n }\n }\n return res.concat(chain(temp));\n }\n return list;\n }\n\n // 同polygon覆盖,booleanOperations改变时需刷新缓冲顶点坐标\n __needRebuildSE(__cacheProps) {\n if(util.isNil(__cacheProps.booleanOperations)) {\n __cacheProps.booleanOperations = true;\n return true;\n }\n }\n\n __buildCache(originX, originY) {\n let { width, height, points, controls, start, end, __cacheProps, isMulti } = this;\n let rebuild, rebuildSE;\n if(isNil(__cacheProps.points)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.points = points.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item);\n }\n });\n }\n else {\n __cacheProps.points = this.__getPoints(originX, originY, width, height, points);\n }\n }\n if(isNil(__cacheProps.controls)) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.controls = controls.map(item => {\n if(Array.isArray(item)) {\n return this.__getPoints(originX, originY, width, height, item, true);\n }\n return item;\n });\n }\n else {\n __cacheProps.controls = this.__getPoints(originX, originY, width, height, controls, true);\n }\n }\n if(isNil(__cacheProps.start)) {\n rebuildSE = true;\n __cacheProps.start = start;\n }\n if(isNil(__cacheProps.end)) {\n rebuildSE = true;\n __cacheProps.end = end;\n }\n // polygon会覆盖检查booleanOperations缓存\n if(this.__needRebuildSE(__cacheProps)) {\n rebuildSE = true;\n }\n // points/controls有变化就需要重建顶点\n if(rebuild) {\n let { points, controls } = __cacheProps;\n if(isMulti) {\n __cacheProps.list2 = points.map((item, i) => {\n let cl = controls[i];\n if(Array.isArray(item)) {\n return item.map((point, j) => {\n if(j) {\n return this.__concatPointAndControl(point, cl && cl[j - 1]);\n }\n return point;\n });\n }\n });\n __cacheProps.len = this.__getLength(__cacheProps.list2, isMulti);\n }\n else {\n __cacheProps.list2 = points.map((point, i) => {\n if(i) {\n return this.__concatPointAndControl(point, controls[i - 1]);\n }\n return point;\n });\n __cacheProps.len = this.__getLength(__cacheProps.list2, isMulti);\n }\n }\n if(rebuild || rebuildSE) {\n if(isMulti) {\n __cacheProps.list = __cacheProps.list2.map((item, i) => {\n if(Array.isArray(item)) {\n let len = __cacheProps.len;\n return this.__getNewList(item, {\n list: len.list[i],\n total: len.total[i],\n increase: len.increase[i],\n }, __cacheProps.start[i], __cacheProps.end[i]);\n }\n });\n }\n else {\n __cacheProps.list = this.__getNewList(__cacheProps.list2, __cacheProps.len, __cacheProps.start, __cacheProps.end);\n }\n // 后处理一次,让polygon支持布尔运算\n __cacheProps.list = this.__reprocessing(__cacheProps.list, isMulti);\n }\n return rebuild || rebuildSE;\n }\n\n __getNewList(list, len, start = 0, end = 1) {\n if(start === 0 && end === 1) {\n return list;\n }\n if(start === end) {\n return [];\n }\n if(start > end) {\n [start, end] = [end, start];\n }\n // start和end只能相差<=1,如果>1则校正\n while(end - start > 1) {\n end--;\n }\n // 将start和end统一至最接近0的正值\n while(end < 0 || start < 0) {\n end++;\n start++;\n }\n while(end >= 1 && start >= 1) {\n end--;\n start--;\n }\n // clone出原本顶点列表,防止干扰\n let length = list.length;\n list = util.clone(list);\n let res = [];\n let start2 = start > 1 ? (start - 1) : start;\n let end2 = end > 1 ? (end - 1) : end;\n let i = this.__getIndex(len.increase, start2 * len.total, 0, length - 1);\n let j = this.__getIndex(len.increase, end2 * len.total, 0, length - 1);\n // start<0或者end>1或者普通情况,一共3种,start和end不可能同时超限\n let isStartLt0 = start < 0;\n let isEndGt1 = end > 1;\n end2 *= len.total;\n let prePercent = 1;\n let endPoint;\n if(end2 > len.increase[j]) {\n let prev = list[j].slice(list[j].length - 2); // 最后2个点是x,y,前面是control\n let current = list[j + 1];\n let l = len.list[j];\n let diff = end2 - len.increase[j];\n let t = diff / l;\n prePercent = t;\n if(current.length === 2) {\n let a = current[0] - prev[0];\n let b = current[1] - prev[1];\n if(isEndGt1) {\n endPoint = [prev[0] + t * a, prev[1] + t * b];\n }\n else {\n t = 1 - t;\n endPoint = [current[0] - t * a, current[1] - t * b];\n }\n }\n else if(current.length === 4) {\n let r = bezier.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]]], t);\n endPoint = [r[1][0], r[1][1], r[2][0], r[2][1]];\n }\n else if(current.length === 6) {\n let r = bezier.sliceBezier([prev, [current[0], current[1]], [current[2], current[3]], [current[4], current[5]]], t);\n endPoint = [r[1][0], r[1][1], r[2][0], r[2][1], r[3][0], r[3][1]];\n }\n }\n start2 *= len.total;\n if(start2 > len.increase[i]) {\n let current;\n let prev = list[i].slice(list[i].length - 2);\n let l = len.list[i];\n // 同一条线段时如果有end裁剪,会影响start长度,这里还要防止头尾绕了一圈的情况\n if(i === j && !isStartLt0 && !isEndGt1 && prePercent !== 1) {\n l *= prePercent;\n if(endPoint) {\n current = endPoint;\n }\n }\n if(!current) {\n current = list[i + 1];\n }\n let diff = start2 - len.increase[i];\n let t = diff / l;\n if(current.length === 2) {\n let a = current[0] - prev[0];\n let b = current[1] - prev[1];\n if(isStartLt0) {\n t = 1 - t;\n res.push([current[0] - t * a, current[1] - t * b]);\n }\n else {\n res.push([prev[0] + t * a, prev[1] + t * b]);\n }\n res.push(current);\n }\n else if(current.length === 4) {\n let r = bezier.sliceBezier([[current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n res.push(r[0]);\n res.push([r[1][0], r[1][1], r[2][0], r[2][1]]);\n // 同一条线段上去除end冲突\n if(i === j && !isStartLt0 && !isEndGt1) {\n endPoint = null;\n }\n }\n else if(current.length === 6) {\n let r = bezier.sliceBezier([[current[4], current[5]], [current[2], current[3]], [current[0], current[1]], prev], 1 - t).reverse();\n res.push(r[0])\n res.push([r[1][0], r[1][1], r[2][0], r[2][1], current[4], current[5]]);\n if(i === j && !isStartLt0 && !isEndGt1) {\n endPoint = null;\n }\n }\n }\n // start和end之间的线段,注意头尾饶了一圈的情况,以及起始点被上方考虑过了\n for(let k = i + 2; k <= j + (!isStartLt0 && !isEndGt1 ? 0 : length); k++) {\n res.push(list[k % length]);\n }\n if(endPoint) {\n res.push(endPoint);\n }\n return res;\n }\n\n __getIndex(list, t, i, j) {\n if(i === j) {\n if(list[i] > t) {\n return i - 1;\n }\n return i;\n }\n let middle = i + ((j - i) >> 1);\n if(list[middle] === t) {\n return middle;\n }\n else if(list[middle] > t) {\n return this.__getIndex(list, t, i, Math.max(middle - 1, i));\n }\n else {\n return this.__getIndex(list, t, Math.min(middle + 1, j), j);\n }\n }\n\n __getLength(list, isMulti) {\n let res = [];\n let total = 0;\n let increase = [];\n if(isMulti) {\n total = [];\n list.forEach(list => {\n let temp = this.__getLength(list);\n res.push(temp.list);\n total.push(temp.total);\n increase.push([0].concat(temp.increase));\n });\n }\n else if(Array.isArray(list)) {\n total = 0;\n increase.push(0);\n let start = 0;\n for(let i = 0, len = list.length; i < len; i++) {\n let item = list[i];\n if(Array.isArray(item)) {\n start = i;\n break;\n }\n }\n let prev = list[start];\n for(let i = start + 1, len = list.length; i < len; i++) {\n let item = list[i];\n if(!Array.isArray(item)) {\n continue;\n }\n if(item.length === 2) {\n let a = Math.abs(item[0] - prev[0]);\n let b = Math.abs(item[1] - prev[1]);\n let c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\n res.push(c);\n total += c;\n increase.push(total);\n prev = item;\n }\n else if(item.length === 4) {\n let c = bezier.bezierLength([prev, [item[0], item[1]], [item[2], item[3]]]);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[2], item[3]];\n }\n else if(item.length === 6) {\n let c = bezier.bezierLength([prev, [item[0], item[1]], [item[2], item[3]], [item[4], item[5]]]);\n res.push(c);\n total += c;\n increase.push(total);\n prev = [item[4], item[5]];\n }\n }\n }\n return {\n list: res,\n total,\n increase,\n };\n }\n\n __concatPointAndControl(point, control) {\n if(Array.isArray(control) && (control.length === 2 || control.length === 4)\n && Array.isArray(point) && point.length === 2) {\n return control.concat(point);\n }\n return point;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.x3, res.y3);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get points() {\n return this.getProps('points');\n }\n\n get controls() {\n return this.getProps('controls');\n }\n\n get start() {\n return this.getProps('start');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n },\n } = this;\n this.__buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let { points, controls } = __cacheProps;\n if(!isMulti) {\n points = [points];\n controls = [controls];\n }\n points.forEach((pointList, i) => {\n if(!pointList || pointList.length < 2 || !pointList[0] || !pointList[1]\n || pointList[0].length < 2 || pointList[1].length < 2) {\n return;\n }\n let controlList = controls[i] || [];\n let [xa, ya] = pointList[0];\n for(let i = 1, len = pointList.length; i < len; i++) {\n let item = pointList[i];\n if(!item || item.length < 2) {\n continue;\n }\n let [xb, yb] = pointList[i];\n let c = controlList[i - 1];\n if(c && c.length === 4) {\n let bezierBox = bezier.bboxBezier(xa, ya, c[0], c[1], c[2], c[3], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else if(c && c.length === 2) {\n let bezierBox = bezier.bboxBezier(xa, ya, c[0], c[1], xb, yb);\n bbox[0] = Math.min(bbox[0], bezierBox[0] - half);\n bbox[1] = Math.min(bbox[1], bezierBox[1] - half);\n bbox[2] = Math.max(bbox[2], bezierBox[2] + half);\n bbox[3] = Math.max(bbox[3], bezierBox[3] + half);\n }\n else {\n bbox[0] = Math.min(bbox[0], xa - half);\n bbox[1] = Math.min(bbox[1], ya - half);\n bbox[2] = Math.max(bbox[2], xa + half);\n bbox[3] = Math.max(bbox[3], ya + half);\n }\n xa = xb;\n ya = yb;\n }\n });\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n\n get booleanOperations() {\n return this.getProps('booleanOperations');\n }\n}\n\nexport default Polyline;\n","import Polyline from './Polyline';\n\nclass Polygon extends Polyline {\n constructor(tagName, props) {\n super(tagName, props);\n }\n\n __getPoints(originX, originY, width, height, points, isControl) {\n let res = super.__getPoints(originX, originY, width, height, points, isControl);\n if(!isControl) {\n res.push(res[0]);\n }\n return res;\n }\n}\n\nexport default Polygon;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport inject from '../../util/inject';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\nconst { sectorPoints } = geom;\n\nfunction getR(v, dft) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = dft;\n }\n return v;\n}\n\nclass Sector extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 角度\n if(this.isMulti) {\n this.__begin = [0];\n this.__end = [0];\n this.__r = [1];\n if(Array.isArray(props.begin)) {\n this.__begin = props.begin.map(i => getR(i, 0));\n }\n if(Array.isArray(props.end)) {\n this.__end = props.end.map(i => getR(i, 0));\n }\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i, 1));\n }\n if(Array.isArray(props.edge)) {\n this.__edge = props.edge.map(i => !!i);\n }\n if(Array.isArray(props.closure)) {\n this.__closure = props.closure.map(i => !!i);\n }\n }\n else {\n this.__begin = this.__end = 0;\n // 半径[0, ∞),默认1\n this.__r = 1;\n // 扇形两侧是否有边\n this.__edge = false;\n // 扇形大于180°时,是否闭合两端\n this.__closure = false;\n if(!isNil(props.begin)) {\n this.__begin = getR(props.begin, 0);\n }\n if(!isNil(props.end)) {\n this.__end = getR(props.end, 0);\n }\n if(!isNil(props.r)) {\n this.__r = getR(props.r, 1);\n }\n if(!isNil(props.edge)) {\n this.__edge = !!props.edge;\n }\n if(!isNil(props.closure)) {\n this.__closure = !!props.closure;\n }\n }\n }\n\n __buildCache(cx, cy, focus) {\n let { width, begin, end, r, edge, closure, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.begin) || focus) {\n rebuild = true;\n __cacheProps.begin = (begin || 0) % 360;\n }\n if(isNil(__cacheProps.end) || focus) {\n rebuild = true;\n __cacheProps.end = (end || 0) % 360;\n }\n if(isNil(__cacheProps.r) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.r = r.map(r => r * width * 0.5);\n }\n else {\n __cacheProps.r = r * width * 0.5;\n }\n }\n r = __cacheProps.r;\n if(isNil(__cacheProps.edge) || focus) {\n rebuild = true;\n __cacheProps.edge = edge;\n }\n if(isNil(__cacheProps.closure) || focus) {\n rebuild = true;\n __cacheProps.closure = closure;\n }\n if(rebuild) {\n if(isMulti) {\n __cacheProps.list = [];\n __cacheProps.sList = [];\n begin.forEach((begin, i) => {\n let r2 = isNil(r[i]) ? width * 0.5 : r[i];\n let list = sectorPoints(cx, cy, r2, parseFloat(begin || 0) % 360, parseFloat(end[i] || 0) % 360);\n let sList = list.slice(0);\n if(closure[i]) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list.push(list);\n __cacheProps.sList.push(sList);\n });\n }\n else {\n let list = sectorPoints(cx, cy, r, parseFloat(begin || 0), parseFloat(end || 0));\n let sList = list.slice(0);\n if(closure) {\n list.push(list[0].slice(0));\n if(edge) {\n sList.push(sList[0].slice(0));\n }\n }\n else {\n list.unshift([cx, cy]);\n list.push([cx, cy]);\n if(edge) {\n sList.unshift([cx, cy]);\n sList.push([cx, cy]);\n }\n }\n __cacheProps.list = list;\n __cacheProps.sList = sList;\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx2, dy2) {\n let res = super.render(renderMode, ctx, dx2, dy2);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.cx, res.cy);\n let {\n fill: fills,\n fillRule: fillRules,\n stroke: strokes,\n strokeWidth: strokeWidths,\n strokeDasharray: strokeDasharrays,\n strokeDasharrayStr: strokeDasharrayStrs,\n strokeLinecap: strokeLinecaps,\n strokeLinejoin: strokeLinejoins,\n strokeMiterlimit: strokeMiterlimits,\n dx,\n dy,\n } = res;\n let { __cacheProps: { list, sList }, isMulti } = this;\n // 普通情况下只有1个,按普通情况走\n if(fills.length <= 1 && strokes.length <= 1) {\n let o = {\n fill: fills[0],\n fillRule: fillRules[0],\n stroke: strokes[0],\n strokeWidth: strokeWidths[0],\n strokeDasharray: strokeDasharrays[0],\n strokeDasharrayStr: strokeDasharrayStrs[0],\n strokeLinecap: strokeLinecaps[0],\n strokeLinejoin: strokeLinejoins[0],\n strokeMiterlimit: strokeMiterlimits[0],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n // 多个需要fill在下面,stroke在上面,依次循环\n else {\n for(let i = 0, len = fills.length; i < len; i++) {\n let fill = fills[i];\n if(fill) {\n let o = {\n fill,\n fillRule: fillRules[i],\n dx,\n dy,\n };\n this.__renderOneSector(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n for(let i = 0, len = strokes.length; i < len; i++) {\n let stroke = strokes[i];\n if(stroke) {\n let o = {\n stroke,\n strokeWidth: strokeWidths[i],\n strokeDasharray: strokeDasharrays[i],\n strokeDasharrayStr: strokeDasharrayStrs[i],\n strokeLinecap: strokeLinecaps[i],\n strokeLinejoin: strokeLinejoins[i],\n strokeMiterlimit: strokeMiterlimits[i],\n dx,\n dy,\n };\n this.__renderOnePolygon(renderMode, ctx, isMulti, list, sList, o);\n }\n }\n }\n return res;\n }\n\n __renderOneSector(renderMode, ctx, isMulti, list, sList, res) {\n let {\n fill,\n stroke,\n strokeWidth,\n } = res;\n let isFillCE = fill.k === 'conic';\n let isStrokeCE = stroke.k === 'conic';\n let isFillRE = fill.k === 'radial' && Array.isArray(fill.v);\n let isStrokeRE = strokeWidth > 0 && stroke.k === 'radial' && Array.isArray(stroke.v);\n if(isFillCE || isStrokeCE) {\n if(isFillCE) {\n this.__conicGradient(renderMode, ctx, list, isMulti, res);\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n if(strokeWidth > 0 && isStrokeCE) {\n inject.warn('Stroke style can not use conic-gradient');\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else if(isFillRE || isStrokeRE) {\n if(isFillRE) {\n this.__radialEllipse(renderMode, ctx, list, isMulti, res, 'fill');\n }\n else if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true);\n }\n // stroke椭圆渐变matrix会变形,降级为圆\n if(strokeWidth > 0 && isStrokeRE) {\n inject.warn('Stroke style can not use radial-gradient for ellipse');\n res.stroke = res.stroke.v[0];\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n else if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n else {\n if(fill && fill !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, list, res, true, false);\n }\n if(strokeWidth > 0 && stroke && stroke !== 'none') {\n this.__drawPolygon(renderMode, ctx, isMulti, sList, res, false, true);\n }\n }\n }\n\n __genSector(edge, d, fill, stroke, strokeWidth, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit) {\n if(edge) {\n let props = [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n else {\n this.addGeom('path', [\n ['d', d[0]],\n ['fill', fill.v || fill],\n ]);\n if(strokeWidth > 0) {\n let props = [\n ['d', d[1]],\n ['fill', 'none'],\n ['stroke', stroke.v || stroke],\n ['stroke-width', strokeWidth],\n ];\n this.__propsStrokeStyle(props, strokeDasharrayStr, strokeLinecap, strokeLinejoin, strokeMiterlimit);\n this.addGeom('path', props);\n }\n }\n }\n\n get begin() {\n return this.getProps('begin');\n }\n\n get end() {\n return this.getProps('end');\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get edge() {\n return this.getProps('edge');\n }\n\n // >180°时是否链接端点\n get closure() {\n return this.getProps('closure');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.__buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - r - half;\n let xb = cx + r - half;\n let ya = cy - r + half;\n let yb = cy + r + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Sector;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction genVertex(x, y, width, height, rx = 0, ry = 0) {\n if(rx === 0 || ry === 0) {\n return [\n [x, y],\n [x + width, y],\n [x + width, y + height],\n [x, y + height],\n [x, y],\n ];\n }\n let ox = rx * geom.H;\n let oy = ry * geom.H;\n return [\n [x + rx, y],\n [x + width - rx, y],\n [x + width + ox - rx, y, x + width, y + ry - oy, x + width, y + ry],\n [x + width, y + height - ry],\n [x + width, y + height + oy - ry, x + width + ox - rx, y + height, x + width - rx, y + height],\n [x + rx, y + height],\n [x + rx - ox, y + height, x, y + height + oy - ry, x, y + height - ry],\n [x, y + ry],\n [x, y + ry - oy, x + rx - ox, y, x + rx, y]\n ];\n}\n\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 0;\n }\n return v;\n}\n\nclass Rect extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 圆角\n if(this.isMulti) {\n this.__rx = [0];\n this.__ry = [0];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n }\n else {\n this.__rx = this.__ry = 0;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n __buildCache(originX, originY, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(rx => Math.min(rx, 0.5) * width);\n }\n else {\n __cacheProps.rx = Math.min(rx, 0.5) * width;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = rx.map(ry => Math.min(ry, 0.5) * height);\n }\n else {\n __cacheProps.ry = Math.min(ry, 0.5) * height;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => genVertex(originX, originY, width, height, rx, ry[i]));\n }\n else {\n __cacheProps.list = genVertex(originX, originY, width, height, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.x3, res.y3);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n this.__buildCache(originX, originY);\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n bbox[0] = Math.min(bbox[0], originX - half);\n bbox[1] = Math.min(bbox[1], originY - half);\n bbox[2] = Math.max(bbox[2], originX + width + half);\n bbox[3] = Math.max(bbox[3], originY + height + half);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Rect;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Circle extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__r = [1];\n if(Array.isArray(props.r)) {\n this.__r = props.r.map(i => getR(i));\n }\n else if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n else {\n this.__r = 1;\n if(!isNil(props.r)) {\n this.__r = getR(props.r);\n }\n }\n }\n\n __buildCache(cx, cy, focus) {\n let { width, r, __cacheProps, isMulti } = this;\n if(isNil(__cacheProps.r) || focus) {\n if(isMulti) {\n __cacheProps.r = r.map(i => i * width * 0.5);\n __cacheProps.list = __cacheProps.r.map(r => geom.ellipsePoints(cx, cy, r, r));\n }\n else {\n __cacheProps.r = r * width * 0.5;\n __cacheProps.list = geom.ellipsePoints(cx, cy, __cacheProps.r, __cacheProps.r);\n }\n }\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.cx, res.cy);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get r() {\n return this.getProps('r');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.__buildCache(cx, cy);\n let r = 0;\n if(isMulti) {\n let max = 0;\n __cacheProps.r.forEach(r => {\n max = Math.max(r, max);\n });\n r = max;\n }\n else {\n r = __cacheProps.r;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - r - half;\n let ya = cy - r - half;\n let xb = cx + r + half;\n let yb = cy + r + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Circle;\n","import Geom from './Geom';\nimport util from '../../util/util';\nimport enums from '../../util/enums';\nimport geom from '../../math/geom';\nimport mode from '../../refresh/mode';\n\nconst { STYLE_KEY: {\n STROKE_WIDTH,\n} } = enums;\nconst { isNil } = util;\n\nfunction getR(v) {\n v = parseFloat(v);\n if(isNaN(v)) {\n v = 1;\n }\n return v;\n}\n\nclass Ellipse extends Geom {\n constructor(tagName, props) {\n super(tagName, props);\n // 半径[0, ∞),默认1\n if(this.isMulti) {\n this.__rx = [1];\n this.__ry = [1];\n if(Array.isArray(props.rx)) {\n this.__rx = props.rx.map(i => getR(i));\n }\n else if(!isNil(props.rx)) {\n this.__rx = [getR(props.rx)];\n }\n if(Array.isArray(props.ry)) {\n this.__ry = props.ry.map(i => getR(i));\n }\n else if(!isNil(props.ry)) {\n this.__ry = [getR(props.ry)];\n }\n }\n else {\n this.__rx = 1;\n if(!isNil(props.rx)) {\n this.__rx = getR(props.rx);\n }\n this.__ry = 1;\n if(!isNil(props.ry)) {\n this.__ry = getR(props.ry);\n }\n }\n }\n\n __buildCache(cx, cy, focus) {\n let { width, height, rx, ry, __cacheProps, isMulti } = this;\n let rebuild;\n if(isNil(__cacheProps.rx) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.rx = rx.map(i => i * width * 0.5);\n }\n else {\n __cacheProps.rx = rx * width * 0.5;\n }\n }\n if(isNil(__cacheProps.ry) || focus) {\n rebuild = true;\n if(isMulti) {\n __cacheProps.ry = ry.map(i => i * height * 0.5);\n }\n else {\n __cacheProps.ry = ry * height * 0.5;\n }\n }\n if(rebuild) {\n let { rx, ry } = __cacheProps;\n if(isMulti) {\n __cacheProps.list = rx.map((rx, i) => geom.ellipsePoints(cx, cy, rx, ry[i]));\n }\n else {\n __cacheProps.list = geom.ellipsePoints(cx, cy, rx, ry);\n }\n }\n return rebuild;\n }\n\n render(renderMode, ctx, dx, dy) {\n let res = super.render(renderMode, ctx, dx, dy);\n if(res.break || renderMode === mode.WEBGL) {\n return res;\n }\n this.__buildCache(res.cx, res.cy);\n this.__renderPolygon(renderMode, ctx, res);\n return res;\n }\n\n get rx() {\n return this.getProps('rx');\n }\n\n get ry() {\n return this.getProps('ry');\n }\n\n get bbox() {\n if(!this.__bbox) {\n let {\n isMulti, __cacheProps,\n __x3: originX, __y3: originY, width, height,\n computedStyle: {\n [STROKE_WIDTH]: strokeWidth,\n }\n } = this;\n let cx = originX + width * 0.5;\n let cy = originY + height * 0.5;\n this.__buildCache(cx, cy);\n let rx = 0, ry = 0;\n if(isMulti) {\n let mx = 0, my = 0;\n __cacheProps.rx.forEach((rx, i) => {\n mx = Math.max(rx, mx);\n my = Math.max(ry, __cacheProps.ry[i]);\n });\n rx = mx;\n ry = my;\n }\n else {\n rx = __cacheProps.rx;\n ry = __cacheProps.ry;\n }\n let bbox = super.bbox;\n let half = 0;\n strokeWidth.forEach(item => {\n half = Math.max(half, item);\n });\n half = Math.ceil(half * 0.5) + 1;\n let xa = cx - rx - half;\n let xb = cx + rx + half;\n let ya = cy - ry - half;\n let yb = cy + ry + half;\n bbox[0] = Math.min(bbox[0], xa);\n bbox[1] = Math.min(bbox[1], ya);\n bbox[2] = Math.max(bbox[2], xb);\n bbox[3] = Math.max(bbox[3], yb);\n this.__bbox = bbox;\n }\n return this.__bbox;\n }\n}\n\nexport default Ellipse;\n","import Node from '../node/Node';\nimport Component from '../node/Component';\nimport util from '../util/util';\n\nlet { isPrimitive, isNil } = util;\n\n/**\n * 入口方法,animateRecords记录所有的动画结果等初始化后分配开始动画\n * offsetTime默认0,递归传下去为右libraryId引用的元素增加偏移时间,为了库元素动画复用而开始时间不同\n * @param karas\n * @param json\n * @param animateRecords\n * @param areaStart 为了和AE功能对应,播放一段动画,特增加这2个参数,递归相加起效\n * @param areaDuration 最外层优先\n * @returns {Node|Component|*}\n */\nfunction parse(karas, json, animateRecords, areaStart, areaDuration) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => {\n return parse(karas, item, animateRecords, areaStart, areaDuration);\n });\n }\n areaStart += parseInt(json.areaStart) || 0;\n if(areaDuration === null) {\n if(!isNil(json.areaDuration)) {\n let n = parseInt(json.areaDuration);\n if(!isNaN(n) && n > 0) {\n areaDuration = n;\n }\n }\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n if(!Array.isArray(children)) {\n throw new Error('children must be an array');\n }\n let vd;\n if(tagName.charAt(0) === '$') {\n vd = karas.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n let cp = Component.getRegister(tagName);\n vd = karas.createCp(cp, props, children.map(item => {\n return parse(karas, item, animateRecords, areaStart, areaDuration);\n }));\n }\n else {\n vd = karas.createVd(tagName, props, children.map(item => {\n return parse(karas, item, animateRecords, areaStart, areaDuration);\n }));\n }\n if(animate) {\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n let has;\n animate.forEach(item => {\n let { value } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n has = true;\n }\n });\n // 产生实际动画运行才存入列表供root调用执行\n if(has) {\n animateRecords.push({\n animate,\n target: vd,\n areaStart,\n areaDuration,\n });\n }\n }\n return vd;\n}\n\nexport default parse;\n","import reset from '../style/reset';\n\nlet fullCssProperty = {\n skewX: 'kx',\n skewY: 'ky',\n transform: 'tf',\n fontSize: 'fz',\n offset: 'os',\n easing: 'e',\n filter: 'ft',\n boxShadow: 'bd',\n overflow: 'of',\n backgroundClip: 'bp',\n textOverflow: 'tof',\n flexWrap: 'fp',\n perspective: 'ppt',\n rotate3d: 'r3',\n};\n\nlet abbrCssProperty = {\n os: 'offset', // 非css属性不会被下面反向遍历插入,手动\n e: 'easing',\n};\n\nlet fullAnimate = {\n value: 'v',\n options: 'o',\n};\n\nlet abbrAnimate = {};\n\nlet fullAnimateOption = {\n duration: 'dt',\n delay: 'd',\n endDelay: 'ed',\n iterations: 'i',\n direction: 'dc',\n fill: 'f',\n fps: 'fp',\n playbackRate: 'p',\n spfLimit: 'sl',\n};\n\nlet abbrAnimateOption = {};\n\nreset.DOM_KEY_SET.concat(reset.GEOM_KEY_SET).forEach(k => {\n if(fullCssProperty.hasOwnProperty(k)) {\n abbrCssProperty[fullCssProperty[k]] = k;\n return;\n }\n let v = k.charAt(0) + k.replace(/[a-z]/g, '').toLowerCase();\n fullCssProperty[k] = v;\n abbrCssProperty[v] = k;\n});\n\nObject.keys(fullAnimate).forEach(k => {\n abbrAnimate[fullAnimate[k]] = k;\n});\n\nObject.keys(fullAnimateOption).forEach(k => {\n abbrAnimateOption[fullAnimateOption[k]] = k;\n});\n\nexport default {\n fullCssProperty,\n abbrCssProperty,\n fullAnimate,\n abbrAnimate,\n fullAnimateOption,\n abbrAnimateOption,\n};\n","import abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport Node from '../node/Node';\nimport Component from '../node/Component';\n\nlet { isNil, isFunction, isPrimitive, clone, extend } = util;\nlet { abbrCssProperty, abbrAnimateOption, abbrAnimate } = abbr;\n\n/**\n * 还原缩写到全称,涉及样式和动画属性,已过时\n * @param target 还原的对象\n * @param hash 缩写映射\n */\nfunction abbr2full(target, hash) {\n // 也许节点没写样式\n if(target) {\n Object.keys(target).forEach(k => {\n // var-attr格式特殊考虑,仅映射attr部分,var-还要保留\n if(k.indexOf('var-') === 0) {\n let k2 = k.slice(4);\n if(hash.hasOwnProperty(k2)) {\n let fk = hash[k2];\n target['var-' + fk] = target[k];\n // delete target[k];\n }\n }\n // 普通样式缩写还原\n else if(hash.hasOwnProperty(k)) {\n let fk = hash[k];\n target[fk] = target[k];\n // 删除以免二次解析\n delete target[k];\n }\n });\n }\n}\n\n/**\n * 链接json中的某个child到library文件,\n * props需要是clone的,因为防止多个child使用同一个库文件\n * children则直接引用,无需担心多个使用同一个\n * library也需要带上,在library直接子元素还包含library时会用到\n * @param child\n * @param libraryItem\n */\nfunction linkLibrary(child, libraryItem) {\n // 规定图层child只有init和动画,属性和子图层来自库\n child.tagName = libraryItem.tagName;\n child.props = clone(libraryItem.props) || {};\n child.children = libraryItem.children || [];\n if(libraryItem.vars && !child.vars) {\n child.vars = libraryItem.vars;\n }\n if(libraryItem.library) {\n child.library = libraryItem.library;\n }\n // library的var-也要继承过来,本身的var-优先级更高,目前只有children会出现优先级情况\n Object.keys(libraryItem).forEach(k => {\n if(k.indexOf('var-') === 0 && !child.hasOwnProperty(k)) {\n child[k] = libraryItem[k];\n }\n });\n // 删除以免二次解析\n delete child.libraryId;\n let init = child.init;\n if(init) {\n let props = child.props;\n let style = props.style;\n extend(props, init);\n // style特殊处理,防止被上面覆盖丢失原始值\n if(style) {\n extend(style, init.style);\n props.style = style;\n }\n // 删除以免二次解析\n delete child.init;\n }\n}\n\n/**\n * 遍历一遍library的一级,将一级的id存到hash上,无需递归二级,\n * 因为顺序前提要求排好且无循环依赖,所以被用到的一定在前面出现,\n * 一般是无children的元件在前,包含children的div在后\n * 即便library中的元素有children或library,在linkChild时将其link过去,parse递归会继续处理\n * @param item:library的一级孩子\n * @param hash:存放library的key/value引用\n */\nfunction initLibrary(item, hash) {\n let id = item.id;\n // library中一定有id,因为是一级,二级+特殊需求才会出现放开\n if(isNil(id)) {\n throw new Error('Library item miss id: ' + JSON.stringify(item));\n }\n else {\n hash[id] = item;\n }\n}\n\n// 有library的json一级初始化library供链接前,可以替换library里的内容\nfunction replaceLibraryVars(json, hash, vars) {\n // 新版同级vars语法,增加可以修改library子元素中递归子属性\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n delete json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // library.xxx,需要>=2的长度,开头必须是library\n if(Array.isArray(member) && member.length > 1 && vars && vars.hasOwnProperty(id)) {\n if(member[0] === 'library') {\n let target = hash;\n for(let i = 1, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n let old = target[k];\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(old);\n }\n // 直接替换library的子对象,需补充id和tagName\n if(i === 1) {\n target[k] = Object.assign({ id: old.id, tagName: old.tagName }, v);\n }\n // 替换library中子对象的一个属性直接赋值\n else {\n target[k] = v;\n }\n }\n // 子属性继续下去\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Library slot miss ' + k);\n return;\n }\n }\n }\n }\n });\n }\n // 兼容老版var-,只支持一级library元素\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-library.') === 0) {\n let v = json[k];\n delete json[k];\n if(!v || !vars) {\n return;\n }\n let k2 = k.slice(12);\n // 有id且变量里面传入了替换的值\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n if(isFunction(value)) {\n value = value(v);\n }\n // library对象也要加上id,与正常的library保持一致\n hash[k2] = Object.assign({ id: k2 }, value);\n }\n }\n });\n }\n}\n\nfunction replaceVars(json, vars) {\n if(json) {\n // 新版vars语法\n if(json.hasOwnProperty('vars')) {\n let slot = json.vars;\n delete json.vars;\n if(!Array.isArray(slot)) {\n slot = [slot];\n }\n if(Array.isArray(slot)) {\n slot.forEach(item => {\n let { id, member } = item;\n if(!Array.isArray(member)) {\n member = [member];\n }\n // 排除特殊的library\n if(Array.isArray(member) && member.length && member[0] !== 'library' && vars && vars.hasOwnProperty(id)) {\n let target = json;\n for(let i = 0, len = member.length; i < len; i++) {\n let k = member[i];\n // 最后一个属性可以为空\n if(target.hasOwnProperty(k) || i === len - 1) {\n // 最后一个member表达式替换\n if(i === len - 1) {\n let v = vars[id];\n // undefined和null意义不同\n if(v === undefined) {\n return;\n }\n // 支持函数模式和值模式\n if(isFunction(v)) {\n v = v(target[k]);\n }\n target[k] = v;\n }\n else {\n target = target[k];\n }\n }\n else {\n inject.error('Slot miss ' + k);\n return;\n }\n }\n }\n });\n }\n }\n else {\n Object.keys(json).forEach(k => {\n if(k.indexOf('var-') === 0) {\n let v = json[k];\n delete json[k];\n if(!v || !vars) {\n return;\n }\n let k2 = k.slice(4);\n // 有id且变量里面传入了替换的值,值可为null,因为某些情况下空为自动\n if(k2 && v.id && vars.hasOwnProperty(v.id)) {\n let value = vars[v.id];\n // undefined和null意义不同\n if(value === undefined) {\n return;\n }\n let target = json;\n // 如果有.则特殊处理子属性\n if(k2.indexOf('.') > -1) {\n let list = k2.split('.');\n let len = list.length;\n for(let i = 0; i < len - 1; i++) {\n k2 = list[i];\n // 避免异常\n if(target[k2]) {\n target = target[k2];\n }\n else {\n inject.warn('parseJson vars is not exist: ' + v.id + ', ' + k + ', ' + list.slice(0, i).join('.'));\n return;\n }\n }\n k2 = list[len - 1];\n }\n // 支持函数模式和值模式\n if(isFunction(value)) {\n value = value(v);\n }\n target[k2] = value;\n }\n }\n });\n }\n }\n}\n\n// parse的options可以传总的duration等\nfunction replaceAnimateOptions(options, opt) {\n ['iterations', 'fill', 'duration', 'direction', 'easing', 'fps', 'delay', 'endDelay', 'playbackRate', 'spfLimit'].forEach(k => {\n if(opt.hasOwnProperty(k)) {\n options[k] = opt[k];\n }\n });\n}\n\nfunction apply(json, opt, hash) {\n if(isPrimitive(json) || json instanceof Node || json instanceof Component) {\n return json;\n }\n if(Array.isArray(json)) {\n return json.map(item => apply(item, opt, hash));\n }\n // 先判断是否是个链接到库的节点,是则进行链接操作\n let libraryId = json.libraryId;\n if(!isNil(libraryId)) {\n let libraryItem = hash[libraryId];\n // 规定图层child只有init和动画,tagName和属性和子图层来自库\n if(libraryItem) {\n linkLibrary(json, libraryItem);\n }\n else {\n throw new Error('Link library miss id: ' + libraryId);\n }\n }\n // 再判断是否有library形成一个新的作用域,会出现library下的library使得一个链接节点链接后出现library的情况\n let library = json.library;\n if(Array.isArray(library)) {\n hash = {};\n library.forEach(item => initLibrary(item, hash));\n // 替换library插槽\n replaceLibraryVars(json, hash, opt.vars);\n delete json.library;\n }\n let { tagName, props = {}, children = [], animate = [] } = json;\n if(!tagName) {\n throw new Error('Dom must have a tagName: ' + JSON.stringify(json));\n }\n // 缩写src和font\n let src = props.src;\n if(/^#\\d+$/.test(src)) {\n let imgs = opt.imgs, i = parseInt(src.slice(1));\n if(Array.isArray(imgs)) {\n props.src = imgs[i];\n }\n }\n let style = props.style;\n if(style) {\n let fontFamily = style.fontFamily;\n if(/^#\\d+$/.test(fontFamily)) {\n let fonts = opt.fonts, i = parseInt(fontFamily.slice(1));\n if(Array.isArray(fonts)) {\n style.fontFamily = fonts[i];\n }\n }\n (opt.abbr !== false) && abbr2full(style, abbrCssProperty);\n // 先替换style的\n replaceVars(style, opt.vars);\n }\n // 再替换静态属性,style也作为属性的一种\n replaceVars(props, opt.vars);\n // 替换children里的内容,如文字,无法直接替换tagName/props/children/animate本身,因为下方用的还是原引用\n replaceVars(json, opt.vars);\n json.children = apply(children, opt, hash);\n if(animate) {\n if(!Array.isArray(animate)) {\n animate = [animate];\n }\n animate.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrAnimate);\n let { value, options } = item;\n // 忽略空动画\n if(Array.isArray(value) && value.length) {\n value.forEach(item => {\n (opt.abbr !== false) && abbr2full(item, abbrCssProperty);\n replaceVars(item, opt.vars);\n });\n }\n if(options) {\n (opt.abbr !== false) && abbr2full(options, abbrAnimateOption);\n replaceVars(options, opt.vars);\n replaceAnimateOptions(options, opt);\n }\n });\n }\n return json;\n}\n\n// 将library、vars应用于json,转换json为一个普通的原始json数据\nexport default function(json, options = {}) {\n // json中定义无abbr\n if(json.abbr === false) {\n options.abbr = false;\n }\n if(options.abbr !== false) {\n inject.warn('Abbr in json is deprecated');\n }\n // 特殊单例声明无需clone加速解析\n if(!options.singleton && !json.singleton) {\n json = util.clone(json);\n }\n return apply(json, options, {});\n}\n","import parse from './parse';\nimport abbr from './abbr';\nimport inject from '../util/inject';\nimport util from '../util/util';\nimport font from '../style/font';\nimport Controller from '../animate/Controller';\nimport apply from './apply';\n\nlet o = {\n apply,\n parse(karas, json, dom, options) {\n if(!json) {\n return;\n }\n // 根节点的fonts字段定义字体信息\n let fonts = json.fonts;\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let { fontFamily, url, data } = item;\n if(fontFamily && (url || data)) {\n font.register(fontFamily, url, data);\n }\n });\n }\n // 重载,在确定dom传入选择器字符串或html节点对象时作为渲染功能,否则仅创建vd返回\n if(!inject.isDom(dom)) {\n options = options || dom || {};\n dom = null;\n }\n else {\n options = options || {};\n }\n json = apply(json, options);\n // 暂存所有动画声明,等root的生成后开始执行\n let animateRecords = [];\n let vd = parse(karas, json, animateRecords, 0, null);\n // 有dom时parse作为根方法渲染\n if(dom) {\n let { tagName } = json;\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) === -1) {\n throw new Error('Parse dom must be canvas/svg/webgl');\n }\n // parse直接(非递归)的动画记录\n let ac = options.controller instanceof Controller ? options.controller : vd.animateController;\n // 第一次render,收集递归json里面的animateRecords,它在xom的__layout最后生成\n karas.render(vd, dom);\n // 直接的json里的animateRecords,再加上递归的parse的json的(第一次render布局时处理)动画一并播放\n if(options.autoPlay !== false) {\n ac.__records = ac.__records.concat(animateRecords);\n ac.__playAuto();\n }\n // 不自动播放进入记录列表,初始化并等待手动调用\n else {\n ac.__records2 = ac.__records2.concat(animateRecords);\n ac.init(ac.__records2, ac.list2);\n }\n }\n // 递归的parse,如果有动画,此时还没root,先暂存下来,等上面的root的render第一次布局时收集\n else {\n if(animateRecords.length) {\n vd.__animateRecords = {\n options,\n list: animateRecords,\n controller: options.controller instanceof Controller ? options.controller : null,\n };\n }\n }\n return vd;\n },\n loadAndParse(karas, json, dom, options) {\n let { fonts, components, imgs } = json;\n let list1 = [];\n let list2 = [];\n let list3 = [];\n if(fonts) {\n if(!Array.isArray(fonts)) {\n fonts = [fonts];\n }\n fonts.forEach(item => {\n let url = item.url;\n if(url) {\n list1.push(item);\n }\n });\n }\n if(components) {\n if(!Array.isArray(components)) {\n components = [components];\n }\n components.forEach(item => {\n let { tagName, url, reload } = item;\n // 如果没申明reload且已经被注册,则无需重复加载\n if(tagName && karas.Component.hasRegister(tagName) && !reload) {\n return;\n }\n // 即便没有tagName也要加载,可能组件内部执行了注册逻辑\n if(url) {\n list2.push(item);\n }\n });\n }\n if(imgs) {\n if(!Array.isArray(imgs)) {\n imgs = [imgs];\n }\n imgs.forEach(item => {\n let url = item.url;\n if(url) {\n list3.push(url);\n }\n });\n }\n let a = list1.length, b = list2.length, c = list3.length;\n let count = 0;\n let cb = function() {\n if(count === a + b + c) {\n let res = o.parse(karas, json, dom, options);\n if(options && util.isFunction(options.callback)) {\n options.callback(res);\n }\n }\n };\n if(a || b || c) {\n karas.inject.loadFont(list1, function() {\n count += a;\n cb();\n });\n karas.inject.loadComponent(list2.map(item => item.url), function() {\n count += b;\n // 默认约定加载的js组件会在全局变量申明同名tagName,已有不覆盖,防止组件代码内部本身有register\n list2.forEach(item => {\n let tagName = item.tagName;\n if(tagName && window[tagName] && !karas.Component.hasRegister(tagName)) {\n karas.Component.register(tagName, window[tagName]);\n }\n });\n cb();\n });\n karas.inject.measureImg(list3, function() {\n count += c;\n cb();\n });\n }\n else {\n cb();\n }\n },\n abbr,\n};\n\nexport default o;\n","import css from './css';\nimport reset from './reset';\nimport unit from './unit';\nimport font from './font';\nimport abbr from './abbr';\nimport transform from './transform';\n\nexport default {\n css,\n reset,\n unit,\n font,\n abbr,\n transform,\n};\n","import Animation from './Animation';\nimport Controller from './Controller';\nimport easing from './easing';\nimport frame from './frame';\n\nexport default {\n Animation,\n Controller,\n easing,\n frame,\n};\n","import matrix from './matrix';\nimport geom from './geom';\n\n// 一条边相对于自己开始点的x向量角度,即从x到此边旋转,0~180和-180~0,需要判断象限\nfunction calDeg(x1, y1, x2, y2) {\n let dx = x2 - x1;\n let dy = y2 - y1;\n let atan = Math.atan(Math.abs(dy) / Math.abs(dx));\n // 2象限\n if(dx < 0 && dy >= 0) {\n return Math.PI - atan;\n }\n // 3象限\n if(dx < 0 && dy < 0) {\n return atan - Math.PI;\n }\n // 1象限\n if(dx >= 0 && dy >= 0) {\n return atan;\n }\n // 4象限,顺时针正好\n return -atan;\n}\n\nfunction rotate(theta) {\n let sin = Math.sin(theta);\n let cos = Math.cos(theta);\n let t = matrix.identity();\n t[0] = t[5] = cos;\n t[1] = sin;\n t[4] = -sin;\n return t;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param points\n */\nfunction pointIndex(points) {\n let [x1, y1, x2, y2, x3, y3] = points;\n let index = [0, 1, 2];\n // 将a点放入最左\n if(x2 < x1 && x2 < x3) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n index[0] = 1;\n index[1] = 0;\n }\n else if(x3 < x2 && x3 < x1) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n index[0] = 2;\n index[2] = 0;\n }\n // 有可能出现2个并列的情况,判断取上面那个\n if(x1 === x2) {\n if(y1 > y2) {\n [x1, y1, x2, y2] = [x2, y2, x1, y1];\n let t = index[0];\n index[0] = index[1];\n index[1] = t;\n }\n }\n else if(x1 === x3) {\n if(y1 > y3) {\n [x1, y1, x3, y3] = [x3, y3, x1, y1];\n let t = index[0];\n index[0] = index[2];\n index[2] = t;\n }\n }\n // ab到ac要顺时针旋转,即2个向量夹角为正,用向量叉乘判断正负\n let cross = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);\n if(cross < 0) {\n [x2, y2, x3, y3] = [x3, y3, x2, y2];\n let t = index[1];\n index[1] = index[2];\n index[2] = t;\n }\n return [x1, y1, x2, y2, x3, y3, index];\n}\n\n/**\n * 第2个点根据第一个点的交换顺序交换\n * @param points\n * @param index\n * @returns {[]}\n */\nfunction pointByIndex(points, index) {\n let res = [];\n for(let i = 0, len = index.length; i < len; i++) {\n let j = index[i];\n res.push(points[j * 2]);\n res.push(points[j * 2 + 1]);\n }\n return res;\n}\n\n/**\n * 确保3个点中,a点在三角形左上方,b/c在右方,同时ab到ac要顺时针旋转\n * @param source 源3个点\n * @param target 目标3个点\n * @returns 交换顺序后的点坐标\n */\nfunction exchangeOrder(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3, index] = pointIndex(source);\n let [tx1, ty1, tx2, ty2, tx3, ty3] = pointByIndex(target, index);\n return [\n [sx1, sy1, sx2, sy2, sx3, sy3],\n [tx1, ty1, tx2, ty2, tx3, ty3]\n ];\n}\n\n/**\n * 存在一种情况,变换结果使得三角形镜像相反了,即顶点a越过bc线,判断是否溢出\n * @param source\n * @param target\n * @returns {boolean}是否溢出\n */\nfunction isOverflow(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n let cross1 = (sx2 - sx1) * (sy3 - sy1) - (sx3 - sx1) * (sy2 - sy1);\n let cross2 = (tx2 - tx1) * (ty3 - ty1) - (tx3 - tx1) * (ty2 - ty1);\n return cross1 > 0 && cross2 < 0 || cross1 < 0 && cross2 > 0;\n}\n\nfunction transform(source, target) {\n let [sx1, sy1, sx2, sy2, sx3, sy3] = source;\n let [tx1, ty1, tx2, ty2, tx3, ty3] = target;\n // 记录翻转\n let overflow = isOverflow(source, target);\n // 第0步,将源三角第1个a点移到原点\n let m = matrix.identity();\n m[12] = -sx1;\n m[13] = -sy1;\n let t;\n // 第1步,以第1条边ab为基准,将其贴合x轴上,为后续倾斜不干扰做准备\n let theta = calDeg(sx1, sy1, sx2, sy2);\n if(theta !== 0) {\n t = rotate(-theta);\n m = matrix.multiply(t, m);\n }\n // 第2步,以第1条边AB为基准,缩放x轴ab至目标相同长度,可与4步合并\n let ls = geom.pointsDistance(sx1, sy1, sx2, sy2);\n let lt = geom.pointsDistance(tx1, ty1, tx2, ty2);\n // if(ls !== lt) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[0] = scale;\n // m = matrix.multiply(t, m);\n // }\n // 第3步,缩放y,先将目标三角形旋转到x轴平行,再变换坐标计算\n let n = matrix.identity();\n n[12] = -tx1;\n n[13] = -ty1;\n theta = calDeg(tx1, ty1, tx2, ty2);\n // 记录下这个旋转角度,后面源三角形要反向旋转\n let alpha = theta;\n if(theta !== 0) {\n t = rotate(-theta);\n n = matrix.multiply(t, n);\n }\n // 目标三角反向旋转至x轴后的坐标\n // 源三角目前的第3点坐标y值即为长度,因为a点在原点0无需减去\n let ls2 = Math.abs(matrix.calPoint({ x: sx3, y: sy3 }, m).y);\n let lt2 = Math.abs(matrix.calPoint({ x: tx3, y: ty3 }, n).y);\n // 缩放y\n // if(ls2 !== lt2) {\n // let scale = lt / ls;\n // t = matrix.identity();\n // t[3] = scale;\n // m = matrix.multiply(t, m);\n // }\n if(ls !== lt || ls2 !== lt2) {\n t = matrix.identity();\n if(ls !== lt) {\n t[0] = lt / ls;\n }\n if(ls2 !== lt2) {\n t[5] = lt2 / ls2;\n }\n m = matrix.multiply(t, m);\n }\n // 第4步,x轴倾斜,用余弦定理求目前a和A的夹角\n n = m;\n let { x: ax1, y: ay1 } = matrix.calPoint({ x: sx1, y: sy1 }, n);\n let { x: ax2, y: ay2 } = matrix.calPoint({ x: sx2, y: sy2 }, n);\n let { x: ax3, y: ay3 } = matrix.calPoint({ x: sx3, y: sy3 }, n);\n let ab = geom.pointsDistance(ax1, ay1, ax2, ay2);\n let ac = geom.pointsDistance(ax1, ay1, ax3, ay3);\n let bc = geom.pointsDistance(ax3, ay3, ax2, ay2);\n let AB = geom.pointsDistance(tx1, ty1, tx2, ty2);\n let AC = geom.pointsDistance(tx1, ty1, tx3, ty3);\n let BC = geom.pointsDistance(tx3, ty3, tx2, ty2);\n let a = geom.angleBySide(bc, ab, ac);\n let A = geom.angleBySide(BC, AB, AC);\n // 先至90°,再旋转至目标角,可以合并成tan相加,不知道为什么不能直接tan倾斜差值角度\n if(a !== A) {\n t = matrix.identity();\n t[4] = Math.tan(a - Math.PI * 0.5) + Math.tan(Math.PI * 0.5 - A);\n m = matrix.multiply(t, m);\n }\n // 发生翻转时特殊处理按x轴垂直翻转\n if(overflow) {\n m[1] = -m[1];\n m[5] = -m[5];\n m[13] = -m[13];\n }\n // 第5步,再次旋转,角度为目标旋转到x轴的负值,可与下步合并\n if(alpha !== 0) {\n t = rotate(alpha);\n // m = matrix.multiply(t, m);\n }\n else {\n t = matrix.identity();\n }\n // 第6步,移动第一个点的差值\n // t = matrix.identity();\n t[12] = tx1;\n t[13] = ty1;\n return matrix.multiply(t, m);\n}\n\nexport default {\n exchangeOrder,\n isOverflow,\n transform,\n};\n","import matrix from './matrix';\nimport tar from './tar';\nimport vector from './vector';\nimport equation from './equation';\nimport geom from './geom';\nimport bezier from './bezier';\nimport isec from './isec';\n// import { union, diff, intersection, xor } from './martinez';\nimport bo from './bo/index';\n\nexport default {\n matrix,\n tar,\n vector,\n equation,\n geom,\n bezier,\n isec,\n booleanOperations: bo,\n};\n","import level from './level';\nimport change from './change';\nimport Page from './Page';\nimport Cache from './Cache';\nimport CanvasPage from './CanvasPage';\nimport CanvasCache from './CanvasCache';\nimport webgl from '../gl/webgl';\n\nexport default {\n level,\n change,\n Page,\n Cache,\n CanvasPage,\n CanvasCache,\n webgl,\n};\n","import Node from './node/Node';\nimport Text from './node/Text';\nimport Xom from './node/Xom';\nimport Dom from './node/Dom';\nimport Img from './node/Img';\nimport Root from './node/Root';\nimport tag from './node/tag';\nimport mode from './refresh/mode';\nimport Geom from './node/geom/Geom';\nimport Line from './node/geom/Line';\nimport Polyline from './node/geom/Polyline';\nimport Polygon from './node/geom/Polygon';\nimport Sector from './node/geom/Sector';\nimport Rect from './node/geom/Rect';\nimport Circle from './node/geom/Circle';\nimport Ellipse from './node/geom/Ellipse';\nimport Component from './node/Component';\nimport Event from './util/Event';\nimport util from './util/util';\nimport inject from './util/inject';\nimport enums from './util/enums';\nimport debug from './util/debug';\nimport parser from './parser/index';\nimport style from './style/index';\nimport animate from './animate/index';\nimport math from './math/index';\nimport refresh from './refresh/index';\nimport { version } from '../package.json';\nimport ca from './gl/ca';\n\nGeom.register('$line', Line);\nGeom.register('$polyline', Polyline);\nGeom.register('$polygon', Polygon);\nGeom.register('$sector', Sector);\nGeom.register('$rect', Rect);\nGeom.register('$circle', Circle);\nGeom.register('$ellipse', Ellipse);\n\nlet karas = {\n version,\n render(root, dom) {\n if(!(root instanceof Root)) {\n throw new Error('Render dom must be canvas/svg/webgl');\n }\n if(dom) {\n root.appendTo(dom);\n }\n return root;\n },\n createElement(tagName, props) {\n props = props || {};\n let children = [];\n for(let i = 2, len = arguments.length; i < len; i++) {\n children.push(arguments[i]);\n }\n if(util.isString(tagName)) {\n if(tagName.charAt(0) === '$') {\n return this.createGm(tagName, props);\n }\n else if(/^[A-Z]/.test(tagName)) {\n return this.createCp(tagName, props, children);\n }\n else {\n return this.createVd(tagName, props, children);\n }\n }\n else if(tagName) {\n // 特殊的$匿名类\n if(tagName instanceof Geom || tagName.prototype && tagName.prototype instanceof Geom) {\n return this.createGm(tagName, props);\n }\n return this.createCp(tagName, props, children);\n }\n },\n createVd(tagName, props, children = []) {\n if(['canvas', 'svg', 'webgl'].indexOf(tagName) > -1) {\n return new Root(tagName, props, children);\n }\n if(tag.TAG_NAME.hasOwnProperty(tagName)) {\n if(tagName === 'img') {\n return new Img(tagName, props);\n }\n else {\n return new Dom(tagName, props, children);\n }\n }\n throw new Error(`Can not use <${tagName}>`);\n },\n createGm(tagName, props) {\n let klass = Geom.getRegister(tagName);\n if(!util.isString(tagName)) {\n let s = /^function ([\\w$]+)/.exec(tagName.toString());\n if(s && s.length > 1) {\n tagName = s[1];\n }\n }\n return new klass(tagName, props);\n },\n createCp(tagName, props, children = []) {\n let klass = Component.getRegister(tagName);\n props.children = children; // 特例,cp的children通过props传入\n return new klass(props);\n },\n parse(json, dom, options) {\n return parser.parse(this, json, dom, options);\n },\n loadAndParse(json, dom, options) {\n return parser.loadAndParse(this, json, dom, options);\n },\n mode,\n Component,\n Node,\n Text,\n Geom,\n Xom,\n Dom,\n Img,\n Root,\n Event,\n util,\n inject,\n style,\n parser,\n animate,\n math,\n refresh,\n enums,\n ca,\n get debug() {\n return debug.flag;\n },\n set debug(v) {\n debug.flag = !!v;\n },\n};\n\nif(typeof window !== 'undefined') {\n window.karas = karas;\n}\nelse if(typeof self !== 'undefined') {\n self.karas = karas;\n}\n\nexport default karas;\n"],"names":["Node","__x","__y","__width","__height","__baseline","__verticalBaseline","__prev","__next","__parent","__domParent","__root","__host","__hostRoot","__virtualDom","__bbox","__filterBbox","__isDestroyed","lv","j","__struct","node","childIndex","diff","CANVAS","SVG","WEBGL","AUTO","PX","PERCENT","NUMBER","INHERIT","DEG","STRING","RGBA","REM","EM","VW","VH","VMAX","VMIN","GRADIENT","o","calUnit","v","n","parseFloat","test","u","identity","multiply","a","b","isE","c","i","a0","a1","a2","a3","multiplyTfo","m","x","y","tfoMultiply","d","h","l","p","multiplyTranslateX","multiplyTranslateY","multiplyTranslateZ","multiplyRotateX","sin","Math","cos","e","f","g","k","multiplyRotateY","multiplyRotateZ","multiplySkewX","tan","multiplySkewY","multiplyScaleX","multiplyScaleY","multiplyScaleZ","multiplyPerspective","max","calPoint","point","z","w","undefined","b1","c1","d1","b2","c2","d2","b3","c3","d3","a4","b4","c4","d4","inverse","length","inverse4","divisor","s","inv","det","m2m6","point2d","slice","calRectPoint","xa","ya","xb","yb","matrix","x1","y1","z1","w1","x3","y3","z3","w3","x2","y2","z2","w2","x4","y4","z4","w4","t","toString","isType","type","obj","call","isObject","isString","isFunction","isNumber","isBoolean","isDate","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","Object","isNil","joinSourceArray","arr","res","len","item","Array","isArray","stringify","encodeHtml","prop","replace","joinVirtualDom","vd","defs","forEach","joinDef","bb","joinVd","conClip","children","props","tagName","content","opacity","transform","visibility","mask","overflow","filter","mixBlendMode","def","uuid","joinItem","rgba2int","color","charAt","push","parseInt","match","int2rgba","floor","int2invert","joinArr","arr2hash","hash","list","keys","hash2arr","clone","util","Date","isPlainObject","equalArr","ai","bi","isArrayA","isArrayB","equal","getTime","extend","target","source","split","transformBbox","bbox","dx","dy","mx","min","proto","getPrototypeOf","Ctor","constructor","assignMatrix","prefixHex","replaceRgba2Hex","$0","$1","$2","$3","$4","isPrimitive","isAuto","flag","SPF","SUPPORT_OFFSCREEN_CANVAS","OffscreenCanvas","prototype","getContext","offscreenCanvas","key","width","height","message","debug","document","createElement","style","setAttribute","body","appendChild","ctx","canvas","enabled","available","release","globalAlpha","setTransform","clearRect","removeChild","IMG","INIT","LOADING","LOADED","FONT","COMPONENT","div","SUPPORT_FONT","defaultFontFamilyData","createDiv","position","left","top","whiteSpace","inject","measureTextSync","str","ff","fs","fw","isUpright","fontFamily","fontSize","fontWeight","writingMode","innerHTML","window","getComputedStyle","measureTextListMax","cns","childNodes","measureImg","url","cb","count","cache","error","state","success","task","img","Image","onload","splice","onerror","substr","host","exec","location","hostname","crossOrigin","src","warn","console","requestAnimationFrame","bind","setTimeout","cancelAnimationFrame","id","clearTimeout","now","performance","hasOffscreenCanvas","getOffscreenCanvas","isDom","Element","self","getElementsByTagName","isWebGLTexture","WebGLTexture","defaultFontFamily","getFontCanvas","checkSupportFontFamily","toLowerCase","context","textAlign","fillStyle","textBaseline","font","fillText","getImageData","data","loadFont","ab","FontFace","load","then","fonts","add","ArrayBuffer","request","XMLHttpRequest","open","responseType","response","send","loadComponent","script","async","head","TINF_OK","TINF_DATA_ERROR","Tree","table","Uint16Array","trans","Data","dest","sourceIndex","tag","bitcount","destLen","ltree","dtree","sltree","sdtree","length_bits","Uint8Array","length_base","dist_bits","dist_base","clcidx","code_tree","lengths","tinf_build_bits_base","bits","base","delta","first","sum","tinf_build_fixed_trees","lt","dt","offs","tinf_build_tree","off","num","tinf_getbit","bit","tinf_read_bits","val","tinf_decode_symbol","cur","tinf_decode_trees","hlit","hdist","hclen","clen","sym","prev","tinf_inflate_block_data","dist","tinf_inflate_uncompressed_block","invlength","tinf_uncompress","bfinal","btype","Error","subarray","getTag","dataView","offset","String","fromCharCode","getInt8","getUShort","getUint16","getULong","getUint32","getFixed","decimal","getInt16","fraction","parseOpenTypeTableEntries","numTables","tableEntries","checksum","compression","parseWOFFTableEntries","compLength","origLength","compressedLength","uncompressTable","tableEntry","inBuffer","buffer","outBuffer","inflate","byteLength","view","DataView","Parser","relativeOffset","minorBase","major","minor","parse","arrayBuffer","signature","flavor","emSquare","ascent","descent","lineGap","parseVersion","parseFixed","parseULong","parseUShort","abs","parseShort","CALLBACK","info","arial","lhr","blr","lgr","helvetica","verdana","tahoma","georgia","simsun","support","checked","register","name","fontInfo","r","opentype","setData","pop","__emitFontRegister","assign","hasRegister","hasLoaded","onRegister","offRegister","indexOf","DOM","display","boxSizing","right","bottom","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","lineHeight","backgroundImage","backgroundColor","backgroundSize","backgroundRepeat","backgroundPositionX","backgroundPositionY","backgroundClip","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderTopStyle","borderRightStyle","borderBottomStyle","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","flexGrow","flexShrink","flexBasis","flexDirection","flexWrap","order","justifyContent","alignItems","alignSelf","alignContent","letterSpacing","transformOrigin","zIndex","translateX","translateY","translateZ","scaleX","scaleY","scaleZ","skewX","skewY","rotateX","rotateY","rotateZ","rotate3d","perspective","perspectiveOrigin","transformStyle","backfaceVisibility","boxShadow","pointerEvents","textOverflow","lineClamp","textStrokeWidth","textStrokeColor","textStrokeOver","fontSizeShrink","GEOM","fill","stroke","strokeWidth","strokeDasharray","strokeLinecap","strokeLinejoin","strokeMiterlimit","fillRule","DOM_ENTRY_SET","DOM_KEY_SET","GEOM_ENTRY_SET","GEOM_KEY_SET","INHERIT_KEY_SET","VALID_STRING_VALUE","isValid","gradient","dotProduct","dotProduct3","crossProduct","crossProduct3","unitize","unitize3","length3","isParallel","isZero","ag","angle","PI","isParallel3","isZero3","angle3","acos","sqrt","pow","getPerpendicularVector3","STYLE_KEY","POSITION","DISPLAY","TOP","RIGHT","BOTTOM","LEFT","MARGIN_TOP","MARGIN_RIGHT","MARGIN_BOTTOM","MARGIN_LEFT","PADDING_TOP","PADDING_RIGHT","PADDING_BOTTOM","PADDING_LEFT","FONT_SIZE","FONT_FAMILY","COLOR","FONT_STYLE","FONT_WEIGHT","LINE_HEIGHT","BACKGROUND_IMAGE","BACKGROUND_COLOR","BACKGROUND_SIZE","BACKGROUND_REPEAT","BACKGROUND_POSITION_X","BACKGROUND_POSITION_Y","BORDER_TOP_WIDTH","BORDER_RIGHT_WIDTH","BORDER_BOTTOM_WIDTH","BORDER_LEFT_WIDTH","BORDER_TOP_COLOR","BORDER_RIGHT_COLOR","BORDER_BOTTOM_COLOR","BORDER_LEFT_COLOR","BORDER_TOP_STYLE","BORDER_RIGHT_STYLE","BORDER_BOTTOM_STYLE","BORDER_LEFT_STYLE","BORDER_TOP_LEFT_RADIUS","BORDER_TOP_RIGHT_RADIUS","BORDER_BOTTOM_RIGHT_RADIUS","BORDER_BOTTOM_LEFT_RADIUS","WIDTH","HEIGHT","FLEX_GROW","FLEX_SHRINK","FLEX_BASIS","FLEX_DIRECTION","JUSTIFY_CONTENT","ALIGN_ITEMS","ALIGN_SELF","TEXT_ALIGN","TRANSFORM_ORIGIN","VISIBILITY","OPACITY","Z_INDEX","TRANSFORM","TRANSLATE_X","TRANSLATE_Y","TRANSLATE_Z","SCALE_X","SCALE_Y","SCALE_Z","SKEW_X","SKEW_Y","ROTATE_X","ROTATE_Y","ROTATE_Z","ROTATE_3D","PERSPECTIVE","PERSPECTIVE_ORIGIN","FILTER","BOX_SHADOW","POINTER_EVENTS","OVERFLOW","MIX_BLEND_MODE","BACKGROUND_CLIP","WHITE_SPACE","TEXT_OVERFLOW","LETTER_SPACING","LINE_CLAMP","ORDER","FLEX_WRAP","ALIGN_CONTENT","TEXT_STROKE_WIDTH","TEXT_STROKE_COLOR","TEXT_STROKE_OVER","WRITING_MODE","TRANSFORM_STYLE","BACKFACE_VISIBILITY","BOX_SIZING","FONT_SIZE_SHRINK","FILL","STROKE","STROKE_WIDTH","STROKE_DASHARRAY","STROKE_DASHARRAY_STR","STROKE_LINECAP","STROKE_LINEJOIN","STROKE_MITERLIMIT","FILL_RULE","MATRIX","BORDER_TOP","BORDER_RIGHT","BORDER_BOTTOM","BORDER_LEFT","TRANSLATE_PATH","STYLE2LOWER_MAP","style2Lower","toUpperCase","STYLE2UPPER_MAP","style2Upper","STYLE_R_KEY","STYLE_RV_KEY","STYLE_V_KEY","k2","ELLIPSIS","H","vector","enums","deg","pointInConvexPolygon","vertexes","xmax","ymax","xmin","ymin","pointInQuadrilateral","angleBySide","theta","sideByAngle","alpha","pointsDistance","triangleIncentre","ellipsePoints","ox","oy","sectorPoints","begin","end","h2","d2r","atan","rx","ry","p1","p2","p4","p3","concat","temp","getRectsIntersection","isRectsOverlap","ax1","ay1","ax4","ay4","bx1","by1","bx4","by4","includeIntersect","isRectsInside","calCoordsInNode","px","py","computedStyle","calPercentInNode","ds","Infinity","r2d","pointOnCircle","getPlainNormalEquation","points","getConicGradientImage","originX","originY","stop","getAngle","increasingList","map","start","factor","idx","canvasPolygon","moveTo","lineTo","quadraticCurveTo","bezierCurveTo","svgPolygon","canvasLine","controlA","controlB","svgLine","canvasFilter","svgFilter","geom","unit","painter","calFitDashed","total","bs","be","smin","smax","dmin","dmax","ps","pd","outer","per","free","mo","calDashed","m1","m2","m3","m4","bw","calPoints","borderWidth","borderStyle","deg1","deg2","direction","beginRadius","endRadius","isLast","main1","main2","cross1","cross2","calTopRadiusPoints","calRightRadiusPoints","calBottomRadiusPoints","calLeftRadiusPoints","pointsList","brx","bry","erx","ery","oxl","oxr","beginList","centerList","endList","beginLength","needInner","crossDeg","rx1","ry1","sx1","oyl","rx2","ry2","sx2","ca","calBezierTopLeft","controls1","controls2","limit","endLength","oyr","calBezierTopRight","sx","isStart","crossDx","p1x","p1y","p2x","p2y","dx1","dsx1","dx2","dsx2","cpx2","cpy2","cpx1","cpy1","crossDsx","beta","tanBetaDiv2Sqrt","tanAlphaHalf","degTg","degTg1","cdx1","cdy1","cx1","cy1","degTg2","cdx2","cdy2","cx2","cy2","isEnd","oyt","oyb","oxt","calBezierRightTop","oxb","calBezierRightBottom","calBezierBottomLeft","calBezierBottomRight","calBezierLeftTop","calBezierLeftBottom","calRadius","btlr","btrr","bbrr","bblr","need","btlx","btly","btrx","btry","bbrx","bbry","bblx","bbly","BR_KS","calBorderRadius","currentStyle","root","noRadius","next","half","calBorderRadiusInline","contentBoxList","last","isEllipsis","outerWidth","outerHeight","renderBorder","xom","renderMode","mode","beginPath","closePath","virtualDom","getLinearDeg","getRadialPosition","center","getColorStop","firstColor","dr","dg","db","da","unshift","calLinearCoords","cx","cy","x0","y0","calCircleCentre","iw","ih","positionX","positionY","calRadialRadius","shape","size","xl","yl","tx","ty","asin","ratio","parseGradient","reg","i5","i6","i7","percent","getLinear","coords","l1","l2","l3","l4","r1","getRadial","scx","scy","getConic","calConicRadius","renderConic","isInline","border","offscreen","imgData","putImageData","save","clip","drawImage","restore","parseFlex","grow","shrink","basis","parseMarginPadding","parseOneBorder","margin","padding","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","background","backgroundPosition","flex","translate","translate3d","scale","scale3d","rotate","skew","textStroke","toFull","bgc","bgi","bgr","bgp","gd","repeat","join","isEmpty","v2","isColorKey","isLengthKey","isExpandKey","isGradientKey","isRadiusKey","RESET_DOM","reset","RESET_GEOM","addGeom","ks","isIgnore","isGeom","isRepaint","kernelSize","sigma","outerSize","outerSizeByD","gaussianWeight","E","change","isGradient","TRANSFORM_HASH","compatibleTransform","camel","convertStringValue","normalize","resetList","abbr","flexFlow","k1","arr1","arr2","k3","arr3","isNaN","item2","setFontStyle","specialFontSize","getBaseline","calFontFamily","normal","calNormalLineHeight","getVerticalBaseline","calRelativePercent","parent","domParent","calRelative","isWidth","isRelativeOrAbsolute","equalStyle","oa","ob","av","bv","avj","bvj","aa","ad","bd","isArrayD1","isArrayD2","ap","bp","aj","bj","ac","bc","isMulti","cloneStyle","vv","spreadBoxShadow","yt","xr","spread","inset","blur","spreadFilter","calRotateX","calRotateY","calRotateZ","calRotate3d","rlen","nc","xy","yz","zx","xs","ys","zs","calMatrix","ow","oh","calSingleValue","calMatrixByOrigin","calMatrixWithOrigin","__computedStyle","calPerspectiveMatrix","ppt","isPerspectiveMatrix","TuOrU","TextBox","index","__index","__content","__parentLineBox","__isVertical","cacheStyle","dom","css","__endX","__endY","me","matrixEvent","dev1","dev2","overFill","cjk","strokeText","measureText","nowCjk","__gradient","__bx1","__by1","__bx2","__by2","baseline","verticalBaseline","CHAR","Ellipsis","text","__x1","__y1","__text","__ellipsis","__fitFontSize","TX","TY","TZ","OP","FT","PPT","SX","SY","SZ","RZ","TF","NONE","CACHE","TRANSLATE","SCALE","TRANSFORM_ALL","MASK","REPAINT","REFLOW","REBUILD","ENUM","isTransforms","contain","value","exclude","getLevel","isReflow","measureLineWidth","ew","perW","hypotheticalNum","rw","newLine","measure","fitFontSize","mw","round","reduce","getFontKey","ls","Text","__textBoxes","__charWidth","__textWidth","__bp","__widthHash","__limitCache","__hasContent","__cache","lx","ly","lineBoxManager","endSpace","lineClampCount","textBoxes","maxW","beginSpace","lineCount","mainCoords","isTextOverflow","textWidth","containerSize","__lineBack","textBox","addItem","verticalLineHeight","ew2","lineBox","isNewLine","tb","__layoutNone","__resetLb","ep","tbs","mbp","isLayout","__offsetX","__offsetY","firstCharWidth","lineWidth","strokeStyle","render","__addUpdate","level","isShadowRoot","hostRoot","__children","__zIndexChildren","__deleteStruct","__destroy","updateContent","fontKey","charWidth","__currentStyle","__style","__cacheStyle","__matrix","__matrixEvent","__perspectiveMatrix","Event","__eHash","handle","on","apply","__karasEventCb","once","emit","event","fns","fn","REGISTER","Component","__tagName","__ref","__isMounted","__taskList","sr","__shadowRoot","listener","componentDidMount","REFRESH","ref","componentWillUnmount","__shadow","force","shadowRoot","__emitEvent","defineProperty","get","arguments","getInlineBox","leading","bcStart","bcEnd","pbStart","pbEnd","bx2","by2","getInlineWidth","contentBox","matrixResize","imgWidth","imgHeight","targetWidth","targetHeight","renderBgc","method","__cacheDefs","renderImage","loadBgi","bgW","bgH","bgX","bgY","needMask","xnl","xnr","ynt","ynb","ceil","image","needResize","copy","traversalBefore","__before","traversalAfter","__after","isPause","Frame","__rootTask","__task","__now","__init","__karasFramecb","offFrame","onFrame","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","Float32Array","A","aA1","aA2","B","C","calcBezier","aT","getSlope","binarySubdivide","aX","aA","aB","mX1","mX2","currentX","currentT","newtonRaphsonIterate","aGuessT","currentSlope","LinearEasing","bezier","mY1","mY2","sampleValues","getTForX","intervalStart","currentSample","lastSample","guessForT","initialSlope","BezierEasing","easing","linear","easeIn","easeOut","ease","easeInOut","cubicBezier","getEasing","v1","v3","timingFunction","Controller","__records","__records2","__list","__list2","__onList","__lastTime","args","records","animate","areaStart","areaDuration","isDestroyed","options","autoPlay","onList","list2","time","timestamp","init","__action","__mergeAuto","__on","__set","genBeforeRefresh","aniParams","allInFn","framing","duration","es","translatePath","transition","fixed","lastPercent","calByUnit","container","calDiff","cl","st","pm","nm","has","pv","nv","pvv","nvv","clientHeight","clientWidth","pi","ni","offsetHeight","offsetWidth","pp","nn","parentComputedStyle","calDiffGradient","len2","pv2","nv2","len3","pv3","nv3","eq","isArrP","isArrN","pz","nz","np","calFrame","hasTp","ts","cs","CAL_HASH","hasZ","hasColor","hasTsColor","hasTsWidth","hasTsOver","optimize","ea","steps","stepsD","calTransform","calFilter","calOrigin","calPosition","calBoxShadow","calBgSize","calNumber","calPath","calLength","calGradient","calColor","frame","clv","cv","st2","cli","calLastStyle","currentProps","__currentProps","gotoOverload","animation","frameCb","FRAME","__isChange","__firstPlay","PLAY","__playCb","Animation","__id","nl","__options","op","__begin","__playState","__target","__firstEnter","iterations","frames","framesR","originStyle","__frames","__framesR","__keys","__originStyle","__isDelay","__outBeginDelay","__playCount","fps","spfLimit","delay","endDelay","playbackRate","__currentFrames","reverse","alternateReverse","controller","addControl","__timestamp","unify","inherit","calTransition","isFinish","__cancelTask","__nextTime","__currentTime","__delay","__duration","__iterations","__endDelay","playState","__hasFin","__hasCancel","__enterFrame","__direction","__fpsTime","__startTime","__end","__fps","currentFrames","stayBegin","__stayBegin","stayEnd","__stayEnd","__areaStart","__areaDuration","__playbackRate","__spfLimit","currentTime","lastFrame","__currentFrame","dur","__inFps","currentFrame","playCount","isEven","isLastCount","frameTime","binarySearch","isLastFrame","inEndDelay","notSameFrame","needClean","__nextEnd","__finished","calIntermediateStyle","playCb","__clean","BEGIN","END","FINISH","silence","pending","PAUSE","play","CANCEL","__goto","isFrame","excludeDelay","finish","spf","alternate","animateController","__animateController","remove","removeControl","__checkModify","__fill","backwards","both","forwards","__easing","current","getProps","__outerWidth","__outerHeight","tf","middle","modify","calIncrease","o2","n2","renderBoxShadow","box","spreadBox","cross","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","blurBox","mbmName","isValidMbm","mbm","getFirstEmptyInlineWidth","flowChildren","child","Xom","__isInline","getLastEmptyInlineWidth","__listener","addEventListener","__animationList","__loadBgi","isClip","__clip","__mask","__refreshLevel","__opacity","__frameAnimateList","__contentBoxList","__cacheAsBitmap","cacheAsBitmap","__cacheTotal","__cacheFilter","__cacheMask","__layoutData","__hasComputeReflow","__fontRegister","__hasMask","hasMask","__calSize","includePercent","isRoot","ph","crs","fontRegister","__clientWidth","__offsetWidth","__clientHeight","__offsetHeight","isDirectionRow","isDirectItem","isAbs","isColumn","isRow","__layoutFlow","__computeReflow","__isIbFull","__isUprightIbFull","clearCache","__mp","__layoutFlex","__layoutInline","__layoutBlock","__x2","__x3","__x4","__x5","__x6","__y2","__y3","__y4","__y5","__y6","__oy","__execAr","__calStyle","__calPerspective","ar","__animateRecords","__playAuto","__reset0","h3","isParentVertical","fixedWidth","fixedHeight","selfEndSpace","isReplaced","matrixCache","sy","__calMatrix","__selfPerspective","__selfPerspectiveMatrix","ct","tfo","__calFilter","bgI","kw","rebuild","po","offscreenBlend","offscreenMask","offscreenFilter","offscreenOverflow","origin","borderList","x5","x6","y5","y6","isRealInline","hasBgi","some","svgBgSymbol","inline","bg","isFirst","lastContentBox","lastLineBox","parentLineBox","ix1","iy1","ix2","iy2","symbol","clearAnimate","clearFrameAnimate","__stopPropagation","__stopImmediatePropagation","willResponseEvent","hasEmitMask","ignore","inThis","__touchstartTarget","__getLg","__getRg","__getCg","lg","createLinearGradient","addColorStop","rg","createRadialGradient","onlyTotal","clearTopCache","formatStyle","updateFormatStyle","cancel","enter","includeBbox","__env","LineBox","__lineHeight","__isUpright","__bOffset","increase","isAlign","__ox","LineBoxManager","__lastX","__lastY","__max","__domList","__domStack","__isNewLine","__isEnd","__spreadList","nextNewLine","genLineBox","spreadList","verticalAlign","__setLB","endX","endY","bOffset","TAG_NAME","INLINE","BOLD","Geom","__isMulti","multi","__cacheProps","isDirectChild","main","isFixed","__addMBP","__layoutStyle","__preLayout","tw","th","__ioSize","__marginAuto","__hasXomContent","empty","strokeDasharrayStr","lineCap","lineJoin","miterLimit","getLineDash","setLineDash","preData","__preSet","fills","fillRules","strokes","strokeWidths","strokeDasharrays","strokeDasharrayStrs","strokeLinecaps","strokeLinejoins","strokeMiterlimits","__renderOnePolygon","isFillCE","isStrokeCE","isFillRE","isStrokeRE","__conicGradient","__drawPolygon","__radialEllipse","isFill","isStroke","__preSetCanvas","__propsStrokeStyle","__inversePtList","getTransform","clearSvgCache","getMergeMargin","topList","bottomList","isFixedWidthOrHeight","isFixedSize","includeParentFlex","getPrevMergeMargin","mtList","mbList","getNextMergeMargin","offsetNext","parentFixed","absList","checkTop","addDom","removeDom","isSiblingBlock","checkNext","cps","isLastAbs","isNowAbs","isLastNone","isNowNone","isLast0","oldH","svg","t1","t2","hasFlowPrev","isText","__updateStruct","__layoutAbs","ld","__layout","isNow0","t3","t4","nowH","isRemoveSelf","__resizeY","buildChildren","flatten","relation","hoc","buildRoot","genZIndexChildren","hasMc","mcHash","lastMaskIndex","__iIndex","__zIndex","__aIndex","sort","genOrderChildren","__order","backtrack","__backtrack","Dom","block","inlineBlock","none","builder","__flexLine","zIndexChildren","__structure","struct","__structs","nss","structs","needSort","__tryLayInline","isContent","fixedSize","countMin","countMax","isR","__calBasis","min2","max2","__lineBoxManager","maxSize","countSize","mergeMarginEndList","mergeMarginStartList","ignoreNextLine","ignoreNextWrap","isXom","isInlineBlock","__isRealInline","lastLineClampCount","reflow","setNotEnd","lastX","lastY","setNewLine","isNone","isEmptyBlock","__resizeX","isLastBlock","hasStart","isBlock","horizonAlign","__inlineSize","domList","growList","shrinkList","basisList","maxList","minList","orderChildren","cw","isMultiLine","line","hypotheticalList","hypothetical","maxCrossList","marginAutoCountList","freeList","__layoutFlexLine","maxCross","marginAutoCount","crossSum","crossSumList","between","around","__flexAlign","flexLine","hypotheticalSum","isOverflow","targetMainList","lessOne","factorSum","factorList","needReset","factorSum2","count1","count2","lbmList","needGenAr","firstBaseline","old","genLineBoxByInlineIfNewLine","setLbByInlineIfNotNewLine","pushContentBoxList","isIbFull","isUprightIbFull","hasAddEndSpace","isInline2","isInlineBlock2","addY","addX","popContentBoxList","maxX","maxY","minX","minY","maxCX","maxCY","minCX","minCY","maxFX","maxFY","minFX","minFY","maxOX","maxOY","minOX","minOY","absChildren","onlyRight","onlyBottom","fixedTop","fixedRight","fixedBottom","fixedLeft","widthLimit","heightLimit","__insertStruct","Cache","rootId","page","pos","__uuid","__renderMode","__ctx","__rootId","__page","__pos","getCoords","__size","__tx1","__ty1","__tx2","__ty2","__enabled","__available","__appendData","dbx","dby","update","__update","clear","del","klass","getInstance","texture","cacheKlass","pageKlass","excludePage","UNIT","MAX","HASH","Page","number","__number","grid","__grid","Int32Array","unitSize","getFreePos","MAX_TEXTURE_SIZE","initShaders","gl","vshader","fshader","program","createProgram","enable","BLEND","blendFunc","ONE","ONE_MINUS_SRC_ALPHA","vertexShader","loadShader","VERTEX_SHADER","fragmentShader","FRAGMENT_SHADER","attachShader","linkProgram","linked","getProgramParameter","LINK_STATUS","getProgramInfoLog","deleteProgram","deleteShader","shader","createShader","shaderSource","compileShader","compiled","getShaderParameter","COMPILE_STATUS","getShaderInfoLog","convertCoords2Gl","tz","createTexture","tex","bindTexture","pixelStorei","UNPACK_FLIP_Y_WEBGL","UNPACK_PREMULTIPLY_ALPHA_WEBGL","texImage2D","TEXTURE_2D","UNSIGNED_BYTE","texParameteri","TEXTURE_WRAP_S","CLAMP_TO_EDGE","TEXTURE_WRAP_T","TEXTURE_MIN_FILTER","LINEAR","TEXTURE_MAG_FILTER","activeTexture","lastVtPoint","lastVtTex","lastVtOpacity","drawTextureCache","vtPoint","vtTex","vtOpacity","tx1","ty1","tx2","ty2","genTexture","bx","by","pointBuffer","createBuffer","bindBuffer","ARRAY_BUFFER","bufferData","STATIC_DRAW","a_position","getAttribLocation","vertexAttribPointer","FLOAT","enableVertexAttribArray","texBuffer","a_texCoords","opacityBuffer","a_opacity","u_texture","getUniformLocation","uniform1i","drawArrays","TRIANGLES","deleteBuffer","disableVertexAttribArray","drawBlur","tex1","useProgram","viewport","u_direction","recycle","tex2","framebufferTexture2D","FRAMEBUFFER","COLOR_ATTACHMENT0","uniform2f","tex3","deleteTexture","drawCm","h1","u_m","uniform1fv","drawOverflow","bbox1","bbox2","drawMask","texBuffer1","a_texCoords1","texBuffer2","a_texCoords2","u_texture1","u_texture2","drawMbm","drawDropShadow","frameBuffer","u_color","drawDropShadowMerge","dy1","dy2","drawTex2Cache","drawCache2Tex","drawSameSize","programSs","u_opacity","uniform1f","drawOitPlane","isPuzzle","pHash","tHash","z0","w0","tx0","ty0","hashP","hashT","CanvasPage","__offscreen","webgl","CanvasCache","oldX1","widthNew","heightNew","callback","cacheMask","genSingle","globalCompositeOperation","drawCache","dbx2","dby2","bboxNew","ImgWebglCache","loadImg","Img","__loadImg","loading","__loadAndRefresh","placeholder","onlyImg","showError","pts","__addGeom","reload","updateSrc","Defs","cacheHash","elem","ovd","nvd","diffDefs","diffBb","diffD2D","od","nd","ol","diffDef","removeAt","insertAt","insertAdjacentHTML","parentNode","removeAttribute","diffItem","diffChild","diffD2G","replaceWith","diffT2T","diffG2D","diffG2G","diffItemSelf","diffX2X","diffByLessLv","firstChild","lastChild","obb","nbb","html","where","insertBefore","OFFSCREEN_OVERFLOW","OFFSCREEN_FILTER","OFFSCREEN_MASK","OFFSCREEN_BLEND","OFFSCREEN_MASK2","applyOffscreen","rect","TOLERANCE","getLinearRoot","coefs","result","getQuadraticRoots","results","getCubicRoots","c0","discrim","halfB","tmp","distance","atan2","sqrt3","getQuarticRoots","resolveRoots","plus","minus","getRoots","degree","equation","ACCURACY","getDerivativeCoefs","derivative","evaluate","bisection","minValue","maxValue","tmp1","log","tmp2","LN10","iters","LN2","getRootsInInterval","roots","derivativeCoefs","droots","intersectBezier2Bezier2","ax2","ay2","ax3","ay3","bx3","by3","c12","c11","c10","c22","c21","c20","v0","v4","v5","v6","xRoots","yRoots","checkRoots","xRoot","intersectBezier3Bezier3","c13","c23","c10x2","c10x3","c10y2","c10y3","c11x2","c11x3","c11y2","c11y3","c12x2","c12x3","c12y2","c12y3","c13x2","c13x3","c13y2","c13y3","c20x2","c20x3","c20y2","c20y3","c21x2","c21x3","c21y2","c22x2","c22x3","c22y2","c23x2","c23x3","c23y2","c23y3","intersectBezier2Bezier3","intersectBezier2Line","minbx","minby","maxbx","maxby","dot","lerp","p5","p6","intersectBezier3Line","p7","p8","p9","p10","intersectLineLine3","limitToFiniteSegment","tolerance","p13","subtractPoint","p43","p21","d1343","d4321","d1321","d4343","d2121","denom","numer","mua","mub","pa","pb","distanceTo","intersectPt","divide","addPoint","paramA","closestParam","paramB","from","to","startToP","startToEnd","startEnd2","startEnd_startP","intersectPlanePlane","v9","mb","invDet","v11","v12","v13","v21","v22","v23","v31","v32","v33","pointOnLine3","v1x","v1y","v1z","v2x","v2y","v2z","isec","shadow","puzzle","xShadow","xBbox","yShadow","yBbox","zShadow","zBbox","splitQuadrilateralPlane","xList","plane","belong","eventHash","seg","eventList","HISTORY","ael","elLen","isVisited","isDeleted","pointsA","pointsB","resA","resB","splitPlaneByLine","scan","willEnd","checkIsec","i1","i2","p0","r2","onVertex1","onVertex2","va","vb","r0","getPercentXY","ipx","ipy","sortPuzzleZ","eventHashX","eventHashY","puzzleHash","cz","eventListX","eventListY","hashX","hashY","zHash","listX","listY","TexturePage","TextureCache","texSubImage2D","ImgCanvasCache","__canvas","MBM","DOM_RENDER","IMG_RENDER","GEOM_RENDER","getCache","genBboxTotal","isPpt","bboxTotal","mergeBbox","__computedStyle2","countMaskNum","__cache2","__cacheTotal2","__cacheFilter2","__cacheMask2","genTotal","ctxTotal","matrixList","parentMatrix","lastMatrix","lastLv","maskStartHash","offscreenHash","mh","__calOffscreen","genTotalOther","needGen","genFilter","genMask","opacityList","parentOpacity","lastOpacity","genFrameBufferWithTexture","createFramebuffer","bindFramebuffer","genTotalWebgl","W","pptNode","oitHash","lastPage","cacheTotal","ppt2","oit","genMbmWebgl","deleteFramebuffer","genPptWebgl","mergeHash","mergeList","isFlat","isTopFlat","planeList","genFilterWebgl","genBlurWebgl","genDropShadowWebgl","rotation","cosR","sinR","genColorMatrixWebgl","amount","oneMinusAmount","genBlurShader","weights","vert","frag","vertexBlur","fragmentBlur","getParameter","MAX_VARYING_VECTORS","programCm","genMaskWebgl","programClip","programMask","programDs","bboxMerge","programMbmMp","programMbmSr","programMbmOl","programMbmDk","programMbmLt","programMbmCd","programMbmCb","programMbmHl","programMbmSl","programMbmDf","programMbmEx","programMbmHue","programMbmSt","programMbmCl","programMbmLm","resTex","resFrameBuffer","renderSvg","rlv","maskEffectHash","hasEffectMask","addCache","maskHash","vdList","parentVd","lastRefreshLv","lastNode","mChildren","ivs","hasTransform","removeCache","renderWebgl","lastRefreshLevel","hasMbm","flatList","flatExtendList","pptNodeList","parentPptNode","lastPptNode","parentFlat","parentExtendFlat","isMbm","hasContent","calContent","isFilter","ii","renderCanvas","msh","antialias","premultipliedAlpha","preserveDrawingBuffer","depth","ROOT_DOM_NAME","getDom","querySelector","renderProp","EVENT_LIST","initEvent","Root","__wrapEvent","__cb","removeEvent","removeEventListener","__dom","__mw","__mh","__freeze","mix","__rlv","__lastUpdateP","domName","__scx","__scy","getBoundingClientRect","touches","clientX","clientY","stopPropagation","stopImmediatePropagation","preventDefault","__hasEmitted","__initProps","nodeName","__genHtml","destroy","domCss","getPropertyValue","params","contextAttributes","__defs","webgl2","__initShader","draw","__eventCbList","vertex","fragment","vertexMask","fragmentMask","fragmentClip","programOverflow","vertexOverflow","fragmentOverflow","vertexCm","fragmentCm","vertexDs","fragmentDs","vertexMbm","fragmentMultiply","fragmentScreen","fragmentOverlay","fragmentDarken","fragmentLighten","fragmentColorDodge","fragmentColorBurn","fragmentHardLight","fragmentSoftLight","fragmentDifference","fragmentExclusion","fragmentHue","fragmentSaturation","fragmentColor","fragmentLuminosity","vertexSs","fragmentSs","__checkRoot","wm","__reLayout","noRender","__clearCanvas","__vd","domDiff","__clearWebgl","updateStyle","includeIgnore","path","zPath","__index__","karas","path2","zPath2","focus","hasVisibility","hasDisplay","hasRelease","isRp","__frameDraw","nextFrame","clearColor","COLOR_BUFFER_BIT","bboxBezier2","qx","qy","bboxBezier3","ax","ay","hx","hy","q","bboxBezier","norm","simpson38","derivativeFunc","middleL","middleR","adaptiveSimpson38","eps","mid","sl","ans","bezierLength","startT","endT","at","at3","at2","derivativeOrder","pointAtBezier","maxIteration","pointAtBezierWithLength","targetLen","approachLen","approachT","preApproachT","derivative1","derivative2","numerator","denominator","sliceBezier","pts0","pts1","pts2","pts3","x12","y12","x23","y23","x123","y123","x34","y34","x234","y234","x1234","y1234","sliceBezier2Both","pointAtByT","pointAtByT3","pointAtByT2","getPointT","getPointT3","getPointT2","xt","bezierSlope","bezier2Slope","bezier3Slope","reBuild","reBuildC","curveNum","getNewPoint","Line","__xa","__ya","__xb","__yb","__controlA","__controlB","__start","__buildCache","curve","bezierBox","Point","Segment","calBbox","myFill","otherFill","myCoincide","otherCoincide","toHash","EPS","EPS2","getIntersectionLineLine","toSource","toClip","getIntersectionBezier2Line","getIntersectionBezier2Bezier2","getIntersectionBezier2Bezier3","getIntersectionBezier3Line","getIntersectionBezier3Bezier3","sortIntersection","isSource","intersect","Polygon","regions","segments","vertices","startPoint","firstPoint","curr","endPoint","compare","cPoint","getBezierMonotonicity","curve1","curve2","cPoint1","cPoint2","lastPoint","lastT","genHashXList","findIntersection","polyA","polyB","isIntermediateA","isIntermediateB","genHashXYList","aelA","aelB","hashA","hashB","hc","isAboveLast","segAboveCompare","isAbove","inside","compareBelong","delList","shift","bboxA","coordsA","lenA","bboxB","coordsB","lenB","isSourceReverted","inters","overs","checkOverlapLine","checkOverlapBezier","activeNewSeg","ra","rb","sliceSegment","isIntermediate","ns","putHashX","hashXY","putHashXY","pointAboveOrOnLine","pt","segA","segB","la","lb","getYByX","isX","isY","firstA","firstB","lastA","lastB","conditionA","conditionB","conditionC","startA","endA","startB","endB","equalBezier","over","chains","chain","isHead","tail","ptHead","ptTail","close","coords2","clockwise","area","prefix","polygon","trivial","polygonA","polygonB","selfIntersect","intersect2","annotate2","INTERSECT","UNION","SUBTRACT","SUBTRACT_REV","XOR","intermediate","union","subtract","subtractRev","xor","bo","subtract2","Polyline","__points","__controls","controls","booleanOperations","__booleanOperations","isControl","rebuildSE","__getPoints","__needRebuildSE","__concatPointAndControl","__getLength","__getNewList","__reprocessing","start2","end2","__getIndex","isStartLt0","isEndGt1","prePercent","control","__renderPolygon","pointList","controlList","getR","dft","Sector","__r","edge","__edge","closure","__closure","sList","__renderOneSector","genVertex","Rect","__rx","__ry","Circle","Ellipse","my","json","animateRecords","JSON","createGm","cp","getRegister","createCp","createVd","fullCssProperty","abbrCssProperty","os","fullAnimate","abbrAnimate","fullAnimateOption","abbrAnimateOption","abbr2full","fk","linkLibrary","libraryItem","vars","library","libraryId","initLibrary","replaceLibraryVars","slot","member","replaceVars","replaceAnimateOptions","opt","imgs","singleton","loadAndParse","components","list1","list3","calDeg","pointIndex","pointByIndex","exchangeOrder","sy1","sy2","sx3","sy3","tx3","ty3","ls2","lt2","AB","AC","BC","tar","version","appendTo","parser","math","refresh"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAMA;EACJ,SAAc,IAAA,GAAA;IACZ,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;IACA,IAAKC,CAAAA,GAAL,GAAW,CAAX,CAAA;IACA,IAAKC,CAAAA,OAAL,GAAe,CAAf,CAAA;IACA,IAAKC,CAAAA,QAAL,GAAgB,CAAhB,CAAA;IACA,IAAKC,CAAAA,UAAL,GAAkB,CAAlB,CAAA;IACA,IAAKC,CAAAA,kBAAL,GAA0B,CAA1B,CAAA;IACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;IACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;IACA,IAAKC,CAAAA,QAAL,GAAgB,IAAhB,CAAA;IACA,IAAKC,CAAAA,WAAL,GAAmB,IAAnB,CAAA;IACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;IACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;IACA,IAAKC,CAAAA,UAAL,GAAkB,IAAlB,CAAA;IACA,IAAKC,CAAAA,YAAL,GAAoB,IAApB,CAAA;IACA,IAAKC,CAAAA,MAAL,GAAc,IAAd,CAAA;IACA,IAAKC,CAAAA,YAAL,GAAoB,IAApB,CAAA;IACA,IAAKC,CAAAA,aAAL,GAAqB,IAArB,CAAA;AACD,GAAA;;;;WAED,SAAYC,WAAAA,CAAAA,EAAZ,EAAgBC,CAA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IAAI,EAAJA,IAjFU;AAkFV2E,EAAAA,MAAM,EAANA,MAlFU;AAmFV3B,EAAAA,KAAK,EAALA,KAnFU;AAoFVktF,EAAAA,MAAM,EAANA,CApFU;AAqFVxkD,EAAAA,OAAO,EAAPA,OArFU;AAsFVykD,EAAAA,IAAI,EAAJA,IAtFU;AAuFVC,EAAAA,OAAO,EAAPA,OAvFU;AAwFVnvE,EAAAA,KAAK,EAALA,KAxFU;AAyFVyI,EAAAA,EAAE,EAAFA,EAzFU;;AA0FV,EAAA,IAAI7mB,KAAJ,GAAY;IACV,OAAOA,KAAK,CAACX,IAAb,CAAA;GA3FQ;;EA6FV,IAAIW,KAAJ,CAAUhN,CAAV,EAAa;AACXgN,IAAAA,KAAK,CAACX,IAAN,GAAa,CAAC,CAACrM,CAAf,CAAA;AACD,GAAA;;AA/FS,EAAZ;;AAkGA,IAAG,OAAO0P,MAAP,KAAkB,WAArB,EAAkC;EAChCA,MAAM,CAAC+2E,KAAP,GAAeA,OAAf,CAAA;AACD,CAFD,MAGK,IAAG,OAAOv0E,IAAP,KAAgB,WAAnB,EAAgC;EACnCA,IAAI,CAACu0E,KAAL,GAAaA,OAAb,CAAA;AACD;;;;"}
\ No newline at end of file
diff --git a/index.js b/index.js
index 44893ecd..03ae5854 100644
--- a/index.js
+++ b/index.js
@@ -44788,7 +44788,7 @@
webgl: webgl
};
- var version = "0.84.7";
+ var version = "0.85.0";
Geom.register('$line', Line);
Geom.register('$polyline', Polyline);
diff --git a/package.json b/package.json
index 29843a23..5bfe4e0e 100755
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "karas",
- "version": "0.84.7",
+ "version": "0.85.0",
"description": "A flexible JavaScript framework for RIA on Canvas/Svg/Webgl.",
"maintainers": [
{