qauMaWeb/node_modules/.cache/babel-loader/2a07f732e1d73e2a4c03b342eee...

1 line
19 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.sort.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 { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createFloat32Array } from '../../util/vendor.js';\n\nfunction diffData(oldData, newData) {\n var diffResult = [];\n newData.diff(oldData).add(function (idx) {\n diffResult.push({\n cmd: '+',\n idx: idx\n });\n }).update(function (newIdx, oldIdx) {\n diffResult.push({\n cmd: '=',\n idx: oldIdx,\n idx1: newIdx\n });\n }).remove(function (idx) {\n diffResult.push({\n cmd: '-',\n idx: idx\n });\n }).execute();\n return diffResult;\n}\n\nexport default function lineAnimationDiff(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) {\n var diff = diffData(oldData, newData); // let newIdList = newData.mapArray(newData.getId);\n // let oldIdList = oldData.mapArray(oldData.getId);\n // convertToIntId(newIdList, oldIdList);\n // // FIXME One data ?\n // diff = arrayDiff(oldIdList, newIdList);\n\n var currPoints = [];\n var nextPoints = []; // Points for stacking base line\n\n var currStackedPoints = [];\n var nextStackedPoints = [];\n var status = [];\n var sortedIndices = [];\n var rawIndices = [];\n var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin); // const oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin);\n\n var oldPoints = oldData.getLayout('points') || [];\n var newPoints = newData.getLayout('points') || [];\n\n for (var i = 0; i < diff.length; i++) {\n var diffItem = diff[i];\n var pointAdded = true;\n var oldIdx2 = void 0;\n var newIdx2 = void 0; // FIXME, animation is not so perfect when dataZoom window moves fast\n // Which is in case remvoing or add more than one data in the tail or head\n\n switch (diffItem.cmd) {\n case '=':\n oldIdx2 = diffItem.idx * 2;\n newIdx2 = diffItem.idx1 * 2;\n var currentX = oldPoints[oldIdx2];\n var currentY = oldPoints[oldIdx2 + 1];\n var nextX = newPoints[newIdx2];\n var nextY = newPoints[newIdx2 + 1]; // If previous data is NaN, use next point directly\n\n if (isNaN(currentX) || isNaN(currentY)) {\n currentX = nextX;\n currentY = nextY;\n }\n\n currPoints.push(currentX, currentY);\n nextPoints.push(nextX, nextY);\n currStackedPoints.push(oldStackedOnPoints[oldIdx2], oldStackedOnPoints[oldIdx2 + 1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(diffItem.idx1));\n break;\n\n case '+':\n var newIdx = diffItem.idx;\n var newDataDimsForPoint = newDataOldCoordInfo.dataDimsForPoint;\n var oldPt = oldCoordSys.dataToPoint([newData.get(newDataDimsForPoint[0], newIdx), newData.get(newDataDimsForPoint[1], newIdx)]);\n newIdx2 = newIdx * 2;\n currPoints.push(oldPt[0], oldPt[1]);\n nextPoints.push(newPoints[newIdx2], newPoints[newIdx2 + 1]);\n var stackedOnPoint = getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, newIdx);\n currStackedPoints.push(stackedOnPoint[0], stackedOnPoint[1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(newIdx));\n break;\n\n case '-':\n pointAdded = false;\n } // Original indices\n\n\n if (pointAdded) {\n status.push(diffItem);\n sortedIndices.push(sortedIndices.length);\n }\n } // Diff result may be crossed if all items are changed\n // Sort by data index\n\n\n sortedIndices.sort(function (a, b) {\n return rawIndices[a] - rawIndices[b];\n });\n var len = currPoints.length;\n var sortedCurrPoints = createFloat32Array(len);\n var sortedNextPoints = createFloat32Array(len);\n var sortedCurrStackedPoints = createFloat32Array(len);\n var sortedNextStackedPoints = createFloat32Array(len);\n var sortedStatus = [];\n\n for (var i = 0; i < sortedIndices.length; i++) {\n var idx = sortedIndices[i];\n var i2 = i * 2;\n var idx2 = idx * 2;\n sortedCurrPoints[i2] = currPoints[idx2];\n sortedCurrPoints[i2 + 1] = currPoints[idx2 + 1];\n sortedNextPoints[i2] = nextPoints[idx2];\n sortedNextPoints[i2 + 1] = nextPoints[idx2 + 1];\n sortedCurrStackedPoints[i2] = currStackedPoints[idx2];\n sortedCurrStackedPoints[i2 + 1] = currStackedPoints[idx2 + 1];\n sortedNextStackedPoints[i2] = nextStackedPoints[idx2];\n sortedNextStackedPoints[i2 + 1] = nextStackedPoints[idx2 + 1];\n sortedStatus[i] = status[idx];\n }\n\n return {\n current: sortedCurrPoints,\n next: sortedNextPoints,\n stackedOnCurrent: sortedCurrStackedPoints,\n stackedOnNext: sortedNextStackedPoints,\n status: sortedStatus\n };\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/chart/line/lineAnimationDiff.js"],"names":["prepareDataCoordInfo","getStackedOnPoint","createFloat32Array","diffData","oldData","newData","diffResult","diff","add","idx","push","cmd","update","newIdx","oldIdx","idx1","remove","execute","lineAnimationDiff","oldStackedOnPoints","newStackedOnPoints","oldCoordSys","newCoordSys","oldValueOrigin","newValueOrigin","currPoints","nextPoints","currStackedPoints","nextStackedPoints","status","sortedIndices","rawIndices","newDataOldCoordInfo","oldPoints","getLayout","newPoints","i","length","diffItem","pointAdded","oldIdx2","newIdx2","currentX","currentY","nextX","nextY","isNaN","getRawIndex","newDataDimsForPoint","dataDimsForPoint","oldPt","dataToPoint","get","stackedOnPoint","sort","a","b","len","sortedCurrPoints","sortedNextPoints","sortedCurrStackedPoints","sortedNextStackedPoints","sortedStatus","i2","idx2","current","next","stackedOnCurrent","stackedOnNext"],"mappings":";;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,oBAAT,EAA+BC,iBAA/B,QAAwD,aAAxD;AACA,SAASC,kBAAT,QAAmC,sBAAnC;;AAEA,SAASC,QAAT,CAAkBC,OAAlB,EAA2BC,OAA3B,EAAoC;AAClC,MAAIC,UAAU,GAAG,EAAjB;AACAD,EAAAA,OAAO,CAACE,IAAR,CAAaH,OAAb,EAAsBI,GAAtB,CAA0B,UAAUC,GAAV,EAAe;AACvCH,IAAAA,UAAU,CAACI,IAAX,CAAgB;AACdC,MAAAA,GAAG,EAAE,GADS;AAEdF,MAAAA,GAAG,EAAEA;AAFS,KAAhB;AAID,GALD,EAKGG,MALH,CAKU,UAAUC,MAAV,EAAkBC,MAAlB,EAA0B;AAClCR,IAAAA,UAAU,CAACI,IAAX,CAAgB;AACdC,MAAAA,GAAG,E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,GAAkCpC,iBAAiB,CAACqC,IAAI,GAAG,CAAR,CAAnD;AACAH,IAAAA,uBAAuB,CAACE,EAAD,CAAvB,GAA8BnC,iBAAiB,CAACoC,IAAD,CAA/C;AACAH,IAAAA,uBAAuB,CAACE,EAAE,GAAG,CAAN,CAAvB,GAAkCnC,iBAAiB,CAACoC,IAAI,GAAG,CAAR,CAAnD;AACAF,IAAAA,YAAY,CAAC1B,CAAD,CAAZ,GAAkBP,MAAM,CAACpB,GAAD,CAAxB;AACD;;AAED,SAAO;AACLwD,IAAAA,OAAO,EAAEP,gBADJ;AAELQ,IAAAA,IAAI,EAAEP,gBAFD;AAGLQ,IAAAA,gBAAgB,EAAEP,uBAHb;AAILQ,IAAAA,aAAa,EAAEP,uBAJV;AAKLhC,IAAAA,MAAM,EAAEiC;AALH,GAAP;AAOD","sourcesContent":["\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/**\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 { prepareDataCoordInfo, getStackedOnPoint } from './helper.js';\nimport { createFloat32Array } from '../../util/vendor.js';\n\nfunction diffData(oldData, newData) {\n var diffResult = [];\n newData.diff(oldData).add(function (idx) {\n diffResult.push({\n cmd: '+',\n idx: idx\n });\n }).update(function (newIdx, oldIdx) {\n diffResult.push({\n cmd: '=',\n idx: oldIdx,\n idx1: newIdx\n });\n }).remove(function (idx) {\n diffResult.push({\n cmd: '-',\n idx: idx\n });\n }).execute();\n return diffResult;\n}\n\nexport default function lineAnimationDiff(oldData, newData, oldStackedOnPoints, newStackedOnPoints, oldCoordSys, newCoordSys, oldValueOrigin, newValueOrigin) {\n var diff = diffData(oldData, newData); // let newIdList = newData.mapArray(newData.getId);\n // let oldIdList = oldData.mapArray(oldData.getId);\n // convertToIntId(newIdList, oldIdList);\n // // FIXME One data ?\n // diff = arrayDiff(oldIdList, newIdList);\n\n var currPoints = [];\n var nextPoints = []; // Points for stacking base line\n\n var currStackedPoints = [];\n var nextStackedPoints = [];\n var status = [];\n var sortedIndices = [];\n var rawIndices = [];\n var newDataOldCoordInfo = prepareDataCoordInfo(oldCoordSys, newData, oldValueOrigin); // const oldDataNewCoordInfo = prepareDataCoordInfo(newCoordSys, oldData, newValueOrigin);\n\n var oldPoints = oldData.getLayout('points') || [];\n var newPoints = newData.getLayout('points') || [];\n\n for (var i = 0; i < diff.length; i++) {\n var diffItem = diff[i];\n var pointAdded = true;\n var oldIdx2 = void 0;\n var newIdx2 = void 0; // FIXME, animation is not so perfect when dataZoom window moves fast\n // Which is in case remvoing or add more than one data in the tail or head\n\n switch (diffItem.cmd) {\n case '=':\n oldIdx2 = diffItem.idx * 2;\n newIdx2 = diffItem.idx1 * 2;\n var currentX = oldPoints[oldIdx2];\n var currentY = oldPoints[oldIdx2 + 1];\n var nextX = newPoints[newIdx2];\n var nextY = newPoints[newIdx2 + 1]; // If previous data is NaN, use next point directly\n\n if (isNaN(currentX) || isNaN(currentY)) {\n currentX = nextX;\n currentY = nextY;\n }\n\n currPoints.push(currentX, currentY);\n nextPoints.push(nextX, nextY);\n currStackedPoints.push(oldStackedOnPoints[oldIdx2], oldStackedOnPoints[oldIdx2 + 1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(diffItem.idx1));\n break;\n\n case '+':\n var newIdx = diffItem.idx;\n var newDataDimsForPoint = newDataOldCoordInfo.dataDimsForPoint;\n var oldPt = oldCoordSys.dataToPoint([newData.get(newDataDimsForPoint[0], newIdx), newData.get(newDataDimsForPoint[1], newIdx)]);\n newIdx2 = newIdx * 2;\n currPoints.push(oldPt[0], oldPt[1]);\n nextPoints.push(newPoints[newIdx2], newPoints[newIdx2 + 1]);\n var stackedOnPoint = getStackedOnPoint(newDataOldCoordInfo, oldCoordSys, newData, newIdx);\n currStackedPoints.push(stackedOnPoint[0], stackedOnPoint[1]);\n nextStackedPoints.push(newStackedOnPoints[newIdx2], newStackedOnPoints[newIdx2 + 1]);\n rawIndices.push(newData.getRawIndex(newIdx));\n break;\n\n case '-':\n pointAdded = false;\n } // Original indices\n\n\n if (pointAdded) {\n status.push(diffItem);\n sortedIndices.push(sortedIndices.length);\n }\n } // Diff result may be crossed if all items are changed\n // Sort by data index\n\n\n sortedIndices.sort(function (a, b) {\n return rawIndices[a] - rawIndices[b];\n });\n var len = currPoints.length;\n var sortedCurrPoints = createFloat32Array(len);\n var sortedNextPoints = createFloat32Array(len);\n var sortedCurrStackedPoints = createFloat32Array(len);\n var sortedNextStackedPoints = createFloat32Array(len);\n var sortedStatus = [];\n\n for (var i = 0; i < sortedIndices.length; i++) {\n var idx = sortedIndices[i];\n var i2 = i * 2;\n var idx2 = idx * 2;\n sortedCurrPoints[i2] = currPoints[idx2];\n sortedCurrPoints[i2 + 1] = currPoints[idx2 + 1];\n sortedNextPoints[i2] = nextPoints[idx2];\n sortedNextPoints[i2 + 1] = nextPoints[idx2 + 1];\n sortedCurrStackedPoints[i2] = currStackedPoints[idx2];\n sortedCurrStackedPoints[i2 + 1] = currStackedPoints[idx2 + 1];\n sortedNextStackedPoints[i2] = nextStackedPoints[idx2];\n sortedNextStackedPoints[i2 + 1] = nextStackedPoints[idx2 + 1];\n sortedStatus[i] = status[idx];\n }\n\n return {\n current: sortedCurrPoints,\n next: sortedNextPoints,\n stackedOnCurrent: sortedCurrStackedPoints,\n stackedOnNext: sortedNextStackedPoints,\n status: sortedStatus\n };\n}"]},"metadata":{},"sourceType":"module"}