@visactor/vtable-gantt 1.17.1-alpha.6 → 1.17.1-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1158,72 +1158,72 @@
1158
1158
  var eventemitter3Exports = eventemitter3.exports;
1159
1159
  var EventEmitter = /*@__PURE__*/getDefaultExportFromCjs(eventemitter3Exports);
1160
1160
 
1161
- const isType$2 = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
1162
- var isType$3 = isType$2;
1161
+ const isType$4 = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
1162
+ var isType$5 = isType$4;
1163
1163
 
1164
- const isBoolean$3 = function (value) {
1164
+ const isBoolean$5 = function (value) {
1165
1165
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1166
- return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$3(value, "Boolean");
1166
+ return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$5(value, "Boolean");
1167
1167
  };
1168
- var isBoolean$4 = isBoolean$3;
1168
+ var isBoolean$6 = isBoolean$5;
1169
1169
 
1170
- const isFunction$4 = value => "function" == typeof value;
1171
- var isFunction$5 = isFunction$4;
1170
+ const isFunction$6 = value => "function" == typeof value;
1171
+ var isFunction$7 = isFunction$6;
1172
1172
 
1173
- const isNil$2 = value => null == value;
1174
- var isNil$3 = isNil$2;
1173
+ const isNil$4 = value => null == value;
1174
+ var isNil$5 = isNil$4;
1175
1175
 
1176
- const isValid$2 = value => null != value;
1177
- var isValid$3 = isValid$2;
1176
+ const isValid$4 = value => null != value;
1177
+ var isValid$5 = isValid$4;
1178
1178
 
1179
- const isObject$7 = value => {
1179
+ const isObject$9 = value => {
1180
1180
  const type = typeof value;
1181
1181
  return null !== value && "object" === type || "function" === type;
1182
1182
  };
1183
- var isObject$8 = isObject$7;
1183
+ var isObject$a = isObject$9;
1184
1184
 
1185
- const isObjectLike$4 = value => "object" == typeof value && null !== value;
1186
- var isObjectLike$5 = isObjectLike$4;
1185
+ const isObjectLike$6 = value => "object" == typeof value && null !== value;
1186
+ var isObjectLike$7 = isObjectLike$6;
1187
1187
 
1188
- const isPlainObject$2 = function (value) {
1189
- if (!isObjectLike$5(value) || !isType$3(value, "Object")) return !1;
1188
+ const isPlainObject$4 = function (value) {
1189
+ if (!isObjectLike$7(value) || !isType$5(value, "Object")) return !1;
1190
1190
  if (null === Object.getPrototypeOf(value)) return !0;
1191
1191
  let proto = value;
1192
1192
  for (; null !== Object.getPrototypeOf(proto);) proto = Object.getPrototypeOf(proto);
1193
1193
  return Object.getPrototypeOf(value) === proto;
1194
1194
  };
1195
- var isPlainObject$3 = isPlainObject$2;
1195
+ var isPlainObject$5 = isPlainObject$4;
1196
1196
 
1197
1197
  const isUndefined = value => void 0 === value;
1198
1198
  var isUndefined$1 = isUndefined;
1199
1199
 
1200
- const isString$3 = function (value) {
1200
+ const isString$5 = function (value) {
1201
1201
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1202
1202
  const type = typeof value;
1203
- return fuzzy ? "string" === type : "string" === type || isType$3(value, "String");
1203
+ return fuzzy ? "string" === type : "string" === type || isType$5(value, "String");
1204
1204
  };
1205
- var isString$4 = isString$3;
1205
+ var isString$6 = isString$5;
1206
1206
 
1207
- const isArray$6 = value => Array.isArray ? Array.isArray(value) : isType$3(value, "Array");
1208
- var isArray$7 = isArray$6;
1207
+ const isArray$8 = value => Array.isArray ? Array.isArray(value) : isType$5(value, "Array");
1208
+ var isArray$9 = isArray$8;
1209
1209
 
1210
- const isArrayLike$2 = function (value) {
1210
+ const isArrayLike$4 = function (value) {
1211
1211
  return null !== value && "function" != typeof value && Number.isFinite(value.length);
1212
1212
  };
1213
- var isArrayLike$3 = isArrayLike$2;
1213
+ var isArrayLike$5 = isArrayLike$4;
1214
1214
 
1215
- const isDate$2 = value => isType$3(value, "Date");
1216
- var isDate$3 = isDate$2;
1215
+ const isDate$4 = value => isType$5(value, "Date");
1216
+ var isDate$5 = isDate$4;
1217
1217
 
1218
- const isNumber$3 = function (value) {
1218
+ const isNumber$5 = function (value) {
1219
1219
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1220
1220
  const type = typeof value;
1221
- return fuzzy ? "number" === type : "number" === type || isType$3(value, "Number");
1221
+ return fuzzy ? "number" === type : "number" === type || isType$5(value, "Number");
1222
1222
  };
1223
- var isNumber$4 = isNumber$3;
1223
+ var isNumber$6 = isNumber$5;
1224
1224
 
1225
- const isValidNumber = value => isNumber$4(value) && Number.isFinite(value);
1226
- var isValidNumber$1 = isValidNumber;
1225
+ const isValidNumber$2 = value => isNumber$6(value) && Number.isFinite(value);
1226
+ var isValidNumber$3 = isValidNumber$2;
1227
1227
 
1228
1228
  const isValidUrl = value => new RegExp(/^(http(s)?:\/\/)\w+[^\s]+(\.[^\s]+){1,}$/).test(value);
1229
1229
  var isValidUrl$1 = isValidUrl;
@@ -1231,60 +1231,60 @@
1231
1231
  const isBase64 = value => new RegExp(/^data:image\/(?:gif|png|jpeg|bmp|webp|svg\+xml)(?:;charset=utf-8)?;base64,(?:[A-Za-z0-9]|[+/])+={0,2}/g).test(value);
1232
1232
  var isBase64$1 = isBase64;
1233
1233
 
1234
- const getType = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
1235
- var getType$1 = getType;
1234
+ const getType$2 = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
1235
+ var getType$3 = getType$2;
1236
1236
 
1237
- const objectProto$5 = Object.prototype,
1238
- isPrototype = function (value) {
1237
+ const objectProto$6 = Object.prototype,
1238
+ isPrototype$2 = function (value) {
1239
1239
  const Ctor = value && value.constructor;
1240
- return value === ("function" == typeof Ctor && Ctor.prototype || objectProto$5);
1240
+ return value === ("function" == typeof Ctor && Ctor.prototype || objectProto$6);
1241
1241
  };
1242
- var isPrototype$1 = isPrototype;
1242
+ var isPrototype$3 = isPrototype$2;
1243
1243
 
1244
- const hasOwnProperty$5 = Object.prototype.hasOwnProperty;
1245
- function isEmpty(value) {
1246
- if (isNil$3(value)) return !0;
1247
- if (isArrayLike$3(value)) return !value.length;
1248
- const type = getType$1(value);
1244
+ const hasOwnProperty$6 = Object.prototype.hasOwnProperty;
1245
+ function isEmpty$1(value) {
1246
+ if (isNil$5(value)) return !0;
1247
+ if (isArrayLike$5(value)) return !value.length;
1248
+ const type = getType$3(value);
1249
1249
  if ("Map" === type || "Set" === type) return !value.size;
1250
- if (isPrototype$1(value)) return !Object.keys(value).length;
1251
- for (const key in value) if (hasOwnProperty$5.call(value, key)) return !1;
1250
+ if (isPrototype$3(value)) return !Object.keys(value).length;
1251
+ for (const key in value) if (hasOwnProperty$6.call(value, key)) return !1;
1252
1252
  return !0;
1253
1253
  }
1254
1254
 
1255
- const get$6 = (obj, path, defaultValue) => {
1256
- const paths = isString$4(path) ? path.split(".") : path;
1255
+ const get$8 = (obj, path, defaultValue) => {
1256
+ const paths = isString$6(path) ? path.split(".") : path;
1257
1257
  for (let p = 0; p < paths.length; p++) obj = obj ? obj[paths[p]] : void 0;
1258
1258
  return void 0 === obj ? defaultValue : obj;
1259
1259
  };
1260
- var get$7 = get$6;
1260
+ var get$9 = get$8;
1261
1261
 
1262
- const hasOwnProperty$4 = Object.prototype.hasOwnProperty,
1263
- has = (object, key) => null != object && hasOwnProperty$4.call(object, key);
1262
+ const hasOwnProperty$5 = Object.prototype.hasOwnProperty,
1263
+ has = (object, key) => null != object && hasOwnProperty$5.call(object, key);
1264
1264
  var has$1 = has;
1265
1265
 
1266
- function cloneDeep$1(value, ignoreWhen, excludeKeys) {
1266
+ function cloneDeep$2(value, ignoreWhen, excludeKeys) {
1267
1267
  let result;
1268
- if (!isValid$3(value) || "object" != typeof value || ignoreWhen && ignoreWhen(value)) return value;
1269
- const isArr = isArray$7(value),
1268
+ if (!isValid$5(value) || "object" != typeof value || ignoreWhen && ignoreWhen(value)) return value;
1269
+ const isArr = isArray$9(value),
1270
1270
  length = value.length;
1271
- result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$4(value) || isNumber$4(value) || isString$4(value) ? value : isDate$3(value) ? new Date(+value) : void 0;
1271
+ result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$6(value) || isNumber$6(value) || isString$6(value) ? value : isDate$5(value) ? new Date(+value) : void 0;
1272
1272
  const props = isArr ? void 0 : Object.keys(Object(value));
1273
1273
  let index = -1;
1274
1274
  if (result) for (; ++index < (props || value).length;) {
1275
1275
  const key = props ? props[index] : index,
1276
1276
  subValue = value[key];
1277
- excludeKeys && excludeKeys.includes(key.toString()) ? result[key] = subValue : result[key] = cloneDeep$1(subValue, ignoreWhen, excludeKeys);
1277
+ excludeKeys && excludeKeys.includes(key.toString()) ? result[key] = subValue : result[key] = cloneDeep$2(subValue, ignoreWhen, excludeKeys);
1278
1278
  }
1279
1279
  return result;
1280
1280
  }
1281
1281
 
1282
- function baseMerge$1(target, source) {
1282
+ function baseMerge$2(target, source) {
1283
1283
  let shallowArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
1284
1284
  let skipTargetArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
1285
1285
  if (source) {
1286
1286
  if (target === source) return;
1287
- if (isValid$3(source) && "object" == typeof source) {
1287
+ if (isValid$5(source) && "object" == typeof source) {
1288
1288
  const iterable = Object(source),
1289
1289
  props = [];
1290
1290
  for (const key in iterable) props.push(key);
@@ -1294,87 +1294,43 @@
1294
1294
  propIndex = -1;
1295
1295
  for (; length--;) {
1296
1296
  const key = props[++propIndex];
1297
- !isValid$3(iterable[key]) || "object" != typeof iterable[key] || skipTargetArray && isArray$7(target[key]) ? assignMergeValue$1(target, key, iterable[key]) : baseMergeDeep$1(target, source, key, shallowArray, skipTargetArray);
1297
+ !isValid$5(iterable[key]) || "object" != typeof iterable[key] || skipTargetArray && isArray$9(target[key]) ? assignMergeValue$2(target, key, iterable[key]) : baseMergeDeep$2(target, source, key, shallowArray, skipTargetArray);
1298
1298
  }
1299
1299
  }
1300
1300
  }
1301
1301
  }
1302
- function baseMergeDeep$1(target, source, key) {
1302
+ function baseMergeDeep$2(target, source, key) {
1303
1303
  let shallowArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
1304
1304
  let skipTargetArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
1305
1305
  const objValue = target[key],
1306
1306
  srcValue = source[key];
1307
1307
  let newValue = source[key],
1308
1308
  isCommon = !0;
1309
- if (isArray$7(srcValue)) {
1310
- if (shallowArray) newValue = [];else if (isArray$7(objValue)) newValue = objValue;else if (isArrayLike$3(objValue)) {
1309
+ if (isArray$9(srcValue)) {
1310
+ if (shallowArray) newValue = [];else if (isArray$9(objValue)) newValue = objValue;else if (isArrayLike$5(objValue)) {
1311
1311
  newValue = new Array(objValue.length);
1312
1312
  let index = -1;
1313
1313
  const length = objValue.length;
1314
1314
  for (; ++index < length;) newValue[index] = objValue[index];
1315
1315
  }
1316
- } else isPlainObject$3(srcValue) ? (newValue = null != objValue ? objValue : {}, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
1317
- isCommon && baseMerge$1(newValue, srcValue, shallowArray, skipTargetArray), assignMergeValue$1(target, key, newValue);
1316
+ } else isPlainObject$5(srcValue) ? (newValue = null != objValue ? objValue : {}, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
1317
+ isCommon && baseMerge$2(newValue, srcValue, shallowArray, skipTargetArray), assignMergeValue$2(target, key, newValue);
1318
1318
  }
1319
- function assignMergeValue$1(target, key, value) {
1320
- (void 0 !== value && !eq$3(target[key], value) || void 0 === value && !(key in target)) && (target[key] = value);
1319
+ function assignMergeValue$2(target, key, value) {
1320
+ (void 0 !== value && !eq$4(target[key], value) || void 0 === value && !(key in target)) && (target[key] = value);
1321
1321
  }
1322
- function eq$3(value, other) {
1322
+ function eq$4(value, other) {
1323
1323
  return value === other || Number.isNaN(value) && Number.isNaN(other);
1324
1324
  }
1325
- function merge$1(target) {
1325
+ function merge$2(target) {
1326
1326
  let sourceIndex = -1;
1327
1327
  const length = arguments.length <= 1 ? 0 : arguments.length - 1;
1328
1328
  for (; ++sourceIndex < length;) {
1329
- baseMerge$1(target, sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1], !0);
1329
+ baseMerge$2(target, sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1], !0);
1330
1330
  }
1331
1331
  return target;
1332
1332
  }
1333
1333
 
1334
- function pickWithout(obj, keys) {
1335
- if (!obj || !isPlainObject$3(obj)) return obj;
1336
- const result = {};
1337
- return Object.keys(obj).forEach(k => {
1338
- const v = obj[k];
1339
- let match = !1;
1340
- keys.forEach(itKey => {
1341
- (isString$4(itKey) && itKey === k || itKey instanceof RegExp && k.match(itKey)) && (match = !0);
1342
- }), match || (result[k] = v);
1343
- }), result;
1344
- }
1345
-
1346
- function objToString(obj) {
1347
- return Object.prototype.toString.call(obj);
1348
- }
1349
- function objectKeys(obj) {
1350
- return Object.keys(obj);
1351
- }
1352
- function isEqual(a, b, options) {
1353
- if (a === b) return !0;
1354
- if (typeof a != typeof b) return !1;
1355
- if (null == a || null == b) return !1;
1356
- if (Number.isNaN(a) && Number.isNaN(b)) return !0;
1357
- if (objToString(a) !== objToString(b)) return !1;
1358
- if (isFunction$5(a)) return !!(null == options ? void 0 : options.skipFunction);
1359
- if ("object" != typeof a) return !1;
1360
- if (isArray$7(a)) {
1361
- if (a.length !== b.length) return !1;
1362
- for (let i = a.length - 1; i >= 0; i--) if (!isEqual(a[i], b[i], options)) return !1;
1363
- return !0;
1364
- }
1365
- if (!isPlainObject$3(a)) return !1;
1366
- const ka = objectKeys(a),
1367
- kb = objectKeys(b);
1368
- if (ka.length !== kb.length) return !1;
1369
- ka.sort(), kb.sort();
1370
- for (let i = ka.length - 1; i >= 0; i--) if (ka[i] != kb[i]) return !1;
1371
- for (let i = ka.length - 1; i >= 0; i--) {
1372
- const key = ka[i];
1373
- if (!isEqual(a[key], b[key], options)) return !1;
1374
- }
1375
- return !0;
1376
- }
1377
-
1378
1334
  function keys$1(obj) {
1379
1335
  if (!obj) return [];
1380
1336
  if (Object.keys) return Object.keys(obj);
@@ -1402,14 +1358,14 @@
1402
1358
  }
1403
1359
 
1404
1360
  function array$1(arr) {
1405
- return isValid$3(arr) ? isArray$7(arr) ? arr : [arr] : [];
1361
+ return isValid$5(arr) ? isArray$9(arr) ? arr : [arr] : [];
1406
1362
  }
1407
- function last(val) {
1408
- if (isArrayLike$3(val)) {
1363
+ function last$1(val) {
1364
+ if (isArrayLike$5(val)) {
1409
1365
  return val[val.length - 1];
1410
1366
  }
1411
1367
  }
1412
- const maxInArray = (arr, compareFn) => {
1368
+ const maxInArray$1 = (arr, compareFn) => {
1413
1369
  var _a;
1414
1370
  if (0 === arr.length) return;
1415
1371
  let max = arr[0];
@@ -1419,7 +1375,7 @@
1419
1375
  }
1420
1376
  return max;
1421
1377
  };
1422
- const minInArray = (arr, compareFn) => {
1378
+ const minInArray$1 = (arr, compareFn) => {
1423
1379
  var _a;
1424
1380
  if (0 === arr.length) return;
1425
1381
  let min = arr[0];
@@ -1429,21 +1385,21 @@
1429
1385
  }
1430
1386
  return min;
1431
1387
  };
1432
- function arrayEqual(a, b) {
1433
- if (!isArray$7(a) || !isArray$7(b)) return !1;
1388
+ function arrayEqual$1(a, b) {
1389
+ if (!isArray$9(a) || !isArray$9(b)) return !1;
1434
1390
  if (a.length !== b.length) return !1;
1435
1391
  for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return !1;
1436
1392
  return !0;
1437
1393
  }
1438
1394
  function flattenArray(arr) {
1439
- if (!isArray$7(arr)) return [arr];
1395
+ if (!isArray$9(arr)) return [arr];
1440
1396
  const result = [];
1441
1397
  for (const value of arr) result.push(...flattenArray(value));
1442
1398
  return result;
1443
1399
  }
1444
1400
 
1445
1401
  function range$1(start, stop, step) {
1446
- isValid$3(stop) || (stop = start, start = 0), isValid$3(step) || (step = 1);
1402
+ isValid$5(stop) || (stop = start, start = 0), isValid$5(step) || (step = 1);
1447
1403
  let i = -1;
1448
1404
  const n = 0 | Math.max(0, Math.ceil((stop - start) / step)),
1449
1405
  range = new Array(n);
@@ -1470,7 +1426,7 @@
1470
1426
  }(LoggerLevel$1 || (LoggerLevel$1 = {}));
1471
1427
  let Logger$1 = class Logger {
1472
1428
  static getInstance(level, method) {
1473
- return Logger._instance && isNumber$4(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
1429
+ return Logger._instance && isNumber$6(level) ? Logger._instance.level(level) : Logger._instance || (Logger._instance = new Logger(level, method)), Logger._instance;
1474
1430
  }
1475
1431
  static setInstance(logger) {
1476
1432
  return Logger._instance = logger;
@@ -1545,7 +1501,7 @@
1545
1501
  function bisect$1(a, x) {
1546
1502
  let lo = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1547
1503
  let hi = arguments.length > 3 ? arguments[3] : undefined;
1548
- for (isNil$3(hi) && (hi = a.length); lo < hi;) {
1504
+ for (isNil$5(hi) && (hi = a.length); lo < hi;) {
1549
1505
  const mid = lo + hi >>> 1;
1550
1506
  ascending$1(a[mid], x) > 0 ? hi = mid : lo = mid + 1;
1551
1507
  }
@@ -1657,7 +1613,7 @@
1657
1613
  }
1658
1614
  return void 0 === timerId && (timerId = startTimer(timerExpired, wait)), result;
1659
1615
  }
1660
- return wait = +wait || 0, isObject$8(options) && (leading = !!options.leading, maxing = "maxWait" in options, maxing && (maxWait = Math.max(isValidNumber$1(options.maxWait) ? options.maxWait : 0, wait)), trailing = "trailing" in options ? !!options.trailing : trailing), debounced.cancel = function () {
1616
+ return wait = +wait || 0, isObject$a(options) && (leading = !!options.leading, maxing = "maxWait" in options, maxing && (maxWait = Math.max(isValidNumber$3(options.maxWait) ? options.maxWait : 0, wait)), trailing = "trailing" in options ? !!options.trailing : trailing), debounced.cancel = function () {
1661
1617
  void 0 !== timerId && function (id) {
1662
1618
  if (useRAF) return cancelAnimationFrame(id);
1663
1619
  clearTimeout(id);
@@ -1674,7 +1630,7 @@
1674
1630
  let leading = !0,
1675
1631
  trailing = !0;
1676
1632
  if ("function" != typeof func) throw new TypeError("Expected a function");
1677
- return isObject$8(options) && (leading = "leading" in options ? !!options.leading : leading, trailing = "trailing" in options ? !!options.trailing : trailing), debounce$2(func, wait, {
1633
+ return isObject$a(options) && (leading = "leading" in options ? !!options.leading : leading, trailing = "trailing" in options ? !!options.trailing : trailing), debounce$2(func, wait, {
1678
1634
  leading: leading,
1679
1635
  trailing: trailing,
1680
1636
  maxWait: wait
@@ -1745,10 +1701,10 @@
1745
1701
  return this.x = x, this.y = y, this;
1746
1702
  }
1747
1703
  add(point) {
1748
- return isNumber$4(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
1704
+ return isNumber$6(point) ? (this.x += point, void (this.y += point)) : (this.x += point.x, this.y += point.y, this);
1749
1705
  }
1750
1706
  sub(point) {
1751
- return isNumber$4(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
1707
+ return isNumber$6(point) ? (this.x -= point, void (this.y -= point)) : (this.x -= point.x, this.y -= point.y, this);
1752
1708
  }
1753
1709
  multi(point) {
1754
1710
  throw new Error("暂不支持");
@@ -1772,7 +1728,7 @@
1772
1728
  }
1773
1729
  }
1774
1730
 
1775
- function degreeToRadian(degree) {
1731
+ function degreeToRadian$1(degree) {
1776
1732
  return degree * (Math.PI / 180);
1777
1733
  }
1778
1734
  function radianToDegree(radian) {
@@ -1903,7 +1859,7 @@
1903
1859
  };
1904
1860
  }
1905
1861
  function toRect(box, isDeg) {
1906
- const deg = isDeg ? degreeToRadian(box.angle) : box.angle,
1862
+ const deg = isDeg ? degreeToRadian$1(box.angle) : box.angle,
1907
1863
  cp = getCenterPoint(box);
1908
1864
  return [rotatePoint({
1909
1865
  x: box.x1,
@@ -1929,10 +1885,10 @@
1929
1885
  BC = vector(rect1[1], rect1[2]),
1930
1886
  A1B1 = vector(rect2[0], rect2[1]),
1931
1887
  B1C1 = vector(rect2[1], rect2[2]),
1932
- deg11 = isDeg ? degreeToRadian(box1.angle) : box1.angle;
1933
- let deg12 = isDeg ? degreeToRadian(90 - box1.angle) : box1.angle + halfPi$1;
1934
- const deg21 = isDeg ? degreeToRadian(box2.angle) : box2.angle;
1935
- let deg22 = isDeg ? degreeToRadian(90 - box2.angle) : box2.angle + halfPi$1;
1888
+ deg11 = isDeg ? degreeToRadian$1(box1.angle) : box1.angle;
1889
+ let deg12 = isDeg ? degreeToRadian$1(90 - box1.angle) : box1.angle + halfPi$1;
1890
+ const deg21 = isDeg ? degreeToRadian$1(box2.angle) : box2.angle;
1891
+ let deg22 = isDeg ? degreeToRadian$1(90 - box2.angle) : box2.angle + halfPi$1;
1936
1892
  deg12 > pi2 && (deg12 -= pi2), deg22 > pi2 && (deg22 -= pi2);
1937
1893
  const isCover = (checkAxisRadius, deg, targetAxis1, targetAxis2) => {
1938
1894
  const checkAxis = [Math.cos(deg), Math.sin(deg)];
@@ -1941,14 +1897,14 @@
1941
1897
  return isCover((box1.x2 - box1.x1) / 2, deg11, A1B1, B1C1) && isCover((box1.y2 - box1.y1) / 2, deg12, A1B1, B1C1) && isCover((box2.x2 - box2.x1) / 2, deg21, AB, BC) && isCover((box2.y2 - box2.y1) / 2, deg22, AB, BC);
1942
1898
  }
1943
1899
 
1944
- const eastAsianCharacterInfo = character => {
1900
+ const eastAsianCharacterInfo$1 = character => {
1945
1901
  let x = character.charCodeAt(0),
1946
1902
  y = 2 === character.length ? character.charCodeAt(1) : 0,
1947
1903
  codePoint = x;
1948
1904
  return 55296 <= x && x <= 56319 && 56320 <= y && y <= 57343 && (x &= 1023, y &= 1023, codePoint = x << 10 | y, codePoint += 65536), 12288 === codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 ? "F" : 8361 === codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518 ? "H" : 4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141 ? "W" : 32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 === codePoint || 175 === codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630 ? "Na" : 161 === codePoint || 164 === codePoint || 167 <= codePoint && codePoint <= 168 || 170 === codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 === codePoint || 208 === codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 === codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 === codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 === codePoint || 254 === codePoint || 257 === codePoint || 273 === codePoint || 275 === codePoint || 283 === codePoint || 294 <= codePoint && codePoint <= 295 || 299 === codePoint || 305 <= codePoint && codePoint <= 307 || 312 === codePoint || 319 <= codePoint && codePoint <= 322 || 324 === codePoint || 328 <= codePoint && codePoint <= 331 || 333 === codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 === codePoint || 462 === codePoint || 464 === codePoint || 466 === codePoint || 468 === codePoint || 470 === codePoint || 472 === codePoint || 474 === codePoint || 476 === codePoint || 593 === codePoint || 609 === codePoint || 708 === codePoint || 711 === codePoint || 713 <= codePoint && codePoint <= 715 || 717 === codePoint || 720 === codePoint || 728 <= codePoint && codePoint <= 731 || 733 === codePoint || 735 === codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 === codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 === codePoint || 8208 === codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 === codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 === codePoint || 8251 === codePoint || 8254 === codePoint || 8308 === codePoint || 8319 === codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 === codePoint || 8451 === codePoint || 8453 === codePoint || 8457 === codePoint || 8467 === codePoint || 8470 === codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 === codePoint || 8491 === codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 === codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 === codePoint || 8660 === codePoint || 8679 === codePoint || 8704 === codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 === codePoint || 8719 === codePoint || 8721 === codePoint || 8725 === codePoint || 8730 === codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 === codePoint || 8741 === codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 === codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 === codePoint || 8780 === codePoint || 8786 === codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 === codePoint || 8857 === codePoint || 8869 === codePoint || 8895 === codePoint || 8978 === codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 === codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 === codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 === codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 === codePoint || 9758 === codePoint || 9792 === codePoint || 9794 === codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 === codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 === codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 === codePoint || 10071 === codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 === codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109 ? "A" : "N";
1949
1905
  };
1950
1906
 
1951
- function getContextFont(text) {
1907
+ function getContextFont$1(text) {
1952
1908
  let defaultAttr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1953
1909
  let fontSizeScale = arguments.length > 2 ? arguments[2] : undefined;
1954
1910
  fontSizeScale || (fontSizeScale = 1);
@@ -1962,17 +1918,17 @@
1962
1918
  return (fontStyle ? fontStyle + " " : "") + (fontVariant ? fontVariant + " " : "") + (fontWeight ? fontWeight + " " : "") + fontSize * fontSizeScale + "px " + (fontFamily || "sans-serif");
1963
1919
  }
1964
1920
 
1965
- class TextMeasure {
1921
+ let TextMeasure$1 = class TextMeasure {
1966
1922
  constructor(option, textSpec) {
1967
- this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$3(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid$3(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
1923
+ this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$5(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid$5(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
1968
1924
  }
1969
1925
  initContext() {
1970
1926
  if (this._notSupportCanvas) return !1;
1971
- if (isNil$3(this._canvas) && (isValid$3(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil$3(this._canvas) && "undefined" != typeof window && void 0 !== window.document && globalThis && isValid$3(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil$3(this._context) && isValid$3(this._canvas)) {
1927
+ if (isNil$5(this._canvas) && (isValid$5(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil$5(this._canvas) && "undefined" != typeof window && void 0 !== window.document && globalThis && isValid$5(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil$5(this._context) && isValid$5(this._canvas)) {
1972
1928
  const context = this._canvas.getContext("2d");
1973
- isValid$3(context) && (context.save(), context.font = getContextFont(this.textSpec), this._contextSaved = !0, this._context = context);
1929
+ isValid$5(context) && (context.save(), context.font = getContextFont$1(this.textSpec), this._contextSaved = !0, this._context = context);
1974
1930
  }
1975
- return !isNil$3(this._context) || (this._notSupportCanvas = !0, !1);
1931
+ return !isNil$5(this._context) || (this._notSupportCanvas = !0, !1);
1976
1932
  }
1977
1933
  _initSpec() {
1978
1934
  var _a, _b, _c;
@@ -1995,7 +1951,7 @@
1995
1951
  let {
1996
1952
  lineHeight = fontSize
1997
1953
  } = this._userSpec;
1998
- if (isString$4(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
1954
+ if (isString$6(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
1999
1955
  const scale = Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100;
2000
1956
  lineHeight = fontSize * scale;
2001
1957
  }
@@ -2026,11 +1982,11 @@
2026
1982
  }
2027
1983
  }
2028
1984
  fullMeasure(text) {
2029
- if (isNil$3(text)) return {
1985
+ if (isNil$5(text)) return {
2030
1986
  width: 0,
2031
1987
  height: 0
2032
1988
  };
2033
- if (isNil$3(this._option.getTextBounds) || !this._notSupportVRender) return this.measureWithNaiveCanvas(text);
1989
+ if (isNil$5(this._option.getTextBounds) || !this._notSupportVRender) return this.measureWithNaiveCanvas(text);
2034
1990
  const {
2035
1991
  fontFamily: fontFamily,
2036
1992
  fontSize: fontSize,
@@ -2092,7 +2048,7 @@
2092
2048
  for (let i = 0; i < text.length; i++) {
2093
2049
  const char = text[i];
2094
2050
  let size = this._measureSpecialChar(char);
2095
- isNil$3(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$3(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$3(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height), !isNil$3(size.fontBoundingBoxAscent) && (totalSize.fontBoundingBoxAscent = size.fontBoundingBoxAscent), !isNil$3(size.fontBoundingBoxDescent) && (totalSize.fontBoundingBoxDescent = size.fontBoundingBoxDescent);
2051
+ isNil$5(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$5(size) && ["F", "W"].includes(eastAsianCharacterInfo$1(char)) && (size = this._measureFullSizeChar()), isNil$5(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height), !isNil$5(size.fontBoundingBoxAscent) && (totalSize.fontBoundingBoxAscent = size.fontBoundingBoxAscent), !isNil$5(size.fontBoundingBoxDescent) && (totalSize.fontBoundingBoxDescent = size.fontBoundingBoxDescent);
2096
2052
  }
2097
2053
  return totalSize;
2098
2054
  }
@@ -2111,7 +2067,7 @@
2111
2067
  } = this.textSpec;
2112
2068
  for (let i = 0; i < text.length; i++) {
2113
2069
  const char = text[i],
2114
- size = ["F", "W"].includes(eastAsianCharacterInfo(char)) ? 1 : .53;
2070
+ size = ["F", "W"].includes(eastAsianCharacterInfo$1(char)) ? 1 : .53;
2115
2071
  totalSize.width += size * fontSize;
2116
2072
  }
2117
2073
  return totalSize.height = null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize, totalSize;
@@ -2126,9 +2082,9 @@
2126
2082
  width: 0,
2127
2083
  height: 0
2128
2084
  };
2129
- if (isNil$3(text)) return defaultResult;
2130
- if (isArray$7(text)) {
2131
- const textArr = text.filter(isValid$3).map(s => s.toString());
2085
+ if (isNil$5(text)) return defaultResult;
2086
+ if (isArray$9(text)) {
2087
+ const textArr = text.filter(isValid$5).map(s => s.toString());
2132
2088
  return 0 === textArr.length ? defaultResult : 1 === textArr.length ? processor(textArr[0]) : {
2133
2089
  width: textArr.reduce((maxWidth, cur) => Math.max(maxWidth, processor(cur).width), 0),
2134
2090
  height: textArr.length * ((null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize) + 1) + 1
@@ -2137,7 +2093,7 @@
2137
2093
  return processor(text.toString());
2138
2094
  }
2139
2095
  _measureNumberChar() {
2140
- if (isNil$3(this._numberCharSize)) {
2096
+ if (isNil$5(this._numberCharSize)) {
2141
2097
  const numberBounds = this._standardMethod(TextMeasure.NUMBERS_CHAR_SET);
2142
2098
  this._numberCharSize = {
2143
2099
  width: numberBounds.width / TextMeasure.NUMBERS_CHAR_SET.length,
@@ -2149,10 +2105,10 @@
2149
2105
  return this._numberCharSize;
2150
2106
  }
2151
2107
  _measureFullSizeChar() {
2152
- return isNil$3(this._fullCharSize) && (this._fullCharSize = this._standardMethod(TextMeasure.FULL_SIZE_CHAR)), this._fullCharSize;
2108
+ return isNil$5(this._fullCharSize) && (this._fullCharSize = this._standardMethod(TextMeasure.FULL_SIZE_CHAR)), this._fullCharSize;
2153
2109
  }
2154
2110
  _measureLetterChar() {
2155
- if (isNil$3(this._letterCharSize)) {
2111
+ if (isNil$5(this._letterCharSize)) {
2156
2112
  const alphabetBounds = this._standardMethod(TextMeasure.ALPHABET_CHAR_SET);
2157
2113
  this._letterCharSize = {
2158
2114
  width: alphabetBounds.width / TextMeasure.ALPHABET_CHAR_SET.length,
@@ -2164,15 +2120,15 @@
2164
2120
  return this._letterCharSize;
2165
2121
  }
2166
2122
  _measureSpecialChar(char) {
2167
- return isValid$3(this._specialCharSizeMap[char]) ? this._specialCharSizeMap[char] : this.specialCharSet.includes(char) ? (this._specialCharSizeMap[char] = this._standardMethod(char), this._specialCharSizeMap[char]) : null;
2123
+ return isValid$5(this._specialCharSizeMap[char]) ? this._specialCharSizeMap[char] : this.specialCharSet.includes(char) ? (this._specialCharSizeMap[char] = this._standardMethod(char), this._specialCharSizeMap[char]) : null;
2168
2124
  }
2169
2125
  release() {
2170
- isValid$3(this._canvas) && (this._canvas = null), isValid$3(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
2126
+ isValid$5(this._canvas) && (this._canvas = null), isValid$5(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
2171
2127
  }
2172
- }
2173
- TextMeasure.ALPHABET_CHAR_SET = "abcdefghijklmnopqrstuvwxyz", TextMeasure.NUMBERS_CHAR_SET = "0123456789", TextMeasure.FULL_SIZE_CHAR = "字";
2128
+ };
2129
+ TextMeasure$1.ALPHABET_CHAR_SET = "abcdefghijklmnopqrstuvwxyz", TextMeasure$1.NUMBERS_CHAR_SET = "0123456789", TextMeasure$1.FULL_SIZE_CHAR = "字";
2174
2130
 
2175
- function transformBoundsWithMatrix(out, bounds, matrix) {
2131
+ function transformBoundsWithMatrix$1(out, bounds, matrix) {
2176
2132
  const {
2177
2133
  x1: x1,
2178
2134
  y1: y1,
@@ -2181,7 +2137,7 @@
2181
2137
  } = bounds;
2182
2138
  return matrix.onlyTranslate() ? (out !== bounds && out.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), out.translate(matrix.e, matrix.f), bounds) : (out.clear(), out.add(matrix.a * x1 + matrix.c * y1 + matrix.e, matrix.b * x1 + matrix.d * y1 + matrix.f), out.add(matrix.a * x2 + matrix.c * y1 + matrix.e, matrix.b * x2 + matrix.d * y1 + matrix.f), out.add(matrix.a * x2 + matrix.c * y2 + matrix.e, matrix.b * x2 + matrix.d * y2 + matrix.f), out.add(matrix.a * x1 + matrix.c * y2 + matrix.e, matrix.b * x1 + matrix.d * y2 + matrix.f), bounds);
2183
2139
  }
2184
- class Bounds {
2140
+ let Bounds$1 = class Bounds {
2185
2141
  constructor(bounds) {
2186
2142
  bounds ? this.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2) : this.clear();
2187
2143
  }
@@ -2218,7 +2174,7 @@
2218
2174
  }
2219
2175
  expand() {
2220
2176
  let d = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
2221
- return isArray$7(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
2177
+ return isArray$9(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
2222
2178
  }
2223
2179
  round() {
2224
2180
  return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
@@ -2281,7 +2237,7 @@
2281
2237
  return this.y1 *= s, this.y2 *= s, this;
2282
2238
  }
2283
2239
  transformWithMatrix(matrix) {
2284
- return transformBoundsWithMatrix(this, this, matrix), this;
2240
+ return transformBoundsWithMatrix$1(this, this, matrix), this;
2285
2241
  }
2286
2242
  copy(b) {
2287
2243
  return this.x1 = b.x1, this.y1 = b.y1, this.x2 = b.x2, this.y2 = b.y2, this;
@@ -2308,9 +2264,9 @@
2308
2264
  } = this;
2309
2265
  return [sx * x1 + (1 - sx) * x, sy * y1 + (1 - sy) * y, sx * x2 + (1 - sx) * x, sy * y2 + (1 - sy) * y];
2310
2266
  }
2311
- }
2312
- class AABBBounds extends Bounds {}
2313
- class OBBBounds extends Bounds {
2267
+ };
2268
+ let AABBBounds$1 = class AABBBounds extends Bounds$1 {};
2269
+ class OBBBounds extends Bounds$1 {
2314
2270
  constructor(bounds) {
2315
2271
  let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
2316
2272
  var _a;
@@ -2737,10 +2693,10 @@
2737
2693
  return ((value = Math.max(0, Math.min(255, Math.round(value) || 0))) < 16 ? "0" : "") + value.toString(16);
2738
2694
  }
2739
2695
  function rgb$1(value) {
2740
- return isNumber$4(value) ? new RGB$1(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$7(value) ? new RGB$1(value[0], value[1], value[2]) : new RGB$1(255, 255, 255);
2696
+ return isNumber$6(value) ? new RGB$1(value >> 16, value >> 8 & 255, 255 & value, 1) : isArray$9(value) ? new RGB$1(value[0], value[1], value[2]) : new RGB$1(255, 255, 255);
2741
2697
  }
2742
2698
  function rgba$1(value) {
2743
- return isNumber$4(value) ? new RGB$1(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$7(value) ? new RGB$1(value[0], value[1], value[2], value[3]) : new RGB$1(255, 255, 255, 1);
2699
+ return isNumber$6(value) ? new RGB$1(value >>> 24, value >>> 16 & 255, value >>> 8 & 255, 255 & value) : isArray$9(value) ? new RGB$1(value[0], value[1], value[2], value[3]) : new RGB$1(255, 255, 255, 1);
2744
2700
  }
2745
2701
  function SRGBToLinear$1(c) {
2746
2702
  return c < .04045 ? .0773993808 * c : Math.pow(.9478672986 * c + .0521327014, 2.4);
@@ -2780,11 +2736,13 @@
2780
2736
  return color.getLuminance2();
2781
2737
  case "lum3":
2782
2738
  return color.getLuminance3();
2739
+ case "wcag":
2740
+ return color.getLuminanceWCAG();
2783
2741
  }
2784
2742
  }
2785
2743
  static parseColorString(value) {
2786
- if (isValid$3(DEFAULT_COLORS_OPACITY$1[value])) return rgba$1(DEFAULT_COLORS_OPACITY$1[value]);
2787
- if (isValid$3(DEFAULT_COLORS$1[value])) return rgb$1(DEFAULT_COLORS$1[value]);
2744
+ if (isValid$5(DEFAULT_COLORS_OPACITY$1[value])) return rgba$1(DEFAULT_COLORS_OPACITY$1[value]);
2745
+ if (isValid$5(DEFAULT_COLORS$1[value])) return rgb$1(DEFAULT_COLORS$1[value]);
2788
2746
  const formatValue = `${value}`.trim().toLowerCase(),
2789
2747
  hexRes = setHex$1(formatValue);
2790
2748
  if (void 0 !== hexRes) return hexRes;
@@ -2850,11 +2808,11 @@
2850
2808
  setHsl(h, s, l) {
2851
2809
  const opacity = this.color.opacity,
2852
2810
  hsl = rgbToHsl$1(this.color.r, this.color.g, this.color.b),
2853
- rgb = hslToRgb$1(isNil$3(h) ? hsl.h : clamp$3(h, 0, 360), isNil$3(s) ? hsl.s : s >= 0 && s <= 1 ? 100 * s : s, isNil$3(l) ? hsl.l : l <= 1 && l >= 0 ? 100 * l : l);
2811
+ rgb = hslToRgb$1(isNil$5(h) ? hsl.h : clamp$3(h, 0, 360), isNil$5(s) ? hsl.s : s >= 0 && s <= 1 ? 100 * s : s, isNil$5(l) ? hsl.l : l <= 1 && l >= 0 ? 100 * l : l);
2854
2812
  return this.color = new RGB$1(rgb.r, rgb.g, rgb.b, opacity), this;
2855
2813
  }
2856
2814
  setRGB(r, g, b) {
2857
- return !isNil$3(r) && (this.color.r = r), !isNil$3(g) && (this.color.g = g), !isNil$3(b) && (this.color.b = b), this;
2815
+ return !isNil$5(r) && (this.color.r = r), !isNil$5(g) && (this.color.g = g), !isNil$5(b) && (this.color.b = b), this;
2858
2816
  }
2859
2817
  setHex(value) {
2860
2818
  const formatValue = `${value}`.trim().toLowerCase(),
@@ -2881,6 +2839,14 @@
2881
2839
  getLuminance3() {
2882
2840
  return (.299 * this.color.r + .587 * this.color.g + .114 * this.color.b) / 255;
2883
2841
  }
2842
+ getLuminanceWCAG() {
2843
+ const RsRGB = this.color.r / 255,
2844
+ GsRGB = this.color.g / 255,
2845
+ BsRGB = this.color.b / 255;
2846
+ let R, G, B;
2847
+ R = RsRGB <= .03928 ? RsRGB / 12.92 : Math.pow((RsRGB + .055) / 1.055, 2.4), G = GsRGB <= .03928 ? GsRGB / 12.92 : Math.pow((GsRGB + .055) / 1.055, 2.4), B = BsRGB <= .03928 ? BsRGB / 12.92 : Math.pow((BsRGB + .055) / 1.055, 2.4);
2848
+ return .2126 * R + .7152 * G + .0722 * B;
2849
+ }
2884
2850
  clone() {
2885
2851
  return new Color(this.color.toString());
2886
2852
  }
@@ -2914,7 +2880,7 @@
2914
2880
  };
2915
2881
  let RGB$1 = class RGB {
2916
2882
  constructor(r, g, b, opacity) {
2917
- this.r = isNaN(+r) ? 255 : Math.max(0, Math.min(255, +r)), this.g = isNaN(+g) ? 255 : Math.max(0, Math.min(255, +g)), this.b = isNaN(+b) ? 255 : Math.max(0, Math.min(255, +b)), isValid$3(opacity) ? this.opacity = isNaN(+opacity) ? 1 : Math.max(0, Math.min(1, +opacity)) : this.opacity = 1;
2883
+ this.r = isNaN(+r) ? 255 : Math.max(0, Math.min(255, +r)), this.g = isNaN(+g) ? 255 : Math.max(0, Math.min(255, +g)), this.b = isNaN(+b) ? 255 : Math.max(0, Math.min(255, +b)), isValid$5(opacity) ? this.opacity = isNaN(+opacity) ? 1 : Math.max(0, Math.min(1, +opacity)) : this.opacity = 1;
2918
2884
  }
2919
2885
  formatHex() {
2920
2886
  return `#${hex$1(this.r) + hex$1(this.g) + hex$1(this.b) + (1 === this.opacity ? "" : hex$1(255 * this.opacity))}`;
@@ -2980,8 +2946,8 @@
2980
2946
  });
2981
2947
 
2982
2948
  function normalizePadding(padding) {
2983
- if (isValidNumber$1(padding)) return [padding, padding, padding, padding];
2984
- if (isArray$7(padding)) {
2949
+ if (isValidNumber$3(padding)) return [padding, padding, padding, padding];
2950
+ if (isArray$9(padding)) {
2985
2951
  const length = padding.length;
2986
2952
  if (1 === length) {
2987
2953
  const paddingValue = padding[0];
@@ -2997,7 +2963,7 @@
2997
2963
  }
2998
2964
  if (4 === length) return padding;
2999
2965
  }
3000
- if (isObject$8(padding)) {
2966
+ if (isObject$a(padding)) {
3001
2967
  const {
3002
2968
  top = 0,
3003
2969
  right = 0,
@@ -3063,7 +3029,7 @@
3063
3029
 
3064
3030
  class CurvePath {
3065
3031
  constructor() {
3066
- this.curves = [], this.bounds = new AABBBounds();
3032
+ this.curves = [], this.bounds = new AABBBounds$1();
3067
3033
  }
3068
3034
  getCurveLengths() {
3069
3035
  return this.curves.map(curve => curve.getLength());
@@ -3174,7 +3140,7 @@
3174
3140
  }(BaseRenderContributionTime || (BaseRenderContributionTime = {}));
3175
3141
 
3176
3142
  function segments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
3177
- const th = degreeToRadian(rotateX),
3143
+ const th = degreeToRadian$1(rotateX),
3178
3144
  sin_th = Math.sin(th),
3179
3145
  cos_th = Math.cos(th),
3180
3146
  px = cos_th * (ox - x) * .5 + sin_th * (oy - y) * .5,
@@ -4743,7 +4709,7 @@
4743
4709
  let offsetY = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
4744
4710
  if (!c || !0 === c) return "black";
4745
4711
  let result, color;
4746
- if (isArray$7(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
4712
+ if (isArray$9(c)) for (let i = 0; i < c.length && (color = c[i], !color); i++);else color = c;
4747
4713
  if (color = GradientParser.Parse(color), "string" == typeof color) return color;
4748
4714
  if (params.AABBBounds && (!params.attribute || 0 !== params.attribute.scaleX || 0 !== params.attribute.scaleY)) {
4749
4715
  const bounds = params.AABBBounds;
@@ -4921,6 +4887,9 @@
4921
4887
  }
4922
4888
  compatibleMetrics(metrics, options) {
4923
4889
  if (null == metrics.actualBoundingBoxAscent || null == metrics.actualBoundingBoxDescent || null == metrics.fontBoundingBoxAscent || null == metrics.fontBoundingBoxDescent) {
4890
+ metrics = {
4891
+ width: metrics.width
4892
+ };
4924
4893
  const {
4925
4894
  ascent: ascent,
4926
4895
  descent: descent
@@ -4928,6 +4897,13 @@
4928
4897
  metrics.actualBoundingBoxAscent = ascent, metrics.actualBoundingBoxDescent = descent, metrics.fontBoundingBoxAscent = ascent, metrics.fontBoundingBoxDescent = descent;
4929
4898
  }
4930
4899
  if (null == metrics.actualBoundingBoxLeft || null == metrics.actualBoundingBoxRight) {
4900
+ metrics = {
4901
+ width: metrics.width,
4902
+ actualBoundingBoxAscent: metrics.actualBoundingBoxAscent,
4903
+ actualBoundingBoxDescent: metrics.actualBoundingBoxDescent,
4904
+ fontBoundingBoxAscent: metrics.fontBoundingBoxAscent,
4905
+ fontBoundingBoxDescent: metrics.fontBoundingBoxDescent
4906
+ };
4931
4907
  const {
4932
4908
  left: left,
4933
4909
  right: right
@@ -5556,14 +5532,14 @@
5556
5532
  return this.global.measureTextMethod = m, data;
5557
5533
  }
5558
5534
  createTextMeasureInstance(textSpec, option, getCanvasForMeasure) {
5559
- return this.configure(this.global, this.global.env), new TextMeasure(Object.assign({
5535
+ return this.configure(this.global, this.global.env), new TextMeasure$1(Object.assign({
5560
5536
  defaultFontParams: {
5561
5537
  fontFamily: DefaultTextStyle.fontFamily,
5562
5538
  fontSize: DefaultTextStyle.fontSize
5563
5539
  },
5564
5540
  getCanvasForMeasure: getCanvasForMeasure || (() => this.canvas),
5565
5541
  getTextBounds: void 0,
5566
- specialCharSet: "-/: .,@%'\"~" + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
5542
+ specialCharSet: "-/: .,@%'\"~" + TextMeasure$1.ALPHABET_CHAR_SET + TextMeasure$1.ALPHABET_CHAR_SET.toUpperCase()
5567
5543
  }, null != option ? option : {}), textSpec);
5568
5544
  }
5569
5545
  drawGraphicToCanvas(graphic, stage, canvas) {
@@ -6074,26 +6050,26 @@
6074
6050
  return this.removeChild(child);
6075
6051
  }
6076
6052
  addEventListener(type, listener, options) {
6077
- const capture = isBoolean$4(options, !0) && options || isObject$8(options) && options.capture,
6078
- once = isObject$8(options) && options.once,
6079
- context = isFunction$5(listener) ? void 0 : listener;
6080
- return type = capture ? `${type}capture` : type, listener = isFunction$5(listener) ? listener : listener.handleEvent, once ? super.once(type, listener, context) : super.on(type, listener, context), this;
6053
+ const capture = isBoolean$6(options, !0) && options || isObject$a(options) && options.capture,
6054
+ once = isObject$a(options) && options.once,
6055
+ context = isFunction$7(listener) ? void 0 : listener;
6056
+ return type = capture ? `${type}capture` : type, listener = isFunction$7(listener) ? listener : listener.handleEvent, once ? super.once(type, listener, context) : super.on(type, listener, context), this;
6081
6057
  }
6082
6058
  on(type, listener, options) {
6083
6059
  return this.addEventListener(type, listener, options);
6084
6060
  }
6085
6061
  removeEventListener(type, listener, options) {
6086
- const capture = isBoolean$4(options, !0) && options || isObject$8(options) && options.capture,
6087
- context = isFunction$5(listener) ? void 0 : listener;
6088
- type = capture ? `${type}capture` : type, listener = isFunction$5(listener) ? listener : listener.handleEvent;
6089
- const once = isObject$8(options) && options.once;
6062
+ const capture = isBoolean$6(options, !0) && options || isObject$a(options) && options.capture,
6063
+ context = isFunction$7(listener) ? void 0 : listener;
6064
+ type = capture ? `${type}capture` : type, listener = isFunction$7(listener) ? listener : listener.handleEvent;
6065
+ const once = isObject$a(options) && options.once;
6090
6066
  return super.off(type, listener, context, once), this;
6091
6067
  }
6092
6068
  off(type, listener, options) {
6093
6069
  return this.removeEventListener(type, listener, options);
6094
6070
  }
6095
6071
  once(type, listener, options) {
6096
- return isObject$8(options) ? (options.once = !0, this.addEventListener(type, listener, options)) : this.addEventListener(type, listener, {
6072
+ return isObject$a(options) ? (options.once = !0, this.addEventListener(type, listener, options)) : this.addEventListener(type, listener, {
6097
6073
  once: !0
6098
6074
  });
6099
6075
  }
@@ -6182,7 +6158,7 @@
6182
6158
  try {
6183
6159
  this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.preventDefault();
6184
6160
  } catch (err) {
6185
- this.nativeEvent.preventDefault && isFunction$5(this.nativeEvent.preventDefault) && this.nativeEvent.preventDefault();
6161
+ this.nativeEvent.preventDefault && isFunction$7(this.nativeEvent.preventDefault) && this.nativeEvent.preventDefault();
6186
6162
  }
6187
6163
  this.defaultPrevented = !0;
6188
6164
  }
@@ -6193,7 +6169,7 @@
6193
6169
  try {
6194
6170
  this.nativeEvent instanceof Event && this.nativeEvent.cancelable && this.nativeEvent.stopPropagation();
6195
6171
  } catch (err) {
6196
- this.nativeEvent.stopPropagation && isFunction$5(this.nativeEvent.stopPropagation) && this.nativeEvent.stopPropagation();
6172
+ this.nativeEvent.stopPropagation && isFunction$7(this.nativeEvent.stopPropagation) && this.nativeEvent.stopPropagation();
6197
6173
  }
6198
6174
  this.propagationStopped = !0;
6199
6175
  }
@@ -6646,7 +6622,7 @@
6646
6622
  if (this.currentCursor === mode) return;
6647
6623
  this.currentCursor = mode;
6648
6624
  const style = this.cursorStyles[mode];
6649
- style ? "string" == typeof style && applyStyles ? domElement.style.cursor = style : "function" == typeof style ? style(mode) : "object" == typeof style && applyStyles && Object.assign(domElement.style, style) : applyStyles && isString$4(mode) && !has$1(this.cursorStyles, mode) && (domElement.style.cursor = mode);
6625
+ style ? "string" == typeof style && applyStyles ? domElement.style.cursor = style : "function" == typeof style ? style(mode) : "object" == typeof style && applyStyles && Object.assign(domElement.style, style) : applyStyles && isString$6(mode) && !has$1(this.cursorStyles, mode) && (domElement.style.cursor = mode);
6650
6626
  }
6651
6627
  setTargetElement(element) {
6652
6628
  this.removeEvents(), this.domElement = element, this.addEvents();
@@ -7433,7 +7409,7 @@
7433
7409
  const parseStroke = stroke => {
7434
7410
  var _a;
7435
7411
  let isFullStroke = !0;
7436
- if (isBoolean$4(stroke, !0)) {
7412
+ if (isBoolean$6(stroke, !0)) {
7437
7413
  for (let i = 0; i < 4; i++) _strokeVec4[i] = stroke, isFullStroke && (isFullStroke = !(null !== (_a = _strokeVec4[i]) && void 0 !== _a && !_a));
7438
7414
  isFullStroke = stroke;
7439
7415
  } else if (Array.isArray(stroke)) for (let i = 0; i < 4; i++) _strokeVec4[i] = !!stroke[i], isFullStroke && (isFullStroke = !!_strokeVec4[i]);else _strokeVec4[0] = !1, _strokeVec4[1] = !1, _strokeVec4[2] = !1, _strokeVec4[3] = !1;
@@ -7443,7 +7419,7 @@
7443
7419
  };
7444
7420
  };
7445
7421
  const _paddingVec4 = [0, 0, 0, 0];
7446
- const parsePadding = padding => padding ? isArray$7(padding) ? 0 === padding.length ? 0 : 1 === padding.length ? padding[0] : 2 === padding.length ? (_paddingVec4[0] = padding[0], _paddingVec4[2] = padding[0], _paddingVec4[1] = padding[1], _paddingVec4[3] = padding[1], _paddingVec4) : padding : padding : 0;
7422
+ const parsePadding = padding => padding ? isArray$9(padding) ? 0 === padding.length ? 0 : 1 === padding.length ? padding[0] : 2 === padding.length ? (_paddingVec4[0] = padding[0], _paddingVec4[2] = padding[0], _paddingVec4[1] = padding[1], _paddingVec4[3] = padding[1], _paddingVec4) : padding : padding : 0;
7447
7423
  const _coords = [{
7448
7424
  x: 0,
7449
7425
  y: 0
@@ -7512,7 +7488,7 @@
7512
7488
  return points;
7513
7489
  }
7514
7490
  function getAttributeFromDefaultAttrList(attr, key) {
7515
- if (isArray$7(attr)) {
7491
+ if (isArray$9(attr)) {
7516
7492
  let val;
7517
7493
  for (let i = 0; i < attr.length && void 0 === val; i++) val = attr[i][key];
7518
7494
  return val;
@@ -7539,7 +7515,7 @@
7539
7515
  RafBasedSTO.TimeOut = 1e3 / 60;
7540
7516
  const rafBasedSto = new RafBasedSTO();
7541
7517
  const _calculateLineHeight = (lineHeight, fontSize) => {
7542
- if (isString$4(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
7518
+ if (isString$6(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
7543
7519
  return fontSize * (Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100);
7544
7520
  }
7545
7521
  return lineHeight;
@@ -7556,8 +7532,8 @@
7556
7532
  width: 0,
7557
7533
  height: 0
7558
7534
  };
7559
- let width = isNil$3(attribute.width) ? attribute.x1 - attribute.x : attribute.width,
7560
- height = isNil$3(attribute.height) ? attribute.y1 - attribute.y : attribute.height,
7535
+ let width = isNil$5(attribute.width) ? attribute.x1 - attribute.x : attribute.width,
7536
+ height = isNil$5(attribute.height) ? attribute.y1 - attribute.y : attribute.height,
7561
7537
  x = 0,
7562
7538
  y = 0;
7563
7539
  return width < 0 ? (x = width, width = -width) : Number.isNaN(width) && (width = 0), height < 0 ? (y = height, height = -height) : Number.isNaN(height) && (height = 0), {
@@ -7605,11 +7581,11 @@
7605
7581
 
7606
7582
  function colorArrayToString(color) {
7607
7583
  let alphaChannel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
7608
- return Array.isArray(color) && isNumber$4(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
7584
+ return Array.isArray(color) && isNumber$6(color[0]) ? alphaChannel ? `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])},${color[3].toFixed(2)})` : `rgb(${Math.round(color[0])},${Math.round(color[1])},${Math.round(color[2])})` : color;
7609
7585
  }
7610
7586
  function interpolateColor(from, to, ratio, alphaChannel, cb) {
7611
- if (Array.isArray(from) && !isNumber$4(from[0]) || Array.isArray(to) && !isNumber$4(to[0])) {
7612
- return new Array(4).fill(0).map((_, index) => _interpolateColor(isArray$7(from) ? from[index] : from, isArray$7(to) ? to[index] : to, ratio, alphaChannel));
7587
+ if (Array.isArray(from) && !isNumber$6(from[0]) || Array.isArray(to) && !isNumber$6(to[0])) {
7588
+ return new Array(4).fill(0).map((_, index) => _interpolateColor(isArray$9(from) ? from[index] : from, isArray$9(to) ? to[index] : to, ratio, alphaChannel));
7613
7589
  }
7614
7590
  return _interpolateColor(from, to, ratio, alphaChannel, cb);
7615
7591
  }
@@ -7790,7 +7766,7 @@
7790
7766
  ResourceLoader.cache = new Map(), ResourceLoader.isLoading = !1, ResourceLoader.toLoadAueue = [], ResourceLoader.onLoadSuccessCb = [];
7791
7767
 
7792
7768
  const tempMatrix = new Matrix(),
7793
- tempBounds$1 = new AABBBounds();
7769
+ tempBounds$1 = new AABBBounds$1();
7794
7770
  const GRAPHIC_UPDATE_TAG_KEY = ["lineWidth", "scaleX", "scaleY", "angle", "anchor", "visible"];
7795
7771
  const tempConstantXYKey = ["x", "y"],
7796
7772
  tempConstantScaleXYKey = ["scaleX", "scaleY"],
@@ -7852,7 +7828,7 @@
7852
7828
  constructor() {
7853
7829
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7854
7830
  var _a;
7855
- super(), this._AABBBounds = new AABBBounds(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
7831
+ super(), this._AABBBounds = new AABBBounds$1(), this._updateTag = UpdateTag.INIT, this.attribute = params, this.valid = this.isValid(), this.updateAABBBoundsStamp = 0, params.background ? this.loadImage(null !== (_a = params.background.background) && void 0 !== _a ? _a : params.background, !0) : params.shadowGraphic && this.setShadowGraphic(params.shadowGraphic);
7856
7832
  }
7857
7833
  setMode(mode) {
7858
7834
  "3d" === mode ? this.set3dMode() : this.set2dMode();
@@ -7992,7 +7968,7 @@
7992
7968
  const params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate({
7993
7969
  [key]: value
7994
7970
  }, this.attribute, key, context);
7995
- params ? this._setAttributes(params, forceUpdateTag, context) : isNil$3(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key ? this.loadImage(value, !0) : "shadowGraphic" === key && this.setShadowGraphic(value);
7971
+ params ? this._setAttributes(params, forceUpdateTag, context) : isNil$5(null === (_a = this.normalAttrs) || void 0 === _a ? void 0 : _a[key]) ? (this.attribute[key] = value, this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.addUpdateLayoutTag(), this.onAttributeUpdate(context)) : this.normalAttrs[key] = value, "background" === key ? this.loadImage(value, !0) : "shadowGraphic" === key && this.setShadowGraphic(value);
7996
7972
  }
7997
7973
  needUpdateTags(keys) {
7998
7974
  let k = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : GRAPHIC_UPDATE_TAG_KEY;
@@ -8130,7 +8106,7 @@
8130
8106
  d ? (d.bounds && this.tryUpdateAABBBounds("imprecise" === this.attribute.boundsMode), d.trans && this.tryUpdateLocalTransMatrix()) : (this.tryUpdateAABBBounds("imprecise" === this.attribute.boundsMode), this.tryUpdateLocalTransMatrix());
8131
8107
  }
8132
8108
  hasState(stateName) {
8133
- return !(!this.currentStates || !this.currentStates.length) && (!!isNil$3(stateName) || this.currentStates.includes(stateName));
8109
+ return !(!this.currentStates || !this.currentStates.length) && (!!isNil$5(stateName) || this.currentStates.includes(stateName));
8134
8110
  }
8135
8111
  getState(stateName) {
8136
8112
  var _a;
@@ -8426,7 +8402,7 @@
8426
8402
  };
8427
8403
  }
8428
8404
  createPathProxy(path) {
8429
- return isString$4(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
8405
+ return isString$6(path, !0) ? this.pathProxy = new CustomPath2D().fromString(path) : this.pathProxy = new CustomPath2D(), this.pathProxy;
8430
8406
  }
8431
8407
  loadImage(image) {
8432
8408
  let background = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
@@ -8437,7 +8413,7 @@
8437
8413
  data: "init",
8438
8414
  state: null
8439
8415
  };
8440
- this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$8(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
8416
+ this.resources.set(url, cache), "string" == typeof image ? (cache.state = "loading", image.startsWith("<svg") ? (ResourceLoader.GetSvg(image, this), this.backgroundImg = this.backgroundImg || background) : (isValidUrl$1(image) || image.includes("/") || isBase64$1(image)) && (ResourceLoader.GetImage(image, this), this.backgroundImg = this.backgroundImg || background)) : isObject$a(image) ? (cache.state = "success", cache.data = image, this.backgroundImg = this.backgroundImg || background) : cache.state = "fail";
8441
8417
  }
8442
8418
  setShadowGraphic(graphic) {
8443
8419
  if (graphic) {
@@ -9163,7 +9139,7 @@
9163
9139
  }
9164
9140
  function runStroke(stroke, lineWidth) {
9165
9141
  let s;
9166
- return s = isArray$7(stroke) ? stroke.some(item => item || void 0 === item) : !!stroke, s && lineWidth > 0;
9142
+ return s = isArray$9(stroke) ? stroke.some(item => item || void 0 === item) : !!stroke, s && lineWidth > 0;
9167
9143
  }
9168
9144
  function fillVisible(opacity, fillOpacity, fill) {
9169
9145
  return fill && opacity * fillOpacity > 0;
@@ -9248,7 +9224,7 @@
9248
9224
  function calculateArcCornerRadius(arc, startAngle, endAngle, innerRadius, outerRadius) {
9249
9225
  const deltaAngle = abs(endAngle - startAngle),
9250
9226
  cornerRadius = arc.getParsedCornerRadius(),
9251
- cornerRadiusIsArray = isArray$7(cornerRadius),
9227
+ cornerRadiusIsArray = isArray$9(cornerRadius),
9252
9228
  {
9253
9229
  outerDeltaAngle: outerDeltaAngle,
9254
9230
  innerDeltaAngle: innerDeltaAngle,
@@ -9742,7 +9718,7 @@
9742
9718
  beforeUpdateAABBBounds: new SyncHook(["graphic", "stage", "willUpdate", "aabbBounds"]),
9743
9719
  afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"]),
9744
9720
  clearAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds"])
9745
- }, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds();
9721
+ }, this.tempAABBBounds1 = new AABBBounds$1(), this.tempAABBBounds2 = new AABBBounds$1();
9746
9722
  }
9747
9723
  onAttributeUpdate(graphic) {
9748
9724
  this.hooks.onAttributeUpdate.taps.length && this.hooks.onAttributeUpdate.call(graphic);
@@ -9783,12 +9759,12 @@
9783
9759
  textBaseline: textBaseline
9784
9760
  } = attribute;
9785
9761
  if (null != attribute.forceBoundsHeight) {
9786
- const h = isNumber$4(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
9762
+ const h = isNumber$6(attribute.forceBoundsHeight) ? attribute.forceBoundsHeight : attribute.forceBoundsHeight(),
9787
9763
  dy = textLayoutOffsetY(textBaseline, h, h);
9788
9764
  aabbBounds.set(aabbBounds.x1, dy, aabbBounds.x2, dy + h);
9789
9765
  }
9790
9766
  if (null != attribute.forceBoundsWidth) {
9791
- const w = isNumber$4(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
9767
+ const w = isNumber$6(attribute.forceBoundsWidth) ? attribute.forceBoundsWidth : attribute.forceBoundsWidth(),
9792
9768
  dx = textDrawOffsetX(textAlign, w);
9793
9769
  aabbBounds.set(dx, aabbBounds.y1, dx + w, aabbBounds.y2);
9794
9770
  }
@@ -9828,7 +9804,7 @@
9828
9804
  if (this.combindShadowAABBBounds(aabbBounds, graphic), aabbBounds.empty()) return;
9829
9805
  let updateMatrix = !0;
9830
9806
  const m = graphic.transMatrix;
9831
- graphic && graphic.isContainer && (updateMatrix = !(1 === m.a && 0 === m.b && 0 === m.c && 1 === m.d && 0 === m.e && 0 === m.f)), updateMatrix && transformBoundsWithMatrix(aabbBounds, aabbBounds, m);
9807
+ graphic && graphic.isContainer && (updateMatrix = !(1 === m.a && 0 === m.b && 0 === m.c && 1 === m.d && 0 === m.e && 0 === m.f)), updateMatrix && transformBoundsWithMatrix$1(aabbBounds, aabbBounds, m);
9832
9808
  }
9833
9809
  validCheck(attribute, theme, aabbBounds, graphic) {
9834
9810
  if (!graphic) return !0;
@@ -10316,7 +10292,7 @@
10316
10292
  const halfPi = pi / 2;
10317
10293
  function createRectPath(path, x, y, width, height, rectCornerRadius, edgeCb) {
10318
10294
  let cornerRadius;
10319
- if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$4(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
10295
+ if (width < 0 && (x += width, width = -width), height < 0 && (y += height, height = -height), isNumber$6(rectCornerRadius, !0)) cornerRadius = [rectCornerRadius = abs(rectCornerRadius), rectCornerRadius, rectCornerRadius, rectCornerRadius];else if (Array.isArray(rectCornerRadius)) {
10320
10296
  const cornerRadiusArr = rectCornerRadius;
10321
10297
  let cr0, cr1;
10322
10298
  switch (cornerRadiusArr.length) {
@@ -10346,23 +10322,23 @@
10346
10322
  rightBottomPoint2 = [rightBottom[0], rightBottom[1] - _cornerRadius[2]],
10347
10323
  leftBottomPoint1 = [leftBottom[0] + _cornerRadius[3], leftBottom[1]],
10348
10324
  leftBottomPoint2 = [leftBottom[0], leftBottom[1] - _cornerRadius[3]];
10349
- if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual(rightTopPoint1, rightTopPoint2)) {
10325
+ if (path.moveTo(leftTopPoint1[0], leftTopPoint1[1]), edgeCb && edgeCb[0] ? edgeCb[0](leftTopPoint1[0], leftTopPoint1[1], rightTopPoint1[0], rightTopPoint1[1]) : path.lineTo(rightTopPoint1[0], rightTopPoint1[1]), !arrayEqual$1(rightTopPoint1, rightTopPoint2)) {
10350
10326
  edgeCb && edgeCb[0] && path.moveTo(rightTopPoint1[0], rightTopPoint1[1]);
10351
10327
  const centerX = rightTopPoint1[0],
10352
10328
  centerY = rightTopPoint1[1] + _cornerRadius[1];
10353
10329
  path.arc(centerX, centerY, _cornerRadius[1], -halfPi, 0, !1);
10354
10330
  }
10355
- if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint2[0], rightTopPoint2[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual(rightBottomPoint1, rightBottomPoint2)) {
10331
+ if (edgeCb && edgeCb[1] ? edgeCb[1](rightTopPoint2[0], rightTopPoint2[1], rightBottomPoint2[0], rightBottomPoint2[1]) : path.lineTo(rightBottomPoint2[0], rightBottomPoint2[1]), !arrayEqual$1(rightBottomPoint1, rightBottomPoint2)) {
10356
10332
  const centerX = rightBottomPoint2[0] - _cornerRadius[2],
10357
10333
  centerY = rightBottomPoint2[1];
10358
10334
  edgeCb && edgeCb[1] && path.moveTo(rightBottomPoint2[0], rightBottomPoint2[1]), path.arc(centerX, centerY, _cornerRadius[2], 0, halfPi, !1);
10359
10335
  }
10360
- if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint1[0], rightBottomPoint1[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual(leftBottomPoint1, leftBottomPoint2)) {
10336
+ if (edgeCb && edgeCb[2] ? edgeCb[2](rightBottomPoint1[0], rightBottomPoint1[1], leftBottomPoint1[0], leftBottomPoint1[1]) : path.lineTo(leftBottomPoint1[0], leftBottomPoint1[1]), !arrayEqual$1(leftBottomPoint1, leftBottomPoint2)) {
10361
10337
  const centerX = leftBottomPoint1[0],
10362
10338
  centerY = leftBottomPoint1[1] - _cornerRadius[3];
10363
10339
  edgeCb && edgeCb[2] && path.moveTo(leftBottomPoint1[0], leftBottomPoint1[1]), path.arc(centerX, centerY, _cornerRadius[3], halfPi, pi, !1);
10364
10340
  }
10365
- if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint2[0], leftBottomPoint2[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual(leftTopPoint1, leftTopPoint2)) {
10341
+ if (edgeCb && edgeCb[3] ? edgeCb[3](leftBottomPoint2[0], leftBottomPoint2[1], leftTopPoint2[0], leftTopPoint2[1]) : path.lineTo(leftTopPoint2[0], leftTopPoint2[1]), !arrayEqual$1(leftTopPoint1, leftTopPoint2)) {
10366
10342
  const centerX = leftTopPoint1[0],
10367
10343
  centerY = leftTopPoint1[1] + _cornerRadius[0];
10368
10344
  edgeCb && edgeCb[3] && path.moveTo(leftTopPoint2[0], leftTopPoint2[1]), path.arc(centerX, centerY, _cornerRadius[0], pi, pi + halfPi, !1);
@@ -10415,7 +10391,7 @@
10415
10391
  nextX = x + sign * d,
10416
10392
  nextY = y + sign * d,
10417
10393
  dw = 2 * d;
10418
- if (0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(nextX, nextY, width - sign * dw, height - sign * dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width - sign * dw, height - sign * dw, cornerRadius)), context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, borderStyle, rectAttribute[key]);else if (doStroke) {
10394
+ if (0 === cornerRadius || isArray$9(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(nextX, nextY, width - sign * dw, height - sign * dw)) : (context.beginPath(), createRectPath(context, nextX, nextY, width - sign * dw, height - sign * dw, cornerRadius)), context.setShadowBlendStyle && context.setShadowBlendStyle(rect, rect.attribute, rectAttribute), strokeCb) strokeCb(context, borderStyle, rectAttribute[key]);else if (doStroke) {
10419
10395
  const lastOpacity = rectAttribute[key].opacity;
10420
10396
  rectAttribute[key].opacity = opacity, context.setStrokeStyle(rect, borderStyle, (originX - x) / scaleX, (originY - y) / scaleY, rectAttribute[key]), rectAttribute[key].opacity = lastOpacity, context.stroke();
10421
10397
  }
@@ -10453,7 +10429,7 @@
10453
10429
  height: height
10454
10430
  } = rect.attribute;
10455
10431
  if (width = (null != width ? width : x1 - originX) || 0, height = (null != height ? height : y1 - originY) || 0, Array.isArray(stroke) && stroke.some(s => !1 === s)) {
10456
- if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num))) {
10432
+ if (context.setStrokeStyle(rect, rect.attribute, x, y, groupAttribute), !(0 === cornerRadius || isArray$9(cornerRadius) && cornerRadius.every(num => 0 === num))) {
10457
10433
  let lastStroke,
10458
10434
  lastStrokeI = 0;
10459
10435
  return createRectPath(context, x, y, width, height, cornerRadius, new Array(4).fill(0).map((_, i) => (x1, y1, x2, y2) => {
@@ -10657,7 +10633,7 @@
10657
10633
  } = arc.attribute;
10658
10634
  outerRadius += outerPadding, innerRadius -= innerPadding;
10659
10635
  let conicalOffset = 0;
10660
- const tempChangeConicalColor = (isBoolean$4(cap) && cap || cap[0]) && "conical" === fill.gradient;
10636
+ const tempChangeConicalColor = (isBoolean$6(cap) && cap || cap[0]) && "conical" === fill.gradient;
10661
10637
  if (tempChangeConicalColor) {
10662
10638
  const {
10663
10639
  sc: sc,
@@ -10686,7 +10662,7 @@
10686
10662
  drawArcPath(arc, context, x, y, outerRadius, innerRadius, arrayStroke);
10687
10663
  beforeRenderContribitionsRuned || this.beforeRenderStep(arc, context, x, y, doFill, doStroke, fVisible, sVisible, arcAttribute, drawContext, fillCb, strokeCb), strokeCb ? strokeCb(context, arc.attribute, arcAttribute) : sVisible && (context.setStrokeStyle(arc, arc.attribute, x, y, arcAttribute), context.stroke());
10688
10664
  }
10689
- if ((isBoolean$4(cap) && cap || cap[1]) && forceShowCap) {
10665
+ if ((isBoolean$6(cap) && cap || cap[1]) && forceShowCap) {
10690
10666
  const {
10691
10667
  startAngle: sa,
10692
10668
  endAngle: ea
@@ -10923,7 +10899,7 @@
10923
10899
  offsetX: offsetX,
10924
10900
  offsetY: offsetY,
10925
10901
  offsetZ: z
10926
- }), line.cache && !isArray$7(line.cache) && line.cache.curves.every(c => c.defined) && line.attribute.curveType && line.attribute.curveType.includes("Closed") && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(line, attribute, defaultAttribute);
10902
+ }), line.cache && !isArray$9(line.cache) && line.cache.curves.every(c => c.defined) && line.attribute.curveType && line.attribute.curveType.includes("Closed") && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(line, attribute, defaultAttribute);
10927
10903
  const {
10928
10904
  x: originX = 0,
10929
10905
  x: originY = 0
@@ -10935,7 +10911,7 @@
10935
10911
  connectedY: connectedY,
10936
10912
  connectedStyle: connectedStyle
10937
10913
  } = attribute;
10938
- if (isArray$7(defaultAttribute) ? (connectedType = null !== (_b = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _b ? _b : defaultAttribute[1].connectedType, connectedX = null !== (_c = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _c ? _c : defaultAttribute[1].connectedX, connectedY = null !== (_d = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _d ? _d : defaultAttribute[1].connectedY, connectedStyle = null !== (_e = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _e ? _e : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), "none" !== connectedType) {
10914
+ if (isArray$9(defaultAttribute) ? (connectedType = null !== (_b = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _b ? _b : defaultAttribute[1].connectedType, connectedX = null !== (_c = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _c ? _c : defaultAttribute[1].connectedX, connectedY = null !== (_d = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _d ? _d : defaultAttribute[1].connectedY, connectedStyle = null !== (_e = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _e ? _e : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), "none" !== connectedType) {
10939
10915
  context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
10940
10916
  offsetX: offsetX,
10941
10917
  offsetY: offsetY,
@@ -10946,7 +10922,7 @@
10946
10922
  zeroY: connectedY
10947
10923
  });
10948
10924
  const da = [];
10949
- isArray$7(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute), !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.stroke()));
10925
+ isArray$9(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute), !1 !== fill && (fillCb ? fillCb(context, attribute, defaultAttribute) : fillOpacity && (context.setCommonStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.fill())), !1 !== stroke && (strokeCb ? strokeCb(context, attribute, defaultAttribute) : strokeOpacity && (context.setStrokeStyle(line, connectedStyle, originX - offsetX, originY - offsetY, da), context.stroke()));
10950
10926
  }
10951
10927
  return !1;
10952
10928
  }
@@ -11241,7 +11217,7 @@
11241
11217
  const {
11242
11218
  stroke = areaAttribute && areaAttribute.stroke
11243
11219
  } = area.attribute;
11244
- if (isArray$7(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1]) if (context.beginPath(), stroke[0]) {
11220
+ if (isArray$9(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1]) if (context.beginPath(), stroke[0]) {
11245
11221
  context.moveTo(startP.x + offsetX, startP.y + offsetY, z);
11246
11222
  for (let i = 1; i < points.length; i++) {
11247
11223
  const p = points[i];
@@ -11391,7 +11367,7 @@
11391
11367
  connectedStyle: connectedStyle
11392
11368
  } = attribute;
11393
11369
  const da = [];
11394
- if (connect && (isArray$7(defaultAttribute) ? (connectedType = null !== (_a = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _a ? _a : defaultAttribute[1].connectedType, connectedX = null !== (_b = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _b ? _b : defaultAttribute[1].connectedX, connectedY = null !== (_c = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _c ? _c : defaultAttribute[1].connectedY, connectedStyle = null !== (_d = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _d ? _d : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), isArray$7(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
11370
+ if (connect && (isArray$9(defaultAttribute) ? (connectedType = null !== (_a = null != connectedType ? connectedType : defaultAttribute[0].connectedType) && void 0 !== _a ? _a : defaultAttribute[1].connectedType, connectedX = null !== (_b = null != connectedX ? connectedX : defaultAttribute[0].connectedX) && void 0 !== _b ? _b : defaultAttribute[1].connectedX, connectedY = null !== (_c = null != connectedY ? connectedY : defaultAttribute[0].connectedY) && void 0 !== _c ? _c : defaultAttribute[1].connectedY, connectedStyle = null !== (_d = null != connectedStyle ? connectedStyle : defaultAttribute[0].connectedStyle) && void 0 !== _d ? _d : defaultAttribute[1].connectedStyle) : (connectedType = null != connectedType ? connectedType : defaultAttribute.connectedType, connectedX = null != connectedX ? connectedX : defaultAttribute.connectedX, connectedY = null != connectedY ? connectedY : defaultAttribute.connectedY, connectedStyle = null != connectedStyle ? connectedStyle : defaultAttribute.connectedStyle), "connect" !== connectedType && "zero" !== connectedType && (connectedType = "none"), isArray$9(defaultAttribute) ? defaultAttribute.forEach(i => da.push(i)) : da.push(defaultAttribute), da.push(attribute)), connect && "none" === connectedType) return !1;
11395
11371
  context.beginPath();
11396
11372
  const {
11397
11373
  points: points,
@@ -11429,7 +11405,7 @@
11429
11405
  const {
11430
11406
  stroke = defaultAttribute && defaultAttribute[1] && defaultAttribute[1].stroke
11431
11407
  } = attribute;
11432
- isArray$7(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? "x" : "y", {
11408
+ isArray$9(stroke) && (stroke[0] || stroke[2]) && !1 === stroke[1] && (context.beginPath(), drawSegments(context.camera ? context : context.nativeContext, stroke[0] ? cache.top : cache.bottom, clipRange, direction === Direction$1.ROW ? "x" : "y", {
11433
11409
  offsetX: offsetX,
11434
11410
  offsetY: offsetY,
11435
11411
  offsetZ: offsetZ,
@@ -11553,7 +11529,7 @@
11553
11529
  if (!rect.valid || !visible) return;
11554
11530
  if (!doFill && !doStroke) return;
11555
11531
  if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
11556
- 0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
11532
+ 0 === cornerRadius || isArray$9(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
11557
11533
  const doFillOrStroke = {
11558
11534
  doFill: doFill,
11559
11535
  doStroke: doStroke
@@ -11636,7 +11612,7 @@
11636
11612
  if (keepDirIn3d && context.camera && context.project) {
11637
11613
  const p = context.project(x, y, z),
11638
11614
  camera = context.camera;
11639
- context.camera = null, !1 === parsedPath.draw(context, isArray$7(size) ? [size[0] * scaleX, size[1] * scaleY] : size * scaleX, p.x, p.y, void 0, callback) && context.closePath(), context.camera = camera;
11615
+ context.camera = null, !1 === parsedPath.draw(context, isArray$9(size) ? [size[0] * scaleX, size[1] * scaleY] : size * scaleX, p.x, p.y, void 0, callback) && context.closePath(), context.camera = camera;
11640
11616
  } else !1 === parsedPath.draw(context, size, x, y, z, callback) && context.closePath();
11641
11617
  context.setShadowBlendStyle && context.setShadowBlendStyle(symbol, symbol.attribute, symbolAttribute), this.beforeRenderStep(symbol, context, x, y, doFill, doStroke, fVisible, sVisible, symbolAttribute, drawContext, fillCb, strokeCb);
11642
11618
  const _runFill = () => {
@@ -11657,15 +11633,15 @@
11657
11633
  class DefaultBoundsAllocate {
11658
11634
  constructor() {
11659
11635
  this.pools = [];
11660
- for (let i = 0; i < 10; i++) this.pools.push(new AABBBounds());
11636
+ for (let i = 0; i < 10; i++) this.pools.push(new AABBBounds$1());
11661
11637
  }
11662
11638
  allocate(x1, y1, x2, y2) {
11663
- if (!this.pools.length) return new AABBBounds().setValue(x1, y1, x2, y2);
11639
+ if (!this.pools.length) return new AABBBounds$1().setValue(x1, y1, x2, y2);
11664
11640
  const b = this.pools.pop();
11665
11641
  return b.x1 = x1, b.y1 = y1, b.x2 = x2, b.y2 = y2, b;
11666
11642
  }
11667
11643
  allocateByObj(b) {
11668
- if (!this.pools.length) return new AABBBounds(b);
11644
+ if (!this.pools.length) return new AABBBounds$1(b);
11669
11645
  const _b = this.pools.pop();
11670
11646
  return _b.x1 = b.x1, _b.y1 = b.y1, _b.x2 = b.x2, _b.y2 = b.y2, _b;
11671
11647
  }
@@ -11720,7 +11696,7 @@
11720
11696
  };
11721
11697
  let b;
11722
11698
  "richtext" === graphic.type && (matrix = context.currentMatrix.clone(), context.restore(), context.save(), context.setTransformForCurrent());
11723
- const shouldReCalBounds = isObject$8(background) && background.background,
11699
+ const shouldReCalBounds = isObject$a(background) && background.background,
11724
11700
  onlyTranslate = graphic.transMatrix.onlyTranslate();
11725
11701
  if (shouldReCalBounds) {
11726
11702
  const _b = graphic.AABBBounds,
@@ -11885,7 +11861,7 @@
11885
11861
  underlineDash = textAttribute.underlineDash,
11886
11862
  fillOpacity = textAttribute.fillOpacity
11887
11863
  } = text.attribute,
11888
- isMulti = !isNil$3(multiOption),
11864
+ isMulti = !isNil$5(multiOption),
11889
11865
  w = isMulti ? multiOption.width : text.clipedWidth,
11890
11866
  offsetX = isMulti ? 0 : textDrawOffsetX(textAlign, w),
11891
11867
  attribute = {
@@ -11999,7 +11975,7 @@
11999
11975
  doFill: doFill,
12000
11976
  doStroke: doStroke
12001
11977
  } = data;
12002
- context.beginPath(), cornerRadius <= 0 || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius, closePath), closePath && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(polygon, polygon.attribute, polygonAttribute), this.beforeRenderStep(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
11978
+ context.beginPath(), cornerRadius <= 0 || isArray$9(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius, closePath), closePath && context.closePath(), context.setShadowBlendStyle && context.setShadowBlendStyle(polygon, polygon.attribute, polygonAttribute), this.beforeRenderStep(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
12003
11979
  const _runFill = () => {
12004
11980
  doFill && (fillCb ? fillCb(context, polygon.attribute, polygonAttribute) : fVisible && (context.setCommonStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.fill()));
12005
11981
  },
@@ -12070,7 +12046,7 @@
12070
12046
  context.disableFill = !0, context.disableStroke = !0, context.disableBeginPath = !0, path.forEach(g => {
12071
12047
  drawContext.drawContribution.getRenderContribution(g).draw(g, drawContext.renderService, drawContext, params);
12072
12048
  }), context.disableFill = disableFill, context.disableStroke = disableStroke, context.disableBeginPath = disableBeginPath;
12073
- } else 0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
12049
+ } else 0 === cornerRadius || isArray$9(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius));
12074
12050
  this._groupRenderContribitions || (this._groupRenderContribitions = this.groupRenderContribitions.getContributions() || [], this._groupRenderContribitions.push(defaultGroupBackgroundRenderContribution));
12075
12051
  const doFillOrStroke = {
12076
12052
  doFill: doFill,
@@ -12166,7 +12142,7 @@
12166
12142
  const res = image.resources.get(url);
12167
12143
  if ("success" !== res.state) return;
12168
12144
  let needRestore = !1;
12169
- 0 === cornerRadius || isArray$7(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), needRestore = !0), context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
12145
+ 0 === cornerRadius || isArray$9(cornerRadius) && cornerRadius.every(num => 0 === num) || (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius), needRestore = !0), context.setShadowBlendStyle && context.setShadowBlendStyle(image, image.attribute, imageAttribute);
12170
12146
  const _runFill = () => {
12171
12147
  if (doFill) if (fillCb) fillCb(context, image.attribute, imageAttribute);else if (fVisible) {
12172
12148
  context.setCommonStyle(image, image.attribute, x, y, imageAttribute);
@@ -12188,7 +12164,7 @@
12188
12164
  } = image.attribute;
12189
12165
  if (!url || !image.resources) return;
12190
12166
  const res = image.resources.get(url);
12191
- if ("loading" === res.state && isString$4(url)) return void ResourceLoader.improveImageLoading(url);
12167
+ if ("loading" === res.state && isString$6(url)) return void ResourceLoader.improveImageLoading(url);
12192
12168
  if ("success" !== res.state) return;
12193
12169
  const {
12194
12170
  context: context
@@ -12271,8 +12247,8 @@
12271
12247
  if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
12272
12248
  };
12273
12249
  const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
12274
- const tempDirtyBounds = new AABBBounds(),
12275
- tempBackupDirtyBounds = new AABBBounds();
12250
+ const tempDirtyBounds = new AABBBounds$1(),
12251
+ tempBackupDirtyBounds = new AABBBounds$1();
12276
12252
  class ShadowRootDrawItemInterceptorContribution {
12277
12253
  constructor() {
12278
12254
  this.order = 1;
@@ -12666,7 +12642,7 @@
12666
12642
  let Text$1 = class Text extends Graphic {
12667
12643
  get font() {
12668
12644
  const textTheme = this.getGraphicTheme();
12669
- return this._font || (this._font = getContextFont(this.attribute, textTheme)), this._font;
12645
+ return this._font || (this._font = getContextFont$1(this.attribute, textTheme)), this._font;
12670
12646
  }
12671
12647
  get clipedText() {
12672
12648
  var _a;
@@ -12716,7 +12692,7 @@
12716
12692
  const {
12717
12693
  text: text
12718
12694
  } = this.attribute;
12719
- return isArray$7(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
12695
+ return isArray$9(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
12720
12696
  }
12721
12697
  getGraphicTheme() {
12722
12698
  return getTheme(this).text;
@@ -12768,7 +12744,7 @@
12768
12744
  const shadowBlurHalfWidth = shadowBlur / Math.abs(scaleX + scaleY);
12769
12745
  boundStroke(tb1, shadowBlurHalfWidth, !0, strokeBoundsBuffer), aabbBounds.union(tb1);
12770
12746
  }
12771
- return application.graphicService.combindShadowAABBBounds(aabbBounds, this), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || application.graphicService.updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds), transformBoundsWithMatrix(aabbBounds, aabbBounds, this.transMatrix), aabbBounds;
12747
+ return application.graphicService.combindShadowAABBBounds(aabbBounds, this), null == attribute.forceBoundsHeight && null == attribute.forceBoundsWidth || application.graphicService.updateHTMLTextAABBBounds(attribute, textTheme, aabbBounds), transformBoundsWithMatrix$1(aabbBounds, aabbBounds, this.transMatrix), aabbBounds;
12772
12748
  }
12773
12749
  updateSingallineAABBBounds(text) {
12774
12750
  this.updateMultilineAABBBounds([text]);
@@ -12871,7 +12847,7 @@
12871
12847
  lineHeight: lineHeight
12872
12848
  },
12873
12849
  layoutObj = new CanvasTextLayout(fontFamily, textOptions, textMeasure),
12874
- lines = isArray$7(text) ? text.map(l => l.toString()) : [text.toString()],
12850
+ lines = isArray$9(text) ? text.map(l => l.toString()) : [text.toString()],
12875
12851
  linesLayout = [],
12876
12852
  bboxWH = [0, 0];
12877
12853
  let lineCountLimit = 1 / 0;
@@ -13091,7 +13067,7 @@
13091
13067
  const {
13092
13068
  text: text
13093
13069
  } = this.attribute;
13094
- return isArray$7(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
13070
+ return isArray$9(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
13095
13071
  }
13096
13072
  updateMultilineAABBBounds(text) {
13097
13073
  var _a, _b, _c, _d;
@@ -13226,13 +13202,13 @@
13226
13202
 
13227
13203
  class BaseSymbol {
13228
13204
  bounds(size, bounds) {
13229
- if (isNumber$4(size)) {
13205
+ if (isNumber$6(size)) {
13230
13206
  const halfS = size / 2;
13231
13207
  bounds.x1 = -halfS, bounds.x2 = halfS, bounds.y1 = -halfS, bounds.y2 = halfS;
13232
13208
  } else bounds.x1 = -size[0] / 2, bounds.x2 = size[0] / 2, bounds.y1 = -size[1] / 2, bounds.y2 = size[1] / 2;
13233
13209
  }
13234
13210
  parseSize(size) {
13235
- return isNumber$4(size) ? size : Math.min(size[0], size[1]);
13211
+ return isNumber$6(size) ? size : Math.min(size[0], size[1]);
13236
13212
  }
13237
13213
  }
13238
13214
 
@@ -13651,19 +13627,19 @@
13651
13627
  super(...arguments), this.type = "rect", this.pathStr = "M -0.5,0.25 L 0.5,0.25 L 0.5,-0.25,L -0.5,-0.25 Z";
13652
13628
  }
13653
13629
  draw(ctx, size, x, y) {
13654
- return isNumber$4(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
13630
+ return isNumber$6(size) ? rectSize(ctx, size, x, y) : rectSizeArray(ctx, size, x, y);
13655
13631
  }
13656
13632
  drawOffset(ctx, size, x, y, offset) {
13657
- return isNumber$4(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
13633
+ return isNumber$6(size) ? rectSize(ctx, size + 2 * offset, x, y) : rectSizeArray(ctx, [size[0] + 2 * offset, size[1] + 2 * offset], x, y);
13658
13634
  }
13659
13635
  }
13660
13636
  var rect = new RectSymbol();
13661
13637
 
13662
- const tempBounds = new AABBBounds();
13638
+ const tempBounds = new AABBBounds$1();
13663
13639
  class CustomSymbolClass {
13664
13640
  constructor(type, path) {
13665
13641
  let isSvg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
13666
- this.pathStr = "", this.type = type, isArray$7(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
13642
+ this.pathStr = "", this.type = type, isArray$9(path) ? this.svgCache = path : this.path = path, this.isSvg = isSvg;
13667
13643
  }
13668
13644
  drawOffset(ctx, size, x, y, offset, z, cb) {
13669
13645
  return size = this.parseSize(size), this.isSvg ? !!this.svgCache && (this.svgCache.forEach(item => {
@@ -13674,7 +13650,7 @@
13674
13650
  return size = this.parseSize(size), this.drawOffset(ctx, size, x, y, 0, z, cb);
13675
13651
  }
13676
13652
  parseSize(size) {
13677
- return isNumber$4(size) ? size : Math.min(size[0], size[1]);
13653
+ return isNumber$6(size) ? size : Math.min(size[0], size[1]);
13678
13654
  }
13679
13655
  bounds(size, bounds) {
13680
13656
  if (size = this.parseSize(size), this.isSvg) {
@@ -13719,7 +13695,7 @@
13719
13695
  return aabbBounds;
13720
13696
  };
13721
13697
 
13722
- const _tempBounds$1 = new AABBBounds(),
13698
+ const _tempBounds$1 = new AABBBounds$1(),
13723
13699
  SYMBOL_UPDATE_TAG_KEY = ["symbolType", "size", ...GRAPHIC_UPDATE_TAG_KEY];
13724
13700
  let Symbol$5 = class Symbol extends Graphic {
13725
13701
  constructor() {
@@ -13738,7 +13714,7 @@
13738
13714
  const {
13739
13715
  size: size
13740
13716
  } = this.attribute;
13741
- return isArray$7(size) ? 2 === size.length && size.every(this._validNumber) : this._validNumber(size);
13717
+ return isArray$9(size) ? 2 === size.length && size.every(this._validNumber) : this._validNumber(size);
13742
13718
  }
13743
13719
  doUpdateParsedPath() {
13744
13720
  const symbolTheme = this.getGraphicTheme();
@@ -13755,7 +13731,7 @@
13755
13731
  svg: svg
13756
13732
  } = parser.parse(symbolType);
13757
13733
  if (!svg) return null;
13758
- const path = isArray$7(svg.path) ? svg.path : [svg.path];
13734
+ const path = isArray$9(svg.path) ? svg.path : [svg.path];
13759
13735
  _tempBounds$1.clear();
13760
13736
  const cacheList = [];
13761
13737
  path.forEach(item => {
@@ -13798,7 +13774,7 @@
13798
13774
  const {
13799
13775
  size = symbolTheme.size
13800
13776
  } = attribute;
13801
- if (isArray$7(size)) aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2);else {
13777
+ if (isArray$9(size)) aabbBounds.set(-size[0] / 2, -size[1] / 2, size[0] / 2, size[1] / 2);else {
13802
13778
  const halfWH = size / 2;
13803
13779
  aabbBounds.set(-halfWH, -halfWH, halfWH, halfWH);
13804
13780
  }
@@ -13819,7 +13795,7 @@
13819
13795
  toCustomPath() {
13820
13796
  const symbolInstance = this.getParsedPath(),
13821
13797
  size = this.attribute.size,
13822
- formattedSize = isArray$7(size) ? size : [size, size];
13798
+ formattedSize = isArray$9(size) ? size : [size, size];
13823
13799
  return symbolInstance.path ? new CustomPath2D().fromCustomPath2D(symbolInstance.path, 0, 0, formattedSize[0], formattedSize[1]) : new CustomPath2D().fromString(symbolInstance.pathStr, 0, 0, formattedSize[0], formattedSize[1]);
13824
13800
  }
13825
13801
  clone() {
@@ -14313,7 +14289,7 @@
14313
14289
  this._marginArray = "number" == typeof marginArray ? [marginArray, marginArray, marginArray, marginArray] : marginArray;
14314
14290
  }
14315
14291
  this.onBeforeAttributeUpdate = (val, attributes, key) => {
14316
- if (isArray$7(key) && -1 !== key.indexOf("margin") || "margin" === key) if (attributes.margin) {
14292
+ if (isArray$9(key) && -1 !== key.indexOf("margin") || "margin" === key) if (attributes.margin) {
14317
14293
  const marginArray = parsePadding(attributes.margin);
14318
14294
  this._marginArray = "number" == typeof marginArray ? [marginArray, marginArray, marginArray, marginArray] : marginArray;
14319
14295
  } else this._marginArray = [0, 0, 0, 0];
@@ -14689,7 +14665,7 @@
14689
14665
  }
14690
14666
  } else {
14691
14667
  const richTextConfig = this.combinedStyleToCharacter(textConfig[i]);
14692
- if (isNumber$4(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
14668
+ if (isNumber$6(richTextConfig.text) && (richTextConfig.text = `${richTextConfig.text}`), richTextConfig.text && richTextConfig.text.includes("\n")) {
14693
14669
  const textParts = richTextConfig.text.split("\n");
14694
14670
  for (let j = 0; j < textParts.length; j++) paragraphs.push(new Paragraph(textParts[j], 0 !== j, richTextConfig));
14695
14671
  } else richTextConfig.text && paragraphs.push(new Paragraph(richTextConfig.text, !1, richTextConfig));
@@ -14793,7 +14769,7 @@
14793
14769
  const pathTheme = this.getGraphicTheme();
14794
14770
  if (!this.valid) return pathTheme.path;
14795
14771
  const attribute = this.attribute;
14796
- return attribute.path instanceof CustomPath2D ? attribute.path : (isNil$3(this.cache) && this.doUpdatePathShape(), this.cache instanceof CustomPath2D ? this.cache : pathTheme.path);
14772
+ return attribute.path instanceof CustomPath2D ? attribute.path : (isNil$5(this.cache) && this.doUpdatePathShape(), this.cache instanceof CustomPath2D ? this.cache : pathTheme.path);
14797
14773
  }
14798
14774
  getGraphicTheme() {
14799
14775
  return getTheme(this).path;
@@ -14818,7 +14794,7 @@
14818
14794
  }
14819
14795
  doUpdatePathShape() {
14820
14796
  const attribute = this.attribute;
14821
- isString$4(attribute.path, !0) ? this.cache = new CustomPath2D().fromString(attribute.path) : attribute.customPath && (this.cache = new CustomPath2D(), attribute.customPath(this.cache, this));
14797
+ isString$6(attribute.path, !0) ? this.cache = new CustomPath2D().fromString(attribute.path) : attribute.customPath && (this.cache = new CustomPath2D(), attribute.customPath(this.cache, this));
14822
14798
  }
14823
14799
  needUpdateTags(keys) {
14824
14800
  return super.needUpdateTags(keys, PATH_UPDATE_TAG_KEY);
@@ -14967,8 +14943,8 @@
14967
14943
  } = this.attribute;
14968
14944
  if (outerRadius += outerPadding, innerRadius -= innerPadding, 0 === cornerRadius || "0%" === cornerRadius) return 0;
14969
14945
  const deltaRadius = Math.abs(outerRadius - innerRadius),
14970
- parseCR = cornerRadius => Math.min(isNumber$4(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
14971
- if (isArray$7(cornerRadius)) {
14946
+ parseCR = cornerRadius => Math.min(isNumber$6(cornerRadius, !0) ? cornerRadius : deltaRadius * parseFloat(cornerRadius) / 100, deltaRadius / 2);
14947
+ if (isArray$9(cornerRadius)) {
14972
14948
  const crList = cornerRadius.map(cr => parseCR(cr) || 0);
14973
14949
  return 0 === crList.length ? [crList[0], crList[0], crList[0], crList[0]] : 2 === crList.length ? [crList[0], crList[1], crList[0], crList[1]] : (3 === crList.length && crList.push(0), crList);
14974
14950
  }
@@ -15616,7 +15592,7 @@
15616
15592
  };
15617
15593
  let DefaultDrawContribution = class {
15618
15594
  constructor(contributions, drawItemInterceptorContributions) {
15619
- this.contributions = contributions, this.drawItemInterceptorContributions = drawItemInterceptorContributions, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds(), this.backupDirtyBounds = new Bounds(), this.global = application.global, this.layerService = application.layerService, this.init();
15595
+ this.contributions = contributions, this.drawItemInterceptorContributions = drawItemInterceptorContributions, this.currentRenderMap = new Map(), this.defaultRenderMap = new Map(), this.styleRenderMap = new Map(), this.dirtyBounds = new Bounds$1(), this.backupDirtyBounds = new Bounds$1(), this.global = application.global, this.layerService = application.layerService, this.init();
15620
15596
  }
15621
15597
  init() {
15622
15598
  this.contributions.forEach(item => {
@@ -16165,7 +16141,7 @@
16165
16141
  }
16166
16142
  }
16167
16143
 
16168
- const globalBounds = new AABBBounds();
16144
+ const globalBounds = new AABBBounds$1();
16169
16145
  class DirtyBoundsPlugin {
16170
16146
  constructor() {
16171
16147
  this.name = "DirtyBoundsPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid;
@@ -16327,7 +16303,7 @@
16327
16303
  canvas: params.canvas
16328
16304
  }), this.state = "normal", this.renderCount = 0, this.tryInitEventSystem(), this._background = null !== (_a = params.background) && void 0 !== _a ? _a : DefaultConfig$1.BACKGROUND, this.appendChild(this.layerService.createLayer(this, {
16329
16305
  main: !0
16330
- })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer, this.timeline = new DefaultTimeline(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), params.optimize || (params.optimize = {}), this.optmize(params.optimize), params.background && isString$4(this._background) && this._background.includes("/") && this.setAttributes({
16306
+ })), this.nextFrameRenderLayerSet = new Set(), this.willNextFrameRender = !1, this.stage = this, this.renderStyle = params.renderStyle, params.autoRender && this.enableAutoRender(), params.autoRefresh && this.enableAutoRefresh(), !1 === params.disableDirtyBounds && this.enableDirtyBounds(), params.enableHtmlAttribute && this.enableHtmlAttribute(params.enableHtmlAttribute), params.ReactDOM && this.enableReactAttribute(params.ReactDOM), params.enableLayout && this.enableLayout(), this.hooks.beforeRender.tap("constructor", this.beforeRender), this.hooks.afterRender.tap("constructor", this.afterRender), this._beforeRender = params.beforeRender, this._afterRender = params.afterRender, this.ticker = params.ticker || defaultTicker, this.supportInteractiveLayer = !1 !== params.interactiveLayer, this.timeline = new DefaultTimeline(), this.ticker.addTimeline(this.timeline), this.timeline.pause(), params.optimize || (params.optimize = {}), this.optmize(params.optimize), params.background && isString$6(this._background) && this._background.includes("/") && this.setAttributes({
16331
16307
  background: this._background
16332
16308
  }), this.ticker.on("afterTick", this.afterTickCb);
16333
16309
  }
@@ -16480,7 +16456,7 @@
16480
16456
  }
16481
16457
  enableDirtyBounds() {
16482
16458
  if (this.dirtyBounds) return;
16483
- this.dirtyBounds = new Bounds();
16459
+ this.dirtyBounds = new Bounds$1();
16484
16460
  let plugin = this.pluginService.findPluginsByName("DirtyBoundsPlugin")[0];
16485
16461
  plugin ? plugin.activate(this.pluginService) : (plugin = new DirtyBoundsPlugin(), this.pluginService.register(plugin));
16486
16462
  }
@@ -16876,7 +16852,7 @@
16876
16852
  service.env === this.type && service.setActiveEnvContribution(this);
16877
16853
  }
16878
16854
  getNativeAABBBounds(dom) {
16879
- return new AABBBounds();
16855
+ return new AABBBounds$1();
16880
16856
  }
16881
16857
  removeDom(dom) {
16882
16858
  return !1;
@@ -16961,7 +16937,7 @@
16961
16937
  };
16962
16938
  let BaseWindowHandlerContribution = class {
16963
16939
  constructor() {
16964
- this._uid = Generator.GenAutoIncrementId(), this.viewBox = new AABBBounds(), this.modelMatrix = new Matrix(1, 0, 0, 1, 0, 0);
16940
+ this._uid = Generator.GenAutoIncrementId(), this.viewBox = new AABBBounds$1(), this.modelMatrix = new Matrix(1, 0, 0, 1, 0, 0);
16965
16941
  }
16966
16942
  onChange(cb) {
16967
16943
  this._onChangeCb = cb;
@@ -17027,7 +17003,7 @@
17027
17003
  params.pickerService = this;
17028
17004
  const w = params.bounds.width(),
17029
17005
  h = params.bounds.height();
17030
- if (!new AABBBounds().setValue(0, 0, w, h).containsPoint(point)) return result;
17006
+ if (!new AABBBounds$1().setValue(0, 0, w, h).containsPoint(point)) return result;
17031
17007
  this.pickContext && (this.pickContext.inuse = !0), params.pickContext = this.pickContext, this.pickContext && this.pickContext.clearMatrix(!0, 1);
17032
17008
  const parentMatrix = new Matrix(1, 0, 0, 1, 0, 0);
17033
17009
  let group;
@@ -17280,10 +17256,10 @@
17280
17256
  graphicCreator.RegisterGraphicCreator("wrapText", createWrapText);
17281
17257
  }
17282
17258
 
17283
- const _tempBounds = new AABBBounds();
17259
+ const _tempBounds = new AABBBounds$1();
17284
17260
  class FlexLayoutPlugin {
17285
17261
  constructor() {
17286
- this.name = "FlexLayoutPlugin", this.activeEvent = "onRegister", this.id = Generator.GenAutoIncrementId(), this.key = this.name + this.id, this.tempBounds = new AABBBounds();
17262
+ this.name = "FlexLayoutPlugin", this.activeEvent = "onRegister", this.id = Generator.GenAutoIncrementId(), this.key = this.name + this.id, this.tempBounds = new AABBBounds$1();
17287
17263
  }
17288
17264
  pauseLayout(p) {
17289
17265
  this.pause = p;
@@ -17564,7 +17540,7 @@
17564
17540
  [key]: value
17565
17541
  }, this.attribute, key, context);
17566
17542
  if (params) return this._setAttributes(params, forceUpdateTag);
17567
- isPlainObject$3(this.attribute[key]) && isPlainObject$3(value) && !isFunction$5(this.attribute[key]) && !isFunction$5(value) ? merge$1(this.attribute[key], value) : this.attribute[key] = value, GROUP_ATTRIBUTES.includes(key) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
17543
+ isPlainObject$5(this.attribute[key]) && isPlainObject$5(value) && !isFunction$7(this.attribute[key]) && !isFunction$7(value) ? merge$2(this.attribute[key], value) : this.attribute[key] = value, GROUP_ATTRIBUTES.includes(key) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTag(key) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
17568
17544
  }
17569
17545
  setAttributes(params, forceUpdateTag, context) {
17570
17546
  return params = this.onBeforeAttributeUpdate && this.onBeforeAttributeUpdate(params, this.attribute, null, context) || params, this._setAttributes(params, forceUpdateTag);
@@ -17574,10 +17550,10 @@
17574
17550
  this._mergeAttributes(params, keys), keys.every(key => GROUP_ATTRIBUTES.includes(key)) || this.render(), this.valid = this.isValid(), this.updateShapeAndBoundsTagSetted() || !forceUpdateTag && !this.needUpdateTags(keys) ? this.addUpdateBoundTag() : this.addUpdateShapeAndBoundsTag(), this.addUpdatePositionTag(), this.onAttributeUpdate();
17575
17551
  }
17576
17552
  _mergeAttributes(params, keys) {
17577
- isNil$3(keys) && (keys = Object.keys(params));
17553
+ isNil$5(keys) && (keys = Object.keys(params));
17578
17554
  for (let i = 0; i < keys.length; i++) {
17579
17555
  const key = keys[i];
17580
- !isPlainObject$3(this.attribute[key]) || isFunction$5(this.attribute[key]) || isFunction$5(params[key]) ? this.attribute[key] = params[key] : merge$1(this.attribute[key], params[key]);
17556
+ !isPlainObject$5(this.attribute[key]) || isFunction$7(this.attribute[key]) || isFunction$7(params[key]) ? this.attribute[key] = params[key] : merge$2(this.attribute[key], params[key]);
17581
17557
  }
17582
17558
  }
17583
17559
  bindEvents() {}
@@ -18366,7 +18342,7 @@
18366
18342
  const {
18367
18343
  scaleIn3d = defaultParams.scaleIn3d
18368
18344
  } = params;
18369
- params.font ? _context.font = params.font : _context.font = getContextFont(params, defaultParams, scaleIn3d && this.camera && this.camera.getProjectionScale(z));
18345
+ params.font ? _context.font = params.font : _context.font = getContextFont$1(params, defaultParams, scaleIn3d && this.camera && this.camera.getProjectionScale(z));
18370
18346
  const {
18371
18347
  fontFamily = defaultParams.fontFamily,
18372
18348
  fontSize = defaultParams.fontSize
@@ -18376,7 +18352,7 @@
18376
18352
  setTextStyle(params, defaultParams, z) {
18377
18353
  var _a, _b;
18378
18354
  const _context = this.nativeContext;
18379
- defaultParams || (defaultParams = this.textAttributes), params.font ? _context.font = params.font : _context.font = getContextFont(params, defaultParams, this.camera && this.camera.getProjectionScale(z));
18355
+ defaultParams || (defaultParams = this.textAttributes), params.font ? _context.font = params.font : _context.font = getContextFont$1(params, defaultParams, this.camera && this.camera.getProjectionScale(z));
18380
18356
  const {
18381
18357
  fontFamily = defaultParams.fontFamily,
18382
18358
  fontSize = defaultParams.fontSize
@@ -18593,7 +18569,7 @@
18593
18569
  return `${BrowserWindowHandlerContribution_1.idprefix}_${BrowserWindowHandlerContribution_1.prefix_count++}`;
18594
18570
  }
18595
18571
  constructor() {
18596
- super(), this.type = "browser", this._canvasIsIntersecting = !0, this.global = application.global, this.viewBox = new AABBBounds(), this.modelMatrix = new Matrix(1, 0, 0, 1, 0, 0);
18572
+ super(), this.type = "browser", this._canvasIsIntersecting = !0, this.global = application.global, this.viewBox = new AABBBounds$1(), this.modelMatrix = new Matrix(1, 0, 0, 1, 0, 0);
18597
18573
  }
18598
18574
  getTitle() {
18599
18575
  return this.canvas.id && this.canvas.id.toString();
@@ -18847,8 +18823,8 @@
18847
18823
  nativeCanvas = null === (_b = domElement.getNativeHandler) || void 0 === _b ? void 0 : _b.call(domElement).nativeCanvas;
18848
18824
  let scaleX, scaleY;
18849
18825
  return nativeCanvas && (scaleX = rect.width / nativeCanvas.offsetWidth, scaleY = rect.height / nativeCanvas.offsetHeight), {
18850
- x: (x - rect.left) / (isValidNumber$1(scaleX) ? scaleX : 1),
18851
- y: (y - rect.top) / (isValidNumber$1(scaleY) ? scaleY : 1)
18826
+ x: (x - rect.left) / (isValidNumber$3(scaleX) ? scaleX : 1),
18827
+ y: (y - rect.top) / (isValidNumber$3(scaleY) ? scaleY : 1)
18852
18828
  };
18853
18829
  }
18854
18830
  return {
@@ -18862,7 +18838,7 @@
18862
18838
  const b = dom.getBoundingClientRect();
18863
18839
  return new DynamicB(b);
18864
18840
  }
18865
- return new AABBBounds();
18841
+ return new AABBBounds$1();
18866
18842
  }
18867
18843
  removeDom(dom) {
18868
18844
  return dom.parentElement.removeChild(dom), !0;
@@ -18873,7 +18849,7 @@
18873
18849
  height: height,
18874
18850
  style: style
18875
18851
  } = params;
18876
- return style && (isString$4(style) ? dom.setAttribute("style", style) : Object.keys(style).forEach(k => {
18852
+ return style && (isString$6(style) ? dom.setAttribute("style", style) : Object.keys(style).forEach(k => {
18877
18853
  dom.style[k] = style[k];
18878
18854
  })), null != width && (dom.style.width = `${width}px`), null != height && (dom.style.height = `${height}px`), !0;
18879
18855
  }
@@ -18884,7 +18860,7 @@
18884
18860
  } = params,
18885
18861
  element = document.createElement(tagName);
18886
18862
  if (this.updateDom(element, params), parent) {
18887
- const pd = isString$4(parent) ? this.getElementById(parent) : parent;
18863
+ const pd = isString$6(parent) ? this.getElementById(parent) : parent;
18888
18864
  pd && pd.appendChild && pd.appendChild(element);
18889
18865
  }
18890
18866
  return element;
@@ -18975,7 +18951,7 @@
18975
18951
  }
18976
18952
  loadFont(font, source, descriptors) {
18977
18953
  return __awaiter$6(this, void 0, void 0, function* () {
18978
- return new FontFace(font, isString$4(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
18954
+ return new FontFace(font, isString$6(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
18979
18955
  return document.fonts.add(loadedFont), {
18980
18956
  loadState: "success"
18981
18957
  };
@@ -19188,7 +19164,7 @@
19188
19164
  loadPathPick$1 || (loadPathPick$1 = !0, bind(MathPathPicker).to(DefaultMathPathPicker).inSingletonScope(), bind(MathPickerContribution).toService(MathPathPicker));
19189
19165
  });
19190
19166
 
19191
- const _bounds = new AABBBounds();
19167
+ const _bounds = new AABBBounds$1();
19192
19168
  class RectPickerBase {
19193
19169
  constructor() {
19194
19170
  this.type = "rect", this.numberType = RECT_NUMBER_TYPE;
@@ -19215,7 +19191,7 @@
19215
19191
  x += point.x, y += point.y, pickContext.setTransformForCurrent();
19216
19192
  } else x = 0, y = 0, onlyTranslate = !1, pickContext.transformFromMatrix(rect.transMatrix, !0);
19217
19193
  let picked = !0;
19218
- if (!onlyTranslate || rect.shadowRoot || isNumber$4(cornerRadius, !0) && 0 !== cornerRadius || isArray$7(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
19194
+ if (!onlyTranslate || rect.shadowRoot || isNumber$6(cornerRadius, !0) && 0 !== cornerRadius || isArray$9(cornerRadius) && cornerRadius.some(num => 0 !== num)) picked = !1, this.canvasRenderer.drawShape(rect, pickContext, x, y, {}, null, (context, rectAttribute, themeAttribute) => !!picked || (picked = context.isPointInPath(point.x, point.y), picked), (context, rectAttribute, themeAttribute) => {
19219
19195
  if (picked) return !0;
19220
19196
  const lineWidth = rectAttribute.lineWidth || themeAttribute.lineWidth,
19221
19197
  pickStrokeBuffer = rectAttribute.pickStrokeBuffer || themeAttribute.pickStrokeBuffer,
@@ -19356,7 +19332,7 @@
19356
19332
  this._context = new NodeContext2d(this, this._dpr), this.nativeCanvas.width = this._pixelWidth, this.nativeCanvas.height = this._pixelHeight;
19357
19333
  }
19358
19334
  release() {
19359
- this._nativeCanvas.release && isFunction$5(this._nativeCanvas.release) && this._nativeCanvas.release();
19335
+ this._nativeCanvas.release && isFunction$7(this._nativeCanvas.release) && this._nativeCanvas.release();
19360
19336
  }
19361
19337
  };
19362
19338
  NodeCanvas.env = "node", NodeCanvas = __decorate$l([injectable(), __metadata$a("design:paramtypes", [Object])], NodeCanvas);
@@ -20680,7 +20656,7 @@
20680
20656
  loadScrollbarComponent();
20681
20657
  class ScrollBar extends AbstractComponent {
20682
20658
  constructor(attributes, options) {
20683
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, ScrollBar.defaultAttributes, attributes)), this.name = "scrollbar", this._onRailPointerDown = e => {
20659
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, ScrollBar.defaultAttributes, attributes)), this.name = "scrollbar", this._onRailPointerDown = e => {
20684
20660
  const {
20685
20661
  viewX: viewX,
20686
20662
  viewY: viewY
@@ -20966,13 +20942,13 @@
20966
20942
  return direct ? angleLargeThanPI ? 2 * Math.PI - ang : ang : angleLargeThanPI ? ang : 2 * Math.PI - ang;
20967
20943
  }
20968
20944
 
20969
- const initTextMeasure = (textSpec, option, useNaiveCanvas, defaultFontParams) => new TextMeasure(Object.assign({
20945
+ const initTextMeasure = (textSpec, option, useNaiveCanvas, defaultFontParams) => new TextMeasure$1(Object.assign({
20970
20946
  defaultFontParams: Object.assign({
20971
20947
  fontFamily: DEFAULT_TEXT_FONT_FAMILY$1,
20972
20948
  fontSize: DEFAULT_TEXT_FONT_SIZE$1
20973
20949
  }, defaultFontParams),
20974
20950
  getTextBounds: useNaiveCanvas ? void 0 : getTextBounds,
20975
- specialCharSet: "-/: .,@%'\"~" + TextMeasure.ALPHABET_CHAR_SET + TextMeasure.ALPHABET_CHAR_SET.toUpperCase()
20951
+ specialCharSet: "-/: .,@%'\"~" + TextMeasure$1.ALPHABET_CHAR_SET + TextMeasure$1.ALPHABET_CHAR_SET.toUpperCase()
20976
20952
  }, null != option ? option : {}), textSpec);
20977
20953
  function measureTextSize(text, textSpec) {
20978
20954
  let defaultTextTheme = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
@@ -21003,11 +20979,11 @@
21003
20979
  function getTextType(attributes) {
21004
20980
  let typeKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "type";
21005
20981
  var _a, _b;
21006
- return isObject$8(attributes.text) && "type" in attributes.text ? null !== (_a = attributes.text.type) && void 0 !== _a ? _a : "text" : typeKey in attributes && null !== (_b = attributes[typeKey]) && void 0 !== _b ? _b : "text";
20982
+ return isObject$a(attributes.text) && "type" in attributes.text ? null !== (_a = attributes.text.type) && void 0 !== _a ? _a : "text" : typeKey in attributes && null !== (_b = attributes[typeKey]) && void 0 !== _b ? _b : "text";
21007
20983
  }
21008
20984
  function richTextAttributeTransform(attributes) {
21009
20985
  var _a, _b;
21010
- return isValid$3(attributes.maxLineWidth) && (attributes.maxWidth = attributes.maxLineWidth, delete attributes.maxLineWidth), attributes.width = null !== (_a = attributes.width) && void 0 !== _a ? _a : 0, attributes.height = null !== (_b = attributes.height) && void 0 !== _b ? _b : 0, attributes.textConfig = attributes.text.text || attributes.text, attributes;
20986
+ return isValid$5(attributes.maxLineWidth) && (attributes.maxWidth = attributes.maxLineWidth, delete attributes.maxLineWidth), attributes.width = null !== (_a = attributes.width) && void 0 !== _a ? _a : 0, attributes.height = null !== (_b = attributes.height) && void 0 !== _b ? _b : 0, attributes.textConfig = attributes.text.text || attributes.text, attributes;
21011
20987
  }
21012
20988
  function htmlAttributeTransform(attributes) {
21013
20989
  const {
@@ -21057,7 +21033,7 @@
21057
21033
  return this._textShape;
21058
21034
  }
21059
21035
  constructor(attributes, options) {
21060
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Tag.defaultAttributes, attributes)), this.name = "tag", this._tagStates = [], this._rectStates = [], this._symbolStates = [], this._textStates = [];
21036
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Tag.defaultAttributes, attributes)), this.name = "tag", this._tagStates = [], this._rectStates = [], this._symbolStates = [], this._textStates = [];
21061
21037
  }
21062
21038
  render() {
21063
21039
  var _a, _b, _c;
@@ -21094,9 +21070,9 @@
21094
21070
  visible: shapeVisible
21095
21071
  } = shape,
21096
21072
  shapeStyle = __rest$5(shape, ["visible"]);
21097
- if (isBoolean$4(shapeVisible)) {
21073
+ if (isBoolean$6(shapeVisible)) {
21098
21074
  const size = (null == shapeStyle ? void 0 : shapeStyle.size) || 10,
21099
- maxSize = isNumber$4(size) ? size : Math.max(size[0], size[1]);
21075
+ maxSize = isNumber$6(size) ? size : Math.max(size[0], size[1]);
21100
21076
  symbol = group.createOrUpdateChild("tag-shape", Object.assign(Object.assign({
21101
21077
  symbolType: "circle",
21102
21078
  size: size,
@@ -21105,7 +21081,7 @@
21105
21081
  visible: shapeVisible,
21106
21082
  x: maxSize / 2,
21107
21083
  y: maxSize / 2
21108
- }), "symbol"), isEmpty(null == state ? void 0 : state.shape) || (symbol.states = state.shape), shapeVisible && (symbolPlaceWidth = maxSize + space);
21084
+ }), "symbol"), isEmpty$1(null == state ? void 0 : state.shape) || (symbol.states = state.shape), shapeVisible && (symbolPlaceWidth = maxSize + space);
21109
21085
  }
21110
21086
  let textShape;
21111
21087
  tagWidth += symbolPlaceWidth, textX += symbolPlaceWidth;
@@ -21116,33 +21092,33 @@
21116
21092
  type: type,
21117
21093
  text: text
21118
21094
  }, textStyle))), textStyle), {
21119
- visible: isValid$3(text) && !1 !== visible,
21095
+ visible: isValid$5(text) && !1 !== visible,
21120
21096
  x: textX,
21121
21097
  y: 0
21122
21098
  });
21123
21099
  textShape = group.createOrUpdateChild("tag-text", richTextAttrs, "richtext"), tagWidth += textShape.AABBBounds.width(), tagHeight += textShape.AABBBounds.height(), tagX += textShape.AABBBounds.x1, tagY += textShape.AABBBounds.y1;
21124
21100
  } else {
21125
21101
  const textAttrs = Object.assign(Object.assign({
21126
- text: isObject$8(text) && "type" in text && "text" === text.type ? text.text : text,
21127
- visible: isValid$3(text) && !1 !== visible,
21102
+ text: isObject$a(text) && "type" in text && "text" === text.type ? text.text : text,
21103
+ visible: isValid$5(text) && !1 !== visible,
21128
21104
  lineHeight: null == textStyle ? void 0 : textStyle.fontSize
21129
21105
  }, textStyle), {
21130
21106
  x: textX,
21131
21107
  y: 0
21132
21108
  });
21133
- isNil$3(textAttrs.lineHeight) && (textAttrs.lineHeight = textStyle.fontSize), textShape = group.createOrUpdateChild("tag-text", textAttrs, "text"), isEmpty(null == state ? void 0 : state.text) || (textShape.states = state.text);
21109
+ isNil$5(textAttrs.lineHeight) && (textAttrs.lineHeight = textStyle.fontSize), textShape = group.createOrUpdateChild("tag-text", textAttrs, "text"), isEmpty$1(null == state ? void 0 : state.text) || (textShape.states = state.text);
21134
21110
  const textBounds = measureTextSize(textAttrs.text, textStyle, null === (_b = null === (_a = this.stage) || void 0 === _a ? void 0 : _a.getTheme()) || void 0 === _b ? void 0 : _b.text),
21135
21111
  textWidth = textBounds.width,
21136
21112
  textHeight = textBounds.height;
21137
21113
  tagWidth += textWidth;
21138
21114
  const size = null !== (_c = shape.size) && void 0 !== _c ? _c : 10,
21139
- maxSize = isNumber$4(size) ? size : Math.max(size[0], size[1]);
21115
+ maxSize = isNumber$6(size) ? size : Math.max(size[0], size[1]);
21140
21116
  tagHeight += Math.max(textHeight, shape.visible ? maxSize : 0);
21141
21117
  const {
21142
21118
  textAlign: textAlign,
21143
21119
  textBaseline: textBaseline
21144
21120
  } = textStyle;
21145
- (isValid$3(minWidth) || isValid$3(maxWidth)) && (isValid$3(minWidth) && tagWidth < minWidth && (tagWidth = minWidth), isValid$3(maxWidth) && tagWidth > maxWidth && (tagWidth = maxWidth, textShape.setAttribute("maxLineWidth", maxWidth - parsedPadding[1] - parsedPadding[2]))), tagX = 0, tagY = 0;
21121
+ (isValid$5(minWidth) || isValid$5(maxWidth)) && (isValid$5(minWidth) && tagWidth < minWidth && (tagWidth = minWidth), isValid$5(maxWidth) && tagWidth > maxWidth && (tagWidth = maxWidth, textShape.setAttribute("maxLineWidth", maxWidth - parsedPadding[1] - parsedPadding[2]))), tagX = 0, tagY = 0;
21146
21122
  let flag = 0;
21147
21123
  "left" === textAlign || "start" === textAlign ? flag = 1 : "right" === textAlign || "end" === textAlign ? flag = -1 : "center" === textAlign && (flag = 0), flag ? flag < 0 ? (tagX -= tagWidth, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth), group.setAttribute("x", -parsedPadding[1] - symbolPlaceWidth)) : flag > 0 && group.setAttribute("x", parsedPadding[3]) : (tagX -= tagWidth / 2, symbol && symbol.setAttribute("x", (symbol.attribute.x || 0) - textWidth / 2), group.setAttribute("x", -symbolPlaceWidth / 2));
21148
21124
  const shouldRight = "right" === containerTextAlign || "end" === containerTextAlign,
@@ -21194,7 +21170,7 @@
21194
21170
  visible: bgVisible
21195
21171
  } = panel,
21196
21172
  backgroundStyle = __rest$5(panel, ["visible"]);
21197
- if (visible && isBoolean$4(bgVisible)) {
21173
+ if (visible && isBoolean$6(bgVisible)) {
21198
21174
  const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
21199
21175
  visible: bgVisible && !!text,
21200
21176
  width: tagWidth,
@@ -21202,7 +21178,7 @@
21202
21178
  x: tagX,
21203
21179
  y: tagY
21204
21180
  }), "rect");
21205
- if (isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel), backgroundStyle.customShape) {
21181
+ if (isEmpty$1(null == state ? void 0 : state.panel) || (bgRect.states = state.panel), backgroundStyle.customShape) {
21206
21182
  const customShape = backgroundStyle.customShape;
21207
21183
  bgRect.pathProxy = attrs => customShape(this, attrs, new CustomPath2D());
21208
21184
  }
@@ -21211,7 +21187,7 @@
21211
21187
  this._textShape = textShape, this._symbol = symbol, this.resetStates();
21212
21188
  }
21213
21189
  initAttributes(params, options) {
21214
- params = (null == options ? void 0 : options.skipDefault) ? params : merge$1({}, Tag.defaultAttributes, params), super.initAttributes(params), this.render();
21190
+ params = (null == options ? void 0 : options.skipDefault) ? params : merge$2({}, Tag.defaultAttributes, params), super.initAttributes(params), this.render();
21215
21191
  }
21216
21192
  addState(stateName, keepCurrentStates, hasAnimation) {
21217
21193
  super.addState(stateName, keepCurrentStates, hasAnimation), this._textShape && this._textShape.addState(stateName, keepCurrentStates, hasAnimation), this._bgRect && this._bgRect.addState(stateName, keepCurrentStates, hasAnimation), this._symbol && this._symbol.addState(stateName, keepCurrentStates, hasAnimation);
@@ -21265,14 +21241,14 @@
21265
21241
  }
21266
21242
  };
21267
21243
  const theme$2 = {
21268
- poptip: merge$1({}, DEFAULT_THEME)
21244
+ poptip: merge$2({}, DEFAULT_THEME)
21269
21245
  };
21270
21246
 
21271
21247
  function loadPoptipComponent() {
21272
21248
  registerGroup(), registerText(), registerSymbol(), registerRect();
21273
21249
  }
21274
21250
  function setPoptipTheme(defaultPoptipTheme) {
21275
- merge$1(theme$2.poptip, DEFAULT_THEME, defaultPoptipTheme);
21251
+ merge$2(theme$2.poptip, DEFAULT_THEME, defaultPoptipTheme);
21276
21252
  }
21277
21253
 
21278
21254
  var __rest$4 = undefined && undefined.__rest || function (s, e) {
@@ -21284,11 +21260,11 @@
21284
21260
  }
21285
21261
  return t;
21286
21262
  };
21287
- const _tBounds = new AABBBounds();
21263
+ const _tBounds = new AABBBounds$1();
21288
21264
  loadPoptipComponent();
21289
21265
  class PopTip extends AbstractComponent {
21290
21266
  constructor(attributes, options) {
21291
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, PopTip.defaultAttributes, attributes)), this.name = "poptip", this.positionList = ["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"];
21267
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, PopTip.defaultAttributes, attributes)), this.name = "poptip", this.positionList = ["top", "tl", "tr", "bottom", "bl", "br", "left", "lt", "lb", "right", "rt", "rb"];
21292
21268
  }
21293
21269
  render() {
21294
21270
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -21319,9 +21295,9 @@
21319
21295
  zIndex: 1
21320
21296
  }, "group"),
21321
21297
  maxLineWidth = maxWidth - parsedPadding[1] - parsedPadding[3],
21322
- titleVisible = isValid$3(title) && !1 !== visible,
21298
+ titleVisible = isValid$5(title) && !1 !== visible,
21323
21299
  titleAttrs = Object.assign(Object.assign({
21324
- text: isArray$7(title) ? title : [title],
21300
+ text: isArray$9(title) ? title : [title],
21325
21301
  visible: titleVisible,
21326
21302
  wrap: !0
21327
21303
  }, titleStyle), {
@@ -21332,15 +21308,15 @@
21332
21308
  textBaseline: "top"
21333
21309
  }),
21334
21310
  titleShape = group.createOrUpdateChild("poptip-title", titleAttrs, "text");
21335
- isEmpty(null == state ? void 0 : state.title) || (titleShape.states = state.title);
21311
+ isEmpty$1(null == state ? void 0 : state.title) || (titleShape.states = state.title);
21336
21312
  const titleBounds = titleShape.AABBBounds,
21337
21313
  titleHeight = titleBounds.height(),
21338
21314
  titleWidth = titleBounds.width();
21339
21315
  let height = titleHeight + space;
21340
21316
  titleVisible || (height = 0);
21341
- const contentVisible = isValid$3(content) && !1 !== visible,
21317
+ const contentVisible = isValid$5(content) && !1 !== visible,
21342
21318
  contentAttrs = Object.assign(Object.assign({
21343
- text: isArray$7(content) ? content : [content],
21319
+ text: isArray$9(content) ? content : [content],
21344
21320
  visible: contentVisible,
21345
21321
  wrap: !0
21346
21322
  }, contentStyle), {
@@ -21351,7 +21327,7 @@
21351
21327
  textBaseline: "top"
21352
21328
  }),
21353
21329
  contentShape = group.createOrUpdateChild("poptip-content", contentAttrs, "text");
21354
- isEmpty(null == state ? void 0 : state.content) || (contentShape.states = state.content);
21330
+ isEmpty$1(null == state ? void 0 : state.content) || (contentShape.states = state.content);
21355
21331
  const contentBounds = contentShape.AABBBounds,
21356
21332
  contentHeight = contentBounds.height(),
21357
21333
  contentWidth = contentBounds.width();
@@ -21364,7 +21340,7 @@
21364
21340
  } = panel,
21365
21341
  backgroundStyle = __rest$4(panel, ["visible"]),
21366
21342
  symbolSize = null !== (_a = backgroundStyle.size) && void 0 !== _a ? _a : 12,
21367
- spaceSize = isArray$7(symbolSize) ? [symbolSize[0] + (null !== (_b = backgroundStyle.space) && void 0 !== _b ? _b : 0), symbolSize[1] + (null !== (_c = backgroundStyle.space) && void 0 !== _c ? _c : 0)] : symbolSize + (null !== (_d = backgroundStyle.space) && void 0 !== _d ? _d : 0),
21343
+ spaceSize = isArray$9(symbolSize) ? [symbolSize[0] + (null !== (_b = backgroundStyle.space) && void 0 !== _b ? _b : 0), symbolSize[1] + (null !== (_c = backgroundStyle.space) && void 0 !== _c ? _c : 0)] : symbolSize + (null !== (_d = backgroundStyle.space) && void 0 !== _d ? _d : 0),
21368
21344
  lineWidth = null !== (_e = backgroundStyle.lineWidth) && void 0 !== _e ? _e : 1,
21369
21345
  range = this.stage ? [null !== (_f = this.stage.viewWidth) && void 0 !== _f ? _f : this.stage.width, null !== (_g = this.stage.viewHeight) && void 0 !== _g ? _g : this.stage.height] : void 0;
21370
21346
  if (range) {
@@ -21372,7 +21348,7 @@
21372
21348
  leftWidth = null !== (_h = this.attribute.x) && void 0 !== _h ? _h : b.x1,
21373
21349
  rightWidth = range[0] - b.x1;
21374
21350
  let maxSpace = Math.max(leftWidth, rightWidth);
21375
- const buf = (isArray$7(symbolSize) ? symbolSize[0] : 12) + 3;
21351
+ const buf = (isArray$9(symbolSize) ? symbolSize[0] : 12) + 3;
21376
21352
  if (maxSpace = Math.min(maxSpace - buf, maxSpace * maxWidthPercent), maxSpace < popTipWidth) {
21377
21353
  popTipWidth = maxSpace;
21378
21354
  const buf = parsedPadding[1] + parsedPadding[3];
@@ -21388,9 +21364,9 @@
21388
21364
  angle: angle,
21389
21365
  offset: offset,
21390
21366
  rectOffset: rectOffset
21391
- } = this.getAngleAndOffset(p, popTipWidth, poptipHeight, isArray$7(spaceSize) ? spaceSize : [spaceSize, spaceSize - lineWidth]);
21392
- if (isBoolean$4(bgVisible)) {
21393
- const offsetX = (isArray$7(symbolSize) ? symbolSize[0] : symbolSize) / 4,
21367
+ } = this.getAngleAndOffset(p, popTipWidth, poptipHeight, isArray$9(spaceSize) ? spaceSize : [spaceSize, spaceSize - lineWidth]);
21368
+ if (isBoolean$6(bgVisible)) {
21369
+ const offsetX = (isArray$9(symbolSize) ? symbolSize[0] : symbolSize) / 4,
21394
21370
  bgSymbol = group.createOrUpdateChild("poptip-symbol-panel", Object.assign(Object.assign({}, backgroundStyle), {
21395
21371
  visible: bgVisible && (contentVisible || titleVisible),
21396
21372
  x: offsetX,
@@ -21405,7 +21381,7 @@
21405
21381
  size: symbolSize,
21406
21382
  zIndex: -9
21407
21383
  }), "symbol");
21408
- isEmpty(null == state ? void 0 : state.panel) || (bgSymbol.states = state.panel);
21384
+ isEmpty$1(null == state ? void 0 : state.panel) || (bgSymbol.states = state.panel);
21409
21385
  const bgRect = group.createOrUpdateChild("poptip-rect-panel", Object.assign(Object.assign({}, backgroundStyle), {
21410
21386
  visible: bgVisible && (contentVisible || titleVisible),
21411
21387
  x: 0,
@@ -21414,7 +21390,7 @@
21414
21390
  height: poptipHeight,
21415
21391
  zIndex: -8
21416
21392
  }), "rect");
21417
- isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
21393
+ isEmpty$1(null == state ? void 0 : state.panel) || (bgRect.states = state.panel);
21418
21394
  }
21419
21395
  if (group.setAttributes({
21420
21396
  x: -offset[0] + dx,
@@ -21423,7 +21399,7 @@
21423
21399
  {
21424
21400
  _tBounds.setValue(0, 0, popTipWidth, poptipHeight).transformWithMatrix(group.globalTransMatrix);
21425
21401
  const b = _tBounds,
21426
- stageBounds = new Bounds().setValue(0, 0, range[0], range[1]);
21402
+ stageBounds = new Bounds$1().setValue(0, 0, range[0], range[1]);
21427
21403
  if (rectInsideAnotherRect(b, stageBounds, !1)) break;
21428
21404
  {
21429
21405
  const bbox = getRectIntersect(b, stageBounds, !1),
@@ -21541,7 +21517,7 @@
21541
21517
  return c > 3 && r && Object.defineProperty(target, key, r), r;
21542
21518
  };
21543
21519
  function wrapPoptip(target, source) {
21544
- return merge$1(target, theme$2.poptip, source), target;
21520
+ return merge$2(target, theme$2.poptip, source), target;
21545
21521
  }
21546
21522
  let PopTipRenderContribution = class {
21547
21523
  render(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb, options) {
@@ -21553,7 +21529,7 @@
21553
21529
  } = graphic.attribute.poptip || {};
21554
21530
  if (!1 === visible || visibleCb && !1 === visibleCb(graphic)) return;
21555
21531
  const attribute = {};
21556
- merge$1(attribute, PopTip.defaultAttributes, graphic.attribute.poptip ? graphic.attribute.poptip : {}), this.poptipComponent ? this.poptipComponent.initAttributes(attribute) : this.poptipComponent = new PopTip(attribute);
21532
+ merge$2(attribute, PopTip.defaultAttributes, graphic.attribute.poptip ? graphic.attribute.poptip : {}), this.poptipComponent ? this.poptipComponent.initAttributes(attribute) : this.poptipComponent = new PopTip(attribute);
21557
21533
  let poptip = graphic.attribute.poptip || {};
21558
21534
  if ("text" === graphic.type && null == poptip.title && null == poptip.content) {
21559
21535
  const out = {};
@@ -21676,7 +21652,7 @@
21676
21652
  return this._mainSegmentPoints;
21677
21653
  }
21678
21654
  constructor(attributes, options) {
21679
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Segment.defaultAttributes, attributes)), this.name = "segment", this.key = "segment", this.lines = [];
21655
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Segment.defaultAttributes, attributes)), this.name = "segment", this.key = "segment", this.lines = [];
21680
21656
  }
21681
21657
  render() {
21682
21658
  this.removeAllChild(!0), this._reset();
@@ -21696,7 +21672,7 @@
21696
21672
  endSymbolShape = this._renderSymbol(endSymbol, points, "end");
21697
21673
  if (this.startSymbol = startSymbolShape, this.endSymbol = endSymbolShape, multiSegment) {
21698
21674
  const points = [...this.attribute.points];
21699
- if (isValidNumber$1(mainSegmentIndex)) points[mainSegmentIndex] = this._clipPoints(points[mainSegmentIndex]);else {
21675
+ if (isValidNumber$3(mainSegmentIndex)) points[mainSegmentIndex] = this._clipPoints(points[mainSegmentIndex]);else {
21700
21676
  const clipPoints = this._clipPoints(flattenArray(points));
21701
21677
  points[0][0] = clipPoints[0], points[points.length - 1][points[points.length - 1].length - 1] = clipPoints[clipPoints.length - 1];
21702
21678
  }
@@ -21704,10 +21680,10 @@
21704
21680
  var _a, _b;
21705
21681
  const line = graphicCreator.line(Object.assign(Object.assign({
21706
21682
  points: point
21707
- }, isArray$7(lineStyle) ? null !== (_a = lineStyle[index]) && void 0 !== _a ? _a : lineStyle[lineStyle.length - 1] : lineStyle), {
21683
+ }, isArray$9(lineStyle) ? null !== (_a = lineStyle[index]) && void 0 !== _a ? _a : lineStyle[lineStyle.length - 1] : lineStyle), {
21708
21684
  fill: !1
21709
21685
  }));
21710
- line.name = `${this.name}-line`, line.id = this._getNodeId("line" + index), isEmpty(null == state ? void 0 : state.line) || (line.states = isArray$7(state.line) ? null !== (_b = state.line[index]) && void 0 !== _b ? _b : state.line[state.line.length - 1] : state.line), this.add(line), this.lines.push(line);
21686
+ line.name = `${this.name}-line`, line.id = this._getNodeId("line" + index), isEmpty$1(null == state ? void 0 : state.line) || (line.states = isArray$9(state.line) ? null !== (_b = state.line[index]) && void 0 !== _b ? _b : state.line[state.line.length - 1] : state.line), this.add(line), this.lines.push(line);
21711
21687
  });
21712
21688
  } else {
21713
21689
  let lineCreator = graphicCreator.line;
@@ -21718,7 +21694,7 @@
21718
21694
  fill: !1,
21719
21695
  closePath: !1
21720
21696
  }));
21721
- line.name = `${this.name}-line`, line.id = this._getNodeId("line"), isEmpty(null == state ? void 0 : state.line) || (line.states = [].concat(state.line)[0]), this.add(line), this.lines.push(line);
21697
+ line.name = `${this.name}-line`, line.id = this._getNodeId("line"), isEmpty$1(null == state ? void 0 : state.line) || (line.states = [].concat(state.line)[0]), this.add(line), this.lines.push(line);
21722
21698
  }
21723
21699
  }
21724
21700
  _computeStartRotate(angle) {
@@ -21751,17 +21727,17 @@
21751
21727
  } = attribute;
21752
21728
  let position, rotate;
21753
21729
  "start" === dim ? (position = {
21754
- x: start.x + (isValidNumber$1(startAngle) ? refX * Math.cos(startAngle) + refY * Math.cos(startAngle - Math.PI / 2) : 0),
21755
- y: start.y + (isValidNumber$1(startAngle) ? refX * Math.sin(startAngle) + refY * Math.sin(startAngle - Math.PI / 2) : 0)
21730
+ x: start.x + (isValidNumber$3(startAngle) ? refX * Math.cos(startAngle) + refY * Math.cos(startAngle - Math.PI / 2) : 0),
21731
+ y: start.y + (isValidNumber$3(startAngle) ? refX * Math.sin(startAngle) + refY * Math.sin(startAngle - Math.PI / 2) : 0)
21756
21732
  }, rotate = this._computeStartRotate(this._startAngle)) : (position = {
21757
- x: end.x + (isValidNumber$1(endAngle) ? refX * Math.cos(endAngle) + refY * Math.cos(endAngle - Math.PI / 2) : 0),
21758
- y: end.y + (isValidNumber$1(endAngle) ? refX * Math.sin(endAngle) + refY * Math.sin(endAngle - Math.PI / 2) : 0)
21733
+ x: end.x + (isValidNumber$3(endAngle) ? refX * Math.cos(endAngle) + refY * Math.cos(endAngle - Math.PI / 2) : 0),
21734
+ y: end.y + (isValidNumber$3(endAngle) ? refX * Math.sin(endAngle) + refY * Math.sin(endAngle - Math.PI / 2) : 0)
21759
21735
  }, rotate = this._computeEndRotate(this._endAngle)), symbol = graphicCreator.symbol(Object.assign(Object.assign(Object.assign({}, position), {
21760
21736
  symbolType: symbolType,
21761
21737
  size: size,
21762
21738
  angle: autoRotate ? rotate + refAngle : 0,
21763
21739
  strokeBoundsBuffer: 0
21764
- }), style)), symbol.name = `${this.name}-${dim}-symbol`, symbol.id = this._getNodeId(`${dim}-symbol`), isEmpty(null == state ? void 0 : state.symbol) || (symbol.states = state.symbol), "start" === dim ? isEmpty(null == state ? void 0 : state.startSymbol) || (symbol.states = state.startSymbol) : isEmpty(null == state ? void 0 : state.endSymbol) || (symbol.states = state.endSymbol), this.add(symbol);
21740
+ }), style)), symbol.name = `${this.name}-${dim}-symbol`, symbol.id = this._getNodeId(`${dim}-symbol`), isEmpty$1(null == state ? void 0 : state.symbol) || (symbol.states = state.symbol), "start" === dim ? isEmpty$1(null == state ? void 0 : state.startSymbol) || (symbol.states = state.startSymbol) : isEmpty$1(null == state ? void 0 : state.endSymbol) || (symbol.states = state.endSymbol), this.add(symbol);
21765
21741
  }
21766
21742
  return symbol;
21767
21743
  }
@@ -21773,7 +21749,7 @@
21773
21749
  mainSegmentIndex: mainSegmentIndex
21774
21750
  } = this.attribute;
21775
21751
  let points;
21776
- return points = multiSegment ? isValidNumber$1(mainSegmentIndex) ? originPoints[mainSegmentIndex] : flattenArray(originPoints) : originPoints, this._mainSegmentPoints = points, points;
21752
+ return points = multiSegment ? isValidNumber$3(mainSegmentIndex) ? originPoints[mainSegmentIndex] : flattenArray(originPoints) : originPoints, this._mainSegmentPoints = points, points;
21777
21753
  }
21778
21754
  _clipPoints(points) {
21779
21755
  const {
@@ -21961,13 +21937,13 @@
21961
21937
  const DELTA_ANGLE = Math.sin(Math.PI / 10);
21962
21938
  function isAngleVertical(angle) {
21963
21939
  let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
21964
- const hasAngle = !isNil$3(angle) && 0 !== angle,
21940
+ const hasAngle = !isNil$5(angle) && 0 !== angle,
21965
21941
  cos = hasAngle ? Math.cos(angle) : 1;
21966
21942
  return hasAngle && Math.abs(cos) <= delta;
21967
21943
  }
21968
21944
  function isAngleHorizontal(angle) {
21969
21945
  let delta = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DELTA_ANGLE;
21970
- const hasAngle = !isNil$3(angle) && 0 !== angle,
21946
+ const hasAngle = !isNil$5(angle) && 0 !== angle,
21971
21947
  sin = hasAngle ? Math.sin(angle) : 0;
21972
21948
  return !hasAngle || Math.abs(sin) <= delta;
21973
21949
  }
@@ -21985,7 +21961,7 @@
21985
21961
  style = {},
21986
21962
  angle = .5 * Math.PI
21987
21963
  } = props,
21988
- symbolStyle = merge$1({}, DEFAULT_AXIS_BREAK_SYMBOL_STYLE, style),
21964
+ symbolStyle = merge$2({}, DEFAULT_AXIS_BREAK_SYMBOL_STYLE, style),
21989
21965
  symbolSize = null !== (_a = symbolStyle.size) && void 0 !== _a ? _a : DEFAULT_AXIS_BREAK_SYMBOL_STYLE.size;
21990
21966
  return Object.assign(Object.assign({}, symbolStyle), {
21991
21967
  symbolType: null !== (_b = symbolStyle.symbolType) && void 0 !== _b ? _b : `M ${-symbolSize / 2} ${symbolSize * Math.sin(angle)} L ${symbolSize / 2} ${-symbolSize * Math.sin(angle)}`,
@@ -22032,19 +22008,19 @@
22032
22008
 
22033
22009
  const dispatchHoverState = (e, container, lastHover) => {
22034
22010
  const target = e.target;
22035
- return target !== lastHover && target.name && !isEmpty(target.states) ? (target.addState(StateValue.hover, !0), traverseGroup(container, node => {
22036
- node !== target && node.name && !isEmpty(node.states) && node.addState(StateValue.hoverReverse, !0);
22011
+ return target !== lastHover && target.name && !isEmpty$1(target.states) ? (target.addState(StateValue.hover, !0), traverseGroup(container, node => {
22012
+ node !== target && node.name && !isEmpty$1(node.states) && node.addState(StateValue.hoverReverse, !0);
22037
22013
  }), target) : lastHover;
22038
22014
  };
22039
22015
  const dispatchUnHoverState = (e, container, lastHover) => lastHover ? (traverseGroup(container, node => {
22040
- node.name && !isEmpty(node.states) && (node.removeState(StateValue.hoverReverse), node.removeState(StateValue.hover));
22016
+ node.name && !isEmpty$1(node.states) && (node.removeState(StateValue.hoverReverse), node.removeState(StateValue.hover));
22041
22017
  }), null) : lastHover;
22042
22018
  const dispatchClickState = (e, container, lastSelect) => {
22043
22019
  const target = e.target;
22044
22020
  return lastSelect === target && target.hasState(StateValue.selected) ? (traverseGroup(container, node => {
22045
- node.name && !isEmpty(node.states) && (node.removeState(StateValue.selectedReverse), node.removeState(StateValue.selected));
22046
- }), null) : target.name && !isEmpty(target.states) ? (target.addState(StateValue.selected, !0), traverseGroup(container, node => {
22047
- node !== target && node.name && !isEmpty(node.states) && node.addState(StateValue.selectedReverse, !0);
22021
+ node.name && !isEmpty$1(node.states) && (node.removeState(StateValue.selectedReverse), node.removeState(StateValue.selected));
22022
+ }), null) : target.name && !isEmpty$1(target.states) ? (target.addState(StateValue.selected, !0), traverseGroup(container, node => {
22023
+ node !== target && node.name && !isEmpty$1(node.states) && node.addState(StateValue.selectedReverse, !0);
22048
22024
  }), target) : lastSelect;
22049
22025
  };
22050
22026
 
@@ -22065,8 +22041,8 @@
22065
22041
  return this._prevInnerView;
22066
22042
  }
22067
22043
  getBoundsWithoutRender(attributes) {
22068
- const currentAttribute = cloneDeep$1(this.attribute);
22069
- merge$1(this.attribute, attributes);
22044
+ const currentAttribute = cloneDeep$2(this.attribute);
22045
+ merge$2(this.attribute, attributes);
22070
22046
  const offscreenGroup = graphicCreator.group({
22071
22047
  x: this.attribute.x,
22072
22048
  y: this.attribute.y
@@ -22146,11 +22122,11 @@
22146
22122
  tickLineGroup.name = AXIS_ELEMENT_NAME.tickContainer, tickLineGroup.id = this._getNodeId("tick-container"), container.add(tickLineGroup), tickLineItems.forEach((item, index) => {
22147
22123
  var _a;
22148
22124
  const line = graphicCreator.line(Object.assign({}, this._getTickLineAttribute("tick", item, index, tickLineItems)));
22149
- if (line.name = AXIS_ELEMENT_NAME.tick, line.id = this._getNodeId(item.id), isEmpty(null === (_a = this.attribute.tick) || void 0 === _a ? void 0 : _a.state)) line.states = DEFAULT_STATES$2;else {
22125
+ if (line.name = AXIS_ELEMENT_NAME.tick, line.id = this._getNodeId(item.id), isEmpty$1(null === (_a = this.attribute.tick) || void 0 === _a ? void 0 : _a.state)) line.states = DEFAULT_STATES$2;else {
22150
22126
  const data = this.data[index],
22151
- tickLineState = merge$1({}, DEFAULT_STATES$2, this.attribute.tick.state);
22127
+ tickLineState = merge$2({}, DEFAULT_STATES$2, this.attribute.tick.state);
22152
22128
  Object.keys(tickLineState).forEach(key => {
22153
- isFunction$5(tickLineState[key]) && (tickLineState[key] = tickLineState[key](data.rawValue, index, data, this.data));
22129
+ isFunction$7(tickLineState[key]) && (tickLineState[key] = tickLineState[key](data.rawValue, index, data, this.data));
22154
22130
  }), line.states = tickLineState;
22155
22131
  }
22156
22132
  tickLineGroup.add(line);
@@ -22162,10 +22138,10 @@
22162
22138
  const subTickLineItems = this.getSubTickLineItems();
22163
22139
  subTickLineItems.length && subTickLineItems.forEach((item, index) => {
22164
22140
  const line = graphicCreator.line(Object.assign({}, this._getTickLineAttribute("subTick", item, index, tickLineItems)));
22165
- if (line.name = AXIS_ELEMENT_NAME.subTick, line.id = this._getNodeId(`${index}`), isEmpty(subTick.state)) line.states = DEFAULT_STATES$2;else {
22166
- const subTickLineState = merge$1({}, DEFAULT_STATES$2, subTick.state);
22141
+ if (line.name = AXIS_ELEMENT_NAME.subTick, line.id = this._getNodeId(`${index}`), isEmpty$1(subTick.state)) line.states = DEFAULT_STATES$2;else {
22142
+ const subTickLineState = merge$2({}, DEFAULT_STATES$2, subTick.state);
22167
22143
  Object.keys(subTickLineState).forEach(key => {
22168
- isFunction$5(subTickLineState[key]) && (subTickLineState[key] = subTickLineState[key](item.value, index, item, tickLineItems));
22144
+ isFunction$7(subTickLineState[key]) && (subTickLineState[key] = subTickLineState[key](item.value, index, item, tickLineItems));
22169
22145
  }), line.states = subTickLineState;
22170
22146
  }
22171
22147
  tickLineGroup.add(line);
@@ -22176,7 +22152,7 @@
22176
22152
  const {
22177
22153
  dataFilter: dataFilter
22178
22154
  } = this.attribute.label;
22179
- dataFilter && isFunction$5(dataFilter) && (items = dataFilter(items, layer));
22155
+ dataFilter && isFunction$7(dataFilter) && (items = dataFilter(items, layer));
22180
22156
  const data = this._transformItems(items),
22181
22157
  labelGroup = graphicCreator.group({
22182
22158
  x: 0,
@@ -22187,10 +22163,10 @@
22187
22163
  var _a;
22188
22164
  const labelStyle = this._getLabelAttribute(item, index, data, layer),
22189
22165
  text = createTextGraphicByType(labelStyle);
22190
- if (text.name = AXIS_ELEMENT_NAME.label, text.id = this._getNodeId(`layer${layer}-label-${item.id}`), isEmpty(null === (_a = this.attribute.label) || void 0 === _a ? void 0 : _a.state)) text.states = DEFAULT_STATES$2;else {
22191
- const labelState = merge$1({}, DEFAULT_STATES$2, this.attribute.label.state);
22166
+ if (text.name = AXIS_ELEMENT_NAME.label, text.id = this._getNodeId(`layer${layer}-label-${item.id}`), isEmpty$1(null === (_a = this.attribute.label) || void 0 === _a ? void 0 : _a.state)) text.states = DEFAULT_STATES$2;else {
22167
+ const labelState = merge$2({}, DEFAULT_STATES$2, this.attribute.label.state);
22192
22168
  Object.keys(labelState).forEach(key => {
22193
- isFunction$5(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
22169
+ isFunction$7(labelState[key]) && (labelState[key] = labelState[key](item, index, data, layer));
22194
22170
  }), text.states = labelState;
22195
22171
  }
22196
22172
  text.data = Object.assign(Object.assign({}, item), {
@@ -22220,7 +22196,7 @@
22220
22196
  dataFilter: dataFilter
22221
22197
  } = tick;
22222
22198
  let tickSegment = 1;
22223
- return data.length >= 2 && (tickSegment = data[1].value - data[0].value), (dataFilter && isFunction$5(dataFilter) ? dataFilter(data) : data).forEach(item => {
22199
+ return data.length >= 2 && (tickSegment = data[1].value - data[0].value), (dataFilter && isFunction$7(dataFilter) ? dataFilter(data) : data).forEach(item => {
22224
22200
  let point = item.point,
22225
22201
  tickValue = item.value;
22226
22202
  if (!alignWithLabel) {
@@ -22281,9 +22257,9 @@
22281
22257
  return subTickLineItems;
22282
22258
  }
22283
22259
  _getTickLineAttribute(type, tickItem, index, tickItems) {
22284
- let style = get$7(this.attribute, `${type}.style`);
22260
+ let style = get$9(this.attribute, `${type}.style`);
22285
22261
  const data = this.data[index];
22286
- style = isFunction$5(style) ? merge$1({}, get$7(DEFAULT_AXIS_THEME, `${type}.style`), "tick" === type ? style(data.rawValue, index, data, this.data) : style(tickItem.value, index, tickItem, tickItems)) : style;
22262
+ style = isFunction$7(style) ? merge$2({}, get$9(DEFAULT_AXIS_THEME, `${type}.style`), "tick" === type ? style(data.rawValue, index, data, this.data) : style(tickItem.value, index, tickItem, tickItems)) : style;
22287
22263
  const {
22288
22264
  start: start,
22289
22265
  end: end,
@@ -22311,16 +22287,16 @@
22311
22287
  tickLength = 0;
22312
22288
  (null === (_a = this.attribute.tick) || void 0 === _a ? void 0 : _a.visible) && this.attribute.tick.inside === inside && (tickLength = this.attribute.tick.length || 4), (null === (_b = this.attribute.subTick) || void 0 === _b ? void 0 : _b.visible) && this.attribute.subTick.inside === inside && (tickLength = Math.max(tickLength, this.attribute.subTick.length || 2)), offset += tickLength;
22313
22289
  const axisVector = this.getRelativeVector(tickDatum.point);
22314
- layer > 0 && (0 === axisVector[1] ? offset += (this.axisLabelLayerSize[layer - 1].height + get$7(this.attribute, "label.space", 4)) * layer : offset += (this.axisLabelLayerSize[layer - 1].width + get$7(this.attribute, "label.space", 4)) * layer);
22290
+ layer > 0 && (0 === axisVector[1] ? offset += (this.axisLabelLayerSize[layer - 1].height + get$9(this.attribute, "label.space", 4)) * layer : offset += (this.axisLabelLayerSize[layer - 1].width + get$9(this.attribute, "label.space", 4)) * layer);
22315
22291
  const point = this.getVerticalCoord(tickDatum.point, offset, inside),
22316
22292
  vector = this.getVerticalVector(offset || 1, inside, point),
22317
22293
  textContent = formatMethod ? formatMethod(`${tickDatum.label}`, tickDatum, index, tickData, layer) : tickDatum.label;
22318
22294
  let {
22319
22295
  style: textStyle
22320
22296
  } = this.attribute.label;
22321
- textStyle = isFunction$5(textStyle) ? merge$1({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
22297
+ textStyle = isFunction$7(textStyle) ? merge$2({}, DEFAULT_AXIS_THEME.label.style, textStyle(tickDatum, index, tickData, layer)) : textStyle;
22322
22298
  const labelAlign = this.getLabelAlign(vector, inside, textStyle.angle);
22323
- return textStyle = merge$1(labelAlign, textStyle), isFunction$5(textStyle.text) && (textStyle.text = textStyle.text({
22299
+ return textStyle = merge$2(labelAlign, textStyle), isFunction$7(textStyle.text) && (textStyle.text = textStyle.text({
22324
22300
  label: tickDatum.label,
22325
22301
  value: tickDatum.rawValue,
22326
22302
  index: tickDatum.index,
@@ -22381,16 +22357,16 @@
22381
22357
  }
22382
22358
  }
22383
22359
  function autoHide(labels, config) {
22384
- if (isEmpty(labels)) return;
22360
+ if (isEmpty$1(labels)) return;
22385
22361
  const source = labels.filter(hasBounds);
22386
- if (isEmpty(source)) return;
22362
+ if (isEmpty$1(source)) return;
22387
22363
  let items;
22388
22364
  items = reset(source);
22389
22365
  const {
22390
22366
  method = "parity",
22391
22367
  separation: sep = 0
22392
22368
  } = config,
22393
- reduce = isFunction$5(method) ? method : methods$1[method] || methods$1.parity;
22369
+ reduce = isFunction$7(method) ? method : methods$1[method] || methods$1.parity;
22394
22370
  if (items.length >= 3 && hasOverlap(items, sep)) {
22395
22371
  do {
22396
22372
  items = reduce(items, sep);
@@ -22402,7 +22378,7 @@
22402
22378
  checkFirst = shouldCheck(items.length, config.firstVisible, !1);
22403
22379
  let checkLast = shouldCheck(items.length, config.lastVisible);
22404
22380
  const firstSourceItem = source[0],
22405
- lastSourceItem = last(source);
22381
+ lastSourceItem = last$1(source);
22406
22382
  textIntersect(firstSourceItem, lastSourceItem, sep) && checkFirst && checkLast && (lastSourceItem.setAttribute("opacity", 0), checkLast = !1), forceItemVisible$1(firstSourceItem, items, checkFirst, item => textIntersect(item, firstSourceItem, sep)), forceItemVisible$1(lastSourceItem, items, checkLast, item => textIntersect(item, lastSourceItem, sep) || !(!checkFirst || item === firstSourceItem) && textIntersect(item, firstSourceItem, sep), !0);
22407
22383
  }
22408
22384
  source.forEach(item => {
@@ -22411,7 +22387,7 @@
22411
22387
  }
22412
22388
 
22413
22389
  function autoRotate(items, rotateConfig) {
22414
- if (isEmpty(items)) return;
22390
+ if (isEmpty$1(items)) return;
22415
22391
  const {
22416
22392
  orient: orient,
22417
22393
  labelRotateAngle = [0, 45, 90]
@@ -22422,7 +22398,7 @@
22422
22398
  for (labelRotateAngle && labelRotateAngle.length > 0 && (n = labelRotateAngle.length); i < n;) {
22423
22399
  const angle = labelRotateAngle[i++];
22424
22400
  if (items.forEach(item => {
22425
- item.attribute.angle = degreeToRadian(angle);
22401
+ item.attribute.angle = degreeToRadian$1(angle);
22426
22402
  }), tryRotate(orient, items), !hasIntersect(items)) break;
22427
22403
  }
22428
22404
  }
@@ -22479,10 +22455,10 @@
22479
22455
  }
22480
22456
 
22481
22457
  function normalizeOverflowLimitLength(overflowLimitLength) {
22482
- return isValidNumber$1(overflowLimitLength) ? {
22458
+ return isValidNumber$3(overflowLimitLength) ? {
22483
22459
  left: overflowLimitLength,
22484
22460
  right: overflowLimitLength
22485
- } : isObject$8(overflowLimitLength) ? {
22461
+ } : isObject$a(overflowLimitLength) ? {
22486
22462
  left: overflowLimitLength.left || 0,
22487
22463
  right: overflowLimitLength.right || 0
22488
22464
  } : {
@@ -22498,11 +22474,11 @@
22498
22474
  orient: orient,
22499
22475
  axisLength: axisLength
22500
22476
  } = config;
22501
- if (isEmpty(labels) || !isValidNumber$1(limitLength)) return;
22477
+ if (isEmpty$1(labels) || !isValidNumber$3(limitLength)) return;
22502
22478
  const overflowLimitLength = normalizeOverflowLimitLength(config.overflowLimitLength),
22503
22479
  firstLabel = labels[0],
22504
22480
  angle = firstLabel.attribute.angle,
22505
- hasAngle = !isNil$3(angle),
22481
+ hasAngle = !isNil$5(angle),
22506
22482
  cos = hasAngle ? Math.cos(angle) : 1,
22507
22483
  sin = hasAngle ? Math.sin(angle) : 0,
22508
22484
  isHorizontal = isAngleHorizontal(angle),
@@ -22539,7 +22515,7 @@
22539
22515
  limitLabelLength = Math.min(lengthLimit, verticalSizeLimit);
22540
22516
  } else limitLabelLength = verticalSizeLimit;
22541
22517
  } else limitLabelLength = Math.abs(limitLength / cos);
22542
- isValidNumber$1(label.attribute.maxLineWidth) && (limitLabelLength = isValidNumber$1(limitLabelLength) ? Math.min(label.attribute.maxLineWidth, limitLabelLength) : label.attribute.maxLineWidth), label.setAttributes({
22518
+ isValidNumber$3(label.attribute.maxLineWidth) && (limitLabelLength = isValidNumber$3(limitLabelLength) ? Math.min(label.attribute.maxLineWidth, limitLabelLength) : label.attribute.maxLineWidth), label.setAttributes({
22543
22519
  maxLineWidth: limitLabelLength,
22544
22520
  ellipsis: null !== (_a = label.attribute.ellipsis) && void 0 !== _a ? _a : ellipsis
22545
22521
  });
@@ -22553,7 +22529,7 @@
22553
22529
  ellipsis = "...",
22554
22530
  orient: orient
22555
22531
  } = config;
22556
- if (isEmpty(labels) || !isValidNumber$1(limitLength)) return;
22532
+ if (isEmpty$1(labels) || !isValidNumber$3(limitLength)) return;
22557
22533
  const angle = labels[0].attribute.angle,
22558
22534
  isHorizontal = isAngleHorizontal(angle),
22559
22535
  isVertical = isAngleVertical(angle),
@@ -22565,12 +22541,12 @@
22565
22541
  if (isVertical && Math.floor(label.AABBBounds.height()) <= limitLength) return;
22566
22542
  if (isHorizontal) {
22567
22543
  const minGap = getLabelMinGap(label.attribute.x, null === (_a = labels[index + 1]) || void 0 === _a ? void 0 : _a.attribute.x, null === (_b = labels[index - 1]) || void 0 === _b ? void 0 : _b.attribute.x);
22568
- isValidNumber$1(minGap) && (verticalLimitLength = min(verticalLimitLength, minGap));
22544
+ isValidNumber$3(minGap) && (verticalLimitLength = min(verticalLimitLength, minGap));
22569
22545
  }
22570
22546
  } else {
22571
22547
  if (isVertical) {
22572
22548
  const minGap = getLabelMinGap(label.attribute.y, null === (_c = labels[index + 1]) || void 0 === _c ? void 0 : _c.attribute.y, null === (_d = labels[index - 1]) || void 0 === _d ? void 0 : _d.attribute.y);
22573
- isValidNumber$1(minGap) && (verticalLimitLength = min(verticalLimitLength, minGap));
22549
+ isValidNumber$3(minGap) && (verticalLimitLength = min(verticalLimitLength, minGap));
22574
22550
  }
22575
22551
  if (isHorizontal && Math.floor(label.AABBBounds.width()) <= limitLength) return;
22576
22552
  }
@@ -22586,7 +22562,7 @@
22586
22562
  }
22587
22563
  function getLabelMinGap(current, next, prev) {
22588
22564
  let minGap;
22589
- return isValidNumber$1(next) && (minGap = Math.abs(next - current)), isValidNumber$1(prev) && (minGap = isValidNumber$1(minGap) ? Math.min(Math.abs(current - prev), minGap) : Math.abs(current - prev)), minGap;
22565
+ return isValidNumber$3(next) && (minGap = Math.abs(next - current)), isValidNumber$3(prev) && (minGap = isValidNumber$3(minGap) ? Math.min(Math.abs(current - prev), minGap) : Math.abs(current - prev)), minGap;
22590
22566
  }
22591
22567
 
22592
22568
  function alignAxisLabels(labels, start, containerSize, orient, align) {
@@ -22675,7 +22651,7 @@
22675
22651
  loadLineAxisComponent();
22676
22652
  class LineAxis extends AxisBase {
22677
22653
  constructor(attributes, options) {
22678
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, LineAxis.defaultAttributes, attributes), options);
22654
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, LineAxis.defaultAttributes, attributes), options);
22679
22655
  }
22680
22656
  _renderInner(container) {
22681
22657
  var _a;
@@ -22735,7 +22711,7 @@
22735
22711
  width: axisContainerBounds.width(),
22736
22712
  height: axisContainerBounds.height()
22737
22713
  }, panel.style));
22738
- bgRect.name = AXIS_ELEMENT_NAME.background, bgRect.id = this._getNodeId("background"), bgRect.states = merge$1({}, DEFAULT_STATES$1, null !== (_a = panel.state) && void 0 !== _a ? _a : {}), axisContainer.insertBefore(bgRect, axisContainer.firstChild);
22714
+ bgRect.name = AXIS_ELEMENT_NAME.background, bgRect.id = this._getNodeId("background"), bgRect.states = merge$2({}, DEFAULT_STATES$1, null !== (_a = panel.state) && void 0 !== _a ? _a : {}), axisContainer.insertBefore(bgRect, axisContainer.firstChild);
22739
22715
  }
22740
22716
  }
22741
22717
  renderLine(container) {
@@ -22768,9 +22744,9 @@
22768
22744
  linePoints.push([lastStartPoint, startPoint]), lastStartPoint = endPoint;
22769
22745
  }), linePoints.push([lastStartPoint, end]), lineAttrs.points = linePoints, lineAttrs.multiSegment = !0;
22770
22746
  } else lineAttrs.points = [start, end];
22771
- isEmpty(state) || (lineAttrs.state = {
22772
- line: merge$1({}, DEFAULT_STATES$1, state),
22773
- symbol: merge$1({}, DEFAULT_STATES$1, state)
22747
+ isEmpty$1(state) || (lineAttrs.state = {
22748
+ line: merge$2({}, DEFAULT_STATES$1, state),
22749
+ symbol: merge$2({}, DEFAULT_STATES$1, state)
22774
22750
  });
22775
22751
  const axisLineGroup = new Segment(lineAttrs);
22776
22752
  axisLineGroup.name = AXIS_ELEMENT_NAME.line, axisLineGroup.id = this._getNodeId("line"), container.add(axisLineGroup);
@@ -22803,7 +22779,7 @@
22803
22779
  axisVector = this.getRelativeVector();
22804
22780
  let labelLength = 0;
22805
22781
  if ((null === (_a = this.attribute.label) || void 0 === _a ? void 0 : _a.visible) && !1 === this.attribute.label.inside) {
22806
- const space = +get$7(this.attribute, "label.space", 4);
22782
+ const space = +get$9(this.attribute, "label.space", 4);
22807
22783
  labelLength += space;
22808
22784
  const layerCount = Object.keys(this.axisLabelLayerSize).length;
22809
22785
  if (0 === axisVector[1]) {
@@ -22832,7 +22808,7 @@
22832
22808
  {
22833
22809
  angle: angle
22834
22810
  } = restAttrs;
22835
- if (textAlign = "start" === position ? "start" : "end" === position ? "end" : "center", isNil$3(angle) && autoRotate) {
22811
+ if (textAlign = "start" === position ? "start" : "end" === position ? "end" : "center", isNil$5(angle) && autoRotate) {
22836
22812
  angle = angleTo(axisVector, [1, 0], !0);
22837
22813
  const {
22838
22814
  verticalFactor = 1
@@ -22840,14 +22816,14 @@
22840
22816
  textBaseline = 1 === -1 * verticalFactor ? "bottom" : "top";
22841
22817
  } else textAlign = this.getTextAlign(vector), textBaseline = this.getTextBaseline(vector, !1);
22842
22818
  let maxTagWidth = maxWidth;
22843
- if (isNil$3(maxTagWidth)) {
22819
+ if (isNil$5(maxTagWidth)) {
22844
22820
  const {
22845
22821
  verticalLimitSize: verticalLimitSize,
22846
22822
  verticalMinSize: verticalMinSize,
22847
22823
  orient: orient
22848
22824
  } = this.attribute,
22849
22825
  limitSize = Math.min(verticalLimitSize || 1 / 0, verticalMinSize || 1 / 0);
22850
- if (isValidNumber$1(limitSize)) {
22826
+ if (isValidNumber$3(limitSize)) {
22851
22827
  if ("bottom" === orient || "top" === orient) {
22852
22828
  if (angle !== Math.PI / 2) {
22853
22829
  const cosValue = Math.abs(Math.cos(null != angle ? angle : 0));
@@ -22866,9 +22842,9 @@
22866
22842
  textBaseline: textBaseline
22867
22843
  }, textStyle),
22868
22844
  state: {
22869
- text: merge$1({}, DEFAULT_STATES$1, state.text),
22870
- shape: merge$1({}, DEFAULT_STATES$1, state.shape),
22871
- panel: merge$1({}, DEFAULT_STATES$1, state.background)
22845
+ text: merge$2({}, DEFAULT_STATES$1, state.text),
22846
+ shape: merge$2({}, DEFAULT_STATES$1, state.shape),
22847
+ panel: merge$2({}, DEFAULT_STATES$1, state.background)
22872
22848
  }
22873
22849
  });
22874
22850
  return attrs.angle = angle, shape && shape.visible && (attrs.shape = Object.assign({
@@ -22909,11 +22885,11 @@
22909
22885
  } = this.attribute,
22910
22886
  isX = "bottom" === orient || "top" === orient,
22911
22887
  first = labelShapes[0],
22912
- last$1 = last(labelShapes),
22913
- isInverse = isX ? first.attribute.x > last$1.attribute.x : first.attribute.y < last$1.attribute.y;
22888
+ last = last$1(labelShapes),
22889
+ isInverse = isX ? first.attribute.x > last.attribute.x : first.attribute.y < last.attribute.y;
22914
22890
  if (isX) {
22915
- const leftMostLabel = isInverse ? last$1 : first,
22916
- rightMostLabel = isInverse ? first : last$1,
22891
+ const leftMostLabel = isInverse ? last : first,
22892
+ rightMostLabel = isInverse ? first : last,
22917
22893
  left = axisStart.x,
22918
22894
  right = axisEnd.x,
22919
22895
  leftBound = leftMostLabel.AABBBounds.x1,
@@ -22935,8 +22911,8 @@
22935
22911
  });
22936
22912
  }
22937
22913
  } else {
22938
- const bottomMostLabel = isInverse ? last$1 : first,
22939
- topMostLabel = isInverse ? first : last$1,
22914
+ const bottomMostLabel = isInverse ? last : first,
22915
+ topMostLabel = isInverse ? first : last,
22940
22916
  bottomBound = bottomMostLabel.AABBBounds.y2,
22941
22917
  topBound = topMostLabel.AABBBounds.y1,
22942
22918
  top = axisStart.y,
@@ -22961,7 +22937,7 @@
22961
22937
  }
22962
22938
  }
22963
22939
  handleLabelsOverlap(labelShapes, labelData, labelContainer, layer, layerCount) {
22964
- if (isEmpty(labelShapes)) return;
22940
+ if (isEmpty$1(labelShapes)) return;
22965
22941
  const {
22966
22942
  verticalLimitSize: verticalLimitSize,
22967
22943
  label: label,
@@ -22982,7 +22958,7 @@
22982
22958
  autoWrap: autoWrap$1,
22983
22959
  overflowLimitLength: overflowLimitLength
22984
22960
  } = label;
22985
- if (isFunction$5(layoutFunc)) layoutFunc(labelShapes, labelData, layer, this);else {
22961
+ if (isFunction$7(layoutFunc)) layoutFunc(labelShapes, labelData, layer, this);else {
22986
22962
  if (autoRotate$1) autoRotate(labelShapes, {
22987
22963
  labelRotateAngle: autoRotateAngle,
22988
22964
  orient: orient
@@ -22995,7 +22971,7 @@
22995
22971
  ellipsis: limitEllipsis
22996
22972
  });
22997
22973
  }
22998
- if (!autoWrap$1 && autoLimit$1 && isValidNumber$1(limitLength) && limitLength > 0) {
22974
+ if (!autoWrap$1 && autoLimit$1 && isValidNumber$3(limitLength) && limitLength > 0) {
22999
22975
  const isVertical = "left" === orient || "right" === orient,
23000
22976
  axisLength = isVertical ? Math.abs(this.attribute.start.y - this.attribute.end.y) : Math.abs(this.attribute.start.x - this.attribute.end.x),
23001
22977
  verticalLimitLength = isVertical ? axisLength / labelShapes.length : autoHide$1 || autoRotate$1 ? 1 / 0 : axisLength / labelShapes.length;
@@ -23028,7 +23004,7 @@
23028
23004
  const {
23029
23005
  verticalMinSize: verticalMinSize
23030
23006
  } = this.attribute;
23031
- if (isValidNumber$1(verticalMinSize) && (!isValidNumber$1(verticalLimitSize) || verticalMinSize <= verticalLimitSize)) {
23007
+ if (isValidNumber$3(verticalMinSize) && (!isValidNumber$3(verticalLimitSize) || verticalMinSize <= verticalLimitSize)) {
23032
23008
  const minSize = this._getAxisLabelLimitLength(verticalMinSize, layerCount);
23033
23009
  let x, y;
23034
23010
  axisLabelContainerSize = Math.max(axisLabelContainerSize, minSize), "left" === orient ? (x = axisLabelContainerBounds.x2 - axisLabelContainerSize, y = axisLabelContainerBounds.y1) : "right" === orient ? (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y1) : "top" === orient ? (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y2 - axisLabelContainerSize) : "bottom" === orient && (x = axisLabelContainerBounds.x1, y = axisLabelContainerBounds.y1);
@@ -23041,7 +23017,7 @@
23041
23017
  });
23042
23018
  bgRect.name = AXIS_ELEMENT_NAME.axisLabelBackground, bgRect.id = this._getNodeId("axis-label-background"), labelContainer.insertBefore(bgRect, labelContainer.firstChild);
23043
23019
  }
23044
- if (isValid$3(this.attribute.label.containerAlign)) {
23020
+ if (isValid$5(this.attribute.label.containerAlign)) {
23045
23021
  let start;
23046
23022
  "left" === orient ? start = axisLabelContainerBounds.x2 - axisLabelContainerSize : "right" === orient ? start = axisLabelContainerBounds.x1 : "top" === orient ? start = axisLabelContainerBounds.y2 - axisLabelContainerSize : "bottom" === orient && (start = axisLabelContainerBounds.y1), alignAxisLabels(labelShapes, start, axisLabelContainerSize, orient, this.attribute.label.containerAlign);
23047
23023
  }
@@ -23079,8 +23055,8 @@
23079
23055
  }));
23080
23056
  const labelOverlap = function (prevLabel, nextLabel) {
23081
23057
  let gap = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
23082
- const prevBounds = new AABBBounds(prevLabel).expand(gap / 2),
23083
- nextBounds = new AABBBounds(nextLabel).expand(gap / 2);
23058
+ const prevBounds = new AABBBounds$1(prevLabel).expand(gap / 2),
23059
+ nextBounds = new AABBBounds$1(nextLabel).expand(gap / 2);
23084
23060
  return prevBounds.intersects(nextBounds);
23085
23061
  };
23086
23062
  const MIN_TICK_GAP = 12;
@@ -23095,7 +23071,7 @@
23095
23071
  startAngle = 0
23096
23072
  } = op;
23097
23073
  let labelAngle = null !== (_a = labelStyle.angle) && void 0 !== _a ? _a : 0;
23098
- "vertical" === labelStyle.direction && (labelAngle += degreeToRadian(90));
23074
+ "vertical" === labelStyle.direction && (labelAngle += degreeToRadian$1(90));
23099
23075
  const isHorizontal = ["bottom", "top"].includes(axisOrientType),
23100
23076
  isVertical = ["left", "right"].includes(axisOrientType);
23101
23077
  let scaleX = 1,
@@ -23120,7 +23096,7 @@
23120
23096
  textX = baseTextX,
23121
23097
  textY = baseTextY;
23122
23098
  labelFlush && isHorizontal && 0 === i ? textX = calculateFlushPos(baseTextX, textWidth, range[0], range[range.length - 1]) : labelFlush && isHorizontal && i === domain.length - 1 ? textX = calculateFlushPos(baseTextX, textWidth, range[range.length - 1], range[0]) : align = null !== (_a = labelStyle.textAlign) && void 0 !== _a ? _a : "center", "right" === align ? textX -= textWidth : "center" === align && (textX -= textWidth / 2), labelFlush && isVertical && 0 === i ? textY = calculateFlushPos(baseTextY, textHeight, range[0], range[range.length - 1]) : labelFlush && isVertical && i === domain.length - 1 ? textY = calculateFlushPos(baseTextY, textHeight, range[range.length - 1], range[0]) : baseline = null !== (_b = labelStyle.textBaseline) && void 0 !== _b ? _b : "middle", "bottom" === baseline ? textY -= textHeight : "middle" === baseline && (textY -= textHeight / 2);
23123
- const bounds = new AABBBounds().set(textX, textY, textX + textWidth, textY + textHeight);
23099
+ const bounds = new AABBBounds$1().set(textX, textY, textX + textWidth, textY + textHeight);
23124
23100
  return labelAngle && bounds.rotate(labelAngle, baseTextX, baseTextY), bounds;
23125
23101
  });
23126
23102
  return labelBoundsList;
@@ -23195,18 +23171,18 @@
23195
23171
  this._rangeFactorStart = null, this._rangeFactorEnd = null;
23196
23172
  }
23197
23173
  _calculateWholeRange(range) {
23198
- return this._wholeRange ? this._wholeRange : isValid$3(this._rangeFactorStart) && isValid$3(this._rangeFactorEnd) && 2 === range.length ? (this._wholeRange = calculateWholeRangeFromRangeFactor$1(range, [this._rangeFactorStart, this._rangeFactorEnd]), this._wholeRange) : range;
23174
+ return this._wholeRange ? this._wholeRange : isValid$5(this._rangeFactorStart) && isValid$5(this._rangeFactorEnd) && 2 === range.length ? (this._wholeRange = calculateWholeRangeFromRangeFactor$1(range, [this._rangeFactorStart, this._rangeFactorEnd]), this._wholeRange) : range;
23199
23175
  }
23200
23176
  rangeFactor(_, slience, clear) {
23201
- return _ ? (2 === _.length && _.every(r => r >= 0 && r <= 1) && (this._wholeRange = null, 0 === _[0] && 1 === _[1] ? (this._rangeFactorStart = null, this._rangeFactorEnd = null) : (this._rangeFactorStart = _[0], this._rangeFactorEnd = _[1])), this) : clear ? (this._wholeRange = null, this._rangeFactorStart = null, this._rangeFactorEnd = null, this) : isValid$3(this._rangeFactorStart) && isValid$3(this._rangeFactorEnd) ? [this._rangeFactorStart, this._rangeFactorEnd] : null;
23177
+ return _ ? (2 === _.length && _.every(r => r >= 0 && r <= 1) && (this._wholeRange = null, 0 === _[0] && 1 === _[1] ? (this._rangeFactorStart = null, this._rangeFactorEnd = null) : (this._rangeFactorStart = _[0], this._rangeFactorEnd = _[1])), this) : clear ? (this._wholeRange = null, this._rangeFactorStart = null, this._rangeFactorEnd = null, this) : isValid$5(this._rangeFactorStart) && isValid$5(this._rangeFactorEnd) ? [this._rangeFactorStart, this._rangeFactorEnd] : null;
23202
23178
  }
23203
23179
  rangeFactorStart(_, slience) {
23204
23180
  var _a;
23205
- return isNil$3(_) ? this._rangeFactorStart : (_ >= 0 && _ <= 1 && (this._wholeRange = null, 0 !== _ || !isNil$3(this._rangeFactorEnd) && 1 !== this._rangeFactorEnd ? (this._rangeFactorStart = _, this._rangeFactorEnd = null !== (_a = this._rangeFactorEnd) && void 0 !== _a ? _a : 1) : (this._rangeFactorStart = null, this._rangeFactorEnd = null)), this);
23181
+ return isNil$5(_) ? this._rangeFactorStart : (_ >= 0 && _ <= 1 && (this._wholeRange = null, 0 !== _ || !isNil$5(this._rangeFactorEnd) && 1 !== this._rangeFactorEnd ? (this._rangeFactorStart = _, this._rangeFactorEnd = null !== (_a = this._rangeFactorEnd) && void 0 !== _a ? _a : 1) : (this._rangeFactorStart = null, this._rangeFactorEnd = null)), this);
23206
23182
  }
23207
23183
  rangeFactorEnd(_, slience) {
23208
23184
  var _a;
23209
- return isNil$3(_) ? this._rangeFactorEnd : (_ >= 0 && _ <= 1 && (this._wholeRange = null, 0 !== _ || !isNil$3(this._rangeFactorStart) && 0 !== this._rangeFactorStart ? (this._rangeFactorEnd = _, this._rangeFactorStart = null !== (_a = this._rangeFactorStart) && void 0 !== _a ? _a : 0) : (this._rangeFactorStart = null, this._rangeFactorEnd = null)), this);
23185
+ return isNil$5(_) ? this._rangeFactorEnd : (_ >= 0 && _ <= 1 && (this._wholeRange = null, 0 !== _ || !isNil$5(this._rangeFactorStart) && 0 !== this._rangeFactorStart ? (this._rangeFactorEnd = _, this._rangeFactorStart = null !== (_a = this._rangeFactorStart) && void 0 !== _a ? _a : 0) : (this._rangeFactorStart = null, this._rangeFactorEnd = null)), this);
23210
23186
  }
23211
23187
  generateFishEyeTransform() {
23212
23188
  var _a;
@@ -23222,7 +23198,7 @@
23222
23198
  min = Math.min(first, last),
23223
23199
  max = Math.max(first, last),
23224
23200
  focus = clamp$3(null !== (_a = this._fishEyeOptions.focus) && void 0 !== _a ? _a : 0, min, max),
23225
- rangeRadius = isNil$3(radius) ? (max - min) * radiusRatio : radius;
23201
+ rangeRadius = isNil$5(radius) ? (max - min) * radiusRatio : radius;
23226
23202
  let k0 = Math.exp(distortion);
23227
23203
  k0 = k0 / (k0 - 1) * rangeRadius;
23228
23204
  const k1 = distortion / rangeRadius;
@@ -23249,7 +23225,7 @@
23249
23225
  function interpolate$1(a, b) {
23250
23226
  const t = typeof b;
23251
23227
  let c;
23252
- if (isNil$3(b) || "boolean" === t) return () => b;
23228
+ if (isNil$5(b) || "boolean" === t) return () => b;
23253
23229
  if ("number" === t) return interpolateNumber$1(a, b);
23254
23230
  if ("string" === t) {
23255
23231
  if (c = Color$1.parseColorString(b)) {
@@ -23269,7 +23245,7 @@
23269
23245
  }
23270
23246
  calculateVisibleDomain(range) {
23271
23247
  var _a;
23272
- if (isValid$3(this._rangeFactorStart) && isValid$3(this._rangeFactorEnd) && 2 === range.length) {
23248
+ if (isValid$5(this._rangeFactorStart) && isValid$5(this._rangeFactorEnd) && 2 === range.length) {
23273
23249
  return [this.invert(range[0]), this.invert(range[1])];
23274
23250
  }
23275
23251
  return null !== (_a = this._niceDomain) && void 0 !== _a ? _a : this._domain;
@@ -23342,10 +23318,10 @@
23342
23318
  return _ ? (super.rangeFactor(_), this._output = this._input = null, this) : super.rangeFactor();
23343
23319
  }
23344
23320
  rangeFactorStart(_, slience) {
23345
- return isNil$3(_) ? super.rangeFactorStart() : (super.rangeFactorStart(_), this._output = this._input = null, this);
23321
+ return isNil$5(_) ? super.rangeFactorStart() : (super.rangeFactorStart(_), this._output = this._input = null, this);
23346
23322
  }
23347
23323
  rangeFactorEnd(_, slience) {
23348
- return isNil$3(_) ? super.rangeFactorEnd() : (super.rangeFactorEnd(_), this._output = this._input = null, this);
23324
+ return isNil$5(_) ? super.rangeFactorEnd() : (super.rangeFactorEnd(_), this._output = this._input = null, this);
23349
23325
  }
23350
23326
  forceAlignDomainRange(forceAlign) {
23351
23327
  return arguments.length ? (this._forceAlign = forceAlign, this) : this._forceAlign;
@@ -23503,13 +23479,13 @@
23503
23479
  }
23504
23480
  }
23505
23481
  function parseNiceOptions$1(originalDomain, option) {
23506
- const hasForceMin = isNumber$4(option.forceMin),
23507
- hasForceMax = isNumber$4(option.forceMax);
23482
+ const hasForceMin = isNumber$6(option.forceMin),
23483
+ hasForceMax = isNumber$6(option.forceMax);
23508
23484
  let niceType = null;
23509
23485
  const niceMinMax = [];
23510
23486
  let niceDomain = null;
23511
23487
  const domainValidator = hasForceMin && hasForceMax ? x => x >= option.forceMin && x <= option.forceMax : hasForceMin ? x => x >= option.forceMin : hasForceMax ? x => x <= option.forceMax : null;
23512
- return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$4(option.min) && option.min <= Math.min(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[0] = option.min), hasForceMax ? niceMinMax[1] = option.forceMax : isNumber$4(option.max) && option.max >= Math.max(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[1] = option.max), isNumber$4(niceMinMax[0]) && isNumber$4(niceMinMax[1]) ? (niceDomain = originalDomain.slice(), niceDomain[0] = niceMinMax[0], niceDomain[niceDomain.length - 1] = niceMinMax[1]) : niceType = isNumber$4(niceMinMax[0]) || isNumber$4(niceMinMax[1]) ? isNumber$4(niceMinMax[0]) ? "max" : "min" : "all", {
23488
+ return hasForceMin ? niceMinMax[0] = option.forceMin : isNumber$6(option.min) && option.min <= Math.min(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[0] = option.min), hasForceMax ? niceMinMax[1] = option.forceMax : isNumber$6(option.max) && option.max >= Math.max(originalDomain[0], originalDomain[originalDomain.length - 1]) && (niceMinMax[1] = option.max), isNumber$6(niceMinMax[0]) && isNumber$6(niceMinMax[1]) ? (niceDomain = originalDomain.slice(), niceDomain[0] = niceMinMax[0], niceDomain[niceDomain.length - 1] = niceMinMax[1]) : niceType = isNumber$6(niceMinMax[0]) || isNumber$6(niceMinMax[1]) ? isNumber$6(niceMinMax[0]) ? "max" : "min" : "all", {
23513
23489
  niceType: niceType,
23514
23490
  niceDomain: niceDomain,
23515
23491
  niceMinMax: niceMinMax,
@@ -23537,8 +23513,8 @@
23537
23513
  let count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
23538
23514
  let options = arguments.length > 1 ? arguments[1] : undefined;
23539
23515
  var _a;
23540
- if (isFunction$5(null == options ? void 0 : options.customTicks)) return options.customTicks(this, count);
23541
- if (isValid$3(this._rangeFactorStart) && isValid$3(this._rangeFactorEnd) && (this._rangeFactorStart > 0 || this._rangeFactorEnd < 1) && 2 === this._range.length || !this._niceType) return this.d3Ticks(count, options);
23516
+ if (isFunction$7(null == options ? void 0 : options.customTicks)) return options.customTicks(this, count);
23517
+ if (isValid$5(this._rangeFactorStart) && isValid$5(this._rangeFactorEnd) && (this._rangeFactorStart > 0 || this._rangeFactorEnd < 1) && 2 === this._range.length || !this._niceType) return this.d3Ticks(count, options);
23542
23518
  const curNiceDomain = null !== (_a = this._niceDomain) && void 0 !== _a ? _a : this._domain,
23543
23519
  originalDomain = this._domain,
23544
23520
  start = curNiceDomain[0],
@@ -23645,8 +23621,8 @@
23645
23621
  breakData: breakData
23646
23622
  } = op;
23647
23623
  let scaleTicks;
23648
- if (isValid$3(tickStep)) ticks = scale.stepTicks(tickStep), breakDomains = breakData && breakData() ? breakData().breakDomains : null, scaleTicks = breakDomains && breakDomains.length ? ticks.filter(tick => breakDomains.every(breakDomain => tick < breakDomain[0] || tick > breakDomain[1])) : ticks;else if (isValid$3(forceTickCount)) scaleTicks = getScaleTicks(op, scale, forceTickCount, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).forceTicks(count) : scale.forceTicks(count));else if ("d3" === op.tickMode) {
23649
- const count = null !== (_a = isFunction$5(tickCount) ? tickCount({
23624
+ if (isValid$5(tickStep)) ticks = scale.stepTicks(tickStep), breakDomains = breakData && breakData() ? breakData().breakDomains : null, scaleTicks = breakDomains && breakDomains.length ? ticks.filter(tick => breakDomains.every(breakDomain => tick < breakDomain[0] || tick > breakDomain[1])) : ticks;else if (isValid$5(forceTickCount)) scaleTicks = getScaleTicks(op, scale, forceTickCount, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).forceTicks(count) : scale.forceTicks(count));else if ("d3" === op.tickMode) {
23625
+ const count = null !== (_a = isFunction$7(tickCount) ? tickCount({
23650
23626
  axisLength: rangeSize,
23651
23627
  labelStyle: labelStyle
23652
23628
  }) : tickCount) && void 0 !== _a ? _a : 5;
@@ -23656,11 +23632,11 @@
23656
23632
  noDecimals: noDecimals
23657
23633
  }));
23658
23634
  } else {
23659
- const count = null !== (_b = isFunction$5(tickCount) ? tickCount({
23635
+ const count = null !== (_b = isFunction$7(tickCount) ? tickCount({
23660
23636
  axisLength: rangeSize,
23661
23637
  labelStyle: labelStyle
23662
23638
  }) : tickCount) && void 0 !== _b ? _b : 5,
23663
- customTicks = isFunction$5(op.tickMode) ? op.tickMode : void 0;
23639
+ customTicks = isFunction$7(op.tickMode) ? op.tickMode : void 0;
23664
23640
  scaleTicks = getScaleTicks(op, scale, count, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).ticks(count, {
23665
23641
  noDecimals: noDecimals,
23666
23642
  customTicks: customTicks
@@ -23692,14 +23668,14 @@
23692
23668
  value: scaleTicks[i]
23693
23669
  }));
23694
23670
  const firstSourceItem = items[0],
23695
- lastSourceItem = last(items),
23671
+ lastSourceItem = last$1(items),
23696
23672
  samplingMethod = breakData && breakData() ? methods.greedy : methods.parity;
23697
23673
  for (; items.length >= 3 && hasOverlap(items, labelGap);) items = samplingMethod(items, labelGap);
23698
23674
  const checkFirst = op.labelFirstVisible;
23699
23675
  let checkLast = op.labelLastVisible;
23700
23676
  textIntersect(firstSourceItem, lastSourceItem, labelGap) && items.includes(lastSourceItem) && items.length > 1 && checkFirst && checkLast && (items.splice(items.indexOf(lastSourceItem), 1), checkLast = !1), forceItemVisible(firstSourceItem, items, checkFirst, item => textIntersect(item, firstSourceItem, labelGap)), forceItemVisible(lastSourceItem, items, checkLast, item => textIntersect(item, lastSourceItem, labelGap) || !(!checkFirst || item === firstSourceItem) && textIntersect(item, firstSourceItem, labelGap), !0);
23701
23677
  const ticks = items.map(item => item.value);
23702
- ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last(ticks) !== last(scaleTicks) && ticks.push(last(scaleTicks))), scaleTicks = ticks;
23678
+ ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last$1(ticks) !== last$1(scaleTicks) && ticks.push(last$1(scaleTicks))), scaleTicks = ticks;
23703
23679
  }
23704
23680
  return convertDomainToTickData(scaleTicks);
23705
23681
  };
@@ -23736,16 +23712,16 @@
23736
23712
  rangeSize = scale.calculateWholeRangeSize();
23737
23713
  if (rangeSize < 2) return op.labelLastVisible ? convertDomainToTickData([domain[domain.length - 1]]) : convertDomainToTickData([domain[0]]);
23738
23714
  let scaleTicks;
23739
- if (isValid$3(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$3(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if (isValid$3(tickCount)) {
23740
- const count = isFunction$5(tickCount) ? tickCount({
23715
+ if (isValid$5(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$5(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if (isValid$5(tickCount)) {
23716
+ const count = isFunction$7(tickCount) ? tickCount({
23741
23717
  axisLength: rangeSize,
23742
23718
  labelStyle: labelStyle
23743
23719
  }) : tickCount;
23744
23720
  scaleTicks = scale.ticks(count);
23745
23721
  } else if (op.sampling) {
23746
23722
  const fontSize = (null !== (_a = op.labelStyle.fontSize) && void 0 !== _a ? _a : 12) + 2,
23747
- rangeStart = minInArray(range),
23748
- rangeEnd = maxInArray(range);
23723
+ rangeStart = minInArray$1(range),
23724
+ rangeEnd = maxInArray$1(range);
23749
23725
  if (domain.length <= rangeSize / fontSize) {
23750
23726
  const incrementUnit = (rangeEnd - rangeStart) / domain.length,
23751
23727
  labelBoundsList = getOneDimensionalLabelBounds(scale, domain, op, isHorizontal),
@@ -23856,7 +23832,7 @@
23856
23832
  y: y
23857
23833
  } = getPolarAngleLabelPosition(angle, center, radius, labelOffset, inside);
23858
23834
  orient.align || (isNumberClose$1(x, center.x) ? orient.baseline || (orient.baseline = y > center.y ? "top" : "bottom") : x > center.x ? orient.align = "left" : x < center.x && (orient.align = "right")), textX = x + ("right" === orient.align ? -textWidth : "left" === orient.align ? 0 : -textWidth / 2), textY = y + ("bottom" === orient.baseline ? -textHeight : "top" === orient.baseline ? 0 : -textHeight / 2);
23859
- return new AABBBounds().set(textX, textY, textX + textWidth, textY + textHeight).rotate(labelAngle, textX + textWidth / 2, textY + textHeight / 2);
23835
+ return new AABBBounds$1().set(textX, textY, textX + textWidth, textY + textHeight).rotate(labelAngle, textX + textWidth / 2, textY + textHeight / 2);
23860
23836
  });
23861
23837
  };
23862
23838
  const polarAngleAxisDiscreteTicks = (scale, op) => {
@@ -23872,10 +23848,10 @@
23872
23848
  radius = null == getRadius ? void 0 : getRadius();
23873
23849
  if (!radius) return convertDomainToTickData(scale.domain());
23874
23850
  let scaleTicks;
23875
- if (isValid$3(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$3(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if (isValid$3(tickCount)) {
23851
+ if (isValid$5(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$5(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if (isValid$5(tickCount)) {
23876
23852
  const range = scale.range(),
23877
23853
  rangeSize = Math.abs(range[range.length - 1] - range[0]),
23878
- count = isFunction$5(tickCount) ? tickCount({
23854
+ count = isFunction$7(tickCount) ? tickCount({
23879
23855
  axisLength: rangeSize,
23880
23856
  labelStyle: labelStyle
23881
23857
  }) : tickCount;
@@ -23884,8 +23860,8 @@
23884
23860
  const domain = scale.domain(),
23885
23861
  range = scale.range(),
23886
23862
  labelBoundsList = getPolarAngleLabelBounds(scale, domain, op),
23887
- rangeStart = minInArray(range),
23888
- rangeEnd = maxInArray(range),
23863
+ rangeStart = minInArray$1(range),
23864
+ rangeEnd = maxInArray$1(range),
23889
23865
  incrementUnit = Math.abs(rangeEnd - rangeStart) * (radius + labelOffset) / domain.length,
23890
23866
  {
23891
23867
  step: step,
@@ -23951,7 +23927,7 @@
23951
23927
  return this._current;
23952
23928
  }
23953
23929
  constructor(attributes, options) {
23954
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Pager.defaultAttributes, attributes)), this.name = "pager", this._current = 1, this._onHover = e => {
23930
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Pager.defaultAttributes, attributes)), this.name = "pager", this._current = 1, this._onHover = e => {
23955
23931
  const target = e.target;
23956
23932
  target.hasState("disable") || target.addState("hover");
23957
23933
  }, this._onUnHover = e => {
@@ -24023,8 +23999,8 @@
24023
23999
  textAlign: "center",
24024
24000
  textBaseline: "middle"
24025
24001
  }, textStyle), null === (_c = null === (_b = this.stage) || void 0 === _b ? void 0 : _b.getTheme()) || void 0 === _c ? void 0 : _c.text),
24026
- handlerSizeX = isNumber$4(handlerSize) ? handlerSize : handlerSize[0],
24027
- handlerSizeY = isNumber$4(handlerSize) ? handlerSize : handlerSize[1],
24002
+ handlerSizeX = isNumber$6(handlerSize) ? handlerSize : handlerSize[0],
24003
+ handlerSizeY = isNumber$6(handlerSize) ? handlerSize : handlerSize[1],
24028
24004
  text = graphicCreator.text(Object.assign({
24029
24005
  x: isHorizontal ? handlerSizeX / 2 + handlerSpace + maxTextWidth / 2 : 0,
24030
24006
  y: isHorizontal ? 0 : handlerSizeY / 2 + handlerSpace + maxTextHeight / 2,
@@ -24059,7 +24035,7 @@
24059
24035
  const {
24060
24036
  pageFormatter: pageFormatter
24061
24037
  } = this.attribute;
24062
- return pageFormatter ? isFunction$5(pageFormatter) ? pageFormatter(current, this._total) : `${pageFormatter}`.replace("{current}", `${current}`).replace("{total}", `${this._total}`) : `${current}/${this._total}`;
24038
+ return pageFormatter ? isFunction$7(pageFormatter) ? pageFormatter(current, this._total) : `${pageFormatter}`.replace("{current}", `${current}`).replace("{total}", `${this._total}`) : `${current}/${this._total}`;
24063
24039
  }
24064
24040
  setTotal(total) {
24065
24041
  total !== this.attribute.total && (this._total = total, 1 !== this._current && this._current <= total ? this.setAttributes({
@@ -24140,7 +24116,7 @@
24140
24116
  };
24141
24117
  shape && shape.visible && (tagAttrs.shape = Object.assign({
24142
24118
  visible: !0
24143
- }, shape.style), isValid$3(shape.space) && (tagAttrs.space = shape.space)), background && background.visible && (tagAttrs.panel = Object.assign({
24119
+ }, shape.style), isValid$5(shape.space) && (tagAttrs.space = shape.space)), background && background.visible && (tagAttrs.panel = Object.assign({
24144
24120
  visible: !0
24145
24121
  }, background.style));
24146
24122
  const titleTag = new Tag$1(tagAttrs);
@@ -24193,7 +24169,7 @@
24193
24169
  loadDiscreteLegendComponent();
24194
24170
  class DiscreteLegend extends LegendBase {
24195
24171
  constructor(attributes, options) {
24196
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, DiscreteLegend.defaultAttributes, attributes)), this.name = "discreteLegend", this._itemsContainer = null, this._itemHeightByUser = void 0, this._itemHeight = 0, this._itemMaxWidth = 0, this._contentMaxHeight = 0, this._onHover = e => {
24172
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, DiscreteLegend.defaultAttributes, attributes)), this.name = "discreteLegend", this._itemsContainer = null, this._itemHeightByUser = void 0, this._itemHeight = 0, this._itemMaxWidth = 0, this._contentMaxHeight = 0, this._onHover = e => {
24197
24173
  const target = e.target;
24198
24174
  if (target && target.name && target.name.startsWith(LEGEND_ELEMENT_NAME.item)) {
24199
24175
  const legendItem = target.delegate;
@@ -24288,18 +24264,18 @@
24288
24264
  for (let index = startIndex, len = legendItems.length; index < len && !(lazyload && pages > this._itemContext.currentPage * maxPages); index++) {
24289
24265
  lazyload && (this._itemContext.startIndex = index + 1), item = legendItems[index], item.id || (item.id = item.label), item.index = index;
24290
24266
  let isSelected = !0;
24291
- isArray$7(defaultSelected) && (isSelected = defaultSelected.includes(item.label));
24267
+ isArray$9(defaultSelected) && (isSelected = defaultSelected.includes(item.label));
24292
24268
  const itemGroup = this._renderEachItem(item, isSelected, index, legendItems),
24293
24269
  itemWidth = itemGroup.attribute.width,
24294
24270
  itemHeight = itemGroup.attribute.height;
24295
- this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$3(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && ("middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
24271
+ this._itemHeight = Math.max(this._itemHeight, itemHeight), maxWidthInCol = Math.max(itemWidth, maxWidthInCol), this._itemMaxWidth = Math.max(itemWidth, this._itemMaxWidth), isHorizontal ? (isValid$5(maxWidth) && (isScrollbar && autoPage ? (pages = Math.ceil((startX + itemWidth) / maxWidth), doWrap = pages > 1) : startX + itemWidth > maxWidth && (doWrap = !0, startX > 0 && ("middle" !== verticalAlign && "bottom" !== verticalAlign || lastLineItemGroup.forEach(i => {
24296
24272
  i.setAttributes({
24297
24273
  y: i.attribute.y + (lastLineHeight - i.attribute.height) / ("middle" === verticalAlign ? 2 : 1)
24298
24274
  });
24299
24275
  }), pages += 1, startX = 0, startY += lastLineHeight + spaceRow, lastLineHeight = 0, lastLineItemGroup.length = 0))), 0 === startX && 0 === startY || itemGroup.setAttributes({
24300
24276
  x: startX,
24301
24277
  y: startY
24302
- }), startX += spaceCol + itemWidth, lastLineHeight = Math.max(lastLineHeight, itemHeight), lastLineItemGroup.push(itemGroup)) : (isValid$3(maxHeight) && (isScrollbar && autoPage ? (pages = Math.ceil((startY + itemHeight) / maxHeight), doWrap = pages > 1) : maxHeight <= itemHeight ? (pages += 1, doWrap = !0, startY = 0, index > 0 && (startX += lastItemWidth + spaceCol)) : maxHeight < startY + itemHeight && (pages += 1, doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0)), 0 === startX && 0 === startY || itemGroup.setAttributes({
24278
+ }), startX += spaceCol + itemWidth, lastLineHeight = Math.max(lastLineHeight, itemHeight), lastLineItemGroup.push(itemGroup)) : (isValid$5(maxHeight) && (isScrollbar && autoPage ? (pages = Math.ceil((startY + itemHeight) / maxHeight), doWrap = pages > 1) : maxHeight <= itemHeight ? (pages += 1, doWrap = !0, startY = 0, index > 0 && (startX += lastItemWidth + spaceCol)) : maxHeight < startY + itemHeight && (pages += 1, doWrap = !0, startY = 0, startX += maxWidthInCol + spaceCol, maxWidthInCol = 0)), 0 === startX && 0 === startY || itemGroup.setAttributes({
24303
24279
  x: startX,
24304
24280
  y: startY
24305
24281
  }), startY += spaceRow + itemHeight), itemsContainer.add(itemGroup), lastItemWidth = itemWidth;
@@ -24318,7 +24294,7 @@
24318
24294
  maxWidth: maxWidth,
24319
24295
  maxHeight: maxHeight
24320
24296
  } = this.attribute;
24321
- if (!1 === item.visible || isEmpty(items)) return;
24297
+ if (!1 === item.visible || isEmpty$1(items)) return;
24322
24298
  let legendItems = items;
24323
24299
  reversed && (legendItems = null == items ? void 0 : items.reverse()), this._contentMaxHeight = Math.max(0, maxHeight - this._parsedPadding[0] - this._parsedPadding[2]);
24324
24300
  const itemsContainer = graphicCreator.group({
@@ -24337,7 +24313,7 @@
24337
24313
  height: itemHeight
24338
24314
  } = item,
24339
24315
  widthsOptions = [];
24340
- isValid$3(maxItemWidth) && widthsOptions.push(maxItemWidth), isValid$3(itemWidth) && widthsOptions.push(itemWidth), widthsOptions.length && (isValid$3(maxWidth) && widthsOptions.push(maxWidth), this._itemWidthByUser = minInArray(widthsOptions)), isValid$3(itemHeight) && (this._itemHeightByUser = itemHeight);
24316
+ isValid$5(maxItemWidth) && widthsOptions.push(maxItemWidth), isValid$5(itemWidth) && widthsOptions.push(itemWidth), widthsOptions.length && (isValid$5(maxWidth) && widthsOptions.push(maxWidth), this._itemWidthByUser = minInArray$1(widthsOptions)), isValid$5(itemHeight) && (this._itemHeightByUser = itemHeight);
24341
24317
  const pager = this.attribute.pager;
24342
24318
  this._itemContext = {
24343
24319
  currentPage: pager && pager.defaultCurrent || 1,
@@ -24355,7 +24331,7 @@
24355
24331
  clipContainer: void 0
24356
24332
  }, this._itemContext = this._renderItems();
24357
24333
  let pagerRendered = !1;
24358
- this._itemContext.doWrap && autoPage && this._itemContext.pages > this._itemContext.maxPages && (pagerRendered = this._renderPagerComponent()), pagerRendered || (itemsContainer.setAttribute("y", this._title ? this._title.AABBBounds.height() + get$7(this.attribute, "title.space", 8) : 0), this._innerView.add(itemsContainer));
24334
+ this._itemContext.doWrap && autoPage && this._itemContext.pages > this._itemContext.maxPages && (pagerRendered = this._renderPagerComponent()), pagerRendered || (itemsContainer.setAttribute("y", this._title ? this._title.AABBBounds.height() + get$9(this.attribute, "title.space", 8) : 0), this._innerView.add(itemsContainer));
24359
24335
  }
24360
24336
  _bindEvents() {
24361
24337
  if (this.attribute.disableTriggerEvent) return;
@@ -24367,11 +24343,11 @@
24367
24343
  if (hover) {
24368
24344
  let trigger = "pointermove",
24369
24345
  triggerOff = "pointerleave";
24370
- isObject$8(hover) && (hover.trigger && (trigger = hover.trigger), hover.triggerOff && (triggerOff = hover.triggerOff)), this._itemsContainer.addEventListener(trigger, this._onHover), this._itemsContainer.addEventListener(triggerOff, this._onUnHover);
24346
+ isObject$a(hover) && (hover.trigger && (trigger = hover.trigger), hover.triggerOff && (triggerOff = hover.triggerOff)), this._itemsContainer.addEventListener(trigger, this._onHover), this._itemsContainer.addEventListener(triggerOff, this._onUnHover);
24371
24347
  }
24372
24348
  if (select) {
24373
24349
  let trigger = "pointerdown";
24374
- isObject$8(select) && select.trigger && (trigger = select.trigger), this._itemsContainer.addEventListener(trigger, this._onClick);
24350
+ isObject$a(select) && select.trigger && (trigger = select.trigger), this._itemsContainer.addEventListener(trigger, this._onClick);
24375
24351
  }
24376
24352
  }
24377
24353
  _autoEllipsis(autoEllipsisStrategy, layoutWidth, labelShape, valueShape) {
@@ -24433,8 +24409,8 @@
24433
24409
  shapeSize = 0,
24434
24410
  shapeSpace = 0;
24435
24411
  if (shapeAttr && !1 !== shapeAttr.visible) {
24436
- const s = get$7(shapeStyle, "style.size", DEFAULT_SHAPE_SIZE);
24437
- shapeSize = isArray$7(s) ? s[0] || 0 : s, shapeSpace = get$7(shapeAttr, "space", DEFAULT_SHAPE_SPACE);
24412
+ const s = get$9(shapeStyle, "style.size", DEFAULT_SHAPE_SIZE);
24413
+ shapeSize = isArray$9(s) ? s[0] || 0 : s, shapeSpace = get$9(shapeAttr, "space", DEFAULT_SHAPE_SPACE);
24438
24414
  const itemShape = graphicCreator.symbol(Object.assign(Object.assign({
24439
24415
  x: 0,
24440
24416
  y: 0,
@@ -24443,12 +24419,12 @@
24443
24419
  }, shape), shapeStyle.style));
24444
24420
  Object.keys(shapeStyle.state || {}).forEach(key => {
24445
24421
  const color = shapeStyle.state[key].fill || shapeStyle.state[key].stroke;
24446
- shape.fill && isNil$3(shapeStyle.state[key].fill) && color && (shapeStyle.state[key].fill = color), shape.stroke && isNil$3(shapeStyle.state[key].stroke) && color && (shapeStyle.state[key].stroke = color);
24422
+ shape.fill && isNil$5(shapeStyle.state[key].fill) && color && (shapeStyle.state[key].fill = color), shape.stroke && isNil$5(shapeStyle.state[key].stroke) && color && (shapeStyle.state[key].stroke = color);
24447
24423
  }), this._appendDataToShape(itemShape, LEGEND_ELEMENT_NAME.itemShape, item, itemGroup, shapeStyle.state), itemShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(itemShape);
24448
24424
  }
24449
24425
  let focusSpace = 0;
24450
24426
  if (focus) {
24451
- const focusSize = get$7(focusIconStyle, "size", DEFAULT_SHAPE_SIZE);
24427
+ const focusSize = get$9(focusIconStyle, "size", DEFAULT_SHAPE_SIZE);
24452
24428
  focusShape = graphicCreator.symbol(Object.assign(Object.assign({
24453
24429
  x: 0,
24454
24430
  y: -focusSize / 2 - 1,
@@ -24472,9 +24448,9 @@
24472
24448
  }),
24473
24449
  labelShape = createTextGraphicByType(labelAttributes);
24474
24450
  this._appendDataToShape(labelShape, LEGEND_ELEMENT_NAME.itemLabel, item, itemGroup, labelStyle.state), labelShape.addState(isSelected ? LegendStateValue.selected : LegendStateValue.unSelected), innerGroup.add(labelShape);
24475
- const labelSpace = get$7(labelAttr, "space", DEFAULT_LABEL_SPACE);
24476
- if (isValid$3(value)) {
24477
- const valueSpace = get$7(valueAttr, "space", focus ? DEFAULT_VALUE_SPACE : 0),
24451
+ const labelSpace = get$9(labelAttr, "space", DEFAULT_LABEL_SPACE);
24452
+ if (isValid$5(value)) {
24453
+ const valueSpace = get$9(valueAttr, "space", focus ? DEFAULT_VALUE_SPACE : 0),
24478
24454
  valueText = valueAttr.formatMethod ? valueAttr.formatMethod(value, item, index) : value,
24479
24455
  valueAttributes = Object.assign(Object.assign({
24480
24456
  x: 0,
@@ -24510,7 +24486,7 @@
24510
24486
  });
24511
24487
  }
24512
24488
  const innerGroupHeight = innerGroupBounds.height(),
24513
- itemGroupWidth = isValid$3(this.attribute.item.width) ? this.attribute.item.width : innerGroupWidth + parsedPadding[1] + parsedPadding[3],
24489
+ itemGroupWidth = isValid$5(this.attribute.item.width) ? this.attribute.item.width : innerGroupWidth + parsedPadding[1] + parsedPadding[3],
24514
24490
  itemGroupHeight = this._itemHeightByUser || innerGroupHeight + parsedPadding[0] + parsedPadding[2];
24515
24491
  return itemGroup.attribute.width = itemGroupWidth, itemGroup.attribute.height = itemGroupHeight, focusShape && focusShape.setAttribute("visible", !1), innerGroup.translateTo(-innerGroupBounds.x1 + parsedPadding[3], -innerGroupBounds.y1 + parsedPadding[0]), itemGroup;
24516
24492
  }
@@ -24524,7 +24500,7 @@
24524
24500
  return this._itemContext.isHorizontal ? new Pager(Object.assign(Object.assign({
24525
24501
  layout: 1 === maxRow ? "horizontal" : "vertical",
24526
24502
  total: estimateTotal(this._itemContext.pages)
24527
- }, merge$1({
24503
+ }, merge$2({
24528
24504
  handler: {
24529
24505
  preShape: "triangleUp",
24530
24506
  nextShape: "triangleDown"
@@ -24667,7 +24643,7 @@
24667
24643
  } else this._pagerComponent.addEventListener("toPrev", onPaging), this._pagerComponent.addEventListener("toNext", onPaging);
24668
24644
  }
24669
24645
  _renderPager() {
24670
- const renderStartY = this._title ? this._title.AABBBounds.height() + get$7(this.attribute, "title.space", 8) : 0,
24646
+ const renderStartY = this._title ? this._title.AABBBounds.height() + get$9(this.attribute, "title.space", 8) : 0,
24671
24647
  {
24672
24648
  maxWidth: maxWidth,
24673
24649
  maxCol = 1,
@@ -24738,7 +24714,7 @@
24738
24714
  }
24739
24715
  _renderScrollbar() {
24740
24716
  var _a;
24741
- const renderStartY = this._title ? this._title.AABBBounds.height() + get$7(this.attribute, "title.space", 8) : 0,
24717
+ const renderStartY = this._title ? this._title.AABBBounds.height() + get$9(this.attribute, "title.space", 8) : 0,
24742
24718
  {
24743
24719
  maxWidth: maxWidth,
24744
24720
  item = {},
@@ -24898,7 +24874,7 @@
24898
24874
  }
24899
24875
  _appendDataToShape(shape, name, data, delegateShape) {
24900
24876
  let states = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
24901
- shape.name = name, shape.data = data, shape.delegate = delegateShape, shape.states = merge$1({}, DEFAULT_STATES, states);
24877
+ shape.name = name, shape.data = data, shape.delegate = delegateShape, shape.states = merge$2({}, DEFAULT_STATES, states);
24902
24878
  }
24903
24879
  _dispatchLegendEvent(eventName, legendItem, event) {
24904
24880
  const currentSelectedItems = this._getSelectedLegends();
@@ -24915,8 +24891,8 @@
24915
24891
  }
24916
24892
  _handleStyle(config, item, isSelected, index, items) {
24917
24893
  const newConfig = {};
24918
- return config.style && (isFunction$5(config.style) ? newConfig.style = config.style(item, isSelected, index, items) : newConfig.style = config.style), config.state && (newConfig.state = {}, Object.keys(config.state).forEach(key => {
24919
- config.state[key] && (isFunction$5(config.state[key]) ? newConfig.state[key] = config.state[key](item, isSelected, index, items) : newConfig.state[key] = config.state[key]);
24894
+ return config.style && (isFunction$7(config.style) ? newConfig.style = config.style(item, isSelected, index, items) : newConfig.style = config.style), config.state && (newConfig.state = {}, Object.keys(config.state).forEach(key => {
24895
+ config.state[key] && (isFunction$7(config.state[key]) ? newConfig.state[key] = config.state[key](item, isSelected, index, items) : newConfig.state[key] = config.state[key]);
24920
24896
  })), newConfig;
24921
24897
  }
24922
24898
  release() {
@@ -25019,7 +24995,7 @@
25019
24995
  }(SLIDER_ELEMENT_NAME || (SLIDER_ELEMENT_NAME = {}));
25020
24996
 
25021
24997
  function convertValueToRange(value) {
25022
- return isArray$7(value) ? value : [value, value];
24998
+ return isArray$9(value) ? value : [value, value];
25023
24999
  }
25024
25000
  function getDefaultCursor(isHorizontal) {
25025
25001
  return isHorizontal ? "ew-resize" : "ns-resize";
@@ -25042,7 +25018,7 @@
25042
25018
  return this._tooltipShape;
25043
25019
  }
25044
25020
  constructor(attributes, options) {
25045
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Slider.defaultAttributes, attributes)), this.name = "slider", this._isHorizontal = !0, this._startHandler = null, this._endHandler = null, this._startHandlerText = null, this._endHandlerText = null, this._currentHandler = null, this._currentValue = {}, this._onTooltipShow = e => {
25021
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Slider.defaultAttributes, attributes)), this.name = "slider", this._isHorizontal = !0, this._startHandler = null, this._endHandler = null, this._startHandlerText = null, this._endHandlerText = null, this._currentHandler = null, this._currentValue = {}, this._onTooltipShow = e => {
25046
25022
  this._isChanging || this._tooltipState && this._tooltipState.isActive || (this._tooltipState ? this._tooltipState.isActive = !0 : this._tooltipState = {
25047
25023
  isActive: !0
25048
25024
  }, this._onTooltipUpdate(e), this._dispatchTooltipEvent("sliderTooltipShow"));
@@ -25167,7 +25143,7 @@
25167
25143
  let currentPos, startHandlerPos, endHandlerPos;
25168
25144
  this._isHorizontal ? (currentPos = e.viewX - this._rail.globalAABBBounds.x1, startHandlerPos = null == startHandler ? void 0 : startHandler.attribute.x, endHandlerPos = null == endHandler ? void 0 : endHandler.attribute.x, railWidth) : (currentPos = e.viewY - this._rail.globalAABBBounds.y1, startHandlerPos = null == startHandler ? void 0 : startHandler.attribute.y, endHandlerPos = null == endHandler ? void 0 : endHandler.attribute.y, railHeight);
25169
25145
  const currentValue = this.calculateValueByPos(currentPos);
25170
- if (isValid$3(endHandlerPos)) {
25146
+ if (isValid$5(endHandlerPos)) {
25171
25147
  const updateHandler = Math.abs(currentPos - startHandlerPos) > Math.abs(currentPos - endHandlerPos) ? endHandler : startHandler;
25172
25148
  this._updateHandler(updateHandler, currentPos, currentValue);
25173
25149
  } else this._updateHandler(startHandler, currentPos, currentValue);
@@ -25229,7 +25205,7 @@
25229
25205
  let {
25230
25206
  value: value
25231
25207
  } = this.attribute;
25232
- isNil$3(value) && (value = [min, max]), this._currentValue = {
25208
+ isNil$5(value) && (value = [min, max]), this._currentValue = {
25233
25209
  startValue: convertValueToRange(value)[0],
25234
25210
  endValue: convertValueToRange(value)[1]
25235
25211
  };
@@ -25251,7 +25227,7 @@
25251
25227
  text: startText.text,
25252
25228
  lineHeight: null === (_a = startText.style) || void 0 === _a ? void 0 : _a.fontSize
25253
25229
  }, startText.style)), startTextShape.name = SLIDER_ELEMENT_NAME.startText, innerView.add(startTextShape);
25254
- const space = isValid$3(startText.space) ? startText.space : 0;
25230
+ const space = isValid$5(startText.space) ? startText.space : 0;
25255
25231
  startLen += (isHorizontal ? startTextShape.AABBBounds.width() : startTextShape.AABBBounds.height()) + space;
25256
25232
  }
25257
25233
  const mainContainer = graphicCreator.group({
@@ -25265,7 +25241,7 @@
25265
25241
  });
25266
25242
  let endTextShape;
25267
25243
  if (railContainer.name = SLIDER_ELEMENT_NAME.railContainer, this._railContainer = railContainer, mainContainer.add(railContainer), this._mainContainer = mainContainer, this._renderRail(railContainer), startLen += isHorizontal ? railWidth : railHeight, endText && endText.visible) {
25268
- const space = isValid$3(endText.space) ? endText.space : 0;
25244
+ const space = isValid$5(endText.space) ? endText.space : 0;
25269
25245
  endTextShape = graphicCreator.text(Object.assign({
25270
25246
  x: isHorizontal ? startLen + space : railWidth / 2,
25271
25247
  y: isHorizontal ? railHeight / 2 : startLen + space,
@@ -25310,7 +25286,7 @@
25310
25286
  let {
25311
25287
  value: value
25312
25288
  } = this.attribute;
25313
- isNil$3(value) && (value = [min, max]);
25289
+ isNil$5(value) && (value = [min, max]);
25314
25290
  const handlerTextVisible = handlerText && handlerText.visible,
25315
25291
  isHorizontal = this._isHorizontal,
25316
25292
  [startValue, endValue] = convertValueToRange(value),
@@ -25354,7 +25330,7 @@
25354
25330
  value: value
25355
25331
  } = this.attribute;
25356
25332
  let startValue, endValue;
25357
- if (isNil$3(value)) range ? (startValue = min, endValue = max) : startValue = endValue = min;else if (range) {
25333
+ if (isNil$5(value)) range ? (startValue = min, endValue = max) : startValue = endValue = min;else if (range) {
25358
25334
  const clampValue = clampRange$1(value, min, max);
25359
25335
  startValue = clampValue[0], endValue = clampValue[1];
25360
25336
  } else startValue = min, endValue = clamp$3(value, min, max);
@@ -25370,7 +25346,7 @@
25370
25346
  pickable: !1
25371
25347
  });
25372
25348
  trackContainer.name = SLIDER_ELEMENT_NAME.trackContainer;
25373
- const draggableTrack = isObject$8(range) && !0 === range.draggableTrack;
25349
+ const draggableTrack = isObject$a(range) && !0 === range.draggableTrack;
25374
25350
  let cursor;
25375
25351
  cursor = !1 === slidable ? "default" : !1 === range || !1 === draggableTrack ? "pointer" : getDefaultCursor(isHorizontal);
25376
25352
  const startPos = this.calculatePosByValue(startValue, "start"),
@@ -25475,7 +25451,7 @@
25475
25451
  slidable: slidable,
25476
25452
  range: range
25477
25453
  } = this.attribute;
25478
- slidable && (this._startHandler && this._startHandler.addEventListener("pointerdown", this._onHandlerPointerdown), this._startHandlerText && this._startHandlerText.addEventListener("pointerdown", this._onHandlerPointerdown), this._endHandler && this._endHandler.addEventListener("pointerdown", this._onHandlerPointerdown), this._endHandlerText && this._endHandlerText.addEventListener("pointerdown", this._onHandlerPointerdown), isObject$8(range) && range.draggableTrack && this._track.addEventListener("pointerdown", this._onTrackPointerdown), this._railContainer.addEventListener("pointerdown", this._onRailPointerDown));
25454
+ slidable && (this._startHandler && this._startHandler.addEventListener("pointerdown", this._onHandlerPointerdown), this._startHandlerText && this._startHandlerText.addEventListener("pointerdown", this._onHandlerPointerdown), this._endHandler && this._endHandler.addEventListener("pointerdown", this._onHandlerPointerdown), this._endHandlerText && this._endHandlerText.addEventListener("pointerdown", this._onHandlerPointerdown), isObject$a(range) && range.draggableTrack && this._track.addEventListener("pointerdown", this._onTrackPointerdown), this._railContainer.addEventListener("pointerdown", this._onRailPointerDown));
25479
25455
  }
25480
25456
  _bindTooltipEvents() {
25481
25457
  this.attribute.disableTriggerEvent || (this._mainContainer.addEventListener("pointerenter", this._onTooltipShow), this._mainContainer.addEventListener("pointermove", this._onTooltipUpdate), this._mainContainer.addEventListener("pointerleave", this._onTooltipHide));
@@ -25643,9 +25619,9 @@
25643
25619
  loadColorContinuousLegendComponent();
25644
25620
  class ColorContinuousLegend extends LegendBase {
25645
25621
  constructor(attributes, options) {
25646
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, ColorContinuousLegend.defaultAttributes, attributes)), this.name = "colorLegend", this._onSliderToolipChange = e => {
25622
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, ColorContinuousLegend.defaultAttributes, attributes)), this.name = "colorLegend", this._onSliderToolipChange = e => {
25647
25623
  const tooltipShape = this._slider.tooltipShape;
25648
- if (tooltipShape && e.detail && !isNil$3(e.detail.value)) {
25624
+ if (tooltipShape && e.detail && !isNil$5(e.detail.value)) {
25649
25625
  const color = this._colorScale.scale(e.detail.value);
25650
25626
  tooltipShape.setAttribute("fill", color);
25651
25627
  }
@@ -25714,7 +25690,7 @@
25714
25690
  disableTriggerEvent: disableTriggerEvent,
25715
25691
  inverse: inverse
25716
25692
  });
25717
- this._innerView.add(slider), this._slider = slider, slider.translateTo(0 - slider.AABBBounds.x1, (this._title ? this._title.AABBBounds.height() + get$7(this.attribute, "title.space", DEFAULT_TITLE_SPACE) : 0) - slider.AABBBounds.y1), this._updateColor();
25693
+ this._innerView.add(slider), this._slider = slider, slider.translateTo(0 - slider.AABBBounds.x1, (this._title ? this._title.AABBBounds.height() + get$9(this.attribute, "title.space", DEFAULT_TITLE_SPACE) : 0) - slider.AABBBounds.y1), this._updateColor();
25718
25694
  }
25719
25695
  _bindEvents() {
25720
25696
  this.attribute.disableTriggerEvent || this._slider && (this._slider.addEventListener("change", this._onSliderChange), this._slider.addEventListener("sliderTooltip", this._onSliderToolipChange));
@@ -25725,7 +25701,7 @@
25725
25701
  layout: layout,
25726
25702
  inverse: inverse
25727
25703
  } = this.attribute;
25728
- if (isEmpty(colors)) return;
25704
+ if (isEmpty$1(colors)) return;
25729
25705
  const count = colors.length;
25730
25706
  if (1 === count) return colors[0];
25731
25707
  const stops = [];
@@ -25846,7 +25822,7 @@
25846
25822
  loadSizeContinuousLegendComponent();
25847
25823
  class SizeContinuousLegend extends LegendBase {
25848
25824
  constructor(attributes, options) {
25849
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, SizeContinuousLegend.defaultAttributes, attributes)), this.name = "sizeLegend", this._onSliderChange = e => {
25825
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, SizeContinuousLegend.defaultAttributes, attributes)), this.name = "sizeLegend", this._onSliderChange = e => {
25850
25826
  this.dispatchEvent(e);
25851
25827
  }, this._onSliderToolipChange = e => {
25852
25828
  this.dispatchEvent(e);
@@ -25926,7 +25902,7 @@
25926
25902
  zIndex: 0
25927
25903
  }));
25928
25904
  mainContainer.add(background);
25929
- const titleSpace = this._title ? this._title.AABBBounds.height() + get$7(this.attribute, "title.space", DEFAULT_TITLE_SPACE) : 0;
25905
+ const titleSpace = this._title ? this._title.AABBBounds.height() + get$9(this.attribute, "title.space", DEFAULT_TITLE_SPACE) : 0;
25930
25906
  mainContainer.translate(0 - mainContainer.AABBBounds.x1, titleSpace - mainContainer.AABBBounds.y1), this._slider = slider;
25931
25907
  }
25932
25908
  _bindEvents() {
@@ -25962,7 +25938,7 @@
25962
25938
  loadTitleComponent();
25963
25939
  let Title$1 = class Title extends AbstractComponent {
25964
25940
  constructor(attributes, options) {
25965
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Title.defaultAttributes, attributes)), this.name = "title";
25941
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Title.defaultAttributes, attributes)), this.name = "title";
25966
25942
  }
25967
25943
  render() {
25968
25944
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
@@ -26002,7 +25978,7 @@
26002
25978
  maxWidth: maxWidth,
26003
25979
  lineClamp: lineClamp
26004
25980
  } = textStyle;
26005
- if ("rich" === textType || isValid$3(textStyle.character)) {
25981
+ if ("rich" === textType || isValid$5(textStyle.character)) {
26006
25982
  const attr = Object.assign({
26007
25983
  x: x,
26008
25984
  y: y,
@@ -26031,8 +26007,8 @@
26031
26007
  textConfig: []
26032
26008
  }, textStyle);
26033
26009
  this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
26034
- } else isValid$3(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
26035
- text: isArray$7(text) ? text : [text],
26010
+ } else isValid$5(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
26011
+ text: isArray$9(text) ? text : [text],
26036
26012
  whiteSpace: "normal"
26037
26013
  }, textStyle), {
26038
26014
  maxLineWidth: null !== (_f = null !== (_e = textStyle.maxLineWidth) && void 0 !== _e ? _e : mainTitleWidth) && void 0 !== _f ? _f : width,
@@ -26058,7 +26034,7 @@
26058
26034
  lineClamp: lineClamp
26059
26035
  } = subtextStyle,
26060
26036
  maxSubTextHeight = Math.max(Number.MIN_VALUE, maxHeight - mainTextBoundsHeight);
26061
- if ("rich" === subtextType || isValid$3(subtextStyle.character)) {
26037
+ if ("rich" === subtextType || isValid$5(subtextStyle.character)) {
26062
26038
  const attr = Object.assign({
26063
26039
  x: x,
26064
26040
  y: y,
@@ -26087,8 +26063,8 @@
26087
26063
  textConfig: []
26088
26064
  }, subtextStyle);
26089
26065
  this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
26090
- } else isValid$3(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
26091
- text: isArray$7(subtext) ? subtext : [subtext],
26066
+ } else isValid$5(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
26067
+ text: isArray$9(subtext) ? subtext : [subtext],
26092
26068
  whiteSpace: "normal"
26093
26069
  }, subtextStyle), {
26094
26070
  maxLineWidth: null !== (_o = subtextStyle.maxLineWidth) && void 0 !== _o ? _o : width,
@@ -26103,28 +26079,28 @@
26103
26079
  subTextBoundsWidth = this._subTitle ? this._subTitle.AABBBounds.width() : 0;
26104
26080
  let totalWidth = Math.max(mainTextBoundsWidth, subTextBoundsWidth),
26105
26081
  totalHeight = mainTextBoundsHeight + (null !== (_q = subtextStyle.height) && void 0 !== _q ? _q : subTextBoundsHeight);
26106
- if (isValid$3(width) && (totalWidth = width), isValid$3(height) && (totalHeight = height), isValid$3(minWidth) && totalWidth < minWidth && (totalWidth = minWidth), isValid$3(maxWidth) && totalWidth > maxWidth && (totalWidth = maxWidth), isValid$3(minHeight) && totalHeight < minHeight && (totalHeight = minHeight), isValid$3(maxHeight) && totalHeight > maxHeight && (totalHeight = maxHeight), group.attribute.width = totalWidth, group.attribute.height = totalHeight, group.attribute.boundsPadding = parsedPadding, this._mainTitle) {
26107
- if (isValid$3(align) || isValid$3(textStyle.align)) {
26082
+ if (isValid$5(width) && (totalWidth = width), isValid$5(height) && (totalHeight = height), isValid$5(minWidth) && totalWidth < minWidth && (totalWidth = minWidth), isValid$5(maxWidth) && totalWidth > maxWidth && (totalWidth = maxWidth), isValid$5(minHeight) && totalHeight < minHeight && (totalHeight = minHeight), isValid$5(maxHeight) && totalHeight > maxHeight && (totalHeight = maxHeight), group.attribute.width = totalWidth, group.attribute.height = totalHeight, group.attribute.boundsPadding = parsedPadding, this._mainTitle) {
26083
+ if (isValid$5(align) || isValid$5(textStyle.align)) {
26108
26084
  const mainTitleAlign = textStyle.align ? textStyle.align : align,
26109
26085
  mainTitleWidth = null !== (_r = textStyle.width) && void 0 !== _r ? _r : totalWidth;
26110
26086
  "center" === mainTitleAlign ? (this._mainTitle.setAttribute("x", mainTitleWidth / 2), this._mainTitle.setAttribute("textAlign", "center")) : "right" === mainTitleAlign ? (this._mainTitle.setAttribute("x", mainTitleWidth), this._mainTitle.setAttribute("textAlign", "right")) : (this._mainTitle.setAttribute("x", 0), this._mainTitle.setAttribute("textAlign", "left"));
26111
26087
  }
26112
- if (isValid$3(verticalAlign) || isValid$3(textStyle.verticalAlign)) {
26088
+ if (isValid$5(verticalAlign) || isValid$5(textStyle.verticalAlign)) {
26113
26089
  const mainTitleVerticalAlign = textStyle.verticalAlign ? textStyle.verticalAlign : verticalAlign;
26114
- "middle" === mainTitleVerticalAlign && isValid$3(fixedMainTitleHeight) ? (this._mainTitle.setAttribute("y", fixedMainTitleHeight / 2), this._mainTitle.setAttribute("textBaseline", "middle")) : "bottom" === mainTitleVerticalAlign && isValid$3(fixedMainTitleHeight) ? (this._mainTitle.setAttribute("y", fixedMainTitleHeight), this._mainTitle.setAttribute("textBaseline", "bottom")) : (this._mainTitle.setAttribute("y", 0), this._mainTitle.setAttribute("textBaseline", "top"));
26090
+ "middle" === mainTitleVerticalAlign && isValid$5(fixedMainTitleHeight) ? (this._mainTitle.setAttribute("y", fixedMainTitleHeight / 2), this._mainTitle.setAttribute("textBaseline", "middle")) : "bottom" === mainTitleVerticalAlign && isValid$5(fixedMainTitleHeight) ? (this._mainTitle.setAttribute("y", fixedMainTitleHeight), this._mainTitle.setAttribute("textBaseline", "bottom")) : (this._mainTitle.setAttribute("y", 0), this._mainTitle.setAttribute("textBaseline", "top"));
26115
26091
  }
26116
26092
  }
26117
26093
  if (this._subTitle) {
26118
- if (isValid$3(align) || isValid$3(subtextStyle.align)) {
26094
+ if (isValid$5(align) || isValid$5(subtextStyle.align)) {
26119
26095
  const subTitleAlign = subtextStyle.align ? subtextStyle.align : align,
26120
26096
  subTitleWidth = null !== (_t = null !== (_s = subtextStyle.width) && void 0 !== _s ? _s : textStyle.width) && void 0 !== _t ? _t : totalWidth;
26121
26097
  "center" === subTitleAlign ? (this._subTitle.setAttribute("x", subTitleWidth / 2), this._subTitle.setAttribute("textAlign", "center")) : "right" === subTitleAlign ? (this._subTitle.setAttribute("x", subTitleWidth), this._subTitle.setAttribute("textAlign", "right")) : (this._subTitle.setAttribute("x", 0), this._subTitle.setAttribute("textAlign", "left"));
26122
26098
  }
26123
- if (isValid$3(verticalAlign) || isValid$3(textStyle.verticalAlign)) {
26099
+ if (isValid$5(verticalAlign) || isValid$5(textStyle.verticalAlign)) {
26124
26100
  const subTitleVerticalAlign = subtextStyle.verticalAlign ? subtextStyle.verticalAlign : verticalAlign,
26125
- subTitleYStart = this._mainTitle ? isValid$3(fixedMainTitleHeight) ? this._mainTitle.AABBBounds.y1 + Math.max(this._mainTitle.AABBBounds.height(), fixedMainTitleHeight) : this._mainTitle.AABBBounds.y2 : 0,
26101
+ subTitleYStart = this._mainTitle ? isValid$5(fixedMainTitleHeight) ? this._mainTitle.AABBBounds.y1 + Math.max(this._mainTitle.AABBBounds.height(), fixedMainTitleHeight) : this._mainTitle.AABBBounds.y2 : 0,
26126
26102
  subTitleHeight = null !== (_u = subtextStyle.height) && void 0 !== _u ? _u : height;
26127
- "middle" === subTitleVerticalAlign && isValid$3(subTitleHeight) ? (this._subTitle.setAttribute("y", subTitleYStart + subTitleHeight / 2), this._subTitle.setAttribute("textBaseline", "middle")) : "bottom" === subTitleVerticalAlign && isValid$3(subTitleHeight) ? (this._subTitle.setAttribute("y", subTitleYStart + subTitleHeight), this._subTitle.setAttribute("textBaseline", "bottom")) : (this._subTitle.setAttribute("y", subTitleYStart), this._subTitle.setAttribute("textBaseline", "top"));
26103
+ "middle" === subTitleVerticalAlign && isValid$5(subTitleHeight) ? (this._subTitle.setAttribute("y", subTitleYStart + subTitleHeight / 2), this._subTitle.setAttribute("textBaseline", "middle")) : "bottom" === subTitleVerticalAlign && isValid$5(subTitleHeight) ? (this._subTitle.setAttribute("y", subTitleYStart + subTitleHeight), this._subTitle.setAttribute("textBaseline", "bottom")) : (this._subTitle.setAttribute("y", subTitleYStart), this._subTitle.setAttribute("textBaseline", "top"));
26128
26104
  }
26129
26105
  }
26130
26106
  }
@@ -26157,7 +26133,7 @@
26157
26133
  loadCheckBoxComponent();
26158
26134
  class CheckBox extends AbstractComponent {
26159
26135
  constructor(attributes, options) {
26160
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, CheckBox.defaultAttributes, attributes)), this._handlePointerUp = () => {
26136
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, CheckBox.defaultAttributes, attributes)), this._handlePointerUp = () => {
26161
26137
  this.attribute.disabled || (this.attribute.checked ? (this.setAttribute("checked", !1), this.setAttribute("indeterminate", !1)) : (this.setAttribute("checked", !0), this.setAttribute("indeterminate", !1)), this._dispatchEvent("checkbox_state_change", {
26162
26138
  eventType: "checkbox_state_change",
26163
26139
  checked: this.attribute.checked
@@ -26170,7 +26146,7 @@
26170
26146
  this.removeAllChild(!0), this.renderBox(), this.renderIcon(), this.renderText(), this.layout();
26171
26147
  }
26172
26148
  renderBox() {
26173
- this._box = new Rect$2(merge$1({}, this.attribute.box));
26149
+ this._box = new Rect$2(merge$2({}, this.attribute.box));
26174
26150
  const isCheckedOrIndeterminate = this.attribute.checked || this.attribute.indeterminate;
26175
26151
  isCheckedOrIndeterminate && this.attribute.disabled ? this._box.setAttributes({
26176
26152
  fill: this.attribute.box.disableCheckedFill,
@@ -26183,14 +26159,14 @@
26183
26159
  }), this.appendChild(this._box);
26184
26160
  }
26185
26161
  renderIcon() {
26186
- this._checkIcon = new Image$2(merge$1({
26162
+ this._checkIcon = new Image$2(merge$2({
26187
26163
  image: this.attribute.icon.checkIconImage
26188
- }, this.attribute.icon)), this.appendChild(this._checkIcon), this._indeterminateIcon = new Image$2(merge$1({
26164
+ }, this.attribute.icon)), this.appendChild(this._checkIcon), this._indeterminateIcon = new Image$2(merge$2({
26189
26165
  image: this.attribute.icon.indeterminateIconImage
26190
26166
  }, this.attribute.icon)), this.appendChild(this._indeterminateIcon), this.attribute.checked ? (this._checkIcon.setAttribute("visible", !0), this._indeterminateIcon.setAttribute("visible", !1)) : this.attribute.indeterminate ? (this._checkIcon.setAttribute("visible", !1), this._indeterminateIcon.setAttribute("visible", !0)) : (this._checkIcon.setAttribute("visible", !1), this._indeterminateIcon.setAttribute("visible", !1));
26191
26167
  }
26192
26168
  renderText() {
26193
- this._text = new Text$1(merge$1({
26169
+ this._text = new Text$1(merge$2({
26194
26170
  wrap: !0
26195
26171
  }, this.attribute.text)), this.attribute.disabled && this._text.setAttribute("fill", this.attribute.text.disableFill), this.appendChild(this._text);
26196
26172
  }
@@ -26226,7 +26202,7 @@
26226
26202
  });
26227
26203
  }
26228
26204
  initAttributes(params, options) {
26229
- params = (null == options ? void 0 : options.skipDefault) ? params : merge$1({}, CheckBox.defaultAttributes, params), super.initAttributes(params), this.renderGroup(), this.render();
26205
+ params = (null == options ? void 0 : options.skipDefault) ? params : merge$2({}, CheckBox.defaultAttributes, params), super.initAttributes(params), this.renderGroup(), this.render();
26230
26206
  }
26231
26207
  }
26232
26208
  CheckBox.defaultAttributes = {
@@ -26274,7 +26250,7 @@
26274
26250
  loadRadioComponent();
26275
26251
  class Radio extends AbstractComponent {
26276
26252
  constructor(attributes, options) {
26277
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Radio.defaultAttributes, attributes)), this._handlePointerUp = () => {
26253
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Radio.defaultAttributes, attributes)), this._handlePointerUp = () => {
26278
26254
  this.attribute.disabled || this.attribute.checked || (this.setAttribute("checked", !0), this._dispatchEvent("radio_checked", {
26279
26255
  eventType: "radio_checked",
26280
26256
  target: this
@@ -26287,7 +26263,7 @@
26287
26263
  this.removeAllChild(!0), this.renderCircle(), this.renderText(), this.layout();
26288
26264
  }
26289
26265
  renderCircle() {
26290
- this._circle = new Arc$1(merge$1({}, this.attribute.circle));
26266
+ this._circle = new Arc$1(merge$2({}, this.attribute.circle));
26291
26267
  const isChecked = this.attribute.checked;
26292
26268
  isChecked && this.attribute.disabled ? this._circle.setAttributes({
26293
26269
  fill: this.attribute.circle.disableCheckedFill,
@@ -26300,7 +26276,7 @@
26300
26276
  }), this.appendChild(this._circle);
26301
26277
  }
26302
26278
  renderText() {
26303
- this._text = new Text$1(merge$1({}, this.attribute.text)), this.attribute.disabled && this._text.setAttribute("fill", this.attribute.text.disableFill), this.appendChild(this._text);
26279
+ this._text = new Text$1(merge$2({}, this.attribute.text)), this.attribute.disabled && this._text.setAttribute("fill", this.attribute.text.disableFill), this.appendChild(this._text);
26304
26280
  }
26305
26281
  renderGroup() {
26306
26282
  this.attribute.interactive || this.setAttribute("pickable", !1), this.attribute.disabled && this.setAttribute("cursor", this.attribute.disableCursor);
@@ -26323,7 +26299,7 @@
26323
26299
  });
26324
26300
  }
26325
26301
  initAttributes(params, options) {
26326
- params = (null == options ? void 0 : options.skipDefault) ? params : merge$1({}, Radio.defaultAttributes, params), super.initAttributes(params), this.renderGroup(), this.render();
26302
+ params = (null == options ? void 0 : options.skipDefault) ? params : merge$2({}, Radio.defaultAttributes, params), super.initAttributes(params), this.renderGroup(), this.render();
26327
26303
  }
26328
26304
  }
26329
26305
  Radio.defaultAttributes = {
@@ -26366,18 +26342,18 @@
26366
26342
  loadEmptyTipComponent();
26367
26343
  let EmptyTip$1 = class EmptyTip extends AbstractComponent {
26368
26344
  constructor(attributes, options) {
26369
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, EmptyTip.defaultAttributes, attributes));
26345
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, EmptyTip.defaultAttributes, attributes));
26370
26346
  }
26371
26347
  render() {
26372
26348
  this.removeAllChild(!0), this.renderIcon(), this.renderText(), this.layout();
26373
26349
  }
26374
26350
  renderIcon() {
26375
- this._emptyTipIcon = new Image$2(merge$1({
26351
+ this._emptyTipIcon = new Image$2(merge$2({
26376
26352
  image: this.attribute.icon.image
26377
26353
  }, this.attribute.icon)), this.appendChild(this._emptyTipIcon);
26378
26354
  }
26379
26355
  renderText() {
26380
- this._text = new Text$1(merge$1({
26356
+ this._text = new Text$1(merge$2({
26381
26357
  wrap: !0
26382
26358
  }, this.attribute.text)), this.appendChild(this._text);
26383
26359
  }
@@ -26417,7 +26393,7 @@
26417
26393
  loadSwitchComponent();
26418
26394
  class Switch extends AbstractComponent {
26419
26395
  constructor(attributes, options) {
26420
- super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, Switch.defaultAttributes, attributes)), this._handlePointerUp = () => {
26396
+ super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Switch.defaultAttributes, attributes)), this._handlePointerUp = () => {
26421
26397
  this.attribute.disabled || (this.attribute.checked ? this.setAttribute("checked", !1) : this.setAttribute("checked", !0), this._dispatchEvent("switch_state_change", {
26422
26398
  eventType: "switch_state_change",
26423
26399
  checked: this.attribute.checked
@@ -26430,7 +26406,7 @@
26430
26406
  this.removeAllChild(!0), this.renderBox(), this.renderCircle(), this.renderText(), this.layout();
26431
26407
  }
26432
26408
  renderBox() {
26433
- this._box = new Rect$2(merge$1({}, this.attribute.box)), this.attribute.disabled && this.attribute.checked ? this._box.setAttributes({
26409
+ this._box = new Rect$2(merge$2({}, this.attribute.box)), this.attribute.disabled && this.attribute.checked ? this._box.setAttributes({
26434
26410
  fill: this.attribute.box.disableCheckedFill
26435
26411
  }) : this.attribute.disabled && !this.attribute.checked ? this._box.setAttributes({
26436
26412
  fill: this.attribute.box.disableUncheckedFill
@@ -26441,11 +26417,11 @@
26441
26417
  }), this.appendChild(this._box);
26442
26418
  }
26443
26419
  renderCircle() {
26444
- this._circle = new Circle$1(merge$1({}, this.attribute.circle)), this.appendChild(this._circle);
26420
+ this._circle = new Circle$1(merge$2({}, this.attribute.circle)), this.appendChild(this._circle);
26445
26421
  }
26446
26422
  renderText() {
26447
26423
  var _a, _b, _c;
26448
- this._text = new Text$1(merge$1({}, null !== (_a = this.attribute.text) && void 0 !== _a ? _a : {})), this.attribute.checked && (null === (_b = this.attribute.text) || void 0 === _b ? void 0 : _b.checkedText) ? this._text.setAttributes({
26424
+ this._text = new Text$1(merge$2({}, null !== (_a = this.attribute.text) && void 0 !== _a ? _a : {})), this.attribute.checked && (null === (_b = this.attribute.text) || void 0 === _b ? void 0 : _b.checkedText) ? this._text.setAttributes({
26449
26425
  text: this.attribute.text.checkedText
26450
26426
  }) : (null === (_c = this.attribute.text) || void 0 === _c ? void 0 : _c.uncheckedText) && this._text.setAttributes({
26451
26427
  text: this.attribute.text.uncheckedText
@@ -26482,7 +26458,7 @@
26482
26458
  });
26483
26459
  }
26484
26460
  initAttributes(params, options) {
26485
- params = (null == options ? void 0 : options.skipDefault) ? params : merge$1({}, Switch.defaultAttributes, params), super.initAttributes(params), this.renderGroup(), this.render();
26461
+ params = (null == options ? void 0 : options.skipDefault) ? params : merge$2({}, Switch.defaultAttributes, params), super.initAttributes(params), this.renderGroup(), this.render();
26486
26462
  }
26487
26463
  }
26488
26464
  Switch.defaultAttributes = {
@@ -28165,6 +28141,616 @@
28165
28141
  return mode;
28166
28142
  }
28167
28143
 
28144
+ const isType$2 = (value, type) => Object.prototype.toString.call(value) === `[object ${type}]`;
28145
+ var isType$3 = isType$2;
28146
+
28147
+ const isBoolean$3 = function (value) {
28148
+ let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
28149
+ return fuzzy ? "boolean" == typeof value : !0 === value || !1 === value || isType$3(value, "Boolean");
28150
+ };
28151
+ var isBoolean$4 = isBoolean$3;
28152
+
28153
+ const isFunction$4 = value => "function" == typeof value;
28154
+ var isFunction$5 = isFunction$4;
28155
+
28156
+ const isNil$2 = value => null == value;
28157
+ var isNil$3 = isNil$2;
28158
+
28159
+ const isValid$2 = value => null != value;
28160
+ var isValid$3 = isValid$2;
28161
+
28162
+ const isObject$7 = value => {
28163
+ const type = typeof value;
28164
+ return null !== value && "object" === type || "function" === type;
28165
+ };
28166
+ var isObject$8 = isObject$7;
28167
+
28168
+ const isObjectLike$4 = value => "object" == typeof value && null !== value;
28169
+ var isObjectLike$5 = isObjectLike$4;
28170
+
28171
+ const isPlainObject$2 = function (value) {
28172
+ if (!isObjectLike$5(value) || !isType$3(value, "Object")) return !1;
28173
+ if (null === Object.getPrototypeOf(value)) return !0;
28174
+ let proto = value;
28175
+ for (; null !== Object.getPrototypeOf(proto);) proto = Object.getPrototypeOf(proto);
28176
+ return Object.getPrototypeOf(value) === proto;
28177
+ };
28178
+ var isPlainObject$3 = isPlainObject$2;
28179
+
28180
+ const isString$3 = function (value) {
28181
+ let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
28182
+ const type = typeof value;
28183
+ return fuzzy ? "string" === type : "string" === type || isType$3(value, "String");
28184
+ };
28185
+ var isString$4 = isString$3;
28186
+
28187
+ const isArray$6 = value => Array.isArray ? Array.isArray(value) : isType$3(value, "Array");
28188
+ var isArray$7 = isArray$6;
28189
+
28190
+ const isArrayLike$2 = function (value) {
28191
+ return null !== value && "function" != typeof value && Number.isFinite(value.length);
28192
+ };
28193
+ var isArrayLike$3 = isArrayLike$2;
28194
+
28195
+ const isDate$2 = value => isType$3(value, "Date");
28196
+ var isDate$3 = isDate$2;
28197
+
28198
+ const isNumber$3 = function (value) {
28199
+ let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
28200
+ const type = typeof value;
28201
+ return fuzzy ? "number" === type : "number" === type || isType$3(value, "Number");
28202
+ };
28203
+ var isNumber$4 = isNumber$3;
28204
+
28205
+ const isValidNumber = value => isNumber$4(value) && Number.isFinite(value);
28206
+ var isValidNumber$1 = isValidNumber;
28207
+
28208
+ const getType = value => ({}).toString.call(value).replace(/^\[object /, "").replace(/]$/, "");
28209
+ var getType$1 = getType;
28210
+
28211
+ const objectProto$5 = Object.prototype,
28212
+ isPrototype = function (value) {
28213
+ const Ctor = value && value.constructor;
28214
+ return value === ("function" == typeof Ctor && Ctor.prototype || objectProto$5);
28215
+ };
28216
+ var isPrototype$1 = isPrototype;
28217
+
28218
+ const hasOwnProperty$4 = Object.prototype.hasOwnProperty;
28219
+ function isEmpty(value) {
28220
+ if (isNil$3(value)) return !0;
28221
+ if (isArrayLike$3(value)) return !value.length;
28222
+ const type = getType$1(value);
28223
+ if ("Map" === type || "Set" === type) return !value.size;
28224
+ if (isPrototype$1(value)) return !Object.keys(value).length;
28225
+ for (const key in value) if (hasOwnProperty$4.call(value, key)) return !1;
28226
+ return !0;
28227
+ }
28228
+
28229
+ const get$6 = (obj, path, defaultValue) => {
28230
+ const paths = isString$4(path) ? path.split(".") : path;
28231
+ for (let p = 0; p < paths.length; p++) obj = obj ? obj[paths[p]] : void 0;
28232
+ return void 0 === obj ? defaultValue : obj;
28233
+ };
28234
+ var get$7 = get$6;
28235
+
28236
+ function cloneDeep$1(value, ignoreWhen, excludeKeys) {
28237
+ let result;
28238
+ if (!isValid$3(value) || "object" != typeof value || ignoreWhen && ignoreWhen(value)) return value;
28239
+ const isArr = isArray$7(value),
28240
+ length = value.length;
28241
+ result = isArr ? new Array(length) : "object" == typeof value ? {} : isBoolean$4(value) || isNumber$4(value) || isString$4(value) ? value : isDate$3(value) ? new Date(+value) : void 0;
28242
+ const props = isArr ? void 0 : Object.keys(Object(value));
28243
+ let index = -1;
28244
+ if (result) for (; ++index < (props || value).length;) {
28245
+ const key = props ? props[index] : index,
28246
+ subValue = value[key];
28247
+ excludeKeys && excludeKeys.includes(key.toString()) ? result[key] = subValue : result[key] = cloneDeep$1(subValue, ignoreWhen, excludeKeys);
28248
+ }
28249
+ return result;
28250
+ }
28251
+
28252
+ function baseMerge$1(target, source) {
28253
+ let shallowArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
28254
+ let skipTargetArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
28255
+ if (source) {
28256
+ if (target === source) return;
28257
+ if (isValid$3(source) && "object" == typeof source) {
28258
+ const iterable = Object(source),
28259
+ props = [];
28260
+ for (const key in iterable) props.push(key);
28261
+ let {
28262
+ length: length
28263
+ } = props,
28264
+ propIndex = -1;
28265
+ for (; length--;) {
28266
+ const key = props[++propIndex];
28267
+ !isValid$3(iterable[key]) || "object" != typeof iterable[key] || skipTargetArray && isArray$7(target[key]) ? assignMergeValue$1(target, key, iterable[key]) : baseMergeDeep$1(target, source, key, shallowArray, skipTargetArray);
28268
+ }
28269
+ }
28270
+ }
28271
+ }
28272
+ function baseMergeDeep$1(target, source, key) {
28273
+ let shallowArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
28274
+ let skipTargetArray = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
28275
+ const objValue = target[key],
28276
+ srcValue = source[key];
28277
+ let newValue = source[key],
28278
+ isCommon = !0;
28279
+ if (isArray$7(srcValue)) {
28280
+ if (shallowArray) newValue = [];else if (isArray$7(objValue)) newValue = objValue;else if (isArrayLike$3(objValue)) {
28281
+ newValue = new Array(objValue.length);
28282
+ let index = -1;
28283
+ const length = objValue.length;
28284
+ for (; ++index < length;) newValue[index] = objValue[index];
28285
+ }
28286
+ } else isPlainObject$3(srcValue) ? (newValue = null != objValue ? objValue : {}, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
28287
+ isCommon && baseMerge$1(newValue, srcValue, shallowArray, skipTargetArray), assignMergeValue$1(target, key, newValue);
28288
+ }
28289
+ function assignMergeValue$1(target, key, value) {
28290
+ (void 0 !== value && !eq$3(target[key], value) || void 0 === value && !(key in target)) && (target[key] = value);
28291
+ }
28292
+ function eq$3(value, other) {
28293
+ return value === other || Number.isNaN(value) && Number.isNaN(other);
28294
+ }
28295
+ function merge$1(target) {
28296
+ let sourceIndex = -1;
28297
+ const length = arguments.length <= 1 ? 0 : arguments.length - 1;
28298
+ for (; ++sourceIndex < length;) {
28299
+ baseMerge$1(target, sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1], !0);
28300
+ }
28301
+ return target;
28302
+ }
28303
+
28304
+ function pickWithout(obj, keys) {
28305
+ if (!obj || !isPlainObject$3(obj)) return obj;
28306
+ const result = {};
28307
+ return Object.keys(obj).forEach(k => {
28308
+ const v = obj[k];
28309
+ let match = !1;
28310
+ keys.forEach(itKey => {
28311
+ (isString$4(itKey) && itKey === k || itKey instanceof RegExp && k.match(itKey)) && (match = !0);
28312
+ }), match || (result[k] = v);
28313
+ }), result;
28314
+ }
28315
+
28316
+ function objToString(obj) {
28317
+ return Object.prototype.toString.call(obj);
28318
+ }
28319
+ function objectKeys(obj) {
28320
+ return Object.keys(obj);
28321
+ }
28322
+ function isEqual(a, b, options) {
28323
+ if (a === b) return !0;
28324
+ if (typeof a != typeof b) return !1;
28325
+ if (null == a || null == b) return !1;
28326
+ if (Number.isNaN(a) && Number.isNaN(b)) return !0;
28327
+ if (objToString(a) !== objToString(b)) return !1;
28328
+ if (isFunction$5(a)) return !!(null == options ? void 0 : options.skipFunction);
28329
+ if ("object" != typeof a) return !1;
28330
+ if (isArray$7(a)) {
28331
+ if (a.length !== b.length) return !1;
28332
+ for (let i = a.length - 1; i >= 0; i--) if (!isEqual(a[i], b[i], options)) return !1;
28333
+ return !0;
28334
+ }
28335
+ if (!isPlainObject$3(a)) return !1;
28336
+ const ka = objectKeys(a),
28337
+ kb = objectKeys(b);
28338
+ if (ka.length !== kb.length) return !1;
28339
+ ka.sort(), kb.sort();
28340
+ for (let i = ka.length - 1; i >= 0; i--) if (ka[i] != kb[i]) return !1;
28341
+ for (let i = ka.length - 1; i >= 0; i--) {
28342
+ const key = ka[i];
28343
+ if (!isEqual(a[key], b[key], options)) return !1;
28344
+ }
28345
+ return !0;
28346
+ }
28347
+
28348
+ function last(val) {
28349
+ if (isArrayLike$3(val)) {
28350
+ return val[val.length - 1];
28351
+ }
28352
+ }
28353
+ const maxInArray = (arr, compareFn) => {
28354
+ var _a;
28355
+ if (0 === arr.length) return;
28356
+ let max = arr[0];
28357
+ for (let i = 1; i < arr.length; i++) {
28358
+ const value = arr[i];
28359
+ (null !== (_a = null == compareFn ? void 0 : compareFn(value, max)) && void 0 !== _a ? _a : value - max) > 0 && (max = value);
28360
+ }
28361
+ return max;
28362
+ };
28363
+ const minInArray = (arr, compareFn) => {
28364
+ var _a;
28365
+ if (0 === arr.length) return;
28366
+ let min = arr[0];
28367
+ for (let i = 1; i < arr.length; i++) {
28368
+ const value = arr[i];
28369
+ (null !== (_a = null == compareFn ? void 0 : compareFn(value, min)) && void 0 !== _a ? _a : value - min) < 0 && (min = value);
28370
+ }
28371
+ return min;
28372
+ };
28373
+ function arrayEqual(a, b) {
28374
+ if (!isArray$7(a) || !isArray$7(b)) return !1;
28375
+ if (a.length !== b.length) return !1;
28376
+ for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return !1;
28377
+ return !0;
28378
+ }
28379
+
28380
+ function degreeToRadian(degree) {
28381
+ return degree * (Math.PI / 180);
28382
+ }
28383
+
28384
+ const eastAsianCharacterInfo = character => {
28385
+ let x = character.charCodeAt(0),
28386
+ y = 2 === character.length ? character.charCodeAt(1) : 0,
28387
+ codePoint = x;
28388
+ return 55296 <= x && x <= 56319 && 56320 <= y && y <= 57343 && (x &= 1023, y &= 1023, codePoint = x << 10 | y, codePoint += 65536), 12288 === codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510 ? "F" : 8361 === codePoint || 65377 <= codePoint && codePoint <= 65470 || 65474 <= codePoint && codePoint <= 65479 || 65482 <= codePoint && codePoint <= 65487 || 65490 <= codePoint && codePoint <= 65495 || 65498 <= codePoint && codePoint <= 65500 || 65512 <= codePoint && codePoint <= 65518 ? "H" : 4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141 ? "W" : 32 <= codePoint && codePoint <= 126 || 162 <= codePoint && codePoint <= 163 || 165 <= codePoint && codePoint <= 166 || 172 === codePoint || 175 === codePoint || 10214 <= codePoint && codePoint <= 10221 || 10629 <= codePoint && codePoint <= 10630 ? "Na" : 161 === codePoint || 164 === codePoint || 167 <= codePoint && codePoint <= 168 || 170 === codePoint || 173 <= codePoint && codePoint <= 174 || 176 <= codePoint && codePoint <= 180 || 182 <= codePoint && codePoint <= 186 || 188 <= codePoint && codePoint <= 191 || 198 === codePoint || 208 === codePoint || 215 <= codePoint && codePoint <= 216 || 222 <= codePoint && codePoint <= 225 || 230 === codePoint || 232 <= codePoint && codePoint <= 234 || 236 <= codePoint && codePoint <= 237 || 240 === codePoint || 242 <= codePoint && codePoint <= 243 || 247 <= codePoint && codePoint <= 250 || 252 === codePoint || 254 === codePoint || 257 === codePoint || 273 === codePoint || 275 === codePoint || 283 === codePoint || 294 <= codePoint && codePoint <= 295 || 299 === codePoint || 305 <= codePoint && codePoint <= 307 || 312 === codePoint || 319 <= codePoint && codePoint <= 322 || 324 === codePoint || 328 <= codePoint && codePoint <= 331 || 333 === codePoint || 338 <= codePoint && codePoint <= 339 || 358 <= codePoint && codePoint <= 359 || 363 === codePoint || 462 === codePoint || 464 === codePoint || 466 === codePoint || 468 === codePoint || 470 === codePoint || 472 === codePoint || 474 === codePoint || 476 === codePoint || 593 === codePoint || 609 === codePoint || 708 === codePoint || 711 === codePoint || 713 <= codePoint && codePoint <= 715 || 717 === codePoint || 720 === codePoint || 728 <= codePoint && codePoint <= 731 || 733 === codePoint || 735 === codePoint || 768 <= codePoint && codePoint <= 879 || 913 <= codePoint && codePoint <= 929 || 931 <= codePoint && codePoint <= 937 || 945 <= codePoint && codePoint <= 961 || 963 <= codePoint && codePoint <= 969 || 1025 === codePoint || 1040 <= codePoint && codePoint <= 1103 || 1105 === codePoint || 8208 === codePoint || 8211 <= codePoint && codePoint <= 8214 || 8216 <= codePoint && codePoint <= 8217 || 8220 <= codePoint && codePoint <= 8221 || 8224 <= codePoint && codePoint <= 8226 || 8228 <= codePoint && codePoint <= 8231 || 8240 === codePoint || 8242 <= codePoint && codePoint <= 8243 || 8245 === codePoint || 8251 === codePoint || 8254 === codePoint || 8308 === codePoint || 8319 === codePoint || 8321 <= codePoint && codePoint <= 8324 || 8364 === codePoint || 8451 === codePoint || 8453 === codePoint || 8457 === codePoint || 8467 === codePoint || 8470 === codePoint || 8481 <= codePoint && codePoint <= 8482 || 8486 === codePoint || 8491 === codePoint || 8531 <= codePoint && codePoint <= 8532 || 8539 <= codePoint && codePoint <= 8542 || 8544 <= codePoint && codePoint <= 8555 || 8560 <= codePoint && codePoint <= 8569 || 8585 === codePoint || 8592 <= codePoint && codePoint <= 8601 || 8632 <= codePoint && codePoint <= 8633 || 8658 === codePoint || 8660 === codePoint || 8679 === codePoint || 8704 === codePoint || 8706 <= codePoint && codePoint <= 8707 || 8711 <= codePoint && codePoint <= 8712 || 8715 === codePoint || 8719 === codePoint || 8721 === codePoint || 8725 === codePoint || 8730 === codePoint || 8733 <= codePoint && codePoint <= 8736 || 8739 === codePoint || 8741 === codePoint || 8743 <= codePoint && codePoint <= 8748 || 8750 === codePoint || 8756 <= codePoint && codePoint <= 8759 || 8764 <= codePoint && codePoint <= 8765 || 8776 === codePoint || 8780 === codePoint || 8786 === codePoint || 8800 <= codePoint && codePoint <= 8801 || 8804 <= codePoint && codePoint <= 8807 || 8810 <= codePoint && codePoint <= 8811 || 8814 <= codePoint && codePoint <= 8815 || 8834 <= codePoint && codePoint <= 8835 || 8838 <= codePoint && codePoint <= 8839 || 8853 === codePoint || 8857 === codePoint || 8869 === codePoint || 8895 === codePoint || 8978 === codePoint || 9312 <= codePoint && codePoint <= 9449 || 9451 <= codePoint && codePoint <= 9547 || 9552 <= codePoint && codePoint <= 9587 || 9600 <= codePoint && codePoint <= 9615 || 9618 <= codePoint && codePoint <= 9621 || 9632 <= codePoint && codePoint <= 9633 || 9635 <= codePoint && codePoint <= 9641 || 9650 <= codePoint && codePoint <= 9651 || 9654 <= codePoint && codePoint <= 9655 || 9660 <= codePoint && codePoint <= 9661 || 9664 <= codePoint && codePoint <= 9665 || 9670 <= codePoint && codePoint <= 9672 || 9675 === codePoint || 9678 <= codePoint && codePoint <= 9681 || 9698 <= codePoint && codePoint <= 9701 || 9711 === codePoint || 9733 <= codePoint && codePoint <= 9734 || 9737 === codePoint || 9742 <= codePoint && codePoint <= 9743 || 9748 <= codePoint && codePoint <= 9749 || 9756 === codePoint || 9758 === codePoint || 9792 === codePoint || 9794 === codePoint || 9824 <= codePoint && codePoint <= 9825 || 9827 <= codePoint && codePoint <= 9829 || 9831 <= codePoint && codePoint <= 9834 || 9836 <= codePoint && codePoint <= 9837 || 9839 === codePoint || 9886 <= codePoint && codePoint <= 9887 || 9918 <= codePoint && codePoint <= 9919 || 9924 <= codePoint && codePoint <= 9933 || 9935 <= codePoint && codePoint <= 9953 || 9955 === codePoint || 9960 <= codePoint && codePoint <= 9983 || 10045 === codePoint || 10071 === codePoint || 10102 <= codePoint && codePoint <= 10111 || 11093 <= codePoint && codePoint <= 11097 || 12872 <= codePoint && codePoint <= 12879 || 57344 <= codePoint && codePoint <= 63743 || 65024 <= codePoint && codePoint <= 65039 || 65533 === codePoint || 127232 <= codePoint && codePoint <= 127242 || 127248 <= codePoint && codePoint <= 127277 || 127280 <= codePoint && codePoint <= 127337 || 127344 <= codePoint && codePoint <= 127386 || 917760 <= codePoint && codePoint <= 917999 || 983040 <= codePoint && codePoint <= 1048573 || 1048576 <= codePoint && codePoint <= 1114109 ? "A" : "N";
28389
+ };
28390
+
28391
+ function getContextFont(text) {
28392
+ let defaultAttr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
28393
+ let fontSizeScale = arguments.length > 2 ? arguments[2] : undefined;
28394
+ fontSizeScale || (fontSizeScale = 1);
28395
+ const {
28396
+ fontStyle = defaultAttr.fontStyle,
28397
+ fontVariant = defaultAttr.fontVariant,
28398
+ fontWeight = defaultAttr.fontWeight,
28399
+ fontSize = defaultAttr.fontSize,
28400
+ fontFamily = defaultAttr.fontFamily
28401
+ } = text;
28402
+ return (fontStyle ? fontStyle + " " : "") + (fontVariant ? fontVariant + " " : "") + (fontWeight ? fontWeight + " " : "") + fontSize * fontSizeScale + "px " + (fontFamily || "sans-serif");
28403
+ }
28404
+
28405
+ class TextMeasure {
28406
+ constructor(option, textSpec) {
28407
+ this._numberCharSize = null, this._fullCharSize = null, this._letterCharSize = null, this._specialCharSizeMap = {}, this._canvas = null, this._context = null, this._contextSaved = !1, this._notSupportCanvas = !1, this._notSupportVRender = !1, this._userSpec = {}, this.specialCharSet = "-/: .,@%'\"~", this._option = option, this._userSpec = null != textSpec ? textSpec : {}, this.textSpec = this._initSpec(), isValid$3(option.specialCharSet) && (this.specialCharSet = option.specialCharSet), this._standardMethod = isValid$3(option.getTextBounds) ? this.fullMeasure.bind(this) : this.measureWithNaiveCanvas.bind(this);
28408
+ }
28409
+ initContext() {
28410
+ if (this._notSupportCanvas) return !1;
28411
+ if (isNil$3(this._canvas) && (isValid$3(this._option.getCanvasForMeasure) && (this._canvas = this._option.getCanvasForMeasure()), isNil$3(this._canvas) && "undefined" != typeof window && void 0 !== window.document && globalThis && isValid$3(globalThis.document) && (this._canvas = globalThis.document.createElement("canvas"))), isNil$3(this._context) && isValid$3(this._canvas)) {
28412
+ const context = this._canvas.getContext("2d");
28413
+ isValid$3(context) && (context.save(), context.font = getContextFont(this.textSpec), this._contextSaved = !0, this._context = context);
28414
+ }
28415
+ return !isNil$3(this._context) || (this._notSupportCanvas = !0, !1);
28416
+ }
28417
+ _initSpec() {
28418
+ var _a, _b, _c;
28419
+ const {
28420
+ defaultFontParams = {}
28421
+ } = this._option,
28422
+ {
28423
+ fontStyle = defaultFontParams.fontStyle,
28424
+ fontVariant = defaultFontParams.fontVariant,
28425
+ fontWeight = null !== (_a = defaultFontParams.fontWeight) && void 0 !== _a ? _a : "normal",
28426
+ fontSize = null !== (_b = defaultFontParams.fontSize) && void 0 !== _b ? _b : 12,
28427
+ fontFamily = null !== (_c = defaultFontParams.fontFamily) && void 0 !== _c ? _c : "sans-serif",
28428
+ align: align,
28429
+ textAlign = null != align ? align : "center",
28430
+ baseline: baseline,
28431
+ textBaseline = null != baseline ? baseline : "middle",
28432
+ ellipsis: ellipsis,
28433
+ limit: limit
28434
+ } = this._userSpec;
28435
+ let {
28436
+ lineHeight = fontSize
28437
+ } = this._userSpec;
28438
+ if (isString$4(lineHeight) && "%" === lineHeight[lineHeight.length - 1]) {
28439
+ const scale = Number.parseFloat(lineHeight.substring(0, lineHeight.length - 1)) / 100;
28440
+ lineHeight = fontSize * scale;
28441
+ }
28442
+ return {
28443
+ fontStyle: fontStyle,
28444
+ fontVariant: fontVariant,
28445
+ fontFamily: fontFamily,
28446
+ fontSize: fontSize,
28447
+ fontWeight: fontWeight,
28448
+ textAlign: textAlign,
28449
+ textBaseline: textBaseline,
28450
+ ellipsis: ellipsis,
28451
+ limit: limit,
28452
+ lineHeight: lineHeight
28453
+ };
28454
+ }
28455
+ measure(text, method) {
28456
+ switch (method) {
28457
+ case "vrender":
28458
+ case "canopus":
28459
+ return this.fullMeasure(text);
28460
+ case "canvas":
28461
+ return this.measureWithNaiveCanvas(text);
28462
+ case "simple":
28463
+ return this.quickMeasureWithoutCanvas(text);
28464
+ default:
28465
+ return this.quickMeasure(text);
28466
+ }
28467
+ }
28468
+ fullMeasure(text) {
28469
+ if (isNil$3(text)) return {
28470
+ width: 0,
28471
+ height: 0
28472
+ };
28473
+ if (isNil$3(this._option.getTextBounds) || !this._notSupportVRender) return this.measureWithNaiveCanvas(text);
28474
+ const {
28475
+ fontFamily: fontFamily,
28476
+ fontSize: fontSize,
28477
+ fontWeight: fontWeight,
28478
+ textAlign: textAlign,
28479
+ textBaseline: textBaseline,
28480
+ ellipsis: ellipsis,
28481
+ limit: limit,
28482
+ lineHeight: lineHeight
28483
+ } = this.textSpec;
28484
+ let size;
28485
+ try {
28486
+ const bounds = this._option.getTextBounds({
28487
+ text: text,
28488
+ fontFamily: fontFamily,
28489
+ fontSize: fontSize,
28490
+ fontWeight: fontWeight,
28491
+ textAlign: textAlign,
28492
+ textBaseline: textBaseline,
28493
+ ellipsis: !!ellipsis,
28494
+ maxLineWidth: limit || 1 / 0,
28495
+ lineHeight: lineHeight
28496
+ });
28497
+ size = {
28498
+ width: bounds.width(),
28499
+ height: bounds.height()
28500
+ };
28501
+ } catch (e) {
28502
+ this._notSupportVRender = !0, size = this.measureWithNaiveCanvas(text);
28503
+ }
28504
+ return size;
28505
+ }
28506
+ measureWithNaiveCanvas(text) {
28507
+ return this._measureReduce(text, this._measureWithNaiveCanvas.bind(this));
28508
+ }
28509
+ _measureWithNaiveCanvas(text) {
28510
+ var _a;
28511
+ if (!this.initContext()) return this._quickMeasureWithoutCanvas(text);
28512
+ const metrics = this._context.measureText(text),
28513
+ {
28514
+ fontSize: fontSize,
28515
+ lineHeight: lineHeight
28516
+ } = this.textSpec;
28517
+ return {
28518
+ width: metrics.width,
28519
+ height: null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize,
28520
+ fontBoundingBoxAscent: metrics.fontBoundingBoxAscent,
28521
+ fontBoundingBoxDescent: metrics.fontBoundingBoxDescent
28522
+ };
28523
+ }
28524
+ quickMeasure(text) {
28525
+ return this._measureReduce(text, this._quickMeasure.bind(this));
28526
+ }
28527
+ _quickMeasure(text) {
28528
+ const totalSize = {
28529
+ width: 0,
28530
+ height: 0
28531
+ };
28532
+ for (let i = 0; i < text.length; i++) {
28533
+ const char = text[i];
28534
+ let size = this._measureSpecialChar(char);
28535
+ isNil$3(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$3(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$3(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height), !isNil$3(size.fontBoundingBoxAscent) && (totalSize.fontBoundingBoxAscent = size.fontBoundingBoxAscent), !isNil$3(size.fontBoundingBoxDescent) && (totalSize.fontBoundingBoxDescent = size.fontBoundingBoxDescent);
28536
+ }
28537
+ return totalSize;
28538
+ }
28539
+ quickMeasureWithoutCanvas(text) {
28540
+ return this._measureReduce(text, this._quickMeasureWithoutCanvas.bind(this));
28541
+ }
28542
+ _quickMeasureWithoutCanvas(text) {
28543
+ var _a;
28544
+ const totalSize = {
28545
+ width: 0,
28546
+ height: 0
28547
+ },
28548
+ {
28549
+ fontSize: fontSize,
28550
+ lineHeight: lineHeight
28551
+ } = this.textSpec;
28552
+ for (let i = 0; i < text.length; i++) {
28553
+ const char = text[i],
28554
+ size = ["F", "W"].includes(eastAsianCharacterInfo(char)) ? 1 : .53;
28555
+ totalSize.width += size * fontSize;
28556
+ }
28557
+ return totalSize.height = null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize, totalSize;
28558
+ }
28559
+ _measureReduce(text, processor) {
28560
+ var _a;
28561
+ const {
28562
+ fontSize: fontSize,
28563
+ lineHeight: lineHeight
28564
+ } = this.textSpec,
28565
+ defaultResult = {
28566
+ width: 0,
28567
+ height: 0
28568
+ };
28569
+ if (isNil$3(text)) return defaultResult;
28570
+ if (isArray$7(text)) {
28571
+ const textArr = text.filter(isValid$3).map(s => s.toString());
28572
+ return 0 === textArr.length ? defaultResult : 1 === textArr.length ? processor(textArr[0]) : {
28573
+ width: textArr.reduce((maxWidth, cur) => Math.max(maxWidth, processor(cur).width), 0),
28574
+ height: textArr.length * ((null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize) + 1) + 1
28575
+ };
28576
+ }
28577
+ return processor(text.toString());
28578
+ }
28579
+ _measureNumberChar() {
28580
+ if (isNil$3(this._numberCharSize)) {
28581
+ const numberBounds = this._standardMethod(TextMeasure.NUMBERS_CHAR_SET);
28582
+ this._numberCharSize = {
28583
+ width: numberBounds.width / TextMeasure.NUMBERS_CHAR_SET.length,
28584
+ height: numberBounds.height,
28585
+ fontBoundingBoxAscent: numberBounds.fontBoundingBoxAscent,
28586
+ fontBoundingBoxDescent: numberBounds.fontBoundingBoxDescent
28587
+ };
28588
+ }
28589
+ return this._numberCharSize;
28590
+ }
28591
+ _measureFullSizeChar() {
28592
+ return isNil$3(this._fullCharSize) && (this._fullCharSize = this._standardMethod(TextMeasure.FULL_SIZE_CHAR)), this._fullCharSize;
28593
+ }
28594
+ _measureLetterChar() {
28595
+ if (isNil$3(this._letterCharSize)) {
28596
+ const alphabetBounds = this._standardMethod(TextMeasure.ALPHABET_CHAR_SET);
28597
+ this._letterCharSize = {
28598
+ width: alphabetBounds.width / TextMeasure.ALPHABET_CHAR_SET.length,
28599
+ height: alphabetBounds.height,
28600
+ fontBoundingBoxAscent: alphabetBounds.fontBoundingBoxAscent,
28601
+ fontBoundingBoxDescent: alphabetBounds.fontBoundingBoxDescent
28602
+ };
28603
+ }
28604
+ return this._letterCharSize;
28605
+ }
28606
+ _measureSpecialChar(char) {
28607
+ return isValid$3(this._specialCharSizeMap[char]) ? this._specialCharSizeMap[char] : this.specialCharSet.includes(char) ? (this._specialCharSizeMap[char] = this._standardMethod(char), this._specialCharSizeMap[char]) : null;
28608
+ }
28609
+ release() {
28610
+ isValid$3(this._canvas) && (this._canvas = null), isValid$3(this._context) && (this._contextSaved && (this._context.restore(), this._contextSaved = !1), this._context = null);
28611
+ }
28612
+ }
28613
+ TextMeasure.ALPHABET_CHAR_SET = "abcdefghijklmnopqrstuvwxyz", TextMeasure.NUMBERS_CHAR_SET = "0123456789", TextMeasure.FULL_SIZE_CHAR = "字";
28614
+
28615
+ function transformBoundsWithMatrix(out, bounds, matrix) {
28616
+ const {
28617
+ x1: x1,
28618
+ y1: y1,
28619
+ x2: x2,
28620
+ y2: y2
28621
+ } = bounds;
28622
+ return matrix.onlyTranslate() ? (out !== bounds && out.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), out.translate(matrix.e, matrix.f), bounds) : (out.clear(), out.add(matrix.a * x1 + matrix.c * y1 + matrix.e, matrix.b * x1 + matrix.d * y1 + matrix.f), out.add(matrix.a * x2 + matrix.c * y1 + matrix.e, matrix.b * x2 + matrix.d * y1 + matrix.f), out.add(matrix.a * x2 + matrix.c * y2 + matrix.e, matrix.b * x2 + matrix.d * y2 + matrix.f), out.add(matrix.a * x1 + matrix.c * y2 + matrix.e, matrix.b * x1 + matrix.d * y2 + matrix.f), bounds);
28623
+ }
28624
+ class Bounds {
28625
+ constructor(bounds) {
28626
+ bounds ? this.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2) : this.clear();
28627
+ }
28628
+ clone() {
28629
+ return new Bounds(this);
28630
+ }
28631
+ clear() {
28632
+ return this.x1 = +Number.MAX_VALUE, this.y1 = +Number.MAX_VALUE, this.x2 = -Number.MAX_VALUE, this.y2 = -Number.MAX_VALUE, this;
28633
+ }
28634
+ empty() {
28635
+ return this.x1 === +Number.MAX_VALUE && this.y1 === +Number.MAX_VALUE && this.x2 === -Number.MAX_VALUE && this.y2 === -Number.MAX_VALUE;
28636
+ }
28637
+ equals(b) {
28638
+ return this.x1 === b.x1 && this.y1 === b.y1 && this.x2 === b.x2 && this.y2 === b.y2;
28639
+ }
28640
+ setValue() {
28641
+ let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28642
+ let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
28643
+ let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
28644
+ let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
28645
+ return this.x1 = x1, this.y1 = y1, this.x2 = x2, this.y2 = y2, this;
28646
+ }
28647
+ set() {
28648
+ let x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28649
+ let y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
28650
+ let x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
28651
+ let y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
28652
+ return x2 < x1 ? (this.x2 = x1, this.x1 = x2) : (this.x1 = x1, this.x2 = x2), y2 < y1 ? (this.y2 = y1, this.y1 = y2) : (this.y1 = y1, this.y2 = y2), this;
28653
+ }
28654
+ add() {
28655
+ let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28656
+ let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
28657
+ return x < this.x1 && (this.x1 = x), y < this.y1 && (this.y1 = y), x > this.x2 && (this.x2 = x), y > this.y2 && (this.y2 = y), this;
28658
+ }
28659
+ expand() {
28660
+ let d = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28661
+ return isArray$7(d) ? (this.y1 -= d[0], this.x2 += d[1], this.y2 += d[2], this.x1 -= d[3]) : (this.x1 -= d, this.y1 -= d, this.x2 += d, this.y2 += d), this;
28662
+ }
28663
+ round() {
28664
+ return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
28665
+ }
28666
+ translate() {
28667
+ let dx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28668
+ let dy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
28669
+ return this.x1 += dx, this.x2 += dx, this.y1 += dy, this.y2 += dy, this;
28670
+ }
28671
+ rotate() {
28672
+ let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28673
+ let x = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
28674
+ let y = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
28675
+ const p = this.rotatedPoints(angle, x, y);
28676
+ return this.clear().add(p[0], p[1]).add(p[2], p[3]).add(p[4], p[5]).add(p[6], p[7]);
28677
+ }
28678
+ scale() {
28679
+ let sx = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28680
+ let sy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
28681
+ let x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
28682
+ let y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
28683
+ const p = this.scalePoints(sx, sy, x, y);
28684
+ return this.clear().add(p[0], p[1]).add(p[2], p[3]);
28685
+ }
28686
+ union(b) {
28687
+ return b.x1 < this.x1 && (this.x1 = b.x1), b.y1 < this.y1 && (this.y1 = b.y1), b.x2 > this.x2 && (this.x2 = b.x2), b.y2 > this.y2 && (this.y2 = b.y2), this;
28688
+ }
28689
+ intersect(b) {
28690
+ return b.x1 > this.x1 && (this.x1 = b.x1), b.y1 > this.y1 && (this.y1 = b.y1), b.x2 < this.x2 && (this.x2 = b.x2), b.y2 < this.y2 && (this.y2 = b.y2), this;
28691
+ }
28692
+ encloses(b) {
28693
+ return b && this.x1 <= b.x1 && this.x2 >= b.x2 && this.y1 <= b.y1 && this.y2 >= b.y2;
28694
+ }
28695
+ alignsWith(b) {
28696
+ return b && (this.x1 === b.x1 || this.x2 === b.x2 || this.y1 === b.y1 || this.y2 === b.y2);
28697
+ }
28698
+ intersects(b) {
28699
+ return b && !(this.x2 < b.x1 || this.x1 > b.x2 || this.y2 < b.y1 || this.y1 > b.y2);
28700
+ }
28701
+ contains() {
28702
+ let x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28703
+ let y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
28704
+ return !(x < this.x1 || x > this.x2 || y < this.y1 || y > this.y2);
28705
+ }
28706
+ containsPoint(p) {
28707
+ return !(p.x < this.x1 || p.x > this.x2 || p.y < this.y1 || p.y > this.y2);
28708
+ }
28709
+ width() {
28710
+ return this.empty() ? 0 : this.x2 - this.x1;
28711
+ }
28712
+ height() {
28713
+ return this.empty() ? 0 : this.y2 - this.y1;
28714
+ }
28715
+ scaleX() {
28716
+ let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28717
+ return this.x1 *= s, this.x2 *= s, this;
28718
+ }
28719
+ scaleY() {
28720
+ let s = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
28721
+ return this.y1 *= s, this.y2 *= s, this;
28722
+ }
28723
+ transformWithMatrix(matrix) {
28724
+ return transformBoundsWithMatrix(this, this, matrix), this;
28725
+ }
28726
+ copy(b) {
28727
+ return this.x1 = b.x1, this.y1 = b.y1, this.x2 = b.x2, this.y2 = b.y2, this;
28728
+ }
28729
+ rotatedPoints(angle, x, y) {
28730
+ const {
28731
+ x1: x1,
28732
+ y1: y1,
28733
+ x2: x2,
28734
+ y2: y2
28735
+ } = this,
28736
+ cos = Math.cos(angle),
28737
+ sin = Math.sin(angle),
28738
+ cx = x - x * cos + y * sin,
28739
+ cy = y - x * sin - y * cos;
28740
+ return [cos * x1 - sin * y1 + cx, sin * x1 + cos * y1 + cy, cos * x1 - sin * y2 + cx, sin * x1 + cos * y2 + cy, cos * x2 - sin * y1 + cx, sin * x2 + cos * y1 + cy, cos * x2 - sin * y2 + cx, sin * x2 + cos * y2 + cy];
28741
+ }
28742
+ scalePoints(sx, sy, x, y) {
28743
+ const {
28744
+ x1: x1,
28745
+ y1: y1,
28746
+ x2: x2,
28747
+ y2: y2
28748
+ } = this;
28749
+ return [sx * x1 + (1 - sx) * x, sy * y1 + (1 - sy) * y, sx * x2 + (1 - sx) * x, sy * y2 + (1 - sy) * y];
28750
+ }
28751
+ }
28752
+ class AABBBounds extends Bounds {}
28753
+
28168
28754
  class ScrollBarComponent {
28169
28755
  hScrollBar;
28170
28756
  vScrollBar;
@@ -41912,7 +42498,7 @@
41912
42498
  lineDash = groupAttribute.lineDash
41913
42499
  } = group.attribute;
41914
42500
  let isDash = !1;
41915
- lineDash.length && lineDash.some(dash => Array.isArray(dash)) && (isDash = !0), context.stroke(), context.beginPath(), context.moveTo(x, y);
42501
+ lineDash.length && lineDash.some(dash => Array.isArray(dash)) && (isDash = !0), context.moveTo(x, y);
41916
42502
  const strokeTop = (isStrokeTrue || stroke[0]) && (isWidthNumber || strokeArrayWidth[0]),
41917
42503
  strokeRight = (isStrokeTrue || stroke[1]) && (isWidthNumber || strokeArrayWidth[1]),
41918
42504
  strokeBottom = (isStrokeTrue || stroke[2]) && (isWidthNumber || strokeArrayWidth[2]),
@@ -41933,7 +42519,7 @@
41933
42519
  isWidthNumber ? widthInfo.width : strokeArrayWidth[3], isWidthNumber ? widthInfo.width : strokeArrayWidth[3];
41934
42520
  context.moveTo(x1, y1), context.lineTo(x2, y2), (isSplitDraw || isDash) && (strokeArrayColor && strokeArrayColor[3] ? context.strokeStyle = strokeArrayColor[3] : strokeArrayColor && !strokeArrayColor[3] && (context.strokeStyle = "transparent"), isWidthNumber || (context.lineWidth = strokeArrayWidth[3]), context.lineDashOffset = context.currentMatrix.f / context.currentMatrix.d, isDash && context.setLineDash(null !== (_d = lineDash[3]) && void 0 !== _d ? _d : []), context.stroke(), context.beginPath(), context.moveTo(x, y));
41935
42521
  } else 3 === i && context.moveTo(x, y);
41936
- context.closePath(), isSplitDraw || isDash || (!isWidthNumber && widthInfo.width && (context.lineWidth = widthInfo.width), context.stroke()), context.lineDashOffset = 0, context.setLineDash([]), context.beginPath();
42522
+ isSplitDraw || isDash || (!isWidthNumber && widthInfo.width && (context.lineWidth = widthInfo.width), context.stroke()), context.lineDashOffset = 0, context.setLineDash([]), context.closePath();
41937
42523
  }
41938
42524
 
41939
42525
  var __decorate$1 = undefined && undefined.__decorate || function (decorators, target, key, desc) {
@@ -51939,7 +52525,7 @@
51939
52525
  constructor(container) {
51940
52526
  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
51941
52527
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
51942
- if (super(), this.showFrozenIcon = !0, this.version = "1.17.1-alpha.6", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
52528
+ if (super(), this.showFrozenIcon = !0, this.version = "1.17.1-alpha.8", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), !container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
51943
52529
  !1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vglobal.isImageAnonymous = !1);
51944
52530
  const {
51945
52531
  frozenColCount = 0,
@@ -64838,7 +65424,7 @@
64838
65424
  themes: themes$1
64839
65425
  });
64840
65426
 
64841
- const version = "1.17.1-alpha.6";
65427
+ const version = "1.17.1-alpha.8";
64842
65428
 
64843
65429
  exports.Gantt = Gantt;
64844
65430
  exports.TYPES = index$3;