qauMaWeb/node_modules/.cache/babel-loader/5a02e5e8479261c65905a7b7217...

1 line
22 KiB
JSON
Raw Normal View History

2024-10-13 18:02:27 +08:00
{"ast":null,"code":"import \"core-js/modules/es.array.slice.js\";\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport { separateMorph, combineMorph, morphPath, isCombineMorphing } from 'zrender/lib/tool/morphPath.js';\nimport { Path } from '../util/graphic.js';\nimport { defaults, isArray } from 'zrender/lib/core/util.js';\nimport { getAnimationConfig } from './basicTransition.js';\nimport { clonePath } from 'zrender/lib/tool/path.js';\n\nfunction isMultiple(elements) {\n return isArray(elements[0]);\n}\n\nfunction prepareMorphBatches(one, many) {\n var batches = [];\n var batchCount = one.length;\n\n for (var i = 0; i < batchCount; i++) {\n batches.push({\n one: one[i],\n many: []\n });\n }\n\n for (var i = 0; i < many.length; i++) {\n var len = many[i].length;\n var k = void 0;\n\n for (k = 0; k < len; k++) {\n batches[k % batchCount].many.push(many[i][k]);\n }\n }\n\n var off = 0; // If one has more paths than each one of many. average them.\n\n for (var i = batchCount - 1; i >= 0; i--) {\n if (!batches[i].many.length) {\n var moveFrom = batches[off].many;\n\n if (moveFrom.length <= 1) {\n // Not enough\n // Start from the first one.\n if (off) {\n off = 0;\n } else {\n return batches;\n }\n }\n\n var len = moveFrom.length;\n var mid = Math.ceil(len / 2);\n batches[i].many = moveFrom.slice(mid, len);\n batches[off].many = moveFrom.slice(0, mid);\n off++;\n }\n }\n\n return batches;\n}\n\nvar pathDividers = {\n clone: function clone(params) {\n var ret = []; // Fitting the alpha\n\n var approxOpacity = 1 - Math.pow(1 - params.path.style.opacity, 1 / params.count);\n\n for (var i = 0; i < params.count; i++) {\n var cloned = clonePath(params.path);\n cloned.setStyle('opacity', approxOpacity);\n ret.push(cloned);\n }\n\n return ret;\n },\n // Use the default divider\n split: null\n};\nexport function applyMorphAnimation(from, to, divideShape, seriesModel, dataIndex, animateOtherProps) {\n if (!from.length || !to.length) {\n return;\n }\n\n var updateAnimationCfg = getAnimationConfig('update', seriesModel, dataIndex);\n\n if (!(updateAnimationCfg && updateAnimationCfg.duration > 0)) {\n return;\n }\n\n var animationDelay = seriesModel.getModel('universalTransition').get('delay');\n var animationCfg = Object.assign({\n // Need