qauMaWeb/node_modules/.cache/babel-loader/4dad8ba5462a09615a88898348c...

1 line
9.6 KiB
JSON

{"ast":null,"code":"/*\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 * as zrUtil from 'zrender/lib/core/util.js';\nimport { getLayoutRect } from '../../util/layout.js';\nvar paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']];\n/**\n * @param visualMapModel\n * @param api\n * @param itemSize always [short, long]\n * @return {string} 'left' or 'right' or 'top' or 'bottom'\n */\n\nexport function getItemAlign(visualMapModel, api, itemSize) {\n var modelOption = visualMapModel.option;\n var itemAlign = modelOption.align;\n\n if (itemAlign != null && itemAlign !== 'auto') {\n return itemAlign;\n } // Auto decision align.\n\n\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;\n var reals = paramsSet[realIndex];\n var fakeValue = [0, null, 10];\n var layoutInput = {};\n\n for (var i = 0; i < 3; i++) {\n layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i];\n layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]];\n }\n\n var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex];\n var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding);\n return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1];\n}\n/**\n * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and\n * dataIndexInside means filtered index.\n */\n// TODO: TYPE more specified payload types.\n\nexport function makeHighDownBatch(batch, visualMapModel) {\n zrUtil.each(batch || [], function (batchItem) {\n if (batchItem.dataIndex != null) {\n batchItem.dataIndexInside = batchItem.dataIndex;\n batchItem.dataIndex = null;\n }\n\n batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : '');\n });\n return batch;\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/component/visualMap/helper.js"],"names":["zrUtil","getLayoutRect","paramsSet","getItemAlign","visualMapModel","api","itemSize","modelOption","option","itemAlign","align","ecSize","width","getWidth","height","getHeight","realIndex","orient","reals","fakeValue","layoutInput","i","rParam","rect","padding","margin","makeHighDownBatch","batch","each","batchItem","dataIndex","dataIndexInside","highlightKey","componentIndex"],"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,OAAO,KAAKA,MAAZ,MAAwB,0BAAxB;AACA,SAASC,aA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IC,MAAM,GAAG,CAAC,CAAC,GAAD,EAAM,OAAN,EAAe,CAAf,CAAD,EAAoB,CAAC,GAAD,EAAM,QAAN,EAAgB,CAAhB,CAApB,EAAwCN,SAAxC,CAAb;AACA,MAAIO,IAAI,GAAGtB,aAAa,CAACmB,WAAD,EAAcT,MAAd,EAAsBJ,WAAW,CAACiB,OAAlC,CAAxB;AACA,SAAON,KAAK,CAAC,CAACK,IAAI,CAACE,MAAL,CAAYH,MAAM,CAAC,CAAD,CAAlB,KAA0B,CAA3B,IAAgCC,IAAI,CAACD,MAAM,CAAC,CAAD,CAAP,CAApC,GAAkDC,IAAI,CAACD,MAAM,CAAC,CAAD,CAAP,CAAJ,GAAkB,GAApE,GAA0EX,MAAM,CAACW,MAAM,CAAC,CAAD,CAAP,CAAN,GAAoB,GAA9F,GAAoG,CAApG,GAAwG,CAAzG,CAAZ;AACD;AACD;AACA;AACA;AACA;AACA;;AAEA,OAAO,SAASI,iBAAT,CAA2BC,KAA3B,EAAkCvB,cAAlC,EAAkD;AACvDJ,EAAAA,MAAM,CAAC4B,IAAP,CAAYD,KAAK,IAAI,EAArB,EAAyB,UAAUE,SAAV,EAAqB;AAC5C,QAAIA,SAAS,CAACC,SAAV,IAAuB,IAA3B,EAAiC;AAC/BD,MAAAA,SAAS,CAACE,eAAV,GAA4BF,SAAS,CAACC,SAAtC;AACAD,MAAAA,SAAS,CAACC,SAAV,GAAsB,IAAtB;AACD;;AAEDD,IAAAA,SAAS,CAACG,YAAV,GAAyB,eAAe5B,cAAc,GAAGA,cAAc,CAAC6B,cAAlB,GAAmC,EAAhE,CAAzB;AACD,GAPD;AAQA,SAAON,KAAP;AACD","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 * as zrUtil from 'zrender/lib/core/util.js';\nimport { getLayoutRect } from '../../util/layout.js';\nvar paramsSet = [['left', 'right', 'width'], ['top', 'bottom', 'height']];\n/**\n * @param visualMapModel\n * @param api\n * @param itemSize always [short, long]\n * @return {string} 'left' or 'right' or 'top' or 'bottom'\n */\n\nexport function getItemAlign(visualMapModel, api, itemSize) {\n var modelOption = visualMapModel.option;\n var itemAlign = modelOption.align;\n\n if (itemAlign != null && itemAlign !== 'auto') {\n return itemAlign;\n } // Auto decision align.\n\n\n var ecSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var realIndex = modelOption.orient === 'horizontal' ? 1 : 0;\n var reals = paramsSet[realIndex];\n var fakeValue = [0, null, 10];\n var layoutInput = {};\n\n for (var i = 0; i < 3; i++) {\n layoutInput[paramsSet[1 - realIndex][i]] = fakeValue[i];\n layoutInput[reals[i]] = i === 2 ? itemSize[0] : modelOption[reals[i]];\n }\n\n var rParam = [['x', 'width', 3], ['y', 'height', 0]][realIndex];\n var rect = getLayoutRect(layoutInput, ecSize, modelOption.padding);\n return reals[(rect.margin[rParam[2]] || 0) + rect[rParam[0]] + rect[rParam[1]] * 0.5 < ecSize[rParam[1]] * 0.5 ? 0 : 1];\n}\n/**\n * Prepare dataIndex for outside usage, where dataIndex means rawIndex, and\n * dataIndexInside means filtered index.\n */\n// TODO: TYPE more specified payload types.\n\nexport function makeHighDownBatch(batch, visualMapModel) {\n zrUtil.each(batch || [], function (batchItem) {\n if (batchItem.dataIndex != null) {\n batchItem.dataIndexInside = batchItem.dataIndex;\n batchItem.dataIndex = null;\n }\n\n batchItem.highlightKey = 'visualMap' + (visualMapModel ? visualMapModel.componentIndex : '');\n });\n return batch;\n}"]},"metadata":{},"sourceType":"module"}