qauMaWeb/node_modules/.cache/babel-loader/a935b0cb8e55bf5eb7d17d33107...

1 line
14 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.slice.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * Calculate slider move result.\r\n * Usage:\r\n * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as\r\n * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.\r\n * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.\r\n *\r\n * @param delta Move length.\r\n * @param handleEnds handleEnds[0] can be bigger then handleEnds[1].\r\n * handleEnds will be modified in this method.\r\n * @param extent handleEnds is restricted by extent.\r\n * extent[0] should less or equals than extent[1].\r\n * @param handleIndex Can be 'all', means that both move the two handleEnds.\r\n * @param minSpan The range of dataZoom can not be smaller than that.\r\n * If not set, handle0 and cross handle1. If set as a non-negative\r\n * number (including `0`), handles will push each other when reaching\r\n * the minSpan.\r\n * @param maxSpan The range of dataZoom can not be larger than that.\r\n * @return The input handleEnds.\r\n */\nexport default function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {\n delta = delta || 0;\n var extentSpan = extent[1] - extent[0]; // Notice maxSpan and minSpan can be null/undefined.\n\n if (minSpan != null) {\n minSpan = restrict(minSpan, [0, extentSpan]);\n }\n\n if (maxSpan != null) {\n maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0);\n }\n\n if (handleIndex === 'all') {\n var handleSpan = Math.abs(handleEnds[1] - handleEnds[0]);\n handleSpan = restrict(handleSpan, [0, extentSpan]);\n minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]);\n handleIndex = 0;\n }\n\n handleEnds[0] = restrict(handleEnds[0], extent);\n handleEnds[1] = restrict(handleEnds[1], extent);\n var originalDistSign = getSpanSign(handleEnds, handleIndex);\n handleEnds[handleIndex] += delta; // Restrict in extent.\n\n var extentMinSpan = minSpan || 0;\n var realExtent = extent.slice();\n originalDistSign.sign < 0 ? realExtent[0] += extentMinSpan : realExtent[1] -= extentMinSpan;\n handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent); // Expand span.\n\n var currDistSign;\n currDistSign = getSpanSign(handleEnds, handleIndex);\n\n if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) {\n // If minSpan exists, 'cross' is forbidden.\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan;\n } // Shrink span.\n\n\n currDistSign = getSpanSign(handleEnds, handleIndex);\n\n if (maxSpan != null && currDistSign.span > maxSpan) {\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + currDistSign.sign * maxSpan;\n }\n\n return handleEnds;\n}\n\nfunction getSpanSign(handleEnds, handleIndex) {\n var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex]; // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0]\n // is at left of handleEnds[1] for non-cross case.\n\n return {\n span: Math.abs(dist),\n sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1\n };\n}\n\nfunction restrict(value, extend) {\n return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value));\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/component/helper/sliderMove.js"],"names":["sliderMove","delta","handleEnds","extent","handleIndex","minSpan","maxSpan","extentSpan","restrict","Math","max","handleSpan","abs","originalDistSign","getSpanSign","extentMinSpan","realExtent","slice","sign","currDistSign","span","dist","value","extend","min","Infinity"],"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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,UAAT,CAAoBC,KAApB,EAA2BC,UAA3B,EAAuCC,MAAvC,EAA+CC,WAA/C,EAA4DC,OAA5D,EAAqEC,OAArE,EAA8E;AAC3FL,EAAAA,KAAK,GAAGA,KAAK,IAAI,CAAjB;AACA,MAAIM,UAAU,GAAGJ,MAAM,CAAC,CAAD,CAAN,GAAYA,MAAM,CAAC,CAAD,CAAnC,CAF2F,CAEnD;;AAExC,MAAIE,OAAO,IAAI,IAAf,EAAqB;AACnBA,IAAAA,OAAO,GAAGG,QA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AAyBC,MAAzB,EAAiC;AAC/B,SAAOd,IAAI,CAACe,GAAL,CAASD,MAAM,CAAC,CAAD,CAAN,IAAa,IAAb,GAAoBA,MAAM,CAAC,CAAD,CAA1B,GAAgCE,QAAzC,EAAmDhB,IAAI,CAACC,GAAL,CAASa,MAAM,CAAC,CAAD,CAAN,IAAa,IAAb,GAAoBA,MAAM,CAAC,CAAD,CAA1B,GAAgC,CAACE,QAA1C,EAAoDH,KAApD,CAAnD,CAAP;AACD","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n/**\r\n * Calculate slider move result.\r\n * Usage:\r\n * (1) If both handle0 and handle1 are needed to be moved, set minSpan the same as\r\n * maxSpan and the same as `Math.abs(handleEnd[1] - handleEnds[0])`.\r\n * (2) If handle0 is forbidden to cross handle1, set minSpan as `0`.\r\n *\r\n * @param delta Move length.\r\n * @param handleEnds handleEnds[0] can be bigger then handleEnds[1].\r\n * handleEnds will be modified in this method.\r\n * @param extent handleEnds is restricted by extent.\r\n * extent[0] should less or equals than extent[1].\r\n * @param handleIndex Can be 'all', means that both move the two handleEnds.\r\n * @param minSpan The range of dataZoom can not be smaller than that.\r\n * If not set, handle0 and cross handle1. If set as a non-negative\r\n * number (including `0`), handles will push each other when reaching\r\n * the minSpan.\r\n * @param maxSpan The range of dataZoom can not be larger than that.\r\n * @return The input handleEnds.\r\n */\r\nexport default function sliderMove(delta, handleEnds, extent, handleIndex, minSpan, maxSpan) {\r\n delta = delta || 0;\r\n var extentSpan = extent[1] - extent[0]; // Notice maxSpan and minSpan can be null/undefined.\r\n\r\n if (minSpan != null) {\r\n minSpan = restrict(minSpan, [0, extentSpan]);\r\n }\r\n\r\n if (maxSpan != null) {\r\n maxSpan = Math.max(maxSpan, minSpan != null ? minSpan : 0);\r\n }\r\n\r\n if (handleIndex === 'all') {\r\n var handleSpan = Math.abs(handleEnds[1] - handleEnds[0]);\r\n handleSpan = restrict(handleSpan, [0, extentSpan]);\r\n minSpan = maxSpan = restrict(handleSpan, [minSpan, maxSpan]);\r\n handleIndex = 0;\r\n }\r\n\r\n handleEnds[0] = restrict(handleEnds[0], extent);\r\n handleEnds[1] = restrict(handleEnds[1], extent);\r\n var originalDistSign = getSpanSign(handleEnds, handleIndex);\r\n handleEnds[handleIndex] += delta; // Restrict in extent.\r\n\r\n var extentMinSpan = minSpan || 0;\r\n var realExtent = extent.slice();\r\n originalDistSign.sign < 0 ? realExtent[0] += extentMinSpan : realExtent[1] -= extentMinSpan;\r\n handleEnds[handleIndex] = restrict(handleEnds[handleIndex], realExtent); // Expand span.\r\n\r\n var currDistSign;\r\n currDistSign = getSpanSign(handleEnds, handleIndex);\r\n\r\n if (minSpan != null && (currDistSign.sign !== originalDistSign.sign || currDistSign.span < minSpan)) {\r\n // If minSpan exists, 'cross' is forbidden.\r\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + originalDistSign.sign * minSpan;\r\n } // Shrink span.\r\n\r\n\r\n currDistSign = getSpanSign(handleEnds, handleIndex);\r\n\r\n if (maxSpan != null && currDistSign.span > maxSpan) {\r\n handleEnds[1 - handleIndex] = handleEnds[handleIndex] + currDistSign.sign * maxSpan;\r\n }\r\n\r\n return handleEnds;\r\n}\r\n\r\nfunction getSpanSign(handleEnds, handleIndex) {\r\n var dist = handleEnds[handleIndex] - handleEnds[1 - handleIndex]; // If `handleEnds[0] === handleEnds[1]`, always believe that handleEnd[0]\r\n // is at left of handleEnds[1] for non-cross case.\r\n\r\n return {\r\n span: Math.abs(dist),\r\n sign: dist > 0 ? -1 : dist < 0 ? 1 : handleIndex ? -1 : 1\r\n };\r\n}\r\n\r\nfunction restrict(value, extend) {\r\n return Math.min(extend[1] != null ? extend[1] : Infinity, Math.max(extend[0] != null ? extend[0] : -Infinity, value));\r\n}"]},"metadata":{},"sourceType":"module"}