/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ var parentJsonpFunction = window["webpackJsonp"];
/******/ window["webpackJsonp"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [], result;
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ };
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // objects to store loaded and loading chunks
/******/ var installedChunks = {
/******/ 14: 0
/******/ };
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ var installedChunkData = installedChunks[chunkId];
/******/ if(installedChunkData === 0) {
/******/ return new Promise(function(resolve) { resolve(); });
/******/ }
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunkData) {
/******/ return installedChunkData[2];
/******/ }
/******/
/******/ // setup Promise in chunk cache
/******/ var promise = new Promise(function(resolve, reject) {
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ });
/******/ installedChunkData[2] = promise;
/******/
/******/ // start chunk loading
/******/ var head = document.getElementsByTagName('head')[0];
/******/ var script = document.createElement('script');
/******/ script.type = 'text/javascript';
/******/ script.charset = 'utf-8';
/******/ script.async = true;
/******/ script.timeout = 120000;
/******/
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = __webpack_require__.p + "js/" + ({"0":"Cloud","1":"device","2":"editRol","3":"config","4":"record","5":"VideoPlan","6":"about","7":"useruserControl","8":"roleManagement","9":"DeviceGroup","10":"channel","11":"VideoPl/an","12":"editUser","13":"editDeiceGroup"}[chunkId]||chunkId) + "." + {"0":"bfb6ca0f","1":"461568f9","2":"ccdb591d","3":"5b6ce58c","4":"949cb5f8","5":"cb3bb9cb","6":"98838d83","7":"50956581","8":"021da5c3","9":"abd14ccc","10":"556ad768","11":"cee109b2","12":"c587987b","13":"e5791683"}[chunkId] + ".js";
/******/ var timeout = setTimeout(onScriptComplete, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ function onScriptComplete() {
/******/ // avoid mem leaks in IE.
/******/ script.onerror = script.onload = null;
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) {
/******/ chunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
/******/ head.appendChild(script);
/******/
/******/ return promise;
/******/ };
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/ // on error function for async loading
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 10);
/******/ })
/************************************************************************/
/******/ ({
/***/ "++K3":
/***/ (function(module, exports) {
/**
* Copyright 2004-present Facebook. All Rights Reserved.
*
* @providesModule UserAgent_DEPRECATED
*/
/**
* Provides entirely client-side User Agent and OS detection. You should prefer
* the non-deprecated UserAgent module when possible, which exposes our
* authoritative server-side PHP-based detection to the client.
*
* Usage is straightforward:
*
* if (UserAgent_DEPRECATED.ie()) {
* // IE
* }
*
* You can also do version checks:
*
* if (UserAgent_DEPRECATED.ie() >= 7) {
* // IE7 or better
* }
*
* The browser functions will return NaN if the browser does not match, so
* you can also do version compares the other way:
*
* if (UserAgent_DEPRECATED.ie() < 7) {
* // IE6 or worse
* }
*
* Note that the version is a float and may include a minor version number,
* so you should always use range operators to perform comparisons, not
* strict equality.
*
* **Note:** You should **strongly** prefer capability detection to browser
* version detection where it's reasonable:
*
* http://www.quirksmode.org/js/support.html
*
* Further, we have a large number of mature wrapper functions and classes
* which abstract away many browser irregularities. Check the documentation,
* grep for things, or ask on javascript@lists.facebook.com before writing yet
* another copy of "event || window.event".
*
*/
var _populated = false;
// Browsers
var _ie, _firefox, _opera, _webkit, _chrome;
// Actual IE browser for compatibility mode
var _ie_real_version;
// Platforms
var _osx, _windows, _linux, _android;
// Architectures
var _win64;
// Devices
var _iphone, _ipad, _native;
var _mobile;
function _populate() {
if (_populated) {
return;
}
_populated = true;
// To work around buggy JS libraries that can't handle multi-digit
// version numbers, Opera 10's user agent string claims it's Opera
// 9, then later includes a Version/X.Y field:
//
// Opera/9.80 (foo) Presto/2.2.15 Version/10.10
var uas = navigator.userAgent;
var agent = /(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(uas);
var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);
_iphone = /\b(iPhone|iP[ao]d)/.exec(uas);
_ipad = /\b(iP[ao]d)/.exec(uas);
_android = /Android/i.exec(uas);
_native = /FBAN\/\w+;/i.exec(uas);
_mobile = /Mobile/i.exec(uas);
// Note that the IE team blog would have you believe you should be checking
// for 'Win64; x64'. But MSDN then reveals that you can actually be coming
// from either x64 or ia64; so ultimately, you should just check for Win64
// as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit
// Windows will send 'WOW64' instead.
_win64 = !!(/Win64/.exec(uas));
if (agent) {
_ie = agent[1] ? parseFloat(agent[1]) : (
agent[5] ? parseFloat(agent[5]) : NaN);
// IE compatibility mode
if (_ie && document && document.documentMode) {
_ie = document.documentMode;
}
// grab the "true" ie version from the trident token if available
var trident = /(?:Trident\/(\d+.\d+))/.exec(uas);
_ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;
_firefox = agent[2] ? parseFloat(agent[2]) : NaN;
_opera = agent[3] ? parseFloat(agent[3]) : NaN;
_webkit = agent[4] ? parseFloat(agent[4]) : NaN;
if (_webkit) {
// We do not add the regexp to the above test, because it will always
// match 'safari' only since 'AppleWebKit' appears before 'Chrome' in
// the userAgent string.
agent = /(?:Chrome\/(\d+\.\d+))/.exec(uas);
_chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;
} else {
_chrome = NaN;
}
} else {
_ie = _firefox = _opera = _chrome = _webkit = NaN;
}
if (os) {
if (os[1]) {
// Detect OS X version. If no version number matches, set _osx to true.
// Version examples: 10, 10_6_1, 10.7
// Parses version number as a float, taking only first two sets of
// digits. If only one set of digits is found, returns just the major
// version number.
var ver = /(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(uas);
_osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;
} else {
_osx = false;
}
_windows = !!os[2];
_linux = !!os[3];
} else {
_osx = _windows = _linux = false;
}
}
var UserAgent_DEPRECATED = {
/**
* Check if the UA is Internet Explorer.
*
*
* @return float|NaN Version number (if match) or NaN.
*/
ie: function() {
return _populate() || _ie;
},
/**
* Check if we're in Internet Explorer compatibility mode.
*
* @return bool true if in compatibility mode, false if
* not compatibility mode or not ie
*/
ieCompatibilityMode: function() {
return _populate() || (_ie_real_version > _ie);
},
/**
* Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we
* only need this because Skype can't handle 64-bit IE yet. We need to remove
* this when we don't need it -- tracked by #601957.
*/
ie64: function() {
return UserAgent_DEPRECATED.ie() && _win64;
},
/**
* Check if the UA is Firefox.
*
*
* @return float|NaN Version number (if match) or NaN.
*/
firefox: function() {
return _populate() || _firefox;
},
/**
* Check if the UA is Opera.
*
*
* @return float|NaN Version number (if match) or NaN.
*/
opera: function() {
return _populate() || _opera;
},
/**
* Check if the UA is WebKit.
*
*
* @return float|NaN Version number (if match) or NaN.
*/
webkit: function() {
return _populate() || _webkit;
},
/**
* For Push
* WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit
*/
safari: function() {
return UserAgent_DEPRECATED.webkit();
},
/**
* Check if the UA is a Chrome browser.
*
*
* @return float|NaN Version number (if match) or NaN.
*/
chrome : function() {
return _populate() || _chrome;
},
/**
* Check if the user is running Windows.
*
* @return bool `true' if the user's OS is Windows.
*/
windows: function() {
return _populate() || _windows;
},
/**
* Check if the user is running Mac OS X.
*
* @return float|bool Returns a float if a version number is detected,
* otherwise true/false.
*/
osx: function() {
return _populate() || _osx;
},
/**
* Check if the user is running Linux.
*
* @return bool `true' if the user's OS is some flavor of Linux.
*/
linux: function() {
return _populate() || _linux;
},
/**
* Check if the user is running on an iPhone or iPod platform.
*
* @return bool `true' if the user is running some flavor of the
* iPhone OS.
*/
iphone: function() {
return _populate() || _iphone;
},
mobile: function() {
return _populate() || (_iphone || _ipad || _android || _mobile);
},
nativeApp: function() {
// webviews inside of the native apps
return _populate() || _native;
},
android: function() {
return _populate() || _android;
},
ipad: function() {
return _populate() || _ipad;
}
};
module.exports = UserAgent_DEPRECATED;
/***/ }),
/***/ "+2+s":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/mathiasbynens/String.prototype.at
var $export = __webpack_require__("Ds5P");
var $at = __webpack_require__("49qz")(true);
var $fails = __webpack_require__("zgIt");
var FORCED = $fails(function () {
return '𠮷'.at(0) !== '𠮷';
});
$export($export.P + $export.F * FORCED, 'String', {
at: function at(pos) {
return $at(this, pos);
}
});
/***/ }),
/***/ "+27R":
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
true ? factory(__webpack_require__("PJh5")) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
's': ['thodde secondanim', 'thodde second'],
'ss': [number + ' secondanim', number + ' second'],
'm': ['eka mintan', 'ek minute'],
'mm': [number + ' mintanim', number + ' mintam'],
'h': ['eka horan', 'ek hor'],
'hh': [number + ' horanim', number + ' horam'],
'd': ['eka disan', 'ek dis'],
'dd': [number + ' disanim', number + ' dis'],
'M': ['eka mhoinean', 'ek mhoino'],
'MM': [number + ' mhoineanim', number + ' mhoine'],
'y': ['eka vorsan', 'ek voros'],
'yy': [number + ' vorsanim', number + ' vorsam']
};
return withoutSuffix ? format[key][0] : format[key][1];
}
var gomLatn = moment.defineLocale('gom-latn', {
months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
monthsParseExact : true,
weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'),
weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'A h:mm [vazta]',
LTS : 'A h:mm:ss [vazta]',
L : 'DD-MM-YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY A h:mm [vazta]',
LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
},
calendar : {
sameDay: '[Aiz] LT',
nextDay: '[Faleam] LT',
nextWeek: '[Ieta to] dddd[,] LT',
lastDay: '[Kal] LT',
lastWeek: '[Fatlo] dddd[,] LT',
sameElse: 'L'
},
relativeTime : {
future : '%s',
past : '%s adim',
s : processRelativeTime,
ss : processRelativeTime,
m : processRelativeTime,
mm : processRelativeTime,
h : processRelativeTime,
hh : processRelativeTime,
d : processRelativeTime,
dd : processRelativeTime,
M : processRelativeTime,
MM : processRelativeTime,
y : processRelativeTime,
yy : processRelativeTime
},
dayOfMonthOrdinalParse : /\d{1,2}(er)/,
ordinal : function (number, period) {
switch (period) {
// the ordinal 'er' only applies to day of the month
case 'D':
return number + 'er';
default:
case 'M':
case 'Q':
case 'DDD':
case 'd':
case 'w':
case 'W':
return number;
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
},
meridiemParse: /rati|sokalli|donparam|sanje/,
meridiemHour : function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'rati') {
return hour < 4 ? hour : hour + 12;
} else if (meridiem === 'sokalli') {
return hour;
} else if (meridiem === 'donparam') {
return hour > 12 ? hour : hour + 12;
} else if (meridiem === 'sanje') {
return hour + 12;
}
},
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
return 'rati';
} else if (hour < 12) {
return 'sokalli';
} else if (hour < 16) {
return 'donparam';
} else if (hour < 20) {
return 'sanje';
} else {
return 'rati';
}
}
});
return gomLatn;
})));
/***/ }),
/***/ "+2Ke":
/***/ (function(module, exports) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Avoid typo.
var SOURCE_FORMAT_ORIGINAL = 'original';
var SOURCE_FORMAT_ARRAY_ROWS = 'arrayRows';
var SOURCE_FORMAT_OBJECT_ROWS = 'objectRows';
var SOURCE_FORMAT_KEYED_COLUMNS = 'keyedColumns';
var SOURCE_FORMAT_UNKNOWN = 'unknown'; // ??? CHANGE A NAME
var SOURCE_FORMAT_TYPED_ARRAY = 'typedArray';
var SERIES_LAYOUT_BY_COLUMN = 'column';
var SERIES_LAYOUT_BY_ROW = 'row';
exports.SOURCE_FORMAT_ORIGINAL = SOURCE_FORMAT_ORIGINAL;
exports.SOURCE_FORMAT_ARRAY_ROWS = SOURCE_FORMAT_ARRAY_ROWS;
exports.SOURCE_FORMAT_OBJECT_ROWS = SOURCE_FORMAT_OBJECT_ROWS;
exports.SOURCE_FORMAT_KEYED_COLUMNS = SOURCE_FORMAT_KEYED_COLUMNS;
exports.SOURCE_FORMAT_UNKNOWN = SOURCE_FORMAT_UNKNOWN;
exports.SOURCE_FORMAT_TYPED_ARRAY = SOURCE_FORMAT_TYPED_ARRAY;
exports.SERIES_LAYOUT_BY_COLUMN = SERIES_LAYOUT_BY_COLUMN;
exports.SERIES_LAYOUT_BY_ROW = SERIES_LAYOUT_BY_ROW;
/***/ }),
/***/ "+7/x":
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
true ? factory(__webpack_require__("PJh5")) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var symbolMap = {
'1': '௧',
'2': '௨',
'3': '௩',
'4': '௪',
'5': '௫',
'6': '௬',
'7': '௭',
'8': '௮',
'9': '௯',
'0': '௦'
}, numberMap = {
'௧': '1',
'௨': '2',
'௩': '3',
'௪': '4',
'௫': '5',
'௬': '6',
'௭': '7',
'௮': '8',
'௯': '9',
'௦': '0'
};
var ta = moment.defineLocale('ta', {
months : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
monthsShort : 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split('_'),
weekdays : 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split('_'),
weekdaysShort : 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split('_'),
weekdaysMin : 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY, HH:mm',
LLLL : 'dddd, D MMMM YYYY, HH:mm'
},
calendar : {
sameDay : '[இன்று] LT',
nextDay : '[நாளை] LT',
nextWeek : 'dddd, LT',
lastDay : '[நேற்று] LT',
lastWeek : '[கடந்த வாரம்] dddd, LT',
sameElse : 'L'
},
relativeTime : {
future : '%s இல்',
past : '%s முன்',
s : 'ஒரு சில விநாடிகள்',
ss : '%d விநாடிகள்',
m : 'ஒரு நிமிடம்',
mm : '%d நிமிடங்கள்',
h : 'ஒரு மணி நேரம்',
hh : '%d மணி நேரம்',
d : 'ஒரு நாள்',
dd : '%d நாட்கள்',
M : 'ஒரு மாதம்',
MM : '%d மாதங்கள்',
y : 'ஒரு வருடம்',
yy : '%d ஆண்டுகள்'
},
dayOfMonthOrdinalParse: /\d{1,2}வது/,
ordinal : function (number) {
return number + 'வது';
},
preparse: function (string) {
return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// refer http://ta.wikipedia.org/s/1er1
meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,
meridiem : function (hour, minute, isLower) {
if (hour < 2) {
return ' யாமம்';
} else if (hour < 6) {
return ' வைகறை'; // வைகறை
} else if (hour < 10) {
return ' காலை'; // காலை
} else if (hour < 14) {
return ' நண்பகல்'; // நண்பகல்
} else if (hour < 18) {
return ' எற்பாடு'; // எற்பாடு
} else if (hour < 22) {
return ' மாலை'; // மாலை
} else {
return ' யாமம்';
}
},
meridiemHour : function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === 'யாமம்') {
return hour < 2 ? hour : hour + 12;
} else if (meridiem === 'வைகறை' || meridiem === 'காலை') {
return hour;
} else if (meridiem === 'நண்பகல்') {
return hour >= 10 ? hour : hour + 12;
} else {
return hour + 12;
}
},
week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
return ta;
})));
/***/ }),
/***/ "+8+3":
/***/ (function(module, exports, __webpack_require__) {
!function(n,e){ true?module.exports=e():"function"==typeof define&&define.amd?define(e):((n=n||self).__vee_validate_locale__zh_CN=n.__vee_validate_locale__zh_CN||{},n.__vee_validate_locale__zh_CN.js=e())}(this,function(){"use strict";var n,e={name:"zh_CN",messages:{_default:function(n){return n+"的值无效"},after:function(n,e){var t=e[0];return n+"必须在"+t+"之后"+(e[1]?"或等于"+t:"")},alpha:function(n){return n+"只能包含字母字符"},alpha_dash:function(n){return n+"能够包含字母数字字符、破折号和下划线"},alpha_num:function(n){return n+"只能包含字母数字字符"},alpha_spaces:function(n){return n+"只能包含字母字符和空格"},before:function(n,e){var t=e[0];return n+"必须在"+t+"之前"+(e[1]?"或等于"+t:"")},between:function(n,e){return n+"必须在"+e[0]+"与"+e[1]+"之间"},confirmed:function(n,e){return n+"不能和"+e[0]+"匹配"},credit_card:function(n){return n+"的格式错误"},date_between:function(n,e){return n+"必须在"+e[0]+"和"+e[1]+"之间"},date_format:function(n,e){return n+"必须符合"+e[0]+"格式"},decimal:function(n,e){void 0===e&&(e=[]);var t=e[0];return void 0===t&&(t="*"),n+"必须是数字,且能够保留"+("*"===t?"":t)+"位小数"},digits:function(n,e){return n+"必须是数字,且精确到"+e[0]+"位数"},dimensions:function(n,e){return n+"必须在"+e[0]+"像素与"+e[1]+"像素之间"},email:function(n){return n+"不是一个有效的邮箱"},excluded:function(n){return n+"不是一个有效值"},ext:function(n){return n+"不是一个有效的文件"},image:function(n){return n+"不是一张有效的图片"},included:function(n){return n+"不是一个有效值"},integer:function(n){return n+"必须是整数"},ip:function(n){return n+"不是一个有效的地址"},length:function(n,e){var t=e[0],r=e[1];return r?n+"长度必须在"+t+"到"+r+"之间":n+"长度必须为"+t},max:function(n,e){return n+"不能超过"+e[0]+"个字符"},max_value:function(n,e){return n+"必须小于或等于"+e[0]},mimes:function(n){return n+"不是一个有效的文件类型"},min:function(n,e){return n+"必须至少有"+e[0]+"个字符"},min_value:function(n,e){return n+"必须大于或等于"+e[0]},numeric:function(n){return n+"只能包含数字字符"},regex:function(n){return n+"格式无效"},required:function(n){return n+"是必须的"},size:function(n,e){return n+"必须小于"+function(n){var e=1024,t=0===(n=Number(n)*e)?0:Math.floor(Math.log(n)/Math.log(e));return 1*(n/Math.pow(e,t)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][t]}(e[0])},url:function(n){return n+"不是一个有效的url"}},attributes:{}};return"undefined"!=typeof VeeValidate&&VeeValidate.Validator.localize(((n={})[e.name]=e,n)),e});
/***/ }),
/***/ "+CM9":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__("Ds5P");
var $indexOf = __webpack_require__("ot5s")(false);
var $native = [].indexOf;
var NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0;
$export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__("NNrz")($native)), 'Array', {
// 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex])
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
return NEGATIVE_ZERO
// convert -0 to +0
? $native.apply(this, arguments) || 0
: $indexOf(this, searchElement, arguments[1]);
}
});
/***/ }),
/***/ "+Dgo":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var ComponentModel = __webpack_require__("Y5nL");
var ComponentView = __webpack_require__("Pgdp");
var _sourceHelper = __webpack_require__("kdOt");
var detectSourceFormat = _sourceHelper.detectSourceFormat;
var _sourceType = __webpack_require__("+2Ke");
var SERIES_LAYOUT_BY_COLUMN = _sourceType.SERIES_LAYOUT_BY_COLUMN;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* This module is imported by echarts directly.
*
* Notice:
* Always keep this file exists for backward compatibility.
* Because before 4.1.0, dataset is an optional component,
* some users may import this module manually.
*/
ComponentModel.extend({
type: 'dataset',
/**
* @protected
*/
defaultOption: {
// 'row', 'column'
seriesLayoutBy: SERIES_LAYOUT_BY_COLUMN,
// null/'auto': auto detect header, see "module:echarts/data/helper/sourceHelper"
sourceHeader: null,
dimensions: null,
source: null
},
optionUpdated: function () {
detectSourceFormat(this);
}
});
ComponentView.extend({
type: 'dataset'
});
/***/ }),
/***/ "+E39":
/***/ (function(module, exports, __webpack_require__) {
// Thank's IE8 for his funny defineProperty
module.exports = !__webpack_require__("S82l")(function () {
return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
});
/***/ }),
/***/ "+HRN":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Buffer = __webpack_require__("kkc6").Buffer;
var util = __webpack_require__(3);
function copyBuffer(src, target, offset) {
src.copy(target, offset);
}
module.exports = function () {
function BufferList() {
_classCallCheck(this, BufferList);
this.head = null;
this.tail = null;
this.length = 0;
}
BufferList.prototype.push = function push(v) {
var entry = { data: v, next: null };
if (this.length > 0) this.tail.next = entry;else this.head = entry;
this.tail = entry;
++this.length;
};
BufferList.prototype.unshift = function unshift(v) {
var entry = { data: v, next: this.head };
if (this.length === 0) this.tail = entry;
this.head = entry;
++this.length;
};
BufferList.prototype.shift = function shift() {
if (this.length === 0) return;
var ret = this.head.data;
if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
--this.length;
return ret;
};
BufferList.prototype.clear = function clear() {
this.head = this.tail = null;
this.length = 0;
};
BufferList.prototype.join = function join(s) {
if (this.length === 0) return '';
var p = this.head;
var ret = '' + p.data;
while (p = p.next) {
ret += s + p.data;
}return ret;
};
BufferList.prototype.concat = function concat(n) {
if (this.length === 0) return Buffer.alloc(0);
if (this.length === 1) return this.head.data;
var ret = Buffer.allocUnsafe(n >>> 0);
var p = this.head;
var i = 0;
while (p) {
copyBuffer(p.data, ret, i);
i += p.data.length;
p = p.next;
}
return ret;
};
return BufferList;
}();
if (util && util.inspect && util.inspect.custom) {
module.exports.prototype[util.inspect.custom] = function () {
var obj = util.inspect({ length: this.length });
return this.constructor.name + ' ' + obj;
};
}
/***/ }),
/***/ "+K7g":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var echarts = __webpack_require__("Icdr");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* @payload
* @property {number} [seriesIndex]
* @property {string} [seriesId]
* @property {string} [seriesName]
* @property {number} [dataIndex]
*/
echarts.registerAction({
type: 'focusNodeAdjacency',
event: 'focusNodeAdjacency',
update: 'series:focusNodeAdjacency'
}, function () {});
/**
* @payload
* @property {number} [seriesIndex]
* @property {string} [seriesId]
* @property {string} [seriesName]
*/
echarts.registerAction({
type: 'unfocusNodeAdjacency',
event: 'unfocusNodeAdjacency',
update: 'series:unfocusNodeAdjacency'
}, function () {});
/***/ }),
/***/ "+KML":
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a in svg, where nodeName is 'style',
// CSS classes is defined globally wherever the style tags are declared.
if (nodeName === 'defs') {
// define flag
this._isDefine = true;
} else if (nodeName === 'text') {
this._isText = true;
}
var el;
if (this._isDefine) {
var parser = defineParsers[nodeName];
if (parser) {
var def = parser.call(this, xmlNode);
var id = xmlNode.getAttribute('id');
if (id) {
this._defs[id] = def;
}
}
} else {
var parser = nodeParsers[nodeName];
if (parser) {
el = parser.call(this, xmlNode, parentGroup);
parentGroup.add(el);
}
}
var child = xmlNode.firstChild;
while (child) {
if (child.nodeType === 1) {
this._parseNode(child, el);
} // Is text
if (child.nodeType === 3 && this._isText) {
this._parseText(child, el);
}
child = child.nextSibling;
} // Quit define
if (nodeName === 'defs') {
this._isDefine = false;
} else if (nodeName === 'text') {
this._isText = false;
}
};
SVGParser.prototype._parseText = function (xmlNode, parentGroup) {
if (xmlNode.nodeType === 1) {
var dx = xmlNode.getAttribute('dx') || 0;
var dy = xmlNode.getAttribute('dy') || 0;
this._textX += parseFloat(dx);
this._textY += parseFloat(dy);
}
var text = new Text({
style: {
text: xmlNode.textContent,
transformText: true
},
position: [this._textX || 0, this._textY || 0]
});
inheritStyle(parentGroup, text);
parseAttributes(xmlNode, text, this._defs);
var fontSize = text.style.fontSize;
if (fontSize && fontSize < 9) {
// PENDING
text.style.fontSize = 9;
text.scale = text.scale || [1, 1];
text.scale[0] *= fontSize / 9;
text.scale[1] *= fontSize / 9;
}
var rect = text.getBoundingRect();
this._textX += rect.width;
parentGroup.add(text);
return text;
};
var nodeParsers = {
'g': function (xmlNode, parentGroup) {
var g = new Group();
inheritStyle(parentGroup, g);
parseAttributes(xmlNode, g, this._defs);
return g;
},
'rect': function (xmlNode, parentGroup) {
var rect = new Rect();
inheritStyle(parentGroup, rect);
parseAttributes(xmlNode, rect, this._defs);
rect.setShape({
x: parseFloat(xmlNode.getAttribute('x') || 0),
y: parseFloat(xmlNode.getAttribute('y') || 0),
width: parseFloat(xmlNode.getAttribute('width') || 0),
height: parseFloat(xmlNode.getAttribute('height') || 0)
}); // console.log(xmlNode.getAttribute('transform'));
// console.log(rect.transform);
return rect;
},
'circle': function (xmlNode, parentGroup) {
var circle = new Circle();
inheritStyle(parentGroup, circle);
parseAttributes(xmlNode, circle, this._defs);
circle.setShape({
cx: parseFloat(xmlNode.getAttribute('cx') || 0),
cy: parseFloat(xmlNode.getAttribute('cy') || 0),
r: parseFloat(xmlNode.getAttribute('r') || 0)
});
return circle;
},
'line': function (xmlNode, parentGroup) {
var line = new Line();
inheritStyle(parentGroup, line);
parseAttributes(xmlNode, line, this._defs);
line.setShape({
x1: parseFloat(xmlNode.getAttribute('x1') || 0),
y1: parseFloat(xmlNode.getAttribute('y1') || 0),
x2: parseFloat(xmlNode.getAttribute('x2') || 0),
y2: parseFloat(xmlNode.getAttribute('y2') || 0)
});
return line;
},
'ellipse': function (xmlNode, parentGroup) {
var ellipse = new Ellipse();
inheritStyle(parentGroup, ellipse);
parseAttributes(xmlNode, ellipse, this._defs);
ellipse.setShape({
cx: parseFloat(xmlNode.getAttribute('cx') || 0),
cy: parseFloat(xmlNode.getAttribute('cy') || 0),
rx: parseFloat(xmlNode.getAttribute('rx') || 0),
ry: parseFloat(xmlNode.getAttribute('ry') || 0)
});
return ellipse;
},
'polygon': function (xmlNode, parentGroup) {
var points = xmlNode.getAttribute('points');
if (points) {
points = parsePoints(points);
}
var polygon = new Polygon({
shape: {
points: points || []
}
});
inheritStyle(parentGroup, polygon);
parseAttributes(xmlNode, polygon, this._defs);
return polygon;
},
'polyline': function (xmlNode, parentGroup) {
var path = new Path();
inheritStyle(parentGroup, path);
parseAttributes(xmlNode, path, this._defs);
var points = xmlNode.getAttribute('points');
if (points) {
points = parsePoints(points);
}
var polyline = new Polyline({
shape: {
points: points || []
}
});
return polyline;
},
'image': function (xmlNode, parentGroup) {
var img = new ZImage();
inheritStyle(parentGroup, img);
parseAttributes(xmlNode, img, this._defs);
img.setStyle({
image: xmlNode.getAttribute('xlink:href'),
x: xmlNode.getAttribute('x'),
y: xmlNode.getAttribute('y'),
width: xmlNode.getAttribute('width'),
height: xmlNode.getAttribute('height')
});
return img;
},
'text': function (xmlNode, parentGroup) {
var x = xmlNode.getAttribute('x') || 0;
var y = xmlNode.getAttribute('y') || 0;
var dx = xmlNode.getAttribute('dx') || 0;
var dy = xmlNode.getAttribute('dy') || 0;
this._textX = parseFloat(x) + parseFloat(dx);
this._textY = parseFloat(y) + parseFloat(dy);
var g = new Group();
inheritStyle(parentGroup, g);
parseAttributes(xmlNode, g, this._defs);
return g;
},
'tspan': function (xmlNode, parentGroup) {
var x = xmlNode.getAttribute('x');
var y = xmlNode.getAttribute('y');
if (x != null) {
// new offset x
this._textX = parseFloat(x);
}
if (y != null) {
// new offset y
this._textY = parseFloat(y);
}
var dx = xmlNode.getAttribute('dx') || 0;
var dy = xmlNode.getAttribute('dy') || 0;
var g = new Group();
inheritStyle(parentGroup, g);
parseAttributes(xmlNode, g, this._defs);
this._textX += dx;
this._textY += dy;
return g;
},
'path': function (xmlNode, parentGroup) {
// TODO svg fill rule
// https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill-rule
// path.style.globalCompositeOperation = 'xor';
var d = xmlNode.getAttribute('d') || ''; // Performance sensitive.
var path = createFromString(d);
inheritStyle(parentGroup, path);
parseAttributes(xmlNode, path, this._defs);
return path;
}
};
var defineParsers = {
'lineargradient': function (xmlNode) {
var x1 = parseInt(xmlNode.getAttribute('x1') || 0, 10);
var y1 = parseInt(xmlNode.getAttribute('y1') || 0, 10);
var x2 = parseInt(xmlNode.getAttribute('x2') || 10, 10);
var y2 = parseInt(xmlNode.getAttribute('y2') || 0, 10);
var gradient = new LinearGradient(x1, y1, x2, y2);
_parseGradientColorStops(xmlNode, gradient);
return gradient;
},
'radialgradient': function (xmlNode) {}
};
function _parseGradientColorStops(xmlNode, gradient) {
var stop = xmlNode.firstChild;
while (stop) {
if (stop.nodeType === 1) {
var offset = stop.getAttribute('offset');
if (offset.indexOf('%') > 0) {
// percentage
offset = parseInt(offset, 10) / 100;
} else if (offset) {
// number from 0 to 1
offset = parseFloat(offset);
} else {
offset = 0;
}
var stopColor = stop.getAttribute('stop-color') || '#000000';
gradient.addColorStop(offset, stopColor);
}
stop = stop.nextSibling;
}
}
function inheritStyle(parent, child) {
if (parent && parent.__inheritedStyle) {
if (!child.__inheritedStyle) {
child.__inheritedStyle = {};
}
defaults(child.__inheritedStyle, parent.__inheritedStyle);
}
}
function parsePoints(pointsString) {
var list = trim(pointsString).split(DILIMITER_REG);
var points = [];
for (var i = 0; i < list.length; i += 2) {
var x = parseFloat(list[i]);
var y = parseFloat(list[i + 1]);
points.push([x, y]);
}
return points;
}
var attributesMap = {
'fill': 'fill',
'stroke': 'stroke',
'stroke-width': 'lineWidth',
'opacity': 'opacity',
'fill-opacity': 'fillOpacity',
'stroke-opacity': 'strokeOpacity',
'stroke-dasharray': 'lineDash',
'stroke-dashoffset': 'lineDashOffset',
'stroke-linecap': 'lineCap',
'stroke-linejoin': 'lineJoin',
'stroke-miterlimit': 'miterLimit',
'font-family': 'fontFamily',
'font-size': 'fontSize',
'font-style': 'fontStyle',
'font-weight': 'fontWeight',
'text-align': 'textAlign',
'alignment-baseline': 'textBaseline'
};
function parseAttributes(xmlNode, el, defs, onlyInlineStyle) {
var zrStyle = el.__inheritedStyle || {};
var isTextEl = el.type === 'text'; // TODO Shadow
if (xmlNode.nodeType === 1) {
parseTransformAttribute(xmlNode, el);
extend(zrStyle, parseStyleAttribute(xmlNode));
if (!onlyInlineStyle) {
for (var svgAttrName in attributesMap) {
if (attributesMap.hasOwnProperty(svgAttrName)) {
var attrValue = xmlNode.getAttribute(svgAttrName);
if (attrValue != null) {
zrStyle[attributesMap[svgAttrName]] = attrValue;
}
}
}
}
}
var elFillProp = isTextEl ? 'textFill' : 'fill';
var elStrokeProp = isTextEl ? 'textStroke' : 'stroke';
el.style = el.style || new Style();
var elStyle = el.style;
zrStyle.fill != null && elStyle.set(elFillProp, getPaint(zrStyle.fill, defs));
zrStyle.stroke != null && elStyle.set(elStrokeProp, getPaint(zrStyle.stroke, defs));
each(['lineWidth', 'opacity', 'fillOpacity', 'strokeOpacity', 'miterLimit', 'fontSize'], function (propName) {
var elPropName = propName === 'lineWidth' && isTextEl ? 'textStrokeWidth' : propName;
zrStyle[propName] != null && elStyle.set(elPropName, parseFloat(zrStyle[propName]));
});
if (!zrStyle.textBaseline || zrStyle.textBaseline === 'auto') {
zrStyle.textBaseline = 'alphabetic';
}
if (zrStyle.textBaseline === 'alphabetic') {
zrStyle.textBaseline = 'bottom';
}
if (zrStyle.textAlign === 'start') {
zrStyle.textAlign = 'left';
}
if (zrStyle.textAlign === 'end') {
zrStyle.textAlign = 'right';
}
each(['lineDashOffset', 'lineCap', 'lineJoin', 'fontWeight', 'fontFamily', 'fontStyle', 'textAlign', 'textBaseline'], function (propName) {
zrStyle[propName] != null && elStyle.set(propName, zrStyle[propName]);
});
if (zrStyle.lineDash) {
el.style.lineDash = trim(zrStyle.lineDash).split(DILIMITER_REG);
}
if (elStyle[elStrokeProp] && elStyle[elStrokeProp] !== 'none') {
// enable stroke
el[elStrokeProp] = true;
}
el.__inheritedStyle = zrStyle;
}
var urlRegex = /url\(\s*#(.*?)\)/;
function getPaint(str, defs) {
// if (str === 'none') {
// return;
// }
var urlMatch = defs && str && str.match(urlRegex);
if (urlMatch) {
var url = trim(urlMatch[1]);
var def = defs[url];
return def;
}
return str;
}
var transformRegex = /(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;
function parseTransformAttribute(xmlNode, node) {
var transform = xmlNode.getAttribute('transform');
if (transform) {
transform = transform.replace(/,/g, ' ');
var m = null;
var transformOps = [];
transform.replace(transformRegex, function (str, type, value) {
transformOps.push(type, value);
});
for (var i = transformOps.length - 1; i > 0; i -= 2) {
var value = transformOps[i];
var type = transformOps[i - 1];
m = m || matrix.create();
switch (type) {
case 'translate':
value = trim(value).split(DILIMITER_REG);
matrix.translate(m, m, [parseFloat(value[0]), parseFloat(value[1] || 0)]);
break;
case 'scale':
value = trim(value).split(DILIMITER_REG);
matrix.scale(m, m, [parseFloat(value[0]), parseFloat(value[1] || value[0])]);
break;
case 'rotate':
value = trim(value).split(DILIMITER_REG);
matrix.rotate(m, m, parseFloat(value[0]));
break;
case 'skew':
value = trim(value).split(DILIMITER_REG);
console.warn('Skew transform is not supported yet');
break;
case 'matrix':
var value = trim(value).split(DILIMITER_REG);
m[0] = parseFloat(value[0]);
m[1] = parseFloat(value[1]);
m[2] = parseFloat(value[2]);
m[3] = parseFloat(value[3]);
m[4] = parseFloat(value[4]);
m[5] = parseFloat(value[5]);
break;
}
}
node.setLocalTransform(m);
}
} // Value may contain space.
var styleRegex = /([^\s:;]+)\s*:\s*([^:;]+)/g;
function parseStyleAttribute(xmlNode) {
var style = xmlNode.getAttribute('style');
var result = {};
if (!style) {
return result;
}
var styleList = {};
styleRegex.lastIndex = 0;
var styleRegResult;
while ((styleRegResult = styleRegex.exec(style)) != null) {
styleList[styleRegResult[1]] = styleRegResult[2];
}
for (var svgAttrName in attributesMap) {
if (attributesMap.hasOwnProperty(svgAttrName) && styleList[svgAttrName] != null) {
result[attributesMap[svgAttrName]] = styleList[svgAttrName];
}
}
return result;
}
/**
* @param {Array.} viewBoxRect
* @param {number} width
* @param {number} height
* @return {Object} {scale, position}
*/
function makeViewBoxTransform(viewBoxRect, width, height) {
var scaleX = width / viewBoxRect.width;
var scaleY = height / viewBoxRect.height;
var scale = Math.min(scaleX, scaleY); // preserveAspectRatio 'xMidYMid'
var viewBoxScale = [scale, scale];
var viewBoxPosition = [-(viewBoxRect.x + viewBoxRect.width / 2) * scale + width / 2, -(viewBoxRect.y + viewBoxRect.height / 2) * scale + height / 2];
return {
scale: viewBoxScale,
position: viewBoxPosition
};
}
/**
* @param {string|XMLElement} xml
* @param {Object} [opt]
* @param {number} [opt.width] Default width if svg width not specified or is a percent value.
* @param {number} [opt.height] Default height if svg height not specified or is a percent value.
* @param {boolean} [opt.ignoreViewBox]
* @param {boolean} [opt.ignoreRootClip]
* @return {Object} result:
* {
* root: Group, The root of the the result tree of zrender shapes,
* width: number, the viewport width of the SVG,
* height: number, the viewport height of the SVG,
* viewBoxRect: {x, y, width, height}, the declared viewBox rect of the SVG, if exists,
* viewBoxTransform: the {scale, position} calculated by viewBox and viewport, is exists.
* }
*/
function parseSVG(xml, opt) {
var parser = new SVGParser();
return parser.parse(xml, opt);
}
exports.parseXML = parseXML;
exports.makeViewBoxTransform = makeViewBoxTransform;
exports.parseSVG = parseSVG;
/***/ }),
/***/ "jHiU":
/***/ (function(module, exports, __webpack_require__) {
var zrUtil = __webpack_require__("/gxq");
var Gradient = __webpack_require__("wRzc");
/**
* x, y, r are all percent from 0 to 1
* @param {number} [x=0.5]
* @param {number} [y=0.5]
* @param {number} [r=0.5]
* @param {Array.} [colorStops]
* @param {boolean} [globalCoord=false]
*/
var RadialGradient = function (x, y, r, colorStops, globalCoord) {
// Should do nothing more in this constructor. Because gradient can be
// declard by `color: {type: 'radial', colorStops: ...}`, where
// this constructor will not be called.
this.x = x == null ? 0.5 : x;
this.y = y == null ? 0.5 : y;
this.r = r == null ? 0.5 : r; // Can be cloned
this.type = 'radial'; // If use global coord
this.global = globalCoord || false;
Gradient.call(this, colorStops);
};
RadialGradient.prototype = {
constructor: RadialGradient
};
zrUtil.inherits(RadialGradient, Gradient);
var _default = RadialGradient;
module.exports = _default;
/***/ }),
/***/ "jJrn":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = __webpack_require__("/gxq");
var IndicatorAxis = __webpack_require__("JFJR");
var IntervalScale = __webpack_require__("tBuv");
var numberUtil = __webpack_require__("wWR3");
var _axisHelper = __webpack_require__("3yJd");
var getScaleExtent = _axisHelper.getScaleExtent;
var niceScaleExtent = _axisHelper.niceScaleExtent;
var CoordinateSystem = __webpack_require__("rctg");
var LogScale = __webpack_require__("xCbH");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// TODO clockwise
function Radar(radarModel, ecModel, api) {
this._model = radarModel;
/**
* Radar dimensions
* @type {Array.}
*/
this.dimensions = [];
this._indicatorAxes = zrUtil.map(radarModel.getIndicatorModels(), function (indicatorModel, idx) {
var dim = 'indicator_' + idx;
var indicatorAxis = new IndicatorAxis(dim, indicatorModel.get('axisType') === 'log' ? new LogScale() : new IntervalScale());
indicatorAxis.name = indicatorModel.get('name'); // Inject model and axis
indicatorAxis.model = indicatorModel;
indicatorModel.axis = indicatorAxis;
this.dimensions.push(dim);
return indicatorAxis;
}, this);
this.resize(radarModel, api);
/**
* @type {number}
* @readOnly
*/
this.cx;
/**
* @type {number}
* @readOnly
*/
this.cy;
/**
* @type {number}
* @readOnly
*/
this.r;
/**
* @type {number}
* @readOnly
*/
this.r0;
/**
* @type {number}
* @readOnly
*/
this.startAngle;
}
Radar.prototype.getIndicatorAxes = function () {
return this._indicatorAxes;
};
Radar.prototype.dataToPoint = function (value, indicatorIndex) {
var indicatorAxis = this._indicatorAxes[indicatorIndex];
return this.coordToPoint(indicatorAxis.dataToCoord(value), indicatorIndex);
};
Radar.prototype.coordToPoint = function (coord, indicatorIndex) {
var indicatorAxis = this._indicatorAxes[indicatorIndex];
var angle = indicatorAxis.angle;
var x = this.cx + coord * Math.cos(angle);
var y = this.cy - coord * Math.sin(angle);
return [x, y];
};
Radar.prototype.pointToData = function (pt) {
var dx = pt[0] - this.cx;
var dy = pt[1] - this.cy;
var radius = Math.sqrt(dx * dx + dy * dy);
dx /= radius;
dy /= radius;
var radian = Math.atan2(-dy, dx); // Find the closest angle
// FIXME index can calculated directly
var minRadianDiff = Infinity;
var closestAxis;
var closestAxisIdx = -1;
for (var i = 0; i < this._indicatorAxes.length; i++) {
var indicatorAxis = this._indicatorAxes[i];
var diff = Math.abs(radian - indicatorAxis.angle);
if (diff < minRadianDiff) {
closestAxis = indicatorAxis;
closestAxisIdx = i;
minRadianDiff = diff;
}
}
return [closestAxisIdx, +(closestAxis && closestAxis.coordToData(radius))];
};
Radar.prototype.resize = function (radarModel, api) {
var center = radarModel.get('center');
var viewWidth = api.getWidth();
var viewHeight = api.getHeight();
var viewSize = Math.min(viewWidth, viewHeight) / 2;
this.cx = numberUtil.parsePercent(center[0], viewWidth);
this.cy = numberUtil.parsePercent(center[1], viewHeight);
this.startAngle = radarModel.get('startAngle') * Math.PI / 180; // radius may be single value like `20`, `'80%'`, or array like `[10, '80%']`
var radius = radarModel.get('radius');
if (typeof radius === 'string' || typeof radius === 'number') {
radius = [0, radius];
}
this.r0 = numberUtil.parsePercent(radius[0], viewSize);
this.r = numberUtil.parsePercent(radius[1], viewSize);
zrUtil.each(this._indicatorAxes, function (indicatorAxis, idx) {
indicatorAxis.setExtent(this.r0, this.r);
var angle = this.startAngle + idx * Math.PI * 2 / this._indicatorAxes.length; // Normalize to [-PI, PI]
angle = Math.atan2(Math.sin(angle), Math.cos(angle));
indicatorAxis.angle = angle;
}, this);
};
Radar.prototype.update = function (ecModel, api) {
var indicatorAxes = this._indicatorAxes;
var radarModel = this._model;
zrUtil.each(indicatorAxes, function (indicatorAxis) {
indicatorAxis.scale.setExtent(Infinity, -Infinity);
});
ecModel.eachSeriesByType('radar', function (radarSeries, idx) {
if (radarSeries.get('coordinateSystem') !== 'radar' || ecModel.getComponent('radar', radarSeries.get('radarIndex')) !== radarModel) {
return;
}
var data = radarSeries.getData();
zrUtil.each(indicatorAxes, function (indicatorAxis) {
indicatorAxis.scale.unionExtentFromData(data, data.mapDimension(indicatorAxis.dim));
});
}, this);
var splitNumber = radarModel.get('splitNumber');
function increaseInterval(interval) {
var exp10 = Math.pow(10, Math.floor(Math.log(interval) / Math.LN10)); // Increase interval
var f = interval / exp10;
if (f === 2) {
f = 5;
} else {
// f is 2 or 5
f *= 2;
}
return f * exp10;
} // Force all the axis fixing the maxSplitNumber.
zrUtil.each(indicatorAxes, function (indicatorAxis, idx) {
var rawExtent = getScaleExtent(indicatorAxis.scale, indicatorAxis.model).extent;
niceScaleExtent(indicatorAxis.scale, indicatorAxis.model);
var axisModel = indicatorAxis.model;
var scale = indicatorAxis.scale;
var fixedMin = axisModel.getMin();
var fixedMax = axisModel.getMax();
var interval = scale.getInterval();
if (fixedMin != null && fixedMax != null) {
// User set min, max, divide to get new interval
scale.setExtent(+fixedMin, +fixedMax);
scale.setInterval((fixedMax - fixedMin) / splitNumber);
} else if (fixedMin != null) {
var max; // User set min, expand extent on the other side
do {
max = fixedMin + interval * splitNumber;
scale.setExtent(+fixedMin, max); // Interval must been set after extent
// FIXME
scale.setInterval(interval);
interval = increaseInterval(interval);
} while (max < rawExtent[1] && isFinite(max) && isFinite(rawExtent[1]));
} else if (fixedMax != null) {
var min; // User set min, expand extent on the other side
do {
min = fixedMax - interval * splitNumber;
scale.setExtent(min, +fixedMax);
scale.setInterval(interval);
interval = increaseInterval(interval);
} while (min > rawExtent[0] && isFinite(min) && isFinite(rawExtent[0]));
} else {
var nicedSplitNumber = scale.getTicks().length - 1;
if (nicedSplitNumber > splitNumber) {
interval = increaseInterval(interval);
} // TODO
var max = Math.ceil(rawExtent[1] / interval) * interval;
var min = numberUtil.round(max - interval * splitNumber);
scale.setExtent(min, max);
scale.setInterval(interval);
}
});
};
/**
* Radar dimensions is based on the data
* @type {Array}
*/
Radar.dimensions = [];
Radar.create = function (ecModel, api) {
var radarList = [];
ecModel.eachComponent('radar', function (radarModel) {
var radar = new Radar(radarModel, ecModel, api);
radarList.push(radar);
radarModel.coordinateSystem = radar;
});
ecModel.eachSeriesByType('radar', function (radarSeries) {
if (radarSeries.get('coordinateSystem') === 'radar') {
// Inject coordinate system
radarSeries.coordinateSystem = radarList[radarSeries.get('radarIndex') || 0];
}
});
return radarList;
};
CoordinateSystem.register('radar', Radar);
var _default = Radar;
module.exports = _default;
/***/ }),
/***/ "jLnL":
/***/ (function(module, exports, __webpack_require__) {
__webpack_require__("4w1v");
var _zrender = __webpack_require__("hv2j");
var registerPainter = _zrender.registerPainter;
var Painter = __webpack_require__("Q5xN");
registerPainter('svg', Painter);
/***/ }),
/***/ "jMTz":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var _config = __webpack_require__("4Nz2");
var __DEV__ = _config.__DEV__;
var createListFromArray = __webpack_require__("ao1T");
var SeriesModel = __webpack_require__("EJsE");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var _default = SeriesModel.extend({
type: 'series.line',
dependencies: ['grid', 'polar'],
getInitialData: function (option, ecModel) {
return createListFromArray(this.getSource(), this, {
useEncodeDefaulter: true
});
},
defaultOption: {
zlevel: 0,
z: 2,
coordinateSystem: 'cartesian2d',
legendHoverLink: true,
hoverAnimation: true,
// stack: null
// xAxisIndex: 0,
// yAxisIndex: 0,
// polarIndex: 0,
// If clip the overflow value
clip: true,
// cursor: null,
label: {
position: 'top'
},
// itemStyle: {
// },
lineStyle: {
width: 2,
type: 'solid'
},
// areaStyle: {
// origin of areaStyle. Valid values:
// `'auto'/null/undefined`: from axisLine to data
// `'start'`: from min to data
// `'end'`: from data to max
// origin: 'auto'
// },
// false, 'start', 'end', 'middle'
step: false,
// Disabled if step is true
smooth: false,
smoothMonotone: null,
symbol: 'emptyCircle',
symbolSize: 4,
symbolRotate: null,
showSymbol: true,
// `false`: follow the label interval strategy.
// `true`: show all symbols.
// `'auto'`: If possible, show all symbols, otherwise
// follow the label interval strategy.
showAllSymbol: 'auto',
// Whether to connect break point.
connectNulls: false,
// Sampling for large data. Can be: 'average', 'max', 'min', 'sum'.
sampling: 'none',
animationEasing: 'linear',
// Disable progressive
progressive: 0,
hoverLayerThreshold: Infinity
}
});
module.exports = _default;
/***/ }),
/***/ "jOgh":
/***/ (function(module, exports, __webpack_require__) {
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// NOTE: These type checking functions intentionally don't use `instanceof`
// because it is fragile and can be easily faked with `Object.create()`.
function isArray(arg) {
if (Array.isArray) {
return Array.isArray(arg);
}
return objectToString(arg) === '[object Array]';
}
exports.isArray = isArray;
function isBoolean(arg) {
return typeof arg === 'boolean';
}
exports.isBoolean = isBoolean;
function isNull(arg) {
return arg === null;
}
exports.isNull = isNull;
function isNullOrUndefined(arg) {
return arg == null;
}
exports.isNullOrUndefined = isNullOrUndefined;
function isNumber(arg) {
return typeof arg === 'number';
}
exports.isNumber = isNumber;
function isString(arg) {
return typeof arg === 'string';
}
exports.isString = isString;
function isSymbol(arg) {
return typeof arg === 'symbol';
}
exports.isSymbol = isSymbol;
function isUndefined(arg) {
return arg === void 0;
}
exports.isUndefined = isUndefined;
function isRegExp(re) {
return objectToString(re) === '[object RegExp]';
}
exports.isRegExp = isRegExp;
function isObject(arg) {
return typeof arg === 'object' && arg !== null;
}
exports.isObject = isObject;
function isDate(d) {
return objectToString(d) === '[object Date]';
}
exports.isDate = isDate;
function isError(e) {
return (objectToString(e) === '[object Error]' || e instanceof Error);
}
exports.isError = isError;
function isFunction(arg) {
return typeof arg === 'function';
}
exports.isFunction = isFunction;
function isPrimitive(arg) {
return arg === null ||
typeof arg === 'boolean' ||
typeof arg === 'number' ||
typeof arg === 'string' ||
typeof arg === 'symbol' || // ES6 symbol
typeof arg === 'undefined';
}
exports.isPrimitive = isPrimitive;
exports.isBuffer = __webpack_require__("EuP9").Buffer.isBuffer;
function objectToString(o) {
return Object.prototype.toString.call(o);
}
/***/ }),
/***/ "jSRM":
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(Buffer) {var BN = __webpack_require__("7NRE")
var randomBytes = __webpack_require__("rOku")
function blind (priv) {
var r = getr(priv)
var blinder = r.toRed(BN.mont(priv.modulus)).redPow(new BN(priv.publicExponent)).fromRed()
return { blinder: blinder, unblinder: r.invm(priv.modulus) }
}
function getr (priv) {
var len = priv.modulus.byteLength()
var r
do {
r = new BN(randomBytes(len))
} while (r.cmp(priv.modulus) >= 0 || !r.umod(priv.prime1) || !r.umod(priv.prime2))
return r
}
function crt (msg, priv) {
var blinds = blind(priv)
var len = priv.modulus.byteLength()
var blinded = new BN(msg).mul(blinds.blinder).umod(priv.modulus)
var c1 = blinded.toRed(BN.mont(priv.prime1))
var c2 = blinded.toRed(BN.mont(priv.prime2))
var qinv = priv.coefficient
var p = priv.prime1
var q = priv.prime2
var m1 = c1.redPow(priv.exponent1).fromRed()
var m2 = c2.redPow(priv.exponent2).fromRed()
var h = m1.isub(m2).imul(qinv).umod(p).imul(q)
return m2.iadd(h).imul(blinds.unblinder).umod(priv.modulus).toArrayLike(Buffer, 'be', len)
}
crt.getr = getr
module.exports = crt
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("EuP9").Buffer))
/***/ }),
/***/ "jTu2":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__util__ = __webpack_require__("eCjd");
/**
* Rule for validating whitespace.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function whitespace(rule, value, source, errors, options) {
if (/^\s+$/.test(value) || value === '') {
errors.push(__WEBPACK_IMPORTED_MODULE_0__util__["d" /* format */](options.messages.whitespace, rule.fullField));
}
}
/* harmony default export */ __webpack_exports__["a"] = (whitespace);
/***/ }),
/***/ "jhxf":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("UKM+");
var document = __webpack_require__("OzIq").document;
// typeof document.createElement is 'object' in old IE
var is = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return is ? document.createElement(it) : {};
};
/***/ }),
/***/ "jkjm":
/***/ (function(module, exports, __webpack_require__) {
var asn1 = __webpack_require__("19bf")
var aesid = __webpack_require__("8YCc")
var fixProc = __webpack_require__("7VT+")
var ciphers = __webpack_require__("tXf9")
var compat = __webpack_require__("/vd3")
var Buffer = __webpack_require__("X3l8").Buffer
module.exports = parseKeys
function parseKeys (buffer) {
var password
if (typeof buffer === 'object' && !Buffer.isBuffer(buffer)) {
password = buffer.passphrase
buffer = buffer.key
}
if (typeof buffer === 'string') {
buffer = Buffer.from(buffer)
}
var stripped = fixProc(buffer, password)
var type = stripped.tag
var data = stripped.data
var subtype, ndata
switch (type) {
case 'CERTIFICATE':
ndata = asn1.certificate.decode(data, 'der').tbsCertificate.subjectPublicKeyInfo
// falls through
case 'PUBLIC KEY':
if (!ndata) {
ndata = asn1.PublicKey.decode(data, 'der')
}
subtype = ndata.algorithm.algorithm.join('.')
switch (subtype) {
case '1.2.840.113549.1.1.1':
return asn1.RSAPublicKey.decode(ndata.subjectPublicKey.data, 'der')
case '1.2.840.10045.2.1':
ndata.subjectPrivateKey = ndata.subjectPublicKey
return {
type: 'ec',
data: ndata
}
case '1.2.840.10040.4.1':
ndata.algorithm.params.pub_key = asn1.DSAparam.decode(ndata.subjectPublicKey.data, 'der')
return {
type: 'dsa',
data: ndata.algorithm.params
}
default: throw new Error('unknown key id ' + subtype)
}
// throw new Error('unknown key type ' + type)
case 'ENCRYPTED PRIVATE KEY':
data = asn1.EncryptedPrivateKey.decode(data, 'der')
data = decrypt(data, password)
// falls through
case 'PRIVATE KEY':
ndata = asn1.PrivateKey.decode(data, 'der')
subtype = ndata.algorithm.algorithm.join('.')
switch (subtype) {
case '1.2.840.113549.1.1.1':
return asn1.RSAPrivateKey.decode(ndata.subjectPrivateKey, 'der')
case '1.2.840.10045.2.1':
return {
curve: ndata.algorithm.curve,
privateKey: asn1.ECPrivateKey.decode(ndata.subjectPrivateKey, 'der').privateKey
}
case '1.2.840.10040.4.1':
ndata.algorithm.params.priv_key = asn1.DSAparam.decode(ndata.subjectPrivateKey, 'der')
return {
type: 'dsa',
params: ndata.algorithm.params
}
default: throw new Error('unknown key id ' + subtype)
}
// throw new Error('unknown key type ' + type)
case 'RSA PUBLIC KEY':
return asn1.RSAPublicKey.decode(data, 'der')
case 'RSA PRIVATE KEY':
return asn1.RSAPrivateKey.decode(data, 'der')
case 'DSA PRIVATE KEY':
return {
type: 'dsa',
params: asn1.DSAPrivateKey.decode(data, 'der')
}
case 'EC PRIVATE KEY':
data = asn1.ECPrivateKey.decode(data, 'der')
return {
curve: data.parameters.value,
privateKey: data.privateKey
}
default: throw new Error('unknown key type ' + type)
}
}
parseKeys.signature = asn1.signature
function decrypt (data, password) {
var salt = data.algorithm.decrypt.kde.kdeparams.salt
var iters = parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)
var algo = aesid[data.algorithm.decrypt.cipher.algo.join('.')]
var iv = data.algorithm.decrypt.cipher.iv
var cipherText = data.subjectPrivateKey
var keylen = parseInt(algo.split('-')[1], 10) / 8
var key = compat.pbkdf2Sync(password, salt, iters, keylen, 'sha1')
var cipher = ciphers.createDecipheriv(algo, key, iv)
var out = []
out.push(cipher.update(cipherText))
out.push(cipher.final())
return Buffer.concat(out)
}
/***/ }),
/***/ "jmaC":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.__esModule = true;
exports.default = function (target) {
for (var i = 1, j = arguments.length; i < j; i++) {
var source = arguments[i] || {};
for (var prop in source) {
if (source.hasOwnProperty(prop)) {
var value = source[prop];
if (value !== undefined) {
target[prop] = value;
}
}
}
}
return target;
};
;
/***/ }),
/***/ "jpt2":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var MapDraw = __webpack_require__("LBXi");
var echarts = __webpack_require__("Icdr");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var _default = echarts.extendComponentView({
type: 'geo',
init: function (ecModel, api) {
var mapDraw = new MapDraw(api, true);
this._mapDraw = mapDraw;
this.group.add(mapDraw.group);
},
render: function (geoModel, ecModel, api, payload) {
// Not render if it is an toggleSelect action from self
if (payload && payload.type === 'geoToggleSelect' && payload.from === this.uid) {
return;
}
var mapDraw = this._mapDraw;
if (geoModel.get('show')) {
mapDraw.draw(geoModel, ecModel, api, this, payload);
} else {
this._mapDraw.group.removeAll();
}
this.group.silent = geoModel.get('silent');
},
dispose: function () {
this._mapDraw && this._mapDraw.remove();
}
});
module.exports = _default;
/***/ }),
/***/ "jrHM":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.3.19 Object.setPrototypeOf(O, proto)
var $export = __webpack_require__("Ds5P");
$export($export.S, 'Object', { setPrototypeOf: __webpack_require__("gvDt").set });
/***/ }),
/***/ "jwfv":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__ = __webpack_require__("Dd8w");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof__ = __webpack_require__("pFYg");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__util__ = __webpack_require__("eCjd");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__validator___ = __webpack_require__("7c3y");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__messages__ = __webpack_require__("9xJI");
/**
* Encapsulates a validation schema.
*
* @param descriptor An object declaring validation rules
* for this schema.
*/
function Schema(descriptor) {
this.rules = null;
this._messages = __WEBPACK_IMPORTED_MODULE_4__messages__["a" /* messages */];
this.define(descriptor);
}
Schema.prototype = {
messages: function messages(_messages) {
if (_messages) {
this._messages = Object(__WEBPACK_IMPORTED_MODULE_2__util__["c" /* deepMerge */])(Object(__WEBPACK_IMPORTED_MODULE_4__messages__["b" /* newMessages */])(), _messages);
}
return this._messages;
},
define: function define(rules) {
if (!rules) {
throw new Error('Cannot configure a schema with no rules');
}
if ((typeof rules === 'undefined' ? 'undefined' : __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof___default()(rules)) !== 'object' || Array.isArray(rules)) {
throw new Error('Rules must be an object');
}
this.rules = {};
var z = void 0;
var item = void 0;
for (z in rules) {
if (rules.hasOwnProperty(z)) {
item = rules[z];
this.rules[z] = Array.isArray(item) ? item : [item];
}
}
},
validate: function validate(source_) {
var _this = this;
var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var oc = arguments[2];
var source = source_;
var options = o;
var callback = oc;
if (typeof options === 'function') {
callback = options;
options = {};
}
if (!this.rules || Object.keys(this.rules).length === 0) {
if (callback) {
callback();
}
return;
}
function complete(results) {
var i = void 0;
var field = void 0;
var errors = [];
var fields = {};
function add(e) {
if (Array.isArray(e)) {
errors = errors.concat.apply(errors, e);
} else {
errors.push(e);
}
}
for (i = 0; i < results.length; i++) {
add(results[i]);
}
if (!errors.length) {
errors = null;
fields = null;
} else {
for (i = 0; i < errors.length; i++) {
field = errors[i].field;
fields[field] = fields[field] || [];
fields[field].push(errors[i]);
}
}
callback(errors, fields);
}
if (options.messages) {
var messages = this.messages();
if (messages === __WEBPACK_IMPORTED_MODULE_4__messages__["a" /* messages */]) {
messages = Object(__WEBPACK_IMPORTED_MODULE_4__messages__["b" /* newMessages */])();
}
Object(__WEBPACK_IMPORTED_MODULE_2__util__["c" /* deepMerge */])(messages, options.messages);
options.messages = messages;
} else {
options.messages = this.messages();
}
var arr = void 0;
var value = void 0;
var series = {};
var keys = options.keys || Object.keys(this.rules);
keys.forEach(function (z) {
arr = _this.rules[z];
value = source[z];
arr.forEach(function (r) {
var rule = r;
if (typeof rule.transform === 'function') {
if (source === source_) {
source = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, source);
}
value = source[z] = rule.transform(value);
}
if (typeof rule === 'function') {
rule = {
validator: rule
};
} else {
rule = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, rule);
}
rule.validator = _this.getValidationMethod(rule);
rule.field = z;
rule.fullField = rule.fullField || z;
rule.type = _this.getType(rule);
if (!rule.validator) {
return;
}
series[z] = series[z] || [];
series[z].push({
rule: rule,
value: value,
source: source,
field: z
});
});
});
var errorFields = {};
Object(__WEBPACK_IMPORTED_MODULE_2__util__["a" /* asyncMap */])(series, options, function (data, doIt) {
var rule = data.rule;
var deep = (rule.type === 'object' || rule.type === 'array') && (__WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof___default()(rule.fields) === 'object' || __WEBPACK_IMPORTED_MODULE_1_babel_runtime_helpers_typeof___default()(rule.defaultField) === 'object');
deep = deep && (rule.required || !rule.required && data.value);
rule.field = data.field;
function addFullfield(key, schema) {
return __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, schema, {
fullField: rule.fullField + '.' + key
});
}
function cb() {
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var errors = e;
if (!Array.isArray(errors)) {
errors = [errors];
}
if (errors.length) {
Object(__WEBPACK_IMPORTED_MODULE_2__util__["f" /* warning */])('async-validator:', errors);
}
if (errors.length && rule.message) {
errors = [].concat(rule.message);
}
errors = errors.map(Object(__WEBPACK_IMPORTED_MODULE_2__util__["b" /* complementError */])(rule));
if (options.first && errors.length) {
errorFields[rule.field] = 1;
return doIt(errors);
}
if (!deep) {
doIt(errors);
} else {
// if rule is required but the target object
// does not exist fail at the rule level and don't
// go deeper
if (rule.required && !data.value) {
if (rule.message) {
errors = [].concat(rule.message).map(Object(__WEBPACK_IMPORTED_MODULE_2__util__["b" /* complementError */])(rule));
} else if (options.error) {
errors = [options.error(rule, Object(__WEBPACK_IMPORTED_MODULE_2__util__["d" /* format */])(options.messages.required, rule.field))];
} else {
errors = [];
}
return doIt(errors);
}
var fieldsSchema = {};
if (rule.defaultField) {
for (var k in data.value) {
if (data.value.hasOwnProperty(k)) {
fieldsSchema[k] = rule.defaultField;
}
}
}
fieldsSchema = __WEBPACK_IMPORTED_MODULE_0_babel_runtime_helpers_extends___default()({}, fieldsSchema, data.rule.fields);
for (var f in fieldsSchema) {
if (fieldsSchema.hasOwnProperty(f)) {
var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
}
}
var schema = new Schema(fieldsSchema);
schema.messages(options.messages);
if (data.rule.options) {
data.rule.options.messages = options.messages;
data.rule.options.error = options.error;
}
schema.validate(data.value, data.rule.options || options, function (errs) {
doIt(errs && errs.length ? errors.concat(errs) : errs);
});
}
}
var res = rule.validator(rule, data.value, cb, data.source, options);
if (res && res.then) {
res.then(function () {
return cb();
}, function (e) {
return cb(e);
});
}
}, function (results) {
complete(results);
});
},
getType: function getType(rule) {
if (rule.type === undefined && rule.pattern instanceof RegExp) {
rule.type = 'pattern';
}
if (typeof rule.validator !== 'function' && rule.type && !__WEBPACK_IMPORTED_MODULE_3__validator___["a" /* default */].hasOwnProperty(rule.type)) {
throw new Error(Object(__WEBPACK_IMPORTED_MODULE_2__util__["d" /* format */])('Unknown rule type %s', rule.type));
}
return rule.type || 'string';
},
getValidationMethod: function getValidationMethod(rule) {
if (typeof rule.validator === 'function') {
return rule.validator;
}
var keys = Object.keys(rule);
var messageIndex = keys.indexOf('message');
if (messageIndex !== -1) {
keys.splice(messageIndex, 1);
}
if (keys.length === 1 && keys[0] === 'required') {
return __WEBPACK_IMPORTED_MODULE_3__validator___["a" /* default */].required;
}
return __WEBPACK_IMPORTED_MODULE_3__validator___["a" /* default */][this.getType(rule)] || false;
}
};
Schema.register = function register(type, validator) {
if (typeof validator !== 'function') {
throw new Error('Cannot register a validator by type, validator is not a function');
}
__WEBPACK_IMPORTED_MODULE_3__validator___["a" /* default */][type] = validator;
};
Schema.messages = __WEBPACK_IMPORTED_MODULE_4__messages__["a" /* messages */];
/* harmony default export */ __webpack_exports__["default"] = (Schema);
/***/ }),
/***/ "jxEH":
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
true ? factory(__webpack_require__("PJh5")) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var units = {
'ss': 'sekundes_sekundēm_sekunde_sekundes'.split('_'),
'm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
'mm': 'minūtes_minūtēm_minūte_minūtes'.split('_'),
'h': 'stundas_stundām_stunda_stundas'.split('_'),
'hh': 'stundas_stundām_stunda_stundas'.split('_'),
'd': 'dienas_dienām_diena_dienas'.split('_'),
'dd': 'dienas_dienām_diena_dienas'.split('_'),
'M': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
'MM': 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'),
'y': 'gada_gadiem_gads_gadi'.split('_'),
'yy': 'gada_gadiem_gads_gadi'.split('_')
};
/**
* @param withoutSuffix boolean true = a length of time; false = before/after a period of time.
*/
function format(forms, number, withoutSuffix) {
if (withoutSuffix) {
// E.g. "21 minūte", "3 minūtes".
return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3];
} else {
// E.g. "21 minūtes" as in "pēc 21 minūtes".
// E.g. "3 minūtēm" as in "pēc 3 minūtēm".
return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1];
}
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
function relativeTimeWithSingular(number, withoutSuffix, key) {
return format(units[key], number, withoutSuffix);
}
function relativeSeconds(number, withoutSuffix) {
return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm';
}
var lv = moment.defineLocale('lv', {
months : 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split('_'),
monthsShort : 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'),
weekdays : 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split('_'),
weekdaysShort : 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysMin : 'Sv_P_O_T_C_Pk_S'.split('_'),
weekdaysParseExact : true,
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY.',
LL : 'YYYY. [gada] D. MMMM',
LLL : 'YYYY. [gada] D. MMMM, HH:mm',
LLLL : 'YYYY. [gada] D. MMMM, dddd, HH:mm'
},
calendar : {
sameDay : '[Šodien pulksten] LT',
nextDay : '[Rīt pulksten] LT',
nextWeek : 'dddd [pulksten] LT',
lastDay : '[Vakar pulksten] LT',
lastWeek : '[Pagājušā] dddd [pulksten] LT',
sameElse : 'L'
},
relativeTime : {
future : 'pēc %s',
past : 'pirms %s',
s : relativeSeconds,
ss : relativeTimeWithPlural,
m : relativeTimeWithSingular,
mm : relativeTimeWithPlural,
h : relativeTimeWithSingular,
hh : relativeTimeWithPlural,
d : relativeTimeWithSingular,
dd : relativeTimeWithPlural,
M : relativeTimeWithSingular,
MM : relativeTimeWithPlural,
y : relativeTimeWithSingular,
yy : relativeTimeWithPlural
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return lv;
})));
/***/ }),
/***/ "k+5o":
/***/ (function(module, exports, __webpack_require__) {
;(function (global, factory) {
true ? factory(__webpack_require__("PJh5")) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var suffixes = {
1: '\'inci',
5: '\'inci',
8: '\'inci',
70: '\'inci',
80: '\'inci',
2: '\'nci',
7: '\'nci',
20: '\'nci',
50: '\'nci',
3: '\'üncü',
4: '\'üncü',
100: '\'üncü',
6: '\'ncı',
9: '\'uncu',
10: '\'uncu',
30: '\'uncu',
60: '\'ıncı',
90: '\'ıncı'
};
var tr = moment.defineLocale('tr', {
months : 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split('_'),
monthsShort : 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'),
weekdays : 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split('_'),
weekdaysShort : 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'),
weekdaysMin : 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay : '[bugün saat] LT',
nextDay : '[yarın saat] LT',
nextWeek : '[gelecek] dddd [saat] LT',
lastDay : '[dün] LT',
lastWeek : '[geçen] dddd [saat] LT',
sameElse : 'L'
},
relativeTime : {
future : '%s sonra',
past : '%s önce',
s : 'birkaç saniye',
ss : '%d saniye',
m : 'bir dakika',
mm : '%d dakika',
h : 'bir saat',
hh : '%d saat',
d : 'bir gün',
dd : '%d gün',
M : 'bir ay',
MM : '%d ay',
y : 'bir yıl',
yy : '%d yıl'
},
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'Do':
case 'DD':
return number;
default:
if (number === 0) { // special case for zero
return number + '\'ıncı';
}
var a = number % 10,
b = number % 100 - a,
c = number >= 100 ? 100 : null;
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
return tr;
})));
/***/ }),
/***/ "k2Sm":
/***/ (function(module, exports, __webpack_require__) {
var Buffer = __webpack_require__("X3l8").Buffer
function encryptByte (self, byteParam, decrypt) {
var pad
var i = -1
var len = 8
var out = 0
var bit, value
while (++i < len) {
pad = self._cipher.encryptBlock(self._prev)
bit = (byteParam & (1 << (7 - i))) ? 0x80 : 0
value = pad[0] ^ bit
out += ((value & 0x80) >> (i % 8))
self._prev = shiftIn(self._prev, decrypt ? bit : value)
}
return out
}
function shiftIn (buffer, value) {
var len = buffer.length
var i = -1
var out = Buffer.allocUnsafe(buffer.length)
buffer = Buffer.concat([buffer, Buffer.from([value])])
while (++i < len) {
out[i] = buffer[i] << 1 | buffer[i + 1] >> (7)
}
return out
}
exports.encrypt = function (self, chunk, decrypt) {
var len = chunk.length
var out = Buffer.allocUnsafe(len)
var i = -1
while (++i < len) {
out[i] = encryptByte(self, chunk[i], decrypt)
}
return out
}
/***/ }),
/***/ "k7nC":
/***/ (function(module, exports) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Fix for 钓鱼岛
// var Region = require('../Region');
// var zrUtil = require('zrender/src/core/util');
// var geoCoord = [126, 25];
var points = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]];
function _default(mapType, region) {
if (mapType === 'china' && region.name === '台湾') {
region.geometries.push({
type: 'polygon',
exterior: points[0]
});
}
}
module.exports = _default;
/***/ }),
/***/ "k9Bd":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var echarts = __webpack_require__("Icdr");
__webpack_require__("P7Q7");
__webpack_require__("Y3kp");
var visualSymbol = __webpack_require__("AjK0");
var layoutPoints = __webpack_require__("1Nix");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
echarts.registerVisual(visualSymbol('effectScatter', 'circle'));
echarts.registerLayout(layoutPoints('effectScatter'));
/***/ }),
/***/ "kBOG":
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.9 Math.cbrt(x)
var $export = __webpack_require__("Ds5P");
var sign = __webpack_require__("cwmK");
$export($export.S, 'Math', {
cbrt: function cbrt(x) {
return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3);
}
});
/***/ }),
/***/ "kJAH":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
const encoders = __webpack_require__("SAez");
const decoders = __webpack_require__("iLJX");
const inherits = __webpack_require__("LC74");
const api = exports;
api.define = function define(name, body) {
return new Entity(name, body);
};
function Entity(name, body) {
this.name = name;
this.body = body;
this.decoders = {};
this.encoders = {};
}
Entity.prototype._createNamed = function createNamed(Base) {
const name = this.name;
function Generated(entity) {
this._initNamed(entity, name);
}
inherits(Generated, Base);
Generated.prototype._initNamed = function _initNamed(entity, name) {
Base.call(this, entity, name);
};
return new Generated(this);
};
Entity.prototype._getDecoder = function _getDecoder(enc) {
enc = enc || 'der';
// Lazily create decoder
if (!this.decoders.hasOwnProperty(enc))
this.decoders[enc] = this._createNamed(decoders[enc]);
return this.decoders[enc];
};
Entity.prototype.decode = function decode(data, enc, options) {
return this._getDecoder(enc).decode(data, options);
};
Entity.prototype._getEncoder = function _getEncoder(enc) {
enc = enc || 'der';
// Lazily create encoder
if (!this.encoders.hasOwnProperty(enc))
this.encoders[enc] = this._createNamed(encoders[enc]);
return this.encoders[enc];
};
Entity.prototype.encode = function encode(data, enc, /* internal */ reporter) {
return this._getEncoder(enc).encode(data, reporter);
};
/***/ }),
/***/ "kK7q":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = __webpack_require__("/gxq");
var graphic = __webpack_require__("0sHC");
var BoundingRect = __webpack_require__("8b51");
var _text = __webpack_require__("3h1/");
var calculateTextPosition = _text.calculateTextPosition;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Symbol factory
/**
* Triangle shape
* @inner
*/
var Triangle = graphic.extendShape({
type: 'triangle',
shape: {
cx: 0,
cy: 0,
width: 0,
height: 0
},
buildPath: function (path, shape) {
var cx = shape.cx;
var cy = shape.cy;
var width = shape.width / 2;
var height = shape.height / 2;
path.moveTo(cx, cy - height);
path.lineTo(cx + width, cy + height);
path.lineTo(cx - width, cy + height);
path.closePath();
}
});
/**
* Diamond shape
* @inner
*/
var Diamond = graphic.extendShape({
type: 'diamond',
shape: {
cx: 0,
cy: 0,
width: 0,
height: 0
},
buildPath: function (path, shape) {
var cx = shape.cx;
var cy = shape.cy;
var width = shape.width / 2;
var height = shape.height / 2;
path.moveTo(cx, cy - height);
path.lineTo(cx + width, cy);
path.lineTo(cx, cy + height);
path.lineTo(cx - width, cy);
path.closePath();
}
});
/**
* Pin shape
* @inner
*/
var Pin = graphic.extendShape({
type: 'pin',
shape: {
// x, y on the cusp
x: 0,
y: 0,
width: 0,
height: 0
},
buildPath: function (path, shape) {
var x = shape.x;
var y = shape.y;
var w = shape.width / 5 * 3; // Height must be larger than width
var h = Math.max(w, shape.height);
var r = w / 2; // Dist on y with tangent point and circle center
var dy = r * r / (h - r);
var cy = y - h + r + dy;
var angle = Math.asin(dy / r); // Dist on x with tangent point and circle center
var dx = Math.cos(angle) * r;
var tanX = Math.sin(angle);
var tanY = Math.cos(angle);
var cpLen = r * 0.6;
var cpLen2 = r * 0.7;
path.moveTo(x - dx, cy + dy);
path.arc(x, cy, r, Math.PI - angle, Math.PI * 2 + angle);
path.bezierCurveTo(x + dx - tanX * cpLen, cy + dy + tanY * cpLen, x, y - cpLen2, x, y);
path.bezierCurveTo(x, y - cpLen2, x - dx + tanX * cpLen, cy + dy + tanY * cpLen, x - dx, cy + dy);
path.closePath();
}
});
/**
* Arrow shape
* @inner
*/
var Arrow = graphic.extendShape({
type: 'arrow',
shape: {
x: 0,
y: 0,
width: 0,
height: 0
},
buildPath: function (ctx, shape) {
var height = shape.height;
var width = shape.width;
var x = shape.x;
var y = shape.y;
var dx = width / 3 * 2;
ctx.moveTo(x, y);
ctx.lineTo(x + dx, y + height);
ctx.lineTo(x, y + height / 4 * 3);
ctx.lineTo(x - dx, y + height);
ctx.lineTo(x, y);
ctx.closePath();
}
});
/**
* Map of path contructors
* @type {Object.}
*/
var symbolCtors = {
line: graphic.Line,
rect: graphic.Rect,
roundRect: graphic.Rect,
square: graphic.Rect,
circle: graphic.Circle,
diamond: Diamond,
pin: Pin,
arrow: Arrow,
triangle: Triangle
};
var symbolShapeMakers = {
line: function (x, y, w, h, shape) {
// FIXME
shape.x1 = x;
shape.y1 = y + h / 2;
shape.x2 = x + w;
shape.y2 = y + h / 2;
},
rect: function (x, y, w, h, shape) {
shape.x = x;
shape.y = y;
shape.width = w;
shape.height = h;
},
roundRect: function (x, y, w, h, shape) {
shape.x = x;
shape.y = y;
shape.width = w;
shape.height = h;
shape.r = Math.min(w, h) / 4;
},
square: function (x, y, w, h, shape) {
var size = Math.min(w, h);
shape.x = x;
shape.y = y;
shape.width = size;
shape.height = size;
},
circle: function (x, y, w, h, shape) {
// Put circle in the center of square
shape.cx = x + w / 2;
shape.cy = y + h / 2;
shape.r = Math.min(w, h) / 2;
},
diamond: function (x, y, w, h, shape) {
shape.cx = x + w / 2;
shape.cy = y + h / 2;
shape.width = w;
shape.height = h;
},
pin: function (x, y, w, h, shape) {
shape.x = x + w / 2;
shape.y = y + h / 2;
shape.width = w;
shape.height = h;
},
arrow: function (x, y, w, h, shape) {
shape.x = x + w / 2;
shape.y = y + h / 2;
shape.width = w;
shape.height = h;
},
triangle: function (x, y, w, h, shape) {
shape.cx = x + w / 2;
shape.cy = y + h / 2;
shape.width = w;
shape.height = h;
}
};
var symbolBuildProxies = {};
zrUtil.each(symbolCtors, function (Ctor, name) {
symbolBuildProxies[name] = new Ctor();
});
var SymbolClz = graphic.extendShape({
type: 'symbol',
shape: {
symbolType: '',
x: 0,
y: 0,
width: 0,
height: 0
},
calculateTextPosition: function (out, style, rect) {
var res = calculateTextPosition(out, style, rect);
var shape = this.shape;
if (shape && shape.symbolType === 'pin' && style.textPosition === 'inside') {
res.y = rect.y + rect.height * 0.4;
}
return res;
},
buildPath: function (ctx, shape, inBundle) {
var symbolType = shape.symbolType;
if (symbolType !== 'none') {
var proxySymbol = symbolBuildProxies[symbolType];
if (!proxySymbol) {
// Default rect
symbolType = 'rect';
proxySymbol = symbolBuildProxies[symbolType];
}
symbolShapeMakers[symbolType](shape.x, shape.y, shape.width, shape.height, proxySymbol.shape);
proxySymbol.buildPath(ctx, proxySymbol.shape, inBundle);
}
}
}); // Provide setColor helper method to avoid determine if set the fill or stroke outside
function symbolPathSetColor(color, innerColor) {
if (this.type !== 'image') {
var symbolStyle = this.style;
var symbolShape = this.shape;
if (symbolShape && symbolShape.symbolType === 'line') {
symbolStyle.stroke = color;
} else if (this.__isEmptyBrush) {
symbolStyle.stroke = color;
symbolStyle.fill = innerColor || '#fff';
} else {
// FIXME 判断图形默认是填充还是描边,使用 onlyStroke ?
symbolStyle.fill && (symbolStyle.fill = color);
symbolStyle.stroke && (symbolStyle.stroke = color);
}
this.dirty(false);
}
}
/**
* Create a symbol element with given symbol configuration: shape, x, y, width, height, color
* @param {string} symbolType
* @param {number} x
* @param {number} y
* @param {number} w
* @param {number} h
* @param {string} color
* @param {boolean} [keepAspect=false] whether to keep the ratio of w/h,
* for path and image only.
*/
function createSymbol(symbolType, x, y, w, h, color, keepAspect) {
// TODO Support image object, DynamicImage.
var isEmpty = symbolType.indexOf('empty') === 0;
if (isEmpty) {
symbolType = symbolType.substr(5, 1).toLowerCase() + symbolType.substr(6);
}
var symbolPath;
if (symbolType.indexOf('image://') === 0) {
symbolPath = graphic.makeImage(symbolType.slice(8), new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover');
} else if (symbolType.indexOf('path://') === 0) {
symbolPath = graphic.makePath(symbolType.slice(7), {}, new BoundingRect(x, y, w, h), keepAspect ? 'center' : 'cover');
} else {
symbolPath = new SymbolClz({
shape: {
symbolType: symbolType,
x: x,
y: y,
width: w,
height: h
}
});
}
symbolPath.__isEmptyBrush = isEmpty;
symbolPath.setColor = symbolPathSetColor;
symbolPath.setColor(color);
return symbolPath;
}
exports.createSymbol = createSymbol;
/***/ }),
/***/ "kM2E":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("7KvD");
var core = __webpack_require__("FeBl");
var ctx = __webpack_require__("+ZMJ");
var hide = __webpack_require__("hJx8");
var has = __webpack_require__("D2L2");
var PROTOTYPE = 'prototype';
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;
var IS_BIND = type & $export.B;
var IS_WRAP = type & $export.W;
var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});
var expProto = exports[PROTOTYPE];
var target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE];
var key, own, out;
if (IS_GLOBAL) source = name;
for (key in source) {
// contains in native
own = !IS_FORCED && target && target[key] !== undefined;
if (own && has(exports, key)) continue;
// export native or passed
out = own ? target[key] : source[key];
// prevent global pollution for namespaces
exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key]
// bind timers to global for call from export context
: IS_BIND && own ? ctx(out, global)
// wrap global constructors for prevent change them in library
: IS_WRAP && target[key] == out ? (function (C) {
var F = function (a, b, c) {
if (this instanceof C) {
switch (arguments.length) {
case 0: return new C();
case 1: return new C(a);
case 2: return new C(a, b);
} return new C(a, b, c);
} return C.apply(this, arguments);
};
F[PROTOTYPE] = C[PROTOTYPE];
return F;
// make static versions for prototype methods
})(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
// export proto methods to core.%CONSTRUCTOR%.methods.%NAME%
if (IS_PROTO) {
(exports.virtual || (exports.virtual = {}))[key] = out;
// export proto methods to core.%CONSTRUCTOR%.prototype.%NAME%
if (type & $export.R && expProto && !expProto[key]) hide(expProto, key, out);
}
}
};
// type bitmap
$export.F = 1; // forced
$export.G = 2; // global
$export.S = 4; // static
$export.P = 8; // proto
$export.B = 16; // bind
$export.W = 32; // wrap
$export.U = 64; // safe
$export.R = 128; // real proto method for `library`
module.exports = $export;
/***/ }),
/***/ "kMPS":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// If obj.hasOwnProperty has been overridden, then calling
// obj.hasOwnProperty(prop) will break.
// See: https://github.com/joyent/node/issues/1707
function hasOwnProperty(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
module.exports = function(qs, sep, eq, options) {
sep = sep || '&';
eq = eq || '=';
var obj = {};
if (typeof qs !== 'string' || qs.length === 0) {
return obj;
}
var regexp = /\+/g;
qs = qs.split(sep);
var maxKeys = 1000;
if (options && typeof options.maxKeys === 'number') {
maxKeys = options.maxKeys;
}
var len = qs.length;
// maxKeys <= 0 means that we should not limit keys count
if (maxKeys > 0 && len > maxKeys) {
len = maxKeys;
}
for (var i = 0; i < len; ++i) {
var x = qs[i].replace(regexp, '%20'),
idx = x.indexOf(eq),
kstr, vstr, k, v;
if (idx >= 0) {
kstr = x.substr(0, idx);
vstr = x.substr(idx + 1);
} else {
kstr = x;
vstr = '';
}
k = decodeURIComponent(kstr);
v = decodeURIComponent(vstr);
if (!hasOwnProperty(obj, k)) {
obj[k] = v;
} else if (isArray(obj[k])) {
obj[k].push(v);
} else {
obj[k] = [obj[k], v];
}
}
return obj;
};
var isArray = Array.isArray || function (xs) {
return Object.prototype.toString.call(xs) === '[object Array]';
};
/***/ }),
/***/ "kNJA":
/***/ (function(module, exports, __webpack_require__) {
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 59);
/******/ })
/************************************************************************/
/******/ ({
/***/ 0:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
function normalizeComponent (
scriptExports,
render,
staticRenderFns,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier, /* server only */
shadowMode /* vue-cli only */
) {
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (render) {
options.render = render
options.staticRenderFns = staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = 'data-v-' + scopeId
}
var hook
if (moduleIdentifier) { // server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}
// inject component styles
if (injectStyles) {
injectStyles.call(this, context)
}
// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier)
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook
} else if (injectStyles) {
hook = shadowMode
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
: injectStyles
}
if (hook) {
if (options.functional) {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functioal component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return originalRender(h, context)
}
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
}
}
return {
exports: scriptExports,
options: options
}
}
/***/ }),
/***/ 14:
/***/ (function(module, exports) {
module.exports = __webpack_require__("fEB+");
/***/ }),
/***/ 18:
/***/ (function(module, exports) {
module.exports = __webpack_require__("EKTV");
/***/ }),
/***/ 21:
/***/ (function(module, exports) {
module.exports = __webpack_require__("E/in");
/***/ }),
/***/ 26:
/***/ (function(module, exports) {
module.exports = __webpack_require__("nvbp");
/***/ }),
/***/ 3:
/***/ (function(module, exports) {
module.exports = __webpack_require__("ylDJ");
/***/ }),
/***/ 31:
/***/ (function(module, exports) {
module.exports = __webpack_require__("zTCi");
/***/ }),
/***/ 32:
/***/ (function(module, exports) {
module.exports = __webpack_require__("hyEB");
/***/ }),
/***/ 51:
/***/ (function(module, exports) {
module.exports = __webpack_require__("RDoK");
/***/ }),
/***/ 59:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
var cascader_panelvue_type_template_id_34932346_render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"div",
{
class: ["el-cascader-panel", _vm.border && "is-bordered"],
on: { keydown: _vm.handleKeyDown }
},
_vm._l(_vm.menus, function(menu, index) {
return _c("cascader-menu", {
key: index,
ref: "menu",
refInFor: true,
attrs: { index: index, nodes: menu }
})
}),
1
)
}
var staticRenderFns = []
cascader_panelvue_type_template_id_34932346_render._withStripped = true
// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=template&id=34932346&
// EXTERNAL MODULE: external "babel-helper-vue-jsx-merge-props"
var external_babel_helper_vue_jsx_merge_props_ = __webpack_require__(26);
var external_babel_helper_vue_jsx_merge_props_default = /*#__PURE__*/__webpack_require__.n(external_babel_helper_vue_jsx_merge_props_);
// EXTERNAL MODULE: external "element-ui/lib/scrollbar"
var scrollbar_ = __webpack_require__(14);
var scrollbar_default = /*#__PURE__*/__webpack_require__.n(scrollbar_);
// EXTERNAL MODULE: external "element-ui/lib/checkbox"
var checkbox_ = __webpack_require__(18);
var checkbox_default = /*#__PURE__*/__webpack_require__.n(checkbox_);
// EXTERNAL MODULE: external "element-ui/lib/radio"
var radio_ = __webpack_require__(51);
var radio_default = /*#__PURE__*/__webpack_require__.n(radio_);
// EXTERNAL MODULE: external "element-ui/lib/utils/util"
var util_ = __webpack_require__(3);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
var stopPropagation = function stopPropagation(e) {
return e.stopPropagation();
};
/* harmony default export */ var cascader_nodevue_type_script_lang_js_ = ({
inject: ['panel'],
components: {
ElCheckbox: checkbox_default.a,
ElRadio: radio_default.a
},
props: {
node: {
required: true
},
nodeId: String
},
computed: {
config: function config() {
return this.panel.config;
},
isLeaf: function isLeaf() {
return this.node.isLeaf;
},
isDisabled: function isDisabled() {
return this.node.isDisabled;
},
checkedValue: function checkedValue() {
return this.panel.checkedValue;
},
isChecked: function isChecked() {
return this.node.isSameNode(this.checkedValue);
},
inActivePath: function inActivePath() {
return this.isInPath(this.panel.activePath);
},
inCheckedPath: function inCheckedPath() {
var _this = this;
if (!this.config.checkStrictly) return false;
return this.panel.checkedNodePaths.some(function (checkedPath) {
return _this.isInPath(checkedPath);
});
},
value: function value() {
return this.node.getValueByOption();
}
},
methods: {
handleExpand: function handleExpand() {
var _this2 = this;
var panel = this.panel,
node = this.node,
isDisabled = this.isDisabled,
config = this.config;
var multiple = config.multiple,
checkStrictly = config.checkStrictly;
if (!checkStrictly && isDisabled || node.loading) return;
if (config.lazy && !node.loaded) {
panel.lazyLoad(node, function () {
// do not use cached leaf value here, invoke this.isLeaf to get new value.
var isLeaf = _this2.isLeaf;
if (!isLeaf) _this2.handleExpand();
if (multiple) {
// if leaf sync checked state, else clear checked state
var checked = isLeaf ? node.checked : false;
_this2.handleMultiCheckChange(checked);
}
});
} else {
panel.handleExpand(node);
}
},
handleCheckChange: function handleCheckChange() {
var panel = this.panel,
value = this.value,
node = this.node;
panel.handleCheckChange(value);
panel.handleExpand(node);
},
handleMultiCheckChange: function handleMultiCheckChange(checked) {
this.node.doCheck(checked);
this.panel.calculateMultiCheckedValue();
},
isInPath: function isInPath(pathNodes) {
var node = this.node;
var selectedPathNode = pathNodes[node.level - 1] || {};
return selectedPathNode.uid === node.uid;
},
renderPrefix: function renderPrefix(h) {
var isLeaf = this.isLeaf,
isChecked = this.isChecked,
config = this.config;
var checkStrictly = config.checkStrictly,
multiple = config.multiple;
if (multiple) {
return this.renderCheckbox(h);
} else if (checkStrictly) {
return this.renderRadio(h);
} else if (isLeaf && isChecked) {
return this.renderCheckIcon(h);
}
return null;
},
renderPostfix: function renderPostfix(h) {
var node = this.node,
isLeaf = this.isLeaf;
if (node.loading) {
return this.renderLoadingIcon(h);
} else if (!isLeaf) {
return this.renderExpandIcon(h);
}
return null;
},
renderCheckbox: function renderCheckbox(h) {
var node = this.node,
config = this.config,
isDisabled = this.isDisabled;
var events = {
on: { change: this.handleMultiCheckChange },
nativeOn: {}
};
if (config.checkStrictly) {
// when every node is selectable, click event should not trigger expand event.
events.nativeOn.click = stopPropagation;
}
return h('el-checkbox', external_babel_helper_vue_jsx_merge_props_default()([{
attrs: {
value: node.checked,
indeterminate: node.indeterminate,
disabled: isDisabled
}
}, events]));
},
renderRadio: function renderRadio(h) {
var checkedValue = this.checkedValue,
value = this.value,
isDisabled = this.isDisabled;
// to keep same reference if value cause radio's checked state is calculated by reference comparision;
if (Object(util_["isEqual"])(value, checkedValue)) {
value = checkedValue;
}
return h(
'el-radio',
{
attrs: {
value: checkedValue,
label: value,
disabled: isDisabled
},
on: {
'change': this.handleCheckChange
},
nativeOn: {
'click': stopPropagation
}
},
[h('span')]
);
},
renderCheckIcon: function renderCheckIcon(h) {
return h('i', { 'class': 'el-icon-check el-cascader-node__prefix' });
},
renderLoadingIcon: function renderLoadingIcon(h) {
return h('i', { 'class': 'el-icon-loading el-cascader-node__postfix' });
},
renderExpandIcon: function renderExpandIcon(h) {
return h('i', { 'class': 'el-icon-arrow-right el-cascader-node__postfix' });
},
renderContent: function renderContent(h) {
var panel = this.panel,
node = this.node;
var render = panel.renderLabelFn;
var vnode = render ? render({ node: node, data: node.data }) : null;
return h(
'span',
{ 'class': 'el-cascader-node__label' },
[vnode || node.label]
);
}
},
render: function render(h) {
var _this3 = this;
var inActivePath = this.inActivePath,
inCheckedPath = this.inCheckedPath,
isChecked = this.isChecked,
isLeaf = this.isLeaf,
isDisabled = this.isDisabled,
config = this.config,
nodeId = this.nodeId;
var expandTrigger = config.expandTrigger,
checkStrictly = config.checkStrictly,
multiple = config.multiple;
var disabled = !checkStrictly && isDisabled;
var events = { on: {} };
if (expandTrigger === 'click') {
events.on.click = this.handleExpand;
} else {
events.on.mouseenter = function (e) {
_this3.handleExpand();
_this3.$emit('expand', e);
};
events.on.focus = function (e) {
_this3.handleExpand();
_this3.$emit('expand', e);
};
}
if (isLeaf && !isDisabled && !checkStrictly && !multiple) {
events.on.click = this.handleCheckChange;
}
return h(
'li',
external_babel_helper_vue_jsx_merge_props_default()([{
attrs: {
role: 'menuitem',
id: nodeId,
'aria-expanded': inActivePath,
tabindex: disabled ? null : -1
},
'class': {
'el-cascader-node': true,
'is-selectable': checkStrictly,
'in-active-path': inActivePath,
'in-checked-path': inCheckedPath,
'is-active': isChecked,
'is-disabled': disabled
}
}, events]),
[this.renderPrefix(h), this.renderContent(h), this.renderPostfix(h)]
);
}
});
// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue?vue&type=script&lang=js&
/* harmony default export */ var src_cascader_nodevue_type_script_lang_js_ = (cascader_nodevue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);
// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-node.vue
var cascader_node_render, cascader_node_staticRenderFns
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
src_cascader_nodevue_type_script_lang_js_,
cascader_node_render,
cascader_node_staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/cascader-panel/src/cascader-node.vue"
/* harmony default export */ var cascader_node = (component.exports);
// EXTERNAL MODULE: external "element-ui/lib/mixins/locale"
var locale_ = __webpack_require__(6);
var locale_default = /*#__PURE__*/__webpack_require__.n(locale_);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
/* harmony default export */ var cascader_menuvue_type_script_lang_js_ = ({
name: 'ElCascaderMenu',
mixins: [locale_default.a],
inject: ['panel'],
components: {
ElScrollbar: scrollbar_default.a,
CascaderNode: cascader_node
},
props: {
nodes: {
type: Array,
required: true
},
index: Number
},
data: function data() {
return {
activeNode: null,
hoverTimer: null,
id: Object(util_["generateId"])()
};
},
computed: {
isEmpty: function isEmpty() {
return !this.nodes.length;
},
menuId: function menuId() {
return 'cascader-menu-' + this.id + '-' + this.index;
}
},
methods: {
handleExpand: function handleExpand(e) {
this.activeNode = e.target;
},
handleMouseMove: function handleMouseMove(e) {
var activeNode = this.activeNode,
hoverTimer = this.hoverTimer;
var hoverZone = this.$refs.hoverZone;
if (!activeNode || !hoverZone) return;
if (activeNode.contains(e.target)) {
clearTimeout(hoverTimer);
var _$el$getBoundingClien = this.$el.getBoundingClientRect(),
left = _$el$getBoundingClien.left;
var startX = e.clientX - left;
var _$el = this.$el,
offsetWidth = _$el.offsetWidth,
offsetHeight = _$el.offsetHeight;
var top = activeNode.offsetTop;
var bottom = top + activeNode.offsetHeight;
hoverZone.innerHTML = '\n \n \n ';
} else if (!hoverTimer) {
this.hoverTimer = setTimeout(this.clearHoverZone, this.panel.config.hoverThreshold);
}
},
clearHoverZone: function clearHoverZone() {
var hoverZone = this.$refs.hoverZone;
if (!hoverZone) return;
hoverZone.innerHTML = '';
},
renderEmptyText: function renderEmptyText(h) {
return h(
'div',
{ 'class': 'el-cascader-menu__empty-text' },
[this.t('el.cascader.noData')]
);
},
renderNodeList: function renderNodeList(h) {
var menuId = this.menuId;
var isHoverMenu = this.panel.isHoverMenu;
var events = { on: {} };
if (isHoverMenu) {
events.on.expand = this.handleExpand;
}
var nodes = this.nodes.map(function (node, index) {
var hasChildren = node.hasChildren;
return h('cascader-node', external_babel_helper_vue_jsx_merge_props_default()([{
key: node.uid,
attrs: { node: node,
'node-id': menuId + '-' + index,
'aria-haspopup': hasChildren,
'aria-owns': hasChildren ? menuId : null
}
}, events]));
});
return [].concat(nodes, [isHoverMenu ? h('svg', { ref: 'hoverZone', 'class': 'el-cascader-menu__hover-zone' }) : null]);
}
},
render: function render(h) {
var isEmpty = this.isEmpty,
menuId = this.menuId;
var events = { nativeOn: {} };
// optimize hover to expand experience (#8010)
if (this.panel.isHoverMenu) {
events.nativeOn.mousemove = this.handleMouseMove;
// events.nativeOn.mouseleave = this.clearHoverZone;
}
return h(
'el-scrollbar',
external_babel_helper_vue_jsx_merge_props_default()([{
attrs: {
tag: 'ul',
role: 'menu',
id: menuId,
'wrap-class': 'el-cascader-menu__wrap',
'view-class': {
'el-cascader-menu__list': true,
'is-empty': isEmpty
}
},
'class': 'el-cascader-menu' }, events]),
[isEmpty ? this.renderEmptyText(h) : this.renderNodeList(h)]
);
}
});
// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue?vue&type=script&lang=js&
/* harmony default export */ var src_cascader_menuvue_type_script_lang_js_ = (cascader_menuvue_type_script_lang_js_);
// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-menu.vue
var cascader_menu_render, cascader_menu_staticRenderFns
/* normalize component */
var cascader_menu_component = Object(componentNormalizer["a" /* default */])(
src_cascader_menuvue_type_script_lang_js_,
cascader_menu_render,
cascader_menu_staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var cascader_menu_api; }
cascader_menu_component.options.__file = "packages/cascader-panel/src/cascader-menu.vue"
/* harmony default export */ var cascader_menu = (cascader_menu_component.exports);
// EXTERNAL MODULE: external "element-ui/lib/utils/shared"
var shared_ = __webpack_require__(21);
// CONCATENATED MODULE: ./packages/cascader-panel/src/node.js
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var uid = 0;
var node_Node = function () {
function Node(data, config, parentNode) {
_classCallCheck(this, Node);
this.data = data;
this.config = config;
this.parent = parentNode || null;
this.level = !this.parent ? 1 : this.parent.level + 1;
this.uid = uid++;
this.initState();
this.initChildren();
}
Node.prototype.initState = function initState() {
var _config = this.config,
valueKey = _config.value,
labelKey = _config.label;
this.value = this.data[valueKey];
this.label = this.data[labelKey];
this.pathNodes = this.calculatePathNodes();
this.path = this.pathNodes.map(function (node) {
return node.value;
});
this.pathLabels = this.pathNodes.map(function (node) {
return node.label;
});
// lazy load
this.loading = false;
this.loaded = false;
};
Node.prototype.initChildren = function initChildren() {
var _this = this;
var config = this.config;
var childrenKey = config.children;
var childrenData = this.data[childrenKey];
this.hasChildren = Array.isArray(childrenData);
this.children = (childrenData || []).map(function (child) {
return new Node(child, config, _this);
});
};
Node.prototype.calculatePathNodes = function calculatePathNodes() {
var nodes = [this];
var parent = this.parent;
while (parent) {
nodes.unshift(parent);
parent = parent.parent;
}
return nodes;
};
Node.prototype.getPath = function getPath() {
return this.path;
};
Node.prototype.getValue = function getValue() {
return this.value;
};
Node.prototype.getValueByOption = function getValueByOption() {
return this.config.emitPath ? this.getPath() : this.getValue();
};
Node.prototype.getText = function getText(allLevels, separator) {
return allLevels ? this.pathLabels.join(separator) : this.label;
};
Node.prototype.isSameNode = function isSameNode(checkedValue) {
var value = this.getValueByOption();
return this.config.multiple && Array.isArray(checkedValue) ? checkedValue.some(function (val) {
return Object(util_["isEqual"])(val, value);
}) : Object(util_["isEqual"])(checkedValue, value);
};
Node.prototype.broadcast = function broadcast(event) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
var handlerName = 'onParent' + Object(util_["capitalize"])(event);
this.children.forEach(function (child) {
if (child) {
// bottom up
child.broadcast.apply(child, [event].concat(args));
child[handlerName] && child[handlerName].apply(child, args);
}
});
};
Node.prototype.emit = function emit(event) {
var parent = this.parent;
var handlerName = 'onChild' + Object(util_["capitalize"])(event);
if (parent) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
parent[handlerName] && parent[handlerName].apply(parent, args);
parent.emit.apply(parent, [event].concat(args));
}
};
Node.prototype.onParentCheck = function onParentCheck(checked) {
if (!this.isDisabled) {
this.setCheckState(checked);
}
};
Node.prototype.onChildCheck = function onChildCheck() {
var children = this.children;
var validChildren = children.filter(function (child) {
return !child.isDisabled;
});
var checked = validChildren.length ? validChildren.every(function (child) {
return child.checked;
}) : false;
this.setCheckState(checked);
};
Node.prototype.setCheckState = function setCheckState(checked) {
var totalNum = this.children.length;
var checkedNum = this.children.reduce(function (c, p) {
var num = p.checked ? 1 : p.indeterminate ? 0.5 : 0;
return c + num;
}, 0);
this.checked = checked;
this.indeterminate = checkedNum !== totalNum && checkedNum > 0;
};
Node.prototype.syncCheckState = function syncCheckState(checkedValue) {
var value = this.getValueByOption();
var checked = this.isSameNode(checkedValue, value);
this.doCheck(checked);
};
Node.prototype.doCheck = function doCheck(checked) {
if (this.checked !== checked) {
if (this.config.checkStrictly) {
this.checked = checked;
} else {
// bottom up to unify the calculation of the indeterminate state
this.broadcast('check', checked);
this.setCheckState(checked);
this.emit('check');
}
}
};
_createClass(Node, [{
key: 'isDisabled',
get: function get() {
var data = this.data,
parent = this.parent,
config = this.config;
var disabledKey = config.disabled;
var checkStrictly = config.checkStrictly;
return data[disabledKey] || !checkStrictly && parent && parent.isDisabled;
}
}, {
key: 'isLeaf',
get: function get() {
var data = this.data,
loaded = this.loaded,
hasChildren = this.hasChildren,
children = this.children;
var _config2 = this.config,
lazy = _config2.lazy,
leafKey = _config2.leaf;
if (lazy) {
var isLeaf = Object(shared_["isDef"])(data[leafKey]) ? data[leafKey] : loaded ? !children.length : false;
this.hasChildren = !isLeaf;
return isLeaf;
}
return !hasChildren;
}
}]);
return Node;
}();
/* harmony default export */ var src_node = (node_Node);
// CONCATENATED MODULE: ./packages/cascader-panel/src/store.js
function store_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var flatNodes = function flatNodes(data, leafOnly) {
return data.reduce(function (res, node) {
if (node.isLeaf) {
res.push(node);
} else {
!leafOnly && res.push(node);
res = res.concat(flatNodes(node.children, leafOnly));
}
return res;
}, []);
};
var store_Store = function () {
function Store(data, config) {
store_classCallCheck(this, Store);
this.config = config;
this.initNodes(data);
}
Store.prototype.initNodes = function initNodes(data) {
var _this = this;
data = Object(util_["coerceTruthyValueToArray"])(data);
this.nodes = data.map(function (nodeData) {
return new src_node(nodeData, _this.config);
});
this.flattedNodes = this.getFlattedNodes(false, false);
this.leafNodes = this.getFlattedNodes(true, false);
};
Store.prototype.appendNode = function appendNode(nodeData, parentNode) {
var node = new src_node(nodeData, this.config, parentNode);
var children = parentNode ? parentNode.children : this.nodes;
children.push(node);
};
Store.prototype.appendNodes = function appendNodes(nodeDataList, parentNode) {
var _this2 = this;
nodeDataList = Object(util_["coerceTruthyValueToArray"])(nodeDataList);
nodeDataList.forEach(function (nodeData) {
return _this2.appendNode(nodeData, parentNode);
});
};
Store.prototype.getNodes = function getNodes() {
return this.nodes;
};
Store.prototype.getFlattedNodes = function getFlattedNodes(leafOnly) {
var cached = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var cachedNodes = leafOnly ? this.leafNodes : this.flattedNodes;
return cached ? cachedNodes : flatNodes(this.nodes, leafOnly);
};
Store.prototype.getNodeByValue = function getNodeByValue(value) {
if (value) {
var nodes = this.getFlattedNodes(false, !this.config.lazy).filter(function (node) {
return Object(util_["valueEquals"])(node.path, value) || node.value === value;
});
return nodes && nodes.length ? nodes[0] : null;
}
return null;
};
return Store;
}();
/* harmony default export */ var src_store = (store_Store);
// EXTERNAL MODULE: external "element-ui/lib/utils/merge"
var merge_ = __webpack_require__(9);
var merge_default = /*#__PURE__*/__webpack_require__.n(merge_);
// EXTERNAL MODULE: external "element-ui/lib/utils/aria-utils"
var aria_utils_ = __webpack_require__(32);
var aria_utils_default = /*#__PURE__*/__webpack_require__.n(aria_utils_);
// EXTERNAL MODULE: external "element-ui/lib/utils/scroll-into-view"
var scroll_into_view_ = __webpack_require__(31);
var scroll_into_view_default = /*#__PURE__*/__webpack_require__.n(scroll_into_view_);
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
var KeyCode = aria_utils_default.a.keys;
var DefaultProps = {
expandTrigger: 'click', // or hover
multiple: false,
checkStrictly: false, // whether all nodes can be selected
emitPath: true, // wether to emit an array of all levels value in which node is located
lazy: false,
lazyLoad: util_["noop"],
value: 'value',
label: 'label',
children: 'children',
leaf: 'leaf',
disabled: 'disabled',
hoverThreshold: 500
};
var cascader_panelvue_type_script_lang_js_isLeaf = function isLeaf(el) {
return !el.getAttribute('aria-owns');
};
var getSibling = function getSibling(el, distance) {
var parentNode = el.parentNode;
if (parentNode) {
var siblings = parentNode.querySelectorAll('.el-cascader-node[tabindex="-1"]');
var index = Array.prototype.indexOf.call(siblings, el);
return siblings[index + distance] || null;
}
return null;
};
var getMenuIndex = function getMenuIndex(el, distance) {
if (!el) return;
var pieces = el.id.split('-');
return Number(pieces[pieces.length - 2]);
};
var focusNode = function focusNode(el) {
if (!el) return;
el.focus();
!cascader_panelvue_type_script_lang_js_isLeaf(el) && el.click();
};
var checkNode = function checkNode(el) {
if (!el) return;
var input = el.querySelector('input');
if (input) {
input.click();
} else if (cascader_panelvue_type_script_lang_js_isLeaf(el)) {
el.click();
}
};
/* harmony default export */ var cascader_panelvue_type_script_lang_js_ = ({
name: 'ElCascaderPanel',
components: {
CascaderMenu: cascader_menu
},
props: {
value: {},
options: Array,
props: Object,
border: {
type: Boolean,
default: true
},
renderLabel: Function
},
provide: function provide() {
return {
panel: this
};
},
data: function data() {
return {
checkedValue: null,
checkedNodePaths: [],
store: [],
menus: [],
activePath: [],
loadCount: 0
};
},
computed: {
config: function config() {
return merge_default()(_extends({}, DefaultProps), this.props || {});
},
multiple: function multiple() {
return this.config.multiple;
},
checkStrictly: function checkStrictly() {
return this.config.checkStrictly;
},
leafOnly: function leafOnly() {
return !this.checkStrictly;
},
isHoverMenu: function isHoverMenu() {
return this.config.expandTrigger === 'hover';
},
renderLabelFn: function renderLabelFn() {
return this.renderLabel || this.$scopedSlots.default;
}
},
watch: {
options: {
handler: function handler() {
this.initStore();
},
immediate: true,
deep: true
},
value: function value() {
this.syncCheckedValue();
this.checkStrictly && this.calculateCheckedNodePaths();
},
checkedValue: function checkedValue(val) {
if (!Object(util_["isEqual"])(val, this.value)) {
this.checkStrictly && this.calculateCheckedNodePaths();
this.$emit('input', val);
this.$emit('change', val);
}
}
},
mounted: function mounted() {
if (!Object(util_["isEmpty"])(this.value)) {
this.syncCheckedValue();
}
},
methods: {
initStore: function initStore() {
var config = this.config,
options = this.options;
if (config.lazy && Object(util_["isEmpty"])(options)) {
this.lazyLoad();
} else {
this.store = new src_store(options, config);
this.menus = [this.store.getNodes()];
this.syncMenuState();
}
},
syncCheckedValue: function syncCheckedValue() {
var value = this.value,
checkedValue = this.checkedValue;
if (!Object(util_["isEqual"])(value, checkedValue)) {
this.checkedValue = value;
this.syncMenuState();
}
},
syncMenuState: function syncMenuState() {
var multiple = this.multiple,
checkStrictly = this.checkStrictly;
this.syncActivePath();
multiple && this.syncMultiCheckState();
checkStrictly && this.calculateCheckedNodePaths();
this.$nextTick(this.scrollIntoView);
},
syncMultiCheckState: function syncMultiCheckState() {
var _this = this;
var nodes = this.getFlattedNodes(this.leafOnly);
nodes.forEach(function (node) {
node.syncCheckState(_this.checkedValue);
});
},
syncActivePath: function syncActivePath() {
var _this2 = this;
var store = this.store,
multiple = this.multiple,
activePath = this.activePath,
checkedValue = this.checkedValue;
if (!Object(util_["isEmpty"])(activePath)) {
var nodes = activePath.map(function (node) {
return _this2.getNodeByValue(node.getValue());
});
this.expandNodes(nodes);
} else if (!Object(util_["isEmpty"])(checkedValue)) {
var value = multiple ? checkedValue[0] : checkedValue;
var checkedNode = this.getNodeByValue(value) || {};
var _nodes = (checkedNode.pathNodes || []).slice(0, -1);
this.expandNodes(_nodes);
} else {
this.activePath = [];
this.menus = [store.getNodes()];
}
},
expandNodes: function expandNodes(nodes) {
var _this3 = this;
nodes.forEach(function (node) {
return _this3.handleExpand(node, true /* silent */);
});
},
calculateCheckedNodePaths: function calculateCheckedNodePaths() {
var _this4 = this;
var checkedValue = this.checkedValue,
multiple = this.multiple;
var checkedValues = multiple ? Object(util_["coerceTruthyValueToArray"])(checkedValue) : [checkedValue];
this.checkedNodePaths = checkedValues.map(function (v) {
var checkedNode = _this4.getNodeByValue(v);
return checkedNode ? checkedNode.pathNodes : [];
});
},
handleKeyDown: function handleKeyDown(e) {
var target = e.target,
keyCode = e.keyCode;
switch (keyCode) {
case KeyCode.up:
var prev = getSibling(target, -1);
focusNode(prev);
break;
case KeyCode.down:
var next = getSibling(target, 1);
focusNode(next);
break;
case KeyCode.left:
var preMenu = this.$refs.menu[getMenuIndex(target) - 1];
if (preMenu) {
var expandedNode = preMenu.$el.querySelector('.el-cascader-node[aria-expanded="true"]');
focusNode(expandedNode);
}
break;
case KeyCode.right:
var nextMenu = this.$refs.menu[getMenuIndex(target) + 1];
if (nextMenu) {
var firstNode = nextMenu.$el.querySelector('.el-cascader-node[tabindex="-1"]');
focusNode(firstNode);
}
break;
case KeyCode.enter:
checkNode(target);
break;
case KeyCode.esc:
case KeyCode.tab:
this.$emit('close');
break;
default:
return;
}
},
handleExpand: function handleExpand(node, silent) {
var activePath = this.activePath;
var level = node.level;
var path = activePath.slice(0, level - 1);
var menus = this.menus.slice(0, level);
if (!node.isLeaf) {
path.push(node);
menus.push(node.children);
}
this.activePath = path;
this.menus = menus;
if (!silent) {
var pathValues = path.map(function (node) {
return node.getValue();
});
var activePathValues = activePath.map(function (node) {
return node.getValue();
});
if (!Object(util_["valueEquals"])(pathValues, activePathValues)) {
this.$emit('active-item-change', pathValues); // Deprecated
this.$emit('expand-change', pathValues);
}
}
},
handleCheckChange: function handleCheckChange(value) {
this.checkedValue = value;
},
lazyLoad: function lazyLoad(node, onFullfiled) {
var _this5 = this;
var config = this.config;
if (!node) {
node = node || { root: true, level: 0 };
this.store = new src_store([], config);
this.menus = [this.store.getNodes()];
}
node.loading = true;
var resolve = function resolve(dataList) {
var parent = node.root ? null : node;
dataList && dataList.length && _this5.store.appendNodes(dataList, parent);
node.loading = false;
node.loaded = true;
// dispose default value on lazy load mode
if (Array.isArray(_this5.checkedValue)) {
var nodeValue = _this5.checkedValue[_this5.loadCount++];
var valueKey = _this5.config.value;
var leafKey = _this5.config.leaf;
if (Array.isArray(dataList) && dataList.filter(function (item) {
return item[valueKey] === nodeValue;
}).length > 0) {
var checkedNode = _this5.store.getNodeByValue(nodeValue);
if (!checkedNode.data[leafKey]) {
_this5.lazyLoad(checkedNode, function () {
_this5.handleExpand(checkedNode);
});
}
if (_this5.loadCount === _this5.checkedValue.length) {
_this5.$parent.computePresentText();
}
}
}
onFullfiled && onFullfiled(dataList);
};
config.lazyLoad(node, resolve);
},
/**
* public methods
*/
calculateMultiCheckedValue: function calculateMultiCheckedValue() {
this.checkedValue = this.getCheckedNodes(this.leafOnly).map(function (node) {
return node.getValueByOption();
});
},
scrollIntoView: function scrollIntoView() {
if (this.$isServer) return;
var menus = this.$refs.menu || [];
menus.forEach(function (menu) {
var menuElement = menu.$el;
if (menuElement) {
var container = menuElement.querySelector('.el-scrollbar__wrap');
var activeNode = menuElement.querySelector('.el-cascader-node.is-active') || menuElement.querySelector('.el-cascader-node.in-active-path');
scroll_into_view_default()(container, activeNode);
}
});
},
getNodeByValue: function getNodeByValue(val) {
return this.store.getNodeByValue(val);
},
getFlattedNodes: function getFlattedNodes(leafOnly) {
var cached = !this.config.lazy;
return this.store.getFlattedNodes(leafOnly, cached);
},
getCheckedNodes: function getCheckedNodes(leafOnly) {
var checkedValue = this.checkedValue,
multiple = this.multiple;
if (multiple) {
var nodes = this.getFlattedNodes(leafOnly);
return nodes.filter(function (node) {
return node.checked;
});
} else {
return Object(util_["isEmpty"])(checkedValue) ? [] : [this.getNodeByValue(checkedValue)];
}
},
clearCheckedNodes: function clearCheckedNodes() {
var config = this.config,
leafOnly = this.leafOnly;
var multiple = config.multiple,
emitPath = config.emitPath;
if (multiple) {
this.getCheckedNodes(leafOnly).filter(function (node) {
return !node.isDisabled;
}).forEach(function (node) {
return node.doCheck(false);
});
this.calculateMultiCheckedValue();
} else {
this.checkedValue = emitPath ? [] : null;
}
}
}
});
// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue?vue&type=script&lang=js&
/* harmony default export */ var src_cascader_panelvue_type_script_lang_js_ = (cascader_panelvue_type_script_lang_js_);
// CONCATENATED MODULE: ./packages/cascader-panel/src/cascader-panel.vue
/* normalize component */
var cascader_panel_component = Object(componentNormalizer["a" /* default */])(
src_cascader_panelvue_type_script_lang_js_,
cascader_panelvue_type_template_id_34932346_render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var cascader_panel_api; }
cascader_panel_component.options.__file = "packages/cascader-panel/src/cascader-panel.vue"
/* harmony default export */ var cascader_panel = (cascader_panel_component.exports);
// CONCATENATED MODULE: ./packages/cascader-panel/index.js
/* istanbul ignore next */
cascader_panel.install = function (Vue) {
Vue.component(cascader_panel.name, cascader_panel);
};
/* harmony default export */ var packages_cascader_panel = __webpack_exports__["default"] = (cascader_panel);
/***/ }),
/***/ 6:
/***/ (function(module, exports) {
module.exports = __webpack_require__("y+7x");
/***/ }),
/***/ 9:
/***/ (function(module, exports) {
module.exports = __webpack_require__("jmaC");
/***/ })
/******/ });
/***/ }),
/***/ "kQD9":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = __webpack_require__("/gxq");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/**
* Data selectable mixin for chart series.
* To eanble data select, option of series must have `selectedMode`.
* And each data item will use `selected` to toggle itself selected status
*/
var _default = {
/**
* @param {Array.} targetList [{name, value, selected}, ...]
* If targetList is an array, it should like [{name: ..., value: ...}, ...].
* If targetList is a "List", it must have coordDim: 'value' dimension and name.
*/
updateSelectedMap: function (targetList) {
this._targetList = zrUtil.isArray(targetList) ? targetList.slice() : [];
this._selectTargetMap = zrUtil.reduce(targetList || [], function (targetMap, target) {
targetMap.set(target.name, target);
return targetMap;
}, zrUtil.createHashMap());
},
/**
* Either name or id should be passed as input here.
* If both of them are defined, id is used.
*
* @param {string|undefined} name name of data
* @param {number|undefined} id dataIndex of data
*/
// PENGING If selectedMode is null ?
select: function (name, id) {
var target = id != null ? this._targetList[id] : this._selectTargetMap.get(name);
var selectedMode = this.get('selectedMode');
if (selectedMode === 'single') {
this._selectTargetMap.each(function (target) {
target.selected = false;
});
}
target && (target.selected = true);
},
/**
* Either name or id should be passed as input here.
* If both of them are defined, id is used.
*
* @param {string|undefined} name name of data
* @param {number|undefined} id dataIndex of data
*/
unSelect: function (name, id) {
var target = id != null ? this._targetList[id] : this._selectTargetMap.get(name); // var selectedMode = this.get('selectedMode');
// selectedMode !== 'single' && target && (target.selected = false);
target && (target.selected = false);
},
/**
* Either name or id should be passed as input here.
* If both of them are defined, id is used.
*
* @param {string|undefined} name name of data
* @param {number|undefined} id dataIndex of data
*/
toggleSelected: function (name, id) {
var target = id != null ? this._targetList[id] : this._selectTargetMap.get(name);
if (target != null) {
this[target.selected ? 'unSelect' : 'select'](name, id);
return target.selected;
}
},
/**
* Either name or id should be passed as input here.
* If both of them are defined, id is used.
*
* @param {string|undefined} name name of data
* @param {number|undefined} id dataIndex of data
*/
isSelected: function (name, id) {
var target = id != null ? this._targetList[id] : this._selectTargetMap.get(name);
return target && target.selected;
}
};
module.exports = _default;
/***/ }),
/***/ "kdOt":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var _config = __webpack_require__("4Nz2");
var __DEV__ = _config.__DEV__;
var _model = __webpack_require__("vXqC");
var makeInner = _model.makeInner;
var getDataItemValue = _model.getDataItemValue;
var _util = __webpack_require__("/gxq");
var createHashMap = _util.createHashMap;
var each = _util.each;
var map = _util.map;
var isArray = _util.isArray;
var isString = _util.isString;
var isObject = _util.isObject;
var isTypedArray = _util.isTypedArray;
var isArrayLike = _util.isArrayLike;
var extend = _util.extend;
var assert = _util.assert;
var Source = __webpack_require__("rrAD");
var _sourceType = __webpack_require__("+2Ke");
var SOURCE_FORMAT_ORIGINAL = _sourceType.SOURCE_FORMAT_ORIGINAL;
var SOURCE_FORMAT_ARRAY_ROWS = _sourceType.SOURCE_FORMAT_ARRAY_ROWS;
var SOURCE_FORMAT_OBJECT_ROWS = _sourceType.SOURCE_FORMAT_OBJECT_ROWS;
var SOURCE_FORMAT_KEYED_COLUMNS = _sourceType.SOURCE_FORMAT_KEYED_COLUMNS;
var SOURCE_FORMAT_UNKNOWN = _sourceType.SOURCE_FORMAT_UNKNOWN;
var SOURCE_FORMAT_TYPED_ARRAY = _sourceType.SOURCE_FORMAT_TYPED_ARRAY;
var SERIES_LAYOUT_BY_ROW = _sourceType.SERIES_LAYOUT_BY_ROW;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// The result of `guessOrdinal`.
var BE_ORDINAL = {
Must: 1,
// Encounter string but not '-' and not number-like.
Might: 2,
// Encounter string but number-like.
Not: 3 // Other cases
};
var inner = makeInner();
/**
* @see {module:echarts/data/Source}
* @param {module:echarts/component/dataset/DatasetModel} datasetModel
* @return {string} sourceFormat
*/
function detectSourceFormat(datasetModel) {
var data = datasetModel.option.source;
var sourceFormat = SOURCE_FORMAT_UNKNOWN;
if (isTypedArray(data)) {
sourceFormat = SOURCE_FORMAT_TYPED_ARRAY;
} else if (isArray(data)) {
// FIXME Whether tolerate null in top level array?
if (data.length === 0) {
sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;
}
for (var i = 0, len = data.length; i < len; i++) {
var item = data[i];
if (item == null) {
continue;
} else if (isArray(item)) {
sourceFormat = SOURCE_FORMAT_ARRAY_ROWS;
break;
} else if (isObject(item)) {
sourceFormat = SOURCE_FORMAT_OBJECT_ROWS;
break;
}
}
} else if (isObject(data)) {
for (var key in data) {
if (data.hasOwnProperty(key) && isArrayLike(data[key])) {
sourceFormat = SOURCE_FORMAT_KEYED_COLUMNS;
break;
}
}
} else if (data != null) {
throw new Error('Invalid data');
}
inner(datasetModel).sourceFormat = sourceFormat;
}
/**
* [Scenarios]:
* (1) Provide source data directly:
* series: {
* encode: {...},
* dimensions: [...]
* seriesLayoutBy: 'row',
* data: [[...]]
* }
* (2) Refer to datasetModel.
* series: [{
* encode: {...}
* // Ignore datasetIndex means `datasetIndex: 0`
* // and the dimensions defination in dataset is used
* }, {
* encode: {...},
* seriesLayoutBy: 'column',
* datasetIndex: 1
* }]
*
* Get data from series itself or datset.
* @return {module:echarts/data/Source} source
*/
function getSource(seriesModel) {
return inner(seriesModel).source;
}
/**
* MUST be called before mergeOption of all series.
* @param {module:echarts/model/Global} ecModel
*/
function resetSourceDefaulter(ecModel) {
// `datasetMap` is used to make default encode.
inner(ecModel).datasetMap = createHashMap();
}
/**
* [Caution]:
* MUST be called after series option merged and
* before "series.getInitailData()" called.
*
* [The rule of making default encode]:
* Category axis (if exists) alway map to the first dimension.
* Each other axis occupies a subsequent dimension.
*
* [Why make default encode]:
* Simplify the typing of encode in option, avoiding the case like that:
* series: [{encode: {x: 0, y: 1}}, {encode: {x: 0, y: 2}}, {encode: {x: 0, y: 3}}],
* where the "y" have to be manually typed as "1, 2, 3, ...".
*
* @param {module:echarts/model/Series} seriesModel
*/
function prepareSource(seriesModel) {
var seriesOption = seriesModel.option;
var data = seriesOption.data;
var sourceFormat = isTypedArray(data) ? SOURCE_FORMAT_TYPED_ARRAY : SOURCE_FORMAT_ORIGINAL;
var fromDataset = false;
var seriesLayoutBy = seriesOption.seriesLayoutBy;
var sourceHeader = seriesOption.sourceHeader;
var dimensionsDefine = seriesOption.dimensions;
var datasetModel = getDatasetModel(seriesModel);
if (datasetModel) {
var datasetOption = datasetModel.option;
data = datasetOption.source;
sourceFormat = inner(datasetModel).sourceFormat;
fromDataset = true; // These settings from series has higher priority.
seriesLayoutBy = seriesLayoutBy || datasetOption.seriesLayoutBy;
sourceHeader == null && (sourceHeader = datasetOption.sourceHeader);
dimensionsDefine = dimensionsDefine || datasetOption.dimensions;
}
var completeResult = completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine);
inner(seriesModel).source = new Source({
data: data,
fromDataset: fromDataset,
seriesLayoutBy: seriesLayoutBy,
sourceFormat: sourceFormat,
dimensionsDefine: completeResult.dimensionsDefine,
startIndex: completeResult.startIndex,
dimensionsDetectCount: completeResult.dimensionsDetectCount,
// Note: dataset option does not have `encode`.
encodeDefine: seriesOption.encode
});
} // return {startIndex, dimensionsDefine, dimensionsCount}
function completeBySourceData(data, sourceFormat, seriesLayoutBy, sourceHeader, dimensionsDefine) {
if (!data) {
return {
dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine)
};
}
var dimensionsDetectCount;
var startIndex;
if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {
// Rule: Most of the first line are string: it is header.
// Caution: consider a line with 5 string and 1 number,
// it still can not be sure it is a head, because the
// 5 string may be 5 values of category columns.
if (sourceHeader === 'auto' || sourceHeader == null) {
arrayRowsTravelFirst(function (val) {
// '-' is regarded as null/undefined.
if (val != null && val !== '-') {
if (isString(val)) {
startIndex == null && (startIndex = 1);
} else {
startIndex = 0;
}
} // 10 is an experience number, avoid long loop.
}, seriesLayoutBy, data, 10);
} else {
startIndex = sourceHeader ? 1 : 0;
}
if (!dimensionsDefine && startIndex === 1) {
dimensionsDefine = [];
arrayRowsTravelFirst(function (val, index) {
dimensionsDefine[index] = val != null ? val : '';
}, seriesLayoutBy, data);
}
dimensionsDetectCount = dimensionsDefine ? dimensionsDefine.length : seriesLayoutBy === SERIES_LAYOUT_BY_ROW ? data.length : data[0] ? data[0].length : null;
} else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {
if (!dimensionsDefine) {
dimensionsDefine = objectRowsCollectDimensions(data);
}
} else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {
if (!dimensionsDefine) {
dimensionsDefine = [];
each(data, function (colArr, key) {
dimensionsDefine.push(key);
});
}
} else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {
var value0 = getDataItemValue(data[0]);
dimensionsDetectCount = isArray(value0) && value0.length || 1;
} else if (sourceFormat === SOURCE_FORMAT_TYPED_ARRAY) {}
return {
startIndex: startIndex,
dimensionsDefine: normalizeDimensionsDefine(dimensionsDefine),
dimensionsDetectCount: dimensionsDetectCount
};
} // Consider dimensions defined like ['A', 'price', 'B', 'price', 'C', 'price'],
// which is reasonable. But dimension name is duplicated.
// Returns undefined or an array contains only object without null/undefiend or string.
function normalizeDimensionsDefine(dimensionsDefine) {
if (!dimensionsDefine) {
// The meaning of null/undefined is different from empty array.
return;
}
var nameMap = createHashMap();
return map(dimensionsDefine, function (item, index) {
item = extend({}, isObject(item) ? item : {
name: item
}); // User can set null in dimensions.
// We dont auto specify name, othewise a given name may
// cause it be refered unexpectedly.
if (item.name == null) {
return item;
} // Also consider number form like 2012.
item.name += ''; // User may also specify displayName.
// displayName will always exists except user not
// specified or dim name is not specified or detected.
// (A auto generated dim name will not be used as
// displayName).
if (item.displayName == null) {
item.displayName = item.name;
}
var exist = nameMap.get(item.name);
if (!exist) {
nameMap.set(item.name, {
count: 1
});
} else {
item.name += '-' + exist.count++;
}
return item;
});
}
function arrayRowsTravelFirst(cb, seriesLayoutBy, data, maxLoop) {
maxLoop == null && (maxLoop = Infinity);
if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) {
for (var i = 0; i < data.length && i < maxLoop; i++) {
cb(data[i] ? data[i][0] : null, i);
}
} else {
var value0 = data[0] || [];
for (var i = 0; i < value0.length && i < maxLoop; i++) {
cb(value0[i], i);
}
}
}
function objectRowsCollectDimensions(data) {
var firstIndex = 0;
var obj;
while (firstIndex < data.length && !(obj = data[firstIndex++])) {} // jshint ignore: line
if (obj) {
var dimensions = [];
each(obj, function (value, key) {
dimensions.push(key);
});
return dimensions;
}
}
/**
* [The strategy of the arrengment of data dimensions for dataset]:
* "value way": all axes are non-category axes. So series one by one take
* several (the number is coordSysDims.length) dimensions from dataset.
* The result of data arrengment of data dimensions like:
* | ser0_x | ser0_y | ser1_x | ser1_y | ser2_x | ser2_y |
* "category way": at least one axis is category axis. So the the first data
* dimension is always mapped to the first category axis and shared by
* all of the series. The other data dimensions are taken by series like
* "value way" does.
* The result of data arrengment of data dimensions like:
* | ser_shared_x | ser0_y | ser1_y | ser2_y |
*
* @param {Array.} coordDimensions [{name: , type: , dimsDef: }, ...]
* @param {module:model/Series} seriesModel
* @param {module:data/Source} source
* @return {Object} encode Never be `null/undefined`.
*/
function makeSeriesEncodeForAxisCoordSys(coordDimensions, seriesModel, source) {
var encode = {};
var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur.
if (!datasetModel || !coordDimensions) {
return encode;
}
var encodeItemName = [];
var encodeSeriesName = [];
var ecModel = seriesModel.ecModel;
var datasetMap = inner(ecModel).datasetMap;
var key = datasetModel.uid + '_' + source.seriesLayoutBy;
var baseCategoryDimIndex;
var categoryWayValueDimStart;
coordDimensions = coordDimensions.slice();
each(coordDimensions, function (coordDimInfo, coordDimIdx) {
!isObject(coordDimInfo) && (coordDimensions[coordDimIdx] = {
name: coordDimInfo
});
if (coordDimInfo.type === 'ordinal' && baseCategoryDimIndex == null) {
baseCategoryDimIndex = coordDimIdx;
categoryWayValueDimStart = getDataDimCountOnCoordDim(coordDimensions[coordDimIdx]);
}
encode[coordDimInfo.name] = [];
});
var datasetRecord = datasetMap.get(key) || datasetMap.set(key, {
categoryWayDim: categoryWayValueDimStart,
valueWayDim: 0
}); // TODO
// Auto detect first time axis and do arrangement.
each(coordDimensions, function (coordDimInfo, coordDimIdx) {
var coordDimName = coordDimInfo.name;
var count = getDataDimCountOnCoordDim(coordDimInfo); // In value way.
if (baseCategoryDimIndex == null) {
var start = datasetRecord.valueWayDim;
pushDim(encode[coordDimName], start, count);
pushDim(encodeSeriesName, start, count);
datasetRecord.valueWayDim += count; // ??? TODO give a better default series name rule?
// especially when encode x y specified.
// consider: when mutiple series share one dimension
// category axis, series name should better use
// the other dimsion name. On the other hand, use
// both dimensions name.
} // In category way, the first category axis.
else if (baseCategoryDimIndex === coordDimIdx) {
pushDim(encode[coordDimName], 0, count);
pushDim(encodeItemName, 0, count);
} // In category way, the other axis.
else {
var start = datasetRecord.categoryWayDim;
pushDim(encode[coordDimName], start, count);
pushDim(encodeSeriesName, start, count);
datasetRecord.categoryWayDim += count;
}
});
function pushDim(dimIdxArr, idxFrom, idxCount) {
for (var i = 0; i < idxCount; i++) {
dimIdxArr.push(idxFrom + i);
}
}
function getDataDimCountOnCoordDim(coordDimInfo) {
var dimsDef = coordDimInfo.dimsDef;
return dimsDef ? dimsDef.length : 1;
}
encodeItemName.length && (encode.itemName = encodeItemName);
encodeSeriesName.length && (encode.seriesName = encodeSeriesName);
return encode;
}
/**
* Work for data like [{name: ..., value: ...}, ...].
*
* @param {module:model/Series} seriesModel
* @param {module:data/Source} source
* @return {Object} encode Never be `null/undefined`.
*/
function makeSeriesEncodeForNameBased(seriesModel, source, dimCount) {
var encode = {};
var datasetModel = getDatasetModel(seriesModel); // Currently only make default when using dataset, util more reqirements occur.
if (!datasetModel) {
return encode;
}
var sourceFormat = source.sourceFormat;
var dimensionsDefine = source.dimensionsDefine;
var potentialNameDimIndex;
if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS || sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {
each(dimensionsDefine, function (dim, idx) {
if ((isObject(dim) ? dim.name : dim) === 'name') {
potentialNameDimIndex = idx;
}
});
} // idxResult: {v, n}.
var idxResult = function () {
var idxRes0 = {};
var idxRes1 = {};
var guessRecords = []; // 5 is an experience value.
for (var i = 0, len = Math.min(5, dimCount); i < len; i++) {
var guessResult = doGuessOrdinal(source.data, sourceFormat, source.seriesLayoutBy, dimensionsDefine, source.startIndex, i);
guessRecords.push(guessResult);
var isPureNumber = guessResult === BE_ORDINAL.Not; // [Strategy of idxRes0]: find the first BE_ORDINAL.Not as the value dim,
// and then find a name dim with the priority:
// "BE_ORDINAL.Might|BE_ORDINAL.Must" > "other dim" > "the value dim itself".
if (isPureNumber && idxRes0.v == null && i !== potentialNameDimIndex) {
idxRes0.v = i;
}
if (idxRes0.n == null || idxRes0.n === idxRes0.v || !isPureNumber && guessRecords[idxRes0.n] === BE_ORDINAL.Not) {
idxRes0.n = i;
}
if (fulfilled(idxRes0) && guessRecords[idxRes0.n] !== BE_ORDINAL.Not) {
return idxRes0;
} // [Strategy of idxRes1]: if idxRes0 not satisfied (that is, no BE_ORDINAL.Not),
// find the first BE_ORDINAL.Might as the value dim,
// and then find a name dim with the priority:
// "other dim" > "the value dim itself".
// That is for backward compat: number-like (e.g., `'3'`, `'55'`) can be
// treated as number.
if (!isPureNumber) {
if (guessResult === BE_ORDINAL.Might && idxRes1.v == null && i !== potentialNameDimIndex) {
idxRes1.v = i;
}
if (idxRes1.n == null || idxRes1.n === idxRes1.v) {
idxRes1.n = i;
}
}
}
function fulfilled(idxResult) {
return idxResult.v != null && idxResult.n != null;
}
return fulfilled(idxRes0) ? idxRes0 : fulfilled(idxRes1) ? idxRes1 : null;
}();
if (idxResult) {
encode.value = idxResult.v; // `potentialNameDimIndex` has highest priority.
var nameDimIndex = potentialNameDimIndex != null ? potentialNameDimIndex : idxResult.n; // By default, label use itemName in charts.
// So we dont set encodeLabel here.
encode.itemName = [nameDimIndex];
encode.seriesName = [nameDimIndex];
}
return encode;
}
/**
* If return null/undefined, indicate that should not use datasetModel.
*/
function getDatasetModel(seriesModel) {
var option = seriesModel.option; // Caution: consider the scenario:
// A dataset is declared and a series is not expected to use the dataset,
// and at the beginning `setOption({series: { noData })` (just prepare other
// option but no data), then `setOption({series: {data: [...]}); In this case,
// the user should set an empty array to avoid that dataset is used by default.
var thisData = option.data;
if (!thisData) {
return seriesModel.ecModel.getComponent('dataset', option.datasetIndex || 0);
}
}
/**
* The rule should not be complex, otherwise user might not
* be able to known where the data is wrong.
* The code is ugly, but how to make it neat?
*
* @param {module:echars/data/Source} source
* @param {number} dimIndex
* @return {BE_ORDINAL} guess result.
*/
function guessOrdinal(source, dimIndex) {
return doGuessOrdinal(source.data, source.sourceFormat, source.seriesLayoutBy, source.dimensionsDefine, source.startIndex, dimIndex);
} // dimIndex may be overflow source data.
// return {BE_ORDINAL}
function doGuessOrdinal(data, sourceFormat, seriesLayoutBy, dimensionsDefine, startIndex, dimIndex) {
var result; // Experience value.
var maxLoop = 5;
if (isTypedArray(data)) {
return BE_ORDINAL.Not;
} // When sourceType is 'objectRows' or 'keyedColumns', dimensionsDefine
// always exists in source.
var dimName;
var dimType;
if (dimensionsDefine) {
var dimDefItem = dimensionsDefine[dimIndex];
if (isObject(dimDefItem)) {
dimName = dimDefItem.name;
dimType = dimDefItem.type;
} else if (isString(dimDefItem)) {
dimName = dimDefItem;
}
}
if (dimType != null) {
return dimType === 'ordinal' ? BE_ORDINAL.Must : BE_ORDINAL.Not;
}
if (sourceFormat === SOURCE_FORMAT_ARRAY_ROWS) {
if (seriesLayoutBy === SERIES_LAYOUT_BY_ROW) {
var sample = data[dimIndex];
for (var i = 0; i < (sample || []).length && i < maxLoop; i++) {
if ((result = detectValue(sample[startIndex + i])) != null) {
return result;
}
}
} else {
for (var i = 0; i < data.length && i < maxLoop; i++) {
var row = data[startIndex + i];
if (row && (result = detectValue(row[dimIndex])) != null) {
return result;
}
}
}
} else if (sourceFormat === SOURCE_FORMAT_OBJECT_ROWS) {
if (!dimName) {
return BE_ORDINAL.Not;
}
for (var i = 0; i < data.length && i < maxLoop; i++) {
var item = data[i];
if (item && (result = detectValue(item[dimName])) != null) {
return result;
}
}
} else if (sourceFormat === SOURCE_FORMAT_KEYED_COLUMNS) {
if (!dimName) {
return BE_ORDINAL.Not;
}
var sample = data[dimName];
if (!sample || isTypedArray(sample)) {
return BE_ORDINAL.Not;
}
for (var i = 0; i < sample.length && i < maxLoop; i++) {
if ((result = detectValue(sample[i])) != null) {
return result;
}
}
} else if (sourceFormat === SOURCE_FORMAT_ORIGINAL) {
for (var i = 0; i < data.length && i < maxLoop; i++) {
var item = data[i];
var val = getDataItemValue(item);
if (!isArray(val)) {
return BE_ORDINAL.Not;
}
if ((result = detectValue(val[dimIndex])) != null) {
return result;
}
}
}
function detectValue(val) {
var beStr = isString(val); // Consider usage convenience, '1', '2' will be treated as "number".
// `isFinit('')` get `true`.
if (val != null && isFinite(val) && val !== '') {
return beStr ? BE_ORDINAL.Might : BE_ORDINAL.Not;
} else if (beStr && val !== '-') {
return BE_ORDINAL.Must;
}
}
return BE_ORDINAL.Not;
}
exports.BE_ORDINAL = BE_ORDINAL;
exports.detectSourceFormat = detectSourceFormat;
exports.getSource = getSource;
exports.resetSourceDefaulter = resetSourceDefaulter;
exports.prepareSource = prepareSource;
exports.makeSeriesEncodeForAxisCoordSys = makeSeriesEncodeForAxisCoordSys;
exports.makeSeriesEncodeForNameBased = makeSeriesEncodeForNameBased;
exports.guessOrdinal = guessOrdinal;
/***/ }),
/***/ "kic5":
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__("UKM+");
var setPrototypeOf = __webpack_require__("gvDt").set;
module.exports = function (that, target, C) {
var S = target.constructor;
var P;
if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {
setPrototypeOf(that, P);
} return that;
};
/***/ }),
/***/ "kkCw":
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__("VWgF")('wks');
var uid = __webpack_require__("ulTY");
var Symbol = __webpack_require__("OzIq").Symbol;
var USE_SYMBOL = typeof Symbol == 'function';
var $exports = module.exports = function (name) {
return store[name] || (store[name] =
USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));
};
$exports.store = store;
/***/ }),
/***/ "kkc6":
/***/ (function(module, exports, __webpack_require__) {
/* eslint-disable node/no-deprecated-api */
var buffer = __webpack_require__("EuP9")
var Buffer = buffer.Buffer
// alternative to using Object.keys for old browsers
function copyProps (src, dst) {
for (var key in src) {
dst[key] = src[key]
}
}
if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
module.exports = buffer
} else {
// Copy properties from require('buffer')
copyProps(buffer, exports)
exports.Buffer = SafeBuffer
}
function SafeBuffer (arg, encodingOrOffset, length) {
return Buffer(arg, encodingOrOffset, length)
}
// Copy static methods from Buffer
copyProps(Buffer, SafeBuffer)
SafeBuffer.from = function (arg, encodingOrOffset, length) {
if (typeof arg === 'number') {
throw new TypeError('Argument must not be a number')
}
return Buffer(arg, encodingOrOffset, length)
}
SafeBuffer.alloc = function (size, fill, encoding) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
var buf = Buffer(size)
if (fill !== undefined) {
if (typeof encoding === 'string') {
buf.fill(fill, encoding)
} else {
buf.fill(fill)
}
} else {
buf.fill(0)
}
return buf
}
SafeBuffer.allocUnsafe = function (size) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
return Buffer(size)
}
SafeBuffer.allocUnsafeSlow = function (size) {
if (typeof size !== 'number') {
throw new TypeError('Argument must be a number')
}
return buffer.SlowBuffer(size)
}
/***/ }),
/***/ "kqpo":
/***/ (function(module, exports, __webpack_require__) {
// helper for String#{startsWith, endsWith, includes}
var isRegExp = __webpack_require__("u0PK");
var defined = __webpack_require__("/whu");
module.exports = function (that, searchString, NAME) {
if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!");
return String(defined(that));
};
/***/ }),
/***/ "krPU":
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
true ? factory(__webpack_require__("PJh5")) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var tzmLatn = moment.defineLocale('tzm-latn', {
months : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
monthsShort : 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split('_'),
weekdays : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
weekdaysShort : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
weekdaysMin : 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD/MM/YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[asdkh g] LT',
nextDay: '[aska g] LT',
nextWeek: 'dddd [g] LT',
lastDay: '[assant g] LT',
lastWeek: 'dddd [g] LT',
sameElse: 'L'
},
relativeTime : {
future : 'dadkh s yan %s',
past : 'yan %s',
s : 'imik',
ss : '%d imik',
m : 'minuḍ',
mm : '%d minuḍ',
h : 'saɛa',
hh : '%d tassaɛin',
d : 'ass',
dd : '%d ossan',
M : 'ayowr',
MM : '%d iyyirn',
y : 'asgas',
yy : '%d isgasn'
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
return tzmLatn;
})));
/***/ }),
/***/ "kxE3":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {
var _Object$setPrototypeO;
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var finished = __webpack_require__("PcVv");
var kLastResolve = Symbol('lastResolve');
var kLastReject = Symbol('lastReject');
var kError = Symbol('error');
var kEnded = Symbol('ended');
var kLastPromise = Symbol('lastPromise');
var kHandlePromise = Symbol('handlePromise');
var kStream = Symbol('stream');
function createIterResult(value, done) {
return {
value: value,
done: done
};
}
function readAndResolve(iter) {
var resolve = iter[kLastResolve];
if (resolve !== null) {
var data = iter[kStream].read(); // we defer if data is null
// we can be expecting either 'end' or
// 'error'
if (data !== null) {
iter[kLastPromise] = null;
iter[kLastResolve] = null;
iter[kLastReject] = null;
resolve(createIterResult(data, false));
}
}
}
function onReadable(iter) {
// we wait for the next tick, because it might
// emit an error with process.nextTick
process.nextTick(readAndResolve, iter);
}
function wrapForNext(lastPromise, iter) {
return function (resolve, reject) {
lastPromise.then(function () {
if (iter[kEnded]) {
resolve(createIterResult(undefined, true));
return;
}
iter[kHandlePromise](resolve, reject);
}, reject);
};
}
var AsyncIteratorPrototype = Object.getPrototypeOf(function () {});
var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
get stream() {
return this[kStream];
},
next: function next() {
var _this = this;
// if we have detected an error in the meanwhile
// reject straight away
var error = this[kError];
if (error !== null) {
return Promise.reject(error);
}
if (this[kEnded]) {
return Promise.resolve(createIterResult(undefined, true));
}
if (this[kStream].destroyed) {
// We need to defer via nextTick because if .destroy(err) is
// called, the error will be emitted via nextTick, and
// we cannot guarantee that there is no error lingering around
// waiting to be emitted.
return new Promise(function (resolve, reject) {
process.nextTick(function () {
if (_this[kError]) {
reject(_this[kError]);
} else {
resolve(createIterResult(undefined, true));
}
});
});
} // if we have multiple next() calls
// we will wait for the previous Promise to finish
// this logic is optimized to support for await loops,
// where next() is only called once at a time
var lastPromise = this[kLastPromise];
var promise;
if (lastPromise) {
promise = new Promise(wrapForNext(lastPromise, this));
} else {
// fast path needed to support multiple this.push()
// without triggering the next() queue
var data = this[kStream].read();
if (data !== null) {
return Promise.resolve(createIterResult(data, false));
}
promise = new Promise(this[kHandlePromise]);
}
this[kLastPromise] = promise;
return promise;
}
}, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {
return this;
}), _defineProperty(_Object$setPrototypeO, "return", function _return() {
var _this2 = this;
// destroy(err, cb) is a private API
// we can guarantee we have that here, because we control the
// Readable class this is attached to
return new Promise(function (resolve, reject) {
_this2[kStream].destroy(null, function (err) {
if (err) {
reject(err);
return;
}
resolve(createIterResult(undefined, true));
});
});
}), _Object$setPrototypeO), AsyncIteratorPrototype);
var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
var _Object$create;
var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
value: stream,
writable: true
}), _defineProperty(_Object$create, kLastResolve, {
value: null,
writable: true
}), _defineProperty(_Object$create, kLastReject, {
value: null,
writable: true
}), _defineProperty(_Object$create, kError, {
value: null,
writable: true
}), _defineProperty(_Object$create, kEnded, {
value: stream._readableState.endEmitted,
writable: true
}), _defineProperty(_Object$create, kHandlePromise, {
value: function value(resolve, reject) {
var data = iterator[kStream].read();
if (data) {
iterator[kLastPromise] = null;
iterator[kLastResolve] = null;
iterator[kLastReject] = null;
resolve(createIterResult(data, false));
} else {
iterator[kLastResolve] = resolve;
iterator[kLastReject] = reject;
}
},
writable: true
}), _Object$create));
iterator[kLastPromise] = null;
finished(stream, function (err) {
if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise
// returned by next() and store the error
if (reject !== null) {
iterator[kLastPromise] = null;
iterator[kLastResolve] = null;
iterator[kLastReject] = null;
reject(err);
}
iterator[kError] = err;
return;
}
var resolve = iterator[kLastResolve];
if (resolve !== null) {
iterator[kLastPromise] = null;
iterator[kLastResolve] = null;
iterator[kLastReject] = null;
resolve(createIterResult(undefined, true));
}
iterator[kEnded] = true;
});
stream.on('readable', onReadable.bind(null, iterator));
return iterator;
};
module.exports = createReadableStreamAsyncIterator;
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("W2nU")))
/***/ }),
/***/ "kxFB":
/***/ (function(module, exports) {
module.exports = function escape(url) {
if (typeof url !== 'string') {
return url
}
// If url is already wrapped in quotes, remove them
if (/^['"].*['"]$/.test(url)) {
url = url.slice(1, -1);
}
// Should url be wrapped?
// See https://drafts.csswg.org/css-values-3/#urls
if (/["'() \t\n]/.test(url)) {
return '"' + url.replace(/"/g, '\\"').replace(/\n/g, '\\n') + '"'
}
return url
}
/***/ }),
/***/ "l+Hw":
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_FormDlg_vue__ = __webpack_require__("Jcpn");
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_FormDlg_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_FormDlg_vue__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_FormDlg_vue__) if(["default","default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_FormDlg_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_9654ee54_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_FormDlg_vue__ = __webpack_require__("mzMY");
function injectStyle (ssrContext) {
__webpack_require__("oEDT")
}
var normalizeComponent = __webpack_require__("VU/8")
/* script */
/* template */
/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = injectStyle
/* scopeId */
var __vue_scopeId__ = "data-v-9654ee54"
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_FormDlg_vue___default.a,
__WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_9654ee54_hasScoped_true_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_FormDlg_vue__["a" /* default */],
__vue_template_functional__,
__vue_styles__,
__vue_scopeId__,
__vue_module_identifier__
)
/* harmony default export */ __webpack_exports__["default"] = (Component.exports);
/***/ }),
/***/ "l0gW":
/***/ (function(module, exports, __webpack_require__) {
var echarts = __webpack_require__("Icdr");
var numberUtil = echarts.number;
var symbolUtil = __webpack_require__("kK7q");
var parsePercent = numberUtil.parsePercent;
var LiquidLayout = __webpack_require__("4GYk");
function getShallow(model, path) {
return model && model.getShallow(path);
}
echarts.extendChartView({
type: 'liquidFill',
render: function (seriesModel, ecModel, api) {
var group = this.group;
group.removeAll();
var data = seriesModel.getData();
var itemModel = data.getItemModel(0);
var center = itemModel.get('center');
var radius = itemModel.get('radius');
var width = api.getWidth();
var height = api.getHeight();
var size = Math.min(width, height);
// itemStyle
var outlineDistance = 0;
var outlineBorderWidth = 0;
var showOutline = seriesModel.get('outline.show');
if (showOutline) {
outlineDistance = seriesModel.get('outline.borderDistance');
outlineBorderWidth = parsePercent(
seriesModel.get('outline.itemStyle.borderWidth'), size
);
}
var cx = parsePercent(center[0], width);
var cy = parsePercent(center[1], height);
var outterRadius;
var innerRadius;
var paddingRadius;
var isFillContainer = false;
var symbol = seriesModel.get('shape');
if (symbol === 'container') {
// a shape that fully fills the container
isFillContainer = true;
outterRadius = [
width / 2,
height / 2
];
innerRadius = [
outterRadius[0] - outlineBorderWidth / 2,
outterRadius[1] - outlineBorderWidth / 2
];
paddingRadius = [
parsePercent(outlineDistance, width),
parsePercent(outlineDistance, height)
];
radius = [
Math.max(innerRadius[0] - paddingRadius[0], 0),
Math.max(innerRadius[1] - paddingRadius[1], 0)
];
}
else {
outterRadius = parsePercent(radius, size) / 2;
innerRadius = outterRadius - outlineBorderWidth / 2;
paddingRadius = parsePercent(outlineDistance, size);
radius = Math.max(innerRadius - paddingRadius, 0);
}
if (showOutline) {
var outline = getOutline();
outline.style.lineWidth = outlineBorderWidth;
group.add(getOutline());
}
var left = isFillContainer ? 0 : cx - radius;
var top = isFillContainer ? 0 : cy - radius;
var wavePath = null;
group.add(getBackground());
// each data item for a wave
var oldData = this._data;
var waves = [];
data.diff(oldData)
.add(function (idx) {
var wave = getWave(idx, false);
var waterLevel = wave.shape.waterLevel;
wave.shape.waterLevel = isFillContainer ? height / 2 : radius;
echarts.graphic.initProps(wave, {
shape: {
waterLevel: waterLevel
}
}, seriesModel);
wave.z2 = 2;
setWaveAnimation(idx, wave, null);
group.add(wave);
data.setItemGraphicEl(idx, wave);
waves.push(wave);
})
.update(function (newIdx, oldIdx) {
var waveElement = oldData.getItemGraphicEl(oldIdx);
// new wave is used to calculate position, but not added
var newWave = getWave(newIdx, false, waveElement);
// changes with animation
var shape = {};
var shapeAttrs = ['amplitude', 'cx', 'cy', 'phase', 'radius', 'radiusY', 'waterLevel', 'waveLength'];
for (var i = 0; i < shapeAttrs.length; ++i) {
var attr = shapeAttrs[i];
if (newWave.shape.hasOwnProperty(attr)) {
shape[attr] = newWave.shape[attr];
}
}
var style = {};
var styleAttrs = ['fill', 'opacity', 'shadowBlur', 'shadowColor'];
for (var i = 0; i < styleAttrs.length; ++i) {
var attr = styleAttrs[i];
if (newWave.style.hasOwnProperty(attr)) {
style[attr] = newWave.style[attr];
}
}
if (isFillContainer) {
shape.radiusY = height / 2;
}
// changes with animation
echarts.graphic.updateProps(waveElement, {
shape: shape
}, seriesModel);
waveElement.useStyle(style);
// instant changes
waveElement.position = newWave.position;
waveElement.setClipPath(newWave.clipPath);
waveElement.shape.inverse = newWave.inverse;
setWaveAnimation(newIdx, waveElement, waveElement);
group.add(waveElement);
data.setItemGraphicEl(newIdx, waveElement);
waves.push(waveElement);
})
.remove(function (idx) {
var wave = oldData.getItemGraphicEl(idx);
group.remove(wave);
})
.execute();
if (itemModel.get('label.show')) {
group.add(getText(waves));
}
this._data = data;
/**
* Get path for outline, background and clipping
*
* @param {number} r outter radius of shape
* @param {boolean|undefined} isForClipping if the shape is used
* for clipping
*/
function getPath(r, isForClipping) {
if (symbol) {
// customed symbol path
if (symbol.indexOf('path://') === 0) {
var path = echarts.graphic.makePath(symbol.slice(7), {});
var bouding = path.getBoundingRect();
var w = bouding.width;
var h = bouding.height;
if (w > h) {
h = r * 2 / w * h;
w = r * 2;
}
else {
w = r * 2 / h * w;
h = r * 2;
}
var left = isForClipping ? 0 : cx - w / 2;
var top = isForClipping ? 0 : cy - h / 2;
path = echarts.graphic.makePath(
symbol.slice(7),
{},
new echarts.graphic.BoundingRect(left, top, w, h)
);
if (isForClipping) {
path.position = [-w / 2, -h / 2];
}
return path;
}
else if (isFillContainer) {
// fully fill the container
var x = isForClipping ? -r[0] : cx - r[0];
var y = isForClipping ? -r[1] : cy - r[1];
return symbolUtil.createSymbol(
'rect', x, y, r[0] * 2, r[1] * 2
);
}
else {
var x = isForClipping ? -r : cx - r;
var y = isForClipping ? -r : cy - r;
if (symbol === 'pin') {
y += r;
}
else if (symbol === 'arrow') {
y -= r;
}
return symbolUtil.createSymbol(symbol, x, y, r * 2, r * 2);
}
}
return new echarts.graphic.Circle({
shape: {
cx: isForClipping ? 0 : cx,
cy: isForClipping ? 0 : cy,
r: r
}
});
}
/**
* Create outline
*/
function getOutline() {
var outlinePath = getPath(outterRadius);
outlinePath.style.fill = null;
outlinePath.setStyle(seriesModel.getModel('outline.itemStyle')
.getItemStyle());
return outlinePath;
}
/**
* Create background
*/
function getBackground() {
// Seperate stroke and fill, so we can use stroke to cover the alias of clipping.
var strokePath = getPath(radius);
strokePath.setStyle(seriesModel.getModel('backgroundStyle')
.getItemStyle());
strokePath.style.fill = null;
// Stroke is front of wave
strokePath.z2 = 5;
var fillPath = getPath(radius);
fillPath.setStyle(seriesModel.getModel('backgroundStyle')
.getItemStyle());
fillPath.style.stroke = null;
var group = new echarts.graphic.Group();
group.add(strokePath);
group.add(fillPath);
return group;
}
/**
* wave shape
*/
function getWave(idx, isInverse, oldWave) {
var radiusX = isFillContainer ? radius[0] : radius;
var radiusY = isFillContainer ? height / 2 : radius;
var itemModel = data.getItemModel(idx);
var itemStyleModel = itemModel.getModel('itemStyle');
var phase = itemModel.get('phase');
var amplitude = parsePercent(itemModel.get('amplitude'),
radiusY * 2);
var waveLength = parsePercent(itemModel.get('waveLength'),
radiusX * 2);
var value = data.get('value', idx);
var waterLevel = radiusY - value * radiusY * 2;
phase = oldWave ? oldWave.shape.phase
: (phase === 'auto' ? idx * Math.PI / 4 : phase);
var normalStyle = itemStyleModel.getItemStyle();
if (!normalStyle.fill) {
var seriesColor = seriesModel.get('color');
var id = idx % seriesColor.length;
normalStyle.fill = seriesColor[id];
}
var x = radiusX * 2;
var wave = new LiquidLayout({
shape: {
waveLength: waveLength,
radius: radiusX,
radiusY: radiusY,
cx: x,
cy: 0,
waterLevel: waterLevel,
amplitude: amplitude,
phase: phase,
inverse: isInverse
},
style: normalStyle,
position: [cx, cy]
});
wave.shape._waterLevel = waterLevel;
var hoverStyle = itemModel.getModel('emphasis.itemStyle')
.getItemStyle();
hoverStyle.lineWidth = 0;
echarts.graphic.setHoverStyle(wave, hoverStyle);
// clip out the part outside the circle
var clip = getPath(radius, true);
// set fill for clipPath, otherwise it will not trigger hover event
clip.setStyle({
fill: 'white'
});
wave.setClipPath(clip);
return wave;
}
function setWaveAnimation(idx, wave, oldWave) {
var itemModel = data.getItemModel(idx);
var maxSpeed = itemModel.get('period');
var direction = itemModel.get('direction');
var value = data.get('value', idx);
var phase = itemModel.get('phase');
phase = oldWave ? oldWave.shape.phase
: (phase === 'auto' ? idx * Math.PI / 4 : phase);
var defaultSpeed = function (maxSpeed) {
var cnt = data.count();
return cnt === 0 ? maxSpeed : maxSpeed *
(0.2 + (cnt - idx) / cnt * 0.8);
};
var speed = 0;
if (maxSpeed === 'auto') {
speed = defaultSpeed(5000);
}
else {
speed = typeof maxSpeed === 'function'
? maxSpeed(value, idx) : maxSpeed;
}
// phase for moving left/right
var phaseOffset = 0;
if (direction === 'right' || direction == null) {
phaseOffset = Math.PI;
}
else if (direction === 'left') {
phaseOffset = -Math.PI;
}
else if (direction === 'none') {
phaseOffset = 0;
}
else {
console.error('Illegal direction value for liquid fill.');
}
// wave animation of moving left/right
if (direction !== 'none' && itemModel.get('waveAnimation')) {
wave
.animate('shape', true)
.when(0, {
phase: phase
})
.when(speed / 2, {
phase: phaseOffset + phase
})
.when(speed, {
phase: phaseOffset * 2 + phase
})
.during(function () {
if (wavePath) {
wavePath.dirty(true);
}
})
.start();
}
}
/**
* text on wave
*/
function getText(waves) {
var labelModel = itemModel.getModel('label');
function formatLabel() {
var formatted = seriesModel.getFormattedLabel(0, 'normal');
var defaultVal = (data.get('value', 0) * 100);
var defaultLabel = data.getName(0) || seriesModel.name;
if (!isNaN(defaultVal)) {
defaultLabel = defaultVal.toFixed(0) + '%';
}
return formatted == null ? defaultLabel : formatted;
}
var textOption = {
z2: 10,
shape: {
x: left,
y: top,
width: (isFillContainer ? radius[0] : radius) * 2,
height: (isFillContainer ? radius[1] : radius) * 2
},
style: {
fill: 'transparent',
text: formatLabel(),
textAlign: labelModel.get('align'),
textVerticalAlign: labelModel.get('baseline')
},
silent: true
};
var outsideTextRect = new echarts.graphic.Rect(textOption);
var color = labelModel.get('color');
echarts.graphic.setText(outsideTextRect.style, labelModel, color);
var insideTextRect = new echarts.graphic.Rect(textOption);
var insColor = labelModel.get('insideColor');
echarts.graphic.setText(insideTextRect.style, labelModel, insColor);
insideTextRect.style.textFill = insColor;
var group = new echarts.graphic.Group();
group.add(outsideTextRect);
group.add(insideTextRect);
// clip out waves for insideText
var boundingCircle = getPath(radius, true);
wavePath = new echarts.graphic.CompoundPath({
shape: {
paths: waves
},
position: [cx, cy]
});
wavePath.setClipPath(boundingCircle);
insideTextRect.setClipPath(wavePath);
return group;
}
},
dispose: function () {
// dispose nothing here
}
});
/***/ }),
/***/ "l2wH":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
__webpack_require__("cuL/");
__webpack_require__("sJ4e");
__webpack_require__("ilLo");
__webpack_require__("r9WW");
__webpack_require__("WO3U");
__webpack_require__("b/SY");
__webpack_require__("KAfT");
/***/ }),
/***/ "l4Op":
/***/ (function(module, exports) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function _default(seriesType) {
return {
seriesType: seriesType,
reset: function (seriesModel, ecModel) {
var legendModels = ecModel.findComponents({
mainType: 'legend'
});
if (!legendModels || !legendModels.length) {
return;
}
var data = seriesModel.getData();
data.filterSelf(function (idx) {
var name = data.getName(idx); // If in any legend component the status is not selected.
for (var i = 0; i < legendModels.length; i++) {
if (!legendModels[i].isSelected(name)) {
return false;
}
}
return true;
});
}
};
}
module.exports = _default;
/***/ }),
/***/ "lDLk":
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("DIVP");
var IE8_DOM_DEFINE = __webpack_require__("xZa+");
var toPrimitive = __webpack_require__("s4j0");
var dP = Object.defineProperty;
exports.f = __webpack_require__("bUqO") ? Object.defineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return dP(O, P, Attributes);
} catch (e) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ "lFkc":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule ExecutionEnvironment
*/
/*jslint evil: true */
var canUseDOM = !!(
typeof window !== 'undefined' &&
window.document &&
window.document.createElement
);
/**
* Simple, lightweight module assisting with the detection and context of
* Worker. Helps avoid circular dependencies and allows code to reason about
* whether or not they are in a Worker, even if they never include the main
* `ReactWorker` dependency.
*/
var ExecutionEnvironment = {
canUseDOM: canUseDOM,
canUseWorkers: typeof Worker !== 'undefined',
canUseEventListeners:
canUseDOM && !!(window.addEventListener || window.attachEvent),
canUseViewport: canUseDOM && !!window.screen,
isInWorker: !canUseDOM // For now, this is true - might change in the future.
};
module.exports = ExecutionEnvironment;
/***/ }),
/***/ "lIb0":
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__("FZ+f")(false);
// imports
// module
exports.push([module.i, ".content[data-v-043ef3bc]{padding-left:10px;padding-right:10px;width:100%;position:relative;padding-bottom:52px!important}.content .Copyright[data-v-043ef3bc]{position:absolute;bottom:0;left:0;height:52px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background-color:#fff}.content-wrapper[data-v-043ef3bc]{margin-left:280px}.content-wrapper[data-v-043ef3bc],.main-footer[data-v-043ef3bc],.right-side[data-v-043ef3bc]{transition:none}.main-footer[data-v-043ef3bc]{text-align:center}@media screen and (max-width:1200px){.content-wrapper[data-v-043ef3bc]{margin-left:0}}", ""]);
// exports
/***/ }),
/***/ "lKE8":
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("bUqO");
var getKeys = __webpack_require__("Qh14");
var toIObject = __webpack_require__("PHqh");
var isEnum = __webpack_require__("Y1aA").f;
module.exports = function (isEntries) {
return function (it) {
var O = toIObject(it);
var keys = getKeys(O);
var length = keys.length;
var i = 0;
var result = [];
var key;
while (length > i) {
key = keys[i++];
if (!DESCRIPTORS || isEnum.call(O, key)) {
result.push(isEntries ? [key, O[key]] : O[key]);
}
}
return result;
};
};
/***/ }),
/***/ "lOED":
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
true ? factory(__webpack_require__("PJh5")) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var bg = moment.defineLocale('bg', {
months : 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split('_'),
monthsShort : 'янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'),
weekdays : 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split('_'),
weekdaysShort : 'нед_пон_вто_сря_чет_пет_съб'.split('_'),
weekdaysMin : 'нд_пн_вт_ср_чт_пт_сб'.split('_'),
longDateFormat : {
LT : 'H:mm',
LTS : 'H:mm:ss',
L : 'D.MM.YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY H:mm',
LLLL : 'dddd, D MMMM YYYY H:mm'
},
calendar : {
sameDay : '[Днес в] LT',
nextDay : '[Утре в] LT',
nextWeek : 'dddd [в] LT',
lastDay : '[Вчера в] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[В изминалата] dddd [в] LT';
case 1:
case 2:
case 4:
case 5:
return '[В изминалия] dddd [в] LT';
}
},
sameElse : 'L'
},
relativeTime : {
future : 'след %s',
past : 'преди %s',
s : 'няколко секунди',
ss : '%d секунди',
m : 'минута',
mm : '%d минути',
h : 'час',
hh : '%d часа',
d : 'ден',
dd : '%d дни',
M : 'месец',
MM : '%d месеца',
y : 'година',
yy : '%d години'
},
dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/,
ordinal : function (number) {
var lastDigit = number % 10,
last2Digits = number % 100;
if (number === 0) {
return number + '-ев';
} else if (last2Digits === 0) {
return number + '-ен';
} else if (last2Digits > 10 && last2Digits < 20) {
return number + '-ти';
} else if (lastDigit === 1) {
return number + '-ви';
} else if (lastDigit === 2) {
return number + '-ри';
} else if (lastDigit === 7 || lastDigit === 8) {
return number + '-ми';
} else {
return number + '-ти';
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
return bg;
})));
/***/ }),
/***/ "lOnJ":
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') throw TypeError(it + ' is not a function!');
return it;
};
/***/ }),
/***/ "lQBd":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// from https://github.com/Rantanen/node-dtls/blob/25a7dc861bda38cfeac93a723500eea4f0ac2e86/Certificate.js
// thanks to @Rantanen
var asn = __webpack_require__("KDHK")
var Time = asn.define('Time', function () {
this.choice({
utcTime: this.utctime(),
generalTime: this.gentime()
})
})
var AttributeTypeValue = asn.define('AttributeTypeValue', function () {
this.seq().obj(
this.key('type').objid(),
this.key('value').any()
)
})
var AlgorithmIdentifier = asn.define('AlgorithmIdentifier', function () {
this.seq().obj(
this.key('algorithm').objid(),
this.key('parameters').optional(),
this.key('curve').objid().optional()
)
})
var SubjectPublicKeyInfo = asn.define('SubjectPublicKeyInfo', function () {
this.seq().obj(
this.key('algorithm').use(AlgorithmIdentifier),
this.key('subjectPublicKey').bitstr()
)
})
var RelativeDistinguishedName = asn.define('RelativeDistinguishedName', function () {
this.setof(AttributeTypeValue)
})
var RDNSequence = asn.define('RDNSequence', function () {
this.seqof(RelativeDistinguishedName)
})
var Name = asn.define('Name', function () {
this.choice({
rdnSequence: this.use(RDNSequence)
})
})
var Validity = asn.define('Validity', function () {
this.seq().obj(
this.key('notBefore').use(Time),
this.key('notAfter').use(Time)
)
})
var Extension = asn.define('Extension', function () {
this.seq().obj(
this.key('extnID').objid(),
this.key('critical').bool().def(false),
this.key('extnValue').octstr()
)
})
var TBSCertificate = asn.define('TBSCertificate', function () {
this.seq().obj(
this.key('version').explicit(0).int().optional(),
this.key('serialNumber').int(),
this.key('signature').use(AlgorithmIdentifier),
this.key('issuer').use(Name),
this.key('validity').use(Validity),
this.key('subject').use(Name),
this.key('subjectPublicKeyInfo').use(SubjectPublicKeyInfo),
this.key('issuerUniqueID').implicit(1).bitstr().optional(),
this.key('subjectUniqueID').implicit(2).bitstr().optional(),
this.key('extensions').explicit(3).seqof(Extension).optional()
)
})
var X509Certificate = asn.define('X509Certificate', function () {
this.seq().obj(
this.key('tbsCertificate').use(TBSCertificate),
this.key('signatureAlgorithm').use(AlgorithmIdentifier),
this.key('signatureValue').bitstr()
)
})
module.exports = X509Certificate
/***/ }),
/***/ "lUSU":
/***/ (function(module, exports, __webpack_require__) {
var xor = __webpack_require__("H2Pp")
exports.encrypt = function (self, block) {
var data = xor(block, self._prev)
self._prev = self._cipher.encryptBlock(data)
return self._prev
}
exports.decrypt = function (self, block) {
var pad = self._prev
self._prev = block
var out = self._cipher.decryptBlock(block)
return xor(out, pad)
}
/***/ }),
/***/ "lVde":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var _config = __webpack_require__("4Nz2");
var __DEV__ = _config.__DEV__;
var echarts = __webpack_require__("Icdr");
var zrUtil = __webpack_require__("/gxq");
var AxisBuilder = __webpack_require__("vjPX");
var graphic = __webpack_require__("0sHC");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var axisBuilderAttrs = ['axisLine', 'axisTickLabel', 'axisName'];
var _default = echarts.extendComponentView({
type: 'radar',
render: function (radarModel, ecModel, api) {
var group = this.group;
group.removeAll();
this._buildAxes(radarModel);
this._buildSplitLineAndArea(radarModel);
},
_buildAxes: function (radarModel) {
var radar = radarModel.coordinateSystem;
var indicatorAxes = radar.getIndicatorAxes();
var axisBuilders = zrUtil.map(indicatorAxes, function (indicatorAxis) {
var axisBuilder = new AxisBuilder(indicatorAxis.model, {
position: [radar.cx, radar.cy],
rotation: indicatorAxis.angle,
labelDirection: -1,
tickDirection: -1,
nameDirection: 1
});
return axisBuilder;
});
zrUtil.each(axisBuilders, function (axisBuilder) {
zrUtil.each(axisBuilderAttrs, axisBuilder.add, axisBuilder);
this.group.add(axisBuilder.getGroup());
}, this);
},
_buildSplitLineAndArea: function (radarModel) {
var radar = radarModel.coordinateSystem;
var indicatorAxes = radar.getIndicatorAxes();
if (!indicatorAxes.length) {
return;
}
var shape = radarModel.get('shape');
var splitLineModel = radarModel.getModel('splitLine');
var splitAreaModel = radarModel.getModel('splitArea');
var lineStyleModel = splitLineModel.getModel('lineStyle');
var areaStyleModel = splitAreaModel.getModel('areaStyle');
var showSplitLine = splitLineModel.get('show');
var showSplitArea = splitAreaModel.get('show');
var splitLineColors = lineStyleModel.get('color');
var splitAreaColors = areaStyleModel.get('color');
splitLineColors = zrUtil.isArray(splitLineColors) ? splitLineColors : [splitLineColors];
splitAreaColors = zrUtil.isArray(splitAreaColors) ? splitAreaColors : [splitAreaColors];
var splitLines = [];
var splitAreas = [];
function getColorIndex(areaOrLine, areaOrLineColorList, idx) {
var colorIndex = idx % areaOrLineColorList.length;
areaOrLine[colorIndex] = areaOrLine[colorIndex] || [];
return colorIndex;
}
if (shape === 'circle') {
var ticksRadius = indicatorAxes[0].getTicksCoords();
var cx = radar.cx;
var cy = radar.cy;
for (var i = 0; i < ticksRadius.length; i++) {
if (showSplitLine) {
var colorIndex = getColorIndex(splitLines, splitLineColors, i);
splitLines[colorIndex].push(new graphic.Circle({
shape: {
cx: cx,
cy: cy,
r: ticksRadius[i].coord
}
}));
}
if (showSplitArea && i < ticksRadius.length - 1) {
var colorIndex = getColorIndex(splitAreas, splitAreaColors, i);
splitAreas[colorIndex].push(new graphic.Ring({
shape: {
cx: cx,
cy: cy,
r0: ticksRadius[i].coord,
r: ticksRadius[i + 1].coord
}
}));
}
}
} // Polyyon
else {
var realSplitNumber;
var axesTicksPoints = zrUtil.map(indicatorAxes, function (indicatorAxis, idx) {
var ticksCoords = indicatorAxis.getTicksCoords();
realSplitNumber = realSplitNumber == null ? ticksCoords.length - 1 : Math.min(ticksCoords.length - 1, realSplitNumber);
return zrUtil.map(ticksCoords, function (tickCoord) {
return radar.coordToPoint(tickCoord.coord, idx);
});
});
var prevPoints = [];
for (var i = 0; i <= realSplitNumber; i++) {
var points = [];
for (var j = 0; j < indicatorAxes.length; j++) {
points.push(axesTicksPoints[j][i]);
} // Close
if (points[0]) {
points.push(points[0].slice());
} else {}
if (showSplitLine) {
var colorIndex = getColorIndex(splitLines, splitLineColors, i);
splitLines[colorIndex].push(new graphic.Polyline({
shape: {
points: points
}
}));
}
if (showSplitArea && prevPoints) {
var colorIndex = getColorIndex(splitAreas, splitAreaColors, i - 1);
splitAreas[colorIndex].push(new graphic.Polygon({
shape: {
points: points.concat(prevPoints)
}
}));
}
prevPoints = points.slice().reverse();
}
}
var lineStyle = lineStyleModel.getLineStyle();
var areaStyle = areaStyleModel.getAreaStyle(); // Add splitArea before splitLine
zrUtil.each(splitAreas, function (splitAreas, idx) {
this.group.add(graphic.mergePath(splitAreas, {
style: zrUtil.defaults({
stroke: 'none',
fill: splitAreaColors[idx % splitAreaColors.length]
}, areaStyle),
silent: true
}));
}, this);
zrUtil.each(splitLines, function (splitLines, idx) {
this.group.add(graphic.mergePath(splitLines, {
style: zrUtil.defaults({
fill: 'none',
stroke: splitLineColors[idx % splitLineColors.length]
}, lineStyle),
silent: true
}));
}, this);
}
});
module.exports = _default;
/***/ }),
/***/ "lXn8":
/***/ (function(module, exports, __webpack_require__) {
/**
* A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
* in FIPS 180-2
* Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009.
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
*
*/
var inherits = __webpack_require__("LC74")
var Sha256 = __webpack_require__("zvjZ")
var Hash = __webpack_require__("CzQx")
var Buffer = __webpack_require__("X3l8").Buffer
var W = new Array(64)
function Sha224 () {
this.init()
this._w = W // new Array(64)
Hash.call(this, 64, 56)
}
inherits(Sha224, Sha256)
Sha224.prototype.init = function () {
this._a = 0xc1059ed8
this._b = 0x367cd507
this._c = 0x3070dd17
this._d = 0xf70e5939
this._e = 0xffc00b31
this._f = 0x68581511
this._g = 0x64f98fa7
this._h = 0xbefa4fa4
return this
}
Sha224.prototype._hash = function () {
var H = Buffer.allocUnsafe(28)
H.writeInt32BE(this._a, 0)
H.writeInt32BE(this._b, 4)
H.writeInt32BE(this._c, 8)
H.writeInt32BE(this._d, 12)
H.writeInt32BE(this._e, 16)
H.writeInt32BE(this._f, 20)
H.writeInt32BE(this._g, 24)
return H
}
module.exports = Sha224
/***/ }),
/***/ "lZ6o":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var elliptic = exports;
elliptic.version = __webpack_require__("KYqO").version;
elliptic.utils = __webpack_require__("TkWM");
elliptic.rand = __webpack_require__("txgm");
elliptic.curve = __webpack_require__("tRuz");
elliptic.curves = __webpack_require__("hQ80");
// Protocols
elliptic.ec = __webpack_require__("F11g");
elliptic.eddsa = __webpack_require__("+e0g");
/***/ }),
/***/ "lj6Z":
/***/ (function(module, exports, __webpack_require__) {
var util = __webpack_require__("/gxq");
var vec2 = __webpack_require__("C7PF");
var Draggable = __webpack_require__("TIfe");
var Eventful = __webpack_require__("qjvV");
var eventTool = __webpack_require__("UAiw");
var GestureMgr = __webpack_require__("JMnz");
/**
* [The interface between `Handler` and `HandlerProxy`]:
*
* The default `HandlerProxy` only support the common standard web environment
* (e.g., standalone browser, headless browser, embed browser in mobild APP, ...).
* But `HandlerProxy` can be replaced to support more non-standard environment
* (e.g., mini app), or to support more feature that the default `HandlerProxy`
* not provided (like echarts-gl did).
* So the interface between `Handler` and `HandlerProxy` should be stable. Do not
* make break changes util inevitable. The interface include the public methods
* of `Handler` and the events listed in `handlerNames` below, by which `HandlerProxy`
* drives `Handler`.
*/
/**
* [Drag outside]:
*
* That is, triggering `mousemove` and `mouseup` event when the pointer is out of the
* zrender area when dragging. That is important for the improvement of the user experience
* when dragging something near the boundary without being terminated unexpectedly.
*
* We originally consider to introduce new events like `pagemovemove` and `pagemouseup`
* to resolve this issue. But some drawbacks of it is described in
* https://github.com/ecomfe/zrender/pull/536#issuecomment-560286899
*
* Instead, we referenced the specifications:
* https://www.w3.org/TR/touch-events/#the-touchmove-event
* https://www.w3.org/TR/2014/WD-DOM-Level-3-Events-20140925/#event-type-mousemove
* where the the mousemove/touchmove can be continue to fire if the user began a drag
* operation and the pointer has left the boundary. (for the mouse event, browsers
* only do it on `document` and when the pointer has left the boundary of the browser.)
*
* So the default `HandlerProxy` supports this feature similarly: if it is in the dragging
* state (see `pointerCapture` in `HandlerProxy`), the `mousemove` and `mouseup` continue
* to fire until release the pointer. That is implemented by listen to those event on
* `document`.
* If we implement some other `HandlerProxy` only for touch device, that would be easier.
* The touch event support this feature by default.
*
* Note:
* There might be some cases that the mouse event can not be
* received on `document`. For example,
* (A) `useCapture` is not supported and some user defined event listeners on the ancestor
* of zr dom throw Error .
* (B) `useCapture` is not supported Some user defined event listeners on the ancestor of
* zr dom call `stopPropagation`.
* In these cases, the `mousemove` event might be keep triggered event
* if the mouse is released. We try to reduce the side-effect in those cases.
* That is, do nothing (especially, `findHover`) in those cases. See `isOutsideBoundary`.
*
* Note:
* If `HandlerProxy` listens to `document` with `useCapture`, `HandlerProxy` needs to
* make sure `stopPropagation` and `preventDefault` doing nothing if and only if the event
* target is not zrender dom. Becuase it is dangerous to enable users to call them in
* `document` capture phase to prevent the propagation to any listener of the webpage.
* But they are needed to work when the pointer inside the zrender dom.
*/
var SILENT = 'silent';
function makeEventPacket(eveType, targetInfo, event) {
return {
type: eveType,
event: event,
// target can only be an element that is not silent.
target: targetInfo.target,
// topTarget can be a silent element.
topTarget: targetInfo.topTarget,
cancelBubble: false,
offsetX: event.zrX,
offsetY: event.zrY,
gestureEvent: event.gestureEvent,
pinchX: event.pinchX,
pinchY: event.pinchY,
pinchScale: event.pinchScale,
wheelDelta: event.zrDelta,
zrByTouch: event.zrByTouch,
which: event.which,
stop: stopEvent
};
}
function stopEvent() {
eventTool.stop(this.event);
}
function EmptyProxy() {}
EmptyProxy.prototype.dispose = function () {};
var handlerNames = ['click', 'dblclick', 'mousewheel', 'mouseout', 'mouseup', 'mousedown', 'mousemove', 'contextmenu'];
/**
* @alias module:zrender/Handler
* @constructor
* @extends module:zrender/mixin/Eventful
* @param {module:zrender/Storage} storage Storage instance.
* @param {module:zrender/Painter} painter Painter instance.
* @param {module:zrender/dom/HandlerProxy} proxy HandlerProxy instance.
* @param {HTMLElement} painterRoot painter.root (not painter.getViewportRoot()).
*/
var Handler = function (storage, painter, proxy, painterRoot) {
Eventful.call(this);
this.storage = storage;
this.painter = painter;
this.painterRoot = painterRoot;
proxy = proxy || new EmptyProxy();
/**
* Proxy of event. can be Dom, WebGLSurface, etc.
*/
this.proxy = null;
/**
* {target, topTarget, x, y}
* @private
* @type {Object}
*/
this._hovered = {};
/**
* @private
* @type {Date}
*/
this._lastTouchMoment;
/**
* @private
* @type {number}
*/
this._lastX;
/**
* @private
* @type {number}
*/
this._lastY;
/**
* @private
* @type {module:zrender/core/GestureMgr}
*/
this._gestureMgr;
Draggable.call(this);
this.setHandlerProxy(proxy);
};
Handler.prototype = {
constructor: Handler,
setHandlerProxy: function (proxy) {
if (this.proxy) {
this.proxy.dispose();
}
if (proxy) {
util.each(handlerNames, function (name) {
proxy.on && proxy.on(name, this[name], this);
}, this); // Attach handler
proxy.handler = this;
}
this.proxy = proxy;
},
mousemove: function (event) {
var x = event.zrX;
var y = event.zrY;
var isOutside = isOutsideBoundary(this, x, y);
var lastHovered = this._hovered;
var lastHoveredTarget = lastHovered.target; // If lastHoveredTarget is removed from zr (detected by '__zr') by some API call
// (like 'setOption' or 'dispatchAction') in event handlers, we should find
// lastHovered again here. Otherwise 'mouseout' can not be triggered normally.
// See #6198.
if (lastHoveredTarget && !lastHoveredTarget.__zr) {
lastHovered = this.findHover(lastHovered.x, lastHovered.y);
lastHoveredTarget = lastHovered.target;
}
var hovered = this._hovered = isOutside ? {
x: x,
y: y
} : this.findHover(x, y);
var hoveredTarget = hovered.target;
var proxy = this.proxy;
proxy.setCursor && proxy.setCursor(hoveredTarget ? hoveredTarget.cursor : 'default'); // Mouse out on previous hovered element
if (lastHoveredTarget && hoveredTarget !== lastHoveredTarget) {
this.dispatchToElement(lastHovered, 'mouseout', event);
} // Mouse moving on one element
this.dispatchToElement(hovered, 'mousemove', event); // Mouse over on a new element
if (hoveredTarget && hoveredTarget !== lastHoveredTarget) {
this.dispatchToElement(hovered, 'mouseover', event);
}
},
mouseout: function (event) {
var eventControl = event.zrEventControl;
var zrIsToLocalDOM = event.zrIsToLocalDOM;
if (eventControl !== 'only_globalout') {
this.dispatchToElement(this._hovered, 'mouseout', event);
}
if (eventControl !== 'no_globalout') {
// FIXME: if the pointer moving from the extra doms to realy "outside",
// the `globalout` should have been triggered. But currently not.
!zrIsToLocalDOM && this.trigger('globalout', {
type: 'globalout',
event: event
});
}
},
/**
* Resize
*/
resize: function (event) {
this._hovered = {};
},
/**
* Dispatch event
* @param {string} eventName
* @param {event=} eventArgs
*/
dispatch: function (eventName, eventArgs) {
var handler = this[eventName];
handler && handler.call(this, eventArgs);
},
/**
* Dispose
*/
dispose: function () {
this.proxy.dispose();
this.storage = this.proxy = this.painter = null;
},
/**
* 设置默认的cursor style
* @param {string} [cursorStyle='default'] 例如 crosshair
*/
setCursorStyle: function (cursorStyle) {
var proxy = this.proxy;
proxy.setCursor && proxy.setCursor(cursorStyle);
},
/**
* 事件分发代理
*
* @private
* @param {Object} targetInfo {target, topTarget} 目标图形元素
* @param {string} eventName 事件名称
* @param {Object} event 事件对象
*/
dispatchToElement: function (targetInfo, eventName, event) {
targetInfo = targetInfo || {};
var el = targetInfo.target;
if (el && el.silent) {
return;
}
var eventHandler = 'on' + eventName;
var eventPacket = makeEventPacket(eventName, targetInfo, event);
while (el) {
el[eventHandler] && (eventPacket.cancelBubble = el[eventHandler].call(el, eventPacket));
el.trigger(eventName, eventPacket);
el = el.parent;
if (eventPacket.cancelBubble) {
break;
}
}
if (!eventPacket.cancelBubble) {
// 冒泡到顶级 zrender 对象
this.trigger(eventName, eventPacket); // 分发事件到用户自定义层
// 用户有可能在全局 click 事件中 dispose,所以需要判断下 painter 是否存在
this.painter && this.painter.eachOtherLayer(function (layer) {
if (typeof layer[eventHandler] === 'function') {
layer[eventHandler].call(layer, eventPacket);
}
if (layer.trigger) {
layer.trigger(eventName, eventPacket);
}
});
}
},
/**
* @private
* @param {number} x
* @param {number} y
* @param {module:zrender/graphic/Displayable} exclude
* @return {model:zrender/Element}
* @method
*/
findHover: function (x, y, exclude) {
var list = this.storage.getDisplayList();
var out = {
x: x,
y: y
};
for (var i = list.length - 1; i >= 0; i--) {
var hoverCheckResult;
if (list[i] !== exclude // getDisplayList may include ignored item in VML mode
&& !list[i].ignore && (hoverCheckResult = isHover(list[i], x, y))) {
!out.topTarget && (out.topTarget = list[i]);
if (hoverCheckResult !== SILENT) {
out.target = list[i];
break;
}
}
}
return out;
},
processGesture: function (event, stage) {
if (!this._gestureMgr) {
this._gestureMgr = new GestureMgr();
}
var gestureMgr = this._gestureMgr;
stage === 'start' && gestureMgr.clear();
var gestureInfo = gestureMgr.recognize(event, this.findHover(event.zrX, event.zrY, null).target, this.proxy.dom);
stage === 'end' && gestureMgr.clear(); // Do not do any preventDefault here. Upper application do that if necessary.
if (gestureInfo) {
var type = gestureInfo.type;
event.gestureEvent = type;
this.dispatchToElement({
target: gestureInfo.target
}, type, gestureInfo.event);
}
}
}; // Common handlers
util.each(['click', 'mousedown', 'mouseup', 'mousewheel', 'dblclick', 'contextmenu'], function (name) {
Handler.prototype[name] = function (event) {
var x = event.zrX;
var y = event.zrY;
var isOutside = isOutsideBoundary(this, x, y);
var hovered;
var hoveredTarget;
if (name !== 'mouseup' || !isOutside) {
// Find hover again to avoid click event is dispatched manually. Or click is triggered without mouseover
hovered = this.findHover(x, y);
hoveredTarget = hovered.target;
}
if (name === 'mousedown') {
this._downEl = hoveredTarget;
this._downPoint = [event.zrX, event.zrY]; // In case click triggered before mouseup
this._upEl = hoveredTarget;
} else if (name === 'mouseup') {
this._upEl = hoveredTarget;
} else if (name === 'click') {
if (this._downEl !== this._upEl // Original click event is triggered on the whole canvas element,
// including the case that `mousedown` - `mousemove` - `mouseup`,
// which should be filtered, otherwise it will bring trouble to
// pan and zoom.
|| !this._downPoint // Arbitrary value
|| vec2.dist(this._downPoint, [event.zrX, event.zrY]) > 4) {
return;
}
this._downPoint = null;
}
this.dispatchToElement(hovered, name, event);
};
});
function isHover(displayable, x, y) {
if (displayable[displayable.rectHover ? 'rectContain' : 'contain'](x, y)) {
var el = displayable;
var isSilent;
while (el) {
// If clipped by ancestor.
// FIXME: If clipPath has neither stroke nor fill,
// el.clipPath.contain(x, y) will always return false.
if (el.clipPath && !el.clipPath.contain(x, y)) {
return false;
}
if (el.silent) {
isSilent = true;
}
el = el.parent;
}
return isSilent ? SILENT : true;
}
return false;
}
/**
* See [Drag outside].
*/
function isOutsideBoundary(handlerInstance, x, y) {
var painter = handlerInstance.painter;
return x < 0 || x > painter.getWidth() || y < 0 || y > painter.getHeight();
}
util.mixin(Handler, Eventful);
util.mixin(Handler, Draggable);
var _default = Handler;
module.exports = _default;
/***/ }),
/***/ "lkT3":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $export = __webpack_require__("Ds5P");
var $reduce = __webpack_require__("FkIZ");
$export($export.P + $export.F * !__webpack_require__("NNrz")([].reduceRight, true), 'Array', {
// 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue])
reduceRight: function reduceRight(callbackfn /* , initialValue */) {
return $reduce(this, callbackfn, arguments.length, arguments[1], true);
}
});
/***/ }),
/***/ "lktj":
/***/ (function(module, exports, __webpack_require__) {
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
var $keys = __webpack_require__("Ibhu");
var enumBugKeys = __webpack_require__("xnc9");
module.exports = Object.keys || function keys(O) {
return $keys(O, enumBugKeys);
};
/***/ }),
/***/ "lnZN":
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__("OzIq");
var inheritIfRequired = __webpack_require__("kic5");
var dP = __webpack_require__("lDLk").f;
var gOPN = __webpack_require__("WcO1").f;
var isRegExp = __webpack_require__("u0PK");
var $flags = __webpack_require__("0pGU");
var $RegExp = global.RegExp;
var Base = $RegExp;
var proto = $RegExp.prototype;
var re1 = /a/g;
var re2 = /a/g;
// "new" creates a new object, old webkit buggy here
var CORRECT_NEW = new $RegExp(re1) !== re1;
if (__webpack_require__("bUqO") && (!CORRECT_NEW || __webpack_require__("zgIt")(function () {
re2[__webpack_require__("kkCw")('match')] = false;
// RegExp constructor can alter flags and IsRegExp works correct with @@match
return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i';
}))) {
$RegExp = function RegExp(p, f) {
var tiRE = this instanceof $RegExp;
var piRE = isRegExp(p);
var fiU = f === undefined;
return !tiRE && piRE && p.constructor === $RegExp && fiU ? p
: inheritIfRequired(CORRECT_NEW
? new Base(piRE && !fiU ? p.source : p, f)
: Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f)
, tiRE ? this : proto, $RegExp);
};
var proxy = function (key) {
key in $RegExp || dP($RegExp, key, {
configurable: true,
get: function () { return Base[key]; },
set: function (it) { Base[key] = it; }
});
};
for (var keys = gOPN(Base), i = 0; keys.length > i;) proxy(keys[i++]);
proto.constructor = $RegExp;
$RegExp.prototype = proto;
__webpack_require__("R3AP")(global, 'RegExp', $RegExp);
}
__webpack_require__("CEne")('RegExp');
/***/ }),
/***/ "lwXq":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = __webpack_require__("/gxq");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function _default(ecModel) {
ecModel.eachSeriesByType('radar', function (seriesModel) {
var data = seriesModel.getData();
var points = [];
var coordSys = seriesModel.coordinateSystem;
if (!coordSys) {
return;
}
var axes = coordSys.getIndicatorAxes();
zrUtil.each(axes, function (axis, axisIndex) {
data.each(data.mapDimension(axes[axisIndex].dim), function (val, dataIndex) {
points[dataIndex] = points[dataIndex] || [];
var point = coordSys.dataToPoint(val, axisIndex);
points[dataIndex][axisIndex] = isValidPoint(point) ? point : getValueMissingPoint(coordSys);
});
}); // Close polygon
data.each(function (idx) {
// TODO
// Is it appropriate to connect to the next data when some data is missing?
// Or, should trade it like `connectNull` in line chart?
var firstPoint = zrUtil.find(points[idx], function (point) {
return isValidPoint(point);
}) || getValueMissingPoint(coordSys); // Copy the first actual point to the end of the array
points[idx].push(firstPoint.slice());
data.setItemLayout(idx, points[idx]);
});
});
}
function isValidPoint(point) {
return !isNaN(point[0]) && !isNaN(point[1]);
}
function getValueMissingPoint(coordSys) {
// It is error-prone to input [NaN, NaN] into polygon, polygon.
// (probably cause problem when refreshing or animating)
return [coordSys.cx, coordSys.cy];
}
module.exports = _default;
/***/ }),
/***/ "lyhN":
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.7 Math.atanh(x)
var $export = __webpack_require__("Ds5P");
var $atanh = Math.atanh;
// Tor Browser bug: Math.atanh(-0) -> 0
$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', {
atanh: function atanh(x) {
return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2;
}
});
/***/ }),
/***/ "m/6y":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = __webpack_require__("/gxq");
var _number = __webpack_require__("wWR3");
var parsePercent = _number.parsePercent;
var _dataStackHelper = __webpack_require__("qVJQ");
var isDimensionStacked = _dataStackHelper.isDimensionStacked;
var createRenderPlanner = __webpack_require__("CqCN");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* global Float32Array */
var STACK_PREFIX = '__ec_stack_';
var LARGE_BAR_MIN_WIDTH = 0.5;
var LargeArr = typeof Float32Array !== 'undefined' ? Float32Array : Array;
function getSeriesStackId(seriesModel) {
return seriesModel.get('stack') || STACK_PREFIX + seriesModel.seriesIndex;
}
function getAxisKey(axis) {
return axis.dim + axis.index;
}
/**
* @param {Object} opt
* @param {module:echarts/coord/Axis} opt.axis Only support category axis currently.
* @param {number} opt.count Positive interger.
* @param {number} [opt.barWidth]
* @param {number} [opt.barMaxWidth]
* @param {number} [opt.barMinWidth]
* @param {number} [opt.barGap]
* @param {number} [opt.barCategoryGap]
* @return {Object} {width, offset, offsetCenter} If axis.type is not 'category', return undefined.
*/
function getLayoutOnAxis(opt) {
var params = [];
var baseAxis = opt.axis;
var axisKey = 'axis0';
if (baseAxis.type !== 'category') {
return;
}
var bandWidth = baseAxis.getBandWidth();
for (var i = 0; i < opt.count || 0; i++) {
params.push(zrUtil.defaults({
bandWidth: bandWidth,
axisKey: axisKey,
stackId: STACK_PREFIX + i
}, opt));
}
var widthAndOffsets = doCalBarWidthAndOffset(params);
var result = [];
for (var i = 0; i < opt.count; i++) {
var item = widthAndOffsets[axisKey][STACK_PREFIX + i];
item.offsetCenter = item.offset + item.width / 2;
result.push(item);
}
return result;
}
function prepareLayoutBarSeries(seriesType, ecModel) {
var seriesModels = [];
ecModel.eachSeriesByType(seriesType, function (seriesModel) {
// Check series coordinate, do layout for cartesian2d only
if (isOnCartesian(seriesModel) && !isInLargeMode(seriesModel)) {
seriesModels.push(seriesModel);
}
});
return seriesModels;
}
/**
* Map from (baseAxis.dim + '_' + baseAxis.index) to min gap of two adjacent
* values.
* This works for time axes, value axes, and log axes.
* For a single time axis, return value is in the form like
* {'x_0': [1000000]}.
* The value of 1000000 is in milliseconds.
*/
function getValueAxesMinGaps(barSeries) {
/**
* Map from axis.index to values.
* For a single time axis, axisValues is in the form like
* {'x_0': [1495555200000, 1495641600000, 1495728000000]}.
* Items in axisValues[x], e.g. 1495555200000, are time values of all
* series.
*/
var axisValues = {};
zrUtil.each(barSeries, function (seriesModel) {
var cartesian = seriesModel.coordinateSystem;
var baseAxis = cartesian.getBaseAxis();
if (baseAxis.type !== 'time' && baseAxis.type !== 'value') {
return;
}
var data = seriesModel.getData();
var key = baseAxis.dim + '_' + baseAxis.index;
var dim = data.mapDimension(baseAxis.dim);
for (var i = 0, cnt = data.count(); i < cnt; ++i) {
var value = data.get(dim, i);
if (!axisValues[key]) {
// No previous data for the axis
axisValues[key] = [value];
} else {
// No value in previous series
axisValues[key].push(value);
} // Ignore duplicated time values in the same axis
}
});
var axisMinGaps = [];
for (var key in axisValues) {
if (axisValues.hasOwnProperty(key)) {
var valuesInAxis = axisValues[key];
if (valuesInAxis) {
// Sort axis values into ascending order to calculate gaps
valuesInAxis.sort(function (a, b) {
return a - b;
});
var min = null;
for (var j = 1; j < valuesInAxis.length; ++j) {
var delta = valuesInAxis[j] - valuesInAxis[j - 1];
if (delta > 0) {
// Ignore 0 delta because they are of the same axis value
min = min === null ? delta : Math.min(min, delta);
}
} // Set to null if only have one data
axisMinGaps[key] = min;
}
}
}
return axisMinGaps;
}
function makeColumnLayout(barSeries) {
var axisMinGaps = getValueAxesMinGaps(barSeries);
var seriesInfoList = [];
zrUtil.each(barSeries, function (seriesModel) {
var cartesian = seriesModel.coordinateSystem;
var baseAxis = cartesian.getBaseAxis();
var axisExtent = baseAxis.getExtent();
var bandWidth;
if (baseAxis.type === 'category') {
bandWidth = baseAxis.getBandWidth();
} else if (baseAxis.type === 'value' || baseAxis.type === 'time') {
var key = baseAxis.dim + '_' + baseAxis.index;
var minGap = axisMinGaps[key];
var extentSpan = Math.abs(axisExtent[1] - axisExtent[0]);
var scale = baseAxis.scale.getExtent();
var scaleSpan = Math.abs(scale[1] - scale[0]);
bandWidth = minGap ? extentSpan / scaleSpan * minGap : extentSpan; // When there is only one data value
} else {
var data = seriesModel.getData();
bandWidth = Math.abs(axisExtent[1] - axisExtent[0]) / data.count();
}
var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);
var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);
var barMinWidth = parsePercent( // barMinWidth by default is 1 in cartesian. Because in value axis,
// the auto-calculated bar width might be less than 1.
seriesModel.get('barMinWidth') || 1, bandWidth);
var barGap = seriesModel.get('barGap');
var barCategoryGap = seriesModel.get('barCategoryGap');
seriesInfoList.push({
bandWidth: bandWidth,
barWidth: barWidth,
barMaxWidth: barMaxWidth,
barMinWidth: barMinWidth,
barGap: barGap,
barCategoryGap: barCategoryGap,
axisKey: getAxisKey(baseAxis),
stackId: getSeriesStackId(seriesModel)
});
});
return doCalBarWidthAndOffset(seriesInfoList);
}
function doCalBarWidthAndOffset(seriesInfoList) {
// Columns info on each category axis. Key is cartesian name
var columnsMap = {};
zrUtil.each(seriesInfoList, function (seriesInfo, idx) {
var axisKey = seriesInfo.axisKey;
var bandWidth = seriesInfo.bandWidth;
var columnsOnAxis = columnsMap[axisKey] || {
bandWidth: bandWidth,
remainedWidth: bandWidth,
autoWidthCount: 0,
categoryGap: '20%',
gap: '30%',
stacks: {}
};
var stacks = columnsOnAxis.stacks;
columnsMap[axisKey] = columnsOnAxis;
var stackId = seriesInfo.stackId;
if (!stacks[stackId]) {
columnsOnAxis.autoWidthCount++;
}
stacks[stackId] = stacks[stackId] || {
width: 0,
maxWidth: 0
}; // Caution: In a single coordinate system, these barGrid attributes
// will be shared by series. Consider that they have default values,
// only the attributes set on the last series will work.
// Do not change this fact unless there will be a break change.
var barWidth = seriesInfo.barWidth;
if (barWidth && !stacks[stackId].width) {
// See #6312, do not restrict width.
stacks[stackId].width = barWidth;
barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);
columnsOnAxis.remainedWidth -= barWidth;
}
var barMaxWidth = seriesInfo.barMaxWidth;
barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);
var barMinWidth = seriesInfo.barMinWidth;
barMinWidth && (stacks[stackId].minWidth = barMinWidth);
var barGap = seriesInfo.barGap;
barGap != null && (columnsOnAxis.gap = barGap);
var barCategoryGap = seriesInfo.barCategoryGap;
barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);
});
var result = {};
zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {
result[coordSysName] = {};
var stacks = columnsOnAxis.stacks;
var bandWidth = columnsOnAxis.bandWidth;
var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);
var barGapPercent = parsePercent(columnsOnAxis.gap, 1);
var remainedWidth = columnsOnAxis.remainedWidth;
var autoWidthCount = columnsOnAxis.autoWidthCount;
var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);
autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth
zrUtil.each(stacks, function (column) {
var maxWidth = column.maxWidth;
var minWidth = column.minWidth;
if (!column.width) {
var finalWidth = autoWidth;
if (maxWidth && maxWidth < finalWidth) {
finalWidth = Math.min(maxWidth, remainedWidth);
} // `minWidth` has higher priority. `minWidth` decide that wheter the
// bar is able to be visible. So `minWidth` should not be restricted
// by `maxWidth` or `remainedWidth` (which is from `bandWidth`). In
// the extreme cases for `value` axis, bars are allowed to overlap
// with each other if `minWidth` specified.
if (minWidth && minWidth > finalWidth) {
finalWidth = minWidth;
}
if (finalWidth !== autoWidth) {
column.width = finalWidth;
remainedWidth -= finalWidth + barGapPercent * finalWidth;
autoWidthCount--;
}
} else {
// `barMinWidth/barMaxWidth` has higher priority than `barWidth`, as
// CSS does. Becuase barWidth can be a percent value, where
// `barMaxWidth` can be used to restrict the final width.
var finalWidth = column.width;
if (maxWidth) {
finalWidth = Math.min(finalWidth, maxWidth);
} // `minWidth` has higher priority, as described above
if (minWidth) {
finalWidth = Math.max(finalWidth, minWidth);
}
column.width = finalWidth;
remainedWidth -= finalWidth + barGapPercent * finalWidth;
autoWidthCount--;
}
}); // Recalculate width again
autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);
autoWidth = Math.max(autoWidth, 0);
var widthSum = 0;
var lastColumn;
zrUtil.each(stacks, function (column, idx) {
if (!column.width) {
column.width = autoWidth;
}
lastColumn = column;
widthSum += column.width * (1 + barGapPercent);
});
if (lastColumn) {
widthSum -= lastColumn.width * barGapPercent;
}
var offset = -widthSum / 2;
zrUtil.each(stacks, function (column, stackId) {
result[coordSysName][stackId] = result[coordSysName][stackId] || {
bandWidth: bandWidth,
offset: offset,
width: column.width
};
offset += column.width * (1 + barGapPercent);
});
});
return result;
}
/**
* @param {Object} barWidthAndOffset The result of makeColumnLayout
* @param {module:echarts/coord/Axis} axis
* @param {module:echarts/model/Series} [seriesModel] If not provided, return all.
* @return {Object} {stackId: {offset, width}} or {offset, width} if seriesModel provided.
*/
function retrieveColumnLayout(barWidthAndOffset, axis, seriesModel) {
if (barWidthAndOffset && axis) {
var result = barWidthAndOffset[getAxisKey(axis)];
if (result != null && seriesModel != null) {
result = result[getSeriesStackId(seriesModel)];
}
return result;
}
}
/**
* @param {string} seriesType
* @param {module:echarts/model/Global} ecModel
*/
function layout(seriesType, ecModel) {
var seriesModels = prepareLayoutBarSeries(seriesType, ecModel);
var barWidthAndOffset = makeColumnLayout(seriesModels);
var lastStackCoords = {};
var lastStackCoordsOrigin = {};
zrUtil.each(seriesModels, function (seriesModel) {
var data = seriesModel.getData();
var cartesian = seriesModel.coordinateSystem;
var baseAxis = cartesian.getBaseAxis();
var stackId = getSeriesStackId(seriesModel);
var columnLayoutInfo = barWidthAndOffset[getAxisKey(baseAxis)][stackId];
var columnOffset = columnLayoutInfo.offset;
var columnWidth = columnLayoutInfo.width;
var valueAxis = cartesian.getOtherAxis(baseAxis);
var barMinHeight = seriesModel.get('barMinHeight') || 0;
lastStackCoords[stackId] = lastStackCoords[stackId] || [];
lastStackCoordsOrigin[stackId] = lastStackCoordsOrigin[stackId] || []; // Fix #4243
data.setLayout({
bandWidth: columnLayoutInfo.bandWidth,
offset: columnOffset,
size: columnWidth
});
var valueDim = data.mapDimension(valueAxis.dim);
var baseDim = data.mapDimension(baseAxis.dim);
var stacked = isDimensionStacked(data, valueDim
/*, baseDim*/
);
var isValueAxisH = valueAxis.isHorizontal();
var valueAxisStart = getValueAxisStart(baseAxis, valueAxis, stacked);
for (var idx = 0, len = data.count(); idx < len; idx++) {
var value = data.get(valueDim, idx);
var baseValue = data.get(baseDim, idx);
var sign = value >= 0 ? 'p' : 'n';
var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in
// stackResultDimension directly.
if (stacked) {
// Only ordinal axis can be stacked.
if (!lastStackCoords[stackId][baseValue]) {
lastStackCoords[stackId][baseValue] = {
p: valueAxisStart,
// Positive stack
n: valueAxisStart // Negative stack
};
} // Should also consider #4243
baseCoord = lastStackCoords[stackId][baseValue][sign];
}
var x;
var y;
var width;
var height;
if (isValueAxisH) {
var coord = cartesian.dataToPoint([value, baseValue]);
x = baseCoord;
y = coord[1] + columnOffset;
width = coord[0] - valueAxisStart;
height = columnWidth;
if (Math.abs(width) < barMinHeight) {
width = (width < 0 ? -1 : 1) * barMinHeight;
} // Ignore stack from NaN value
if (!isNaN(width)) {
stacked && (lastStackCoords[stackId][baseValue][sign] += width);
}
} else {
var coord = cartesian.dataToPoint([baseValue, value]);
x = coord[0] + columnOffset;
y = baseCoord;
width = columnWidth;
height = coord[1] - valueAxisStart;
if (Math.abs(height) < barMinHeight) {
// Include zero to has a positive bar
height = (height <= 0 ? -1 : 1) * barMinHeight;
} // Ignore stack from NaN value
if (!isNaN(height)) {
stacked && (lastStackCoords[stackId][baseValue][sign] += height);
}
}
data.setItemLayout(idx, {
x: x,
y: y,
width: width,
height: height
});
}
}, this);
} // TODO: Do not support stack in large mode yet.
var largeLayout = {
seriesType: 'bar',
plan: createRenderPlanner(),
reset: function (seriesModel) {
if (!isOnCartesian(seriesModel) || !isInLargeMode(seriesModel)) {
return;
}
var data = seriesModel.getData();
var cartesian = seriesModel.coordinateSystem;
var coordLayout = cartesian.grid.getRect();
var baseAxis = cartesian.getBaseAxis();
var valueAxis = cartesian.getOtherAxis(baseAxis);
var valueDim = data.mapDimension(valueAxis.dim);
var baseDim = data.mapDimension(baseAxis.dim);
var valueAxisHorizontal = valueAxis.isHorizontal();
var valueDimIdx = valueAxisHorizontal ? 0 : 1;
var barWidth = retrieveColumnLayout(makeColumnLayout([seriesModel]), baseAxis, seriesModel).width;
if (!(barWidth > LARGE_BAR_MIN_WIDTH)) {
// jshint ignore:line
barWidth = LARGE_BAR_MIN_WIDTH;
}
return {
progress: progress
};
function progress(params, data) {
var count = params.count;
var largePoints = new LargeArr(count * 2);
var largeBackgroundPoints = new LargeArr(count * 2);
var largeDataIndices = new LargeArr(count);
var dataIndex;
var coord = [];
var valuePair = [];
var pointsOffset = 0;
var idxOffset = 0;
while ((dataIndex = params.next()) != null) {
valuePair[valueDimIdx] = data.get(valueDim, dataIndex);
valuePair[1 - valueDimIdx] = data.get(baseDim, dataIndex);
coord = cartesian.dataToPoint(valuePair, null, coord); // Data index might not be in order, depends on `progressiveChunkMode`.
largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coordLayout.x + coordLayout.width : coord[0];
largePoints[pointsOffset++] = coord[0];
largeBackgroundPoints[pointsOffset] = valueAxisHorizontal ? coord[1] : coordLayout.y + coordLayout.height;
largePoints[pointsOffset++] = coord[1];
largeDataIndices[idxOffset++] = dataIndex;
}
data.setLayout({
largePoints: largePoints,
largeDataIndices: largeDataIndices,
largeBackgroundPoints: largeBackgroundPoints,
barWidth: barWidth,
valueAxisStart: getValueAxisStart(baseAxis, valueAxis, false),
backgroundStart: valueAxisHorizontal ? coordLayout.x : coordLayout.y,
valueAxisHorizontal: valueAxisHorizontal
});
}
}
};
function isOnCartesian(seriesModel) {
return seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'cartesian2d';
}
function isInLargeMode(seriesModel) {
return seriesModel.pipelineContext && seriesModel.pipelineContext.large;
} // See cases in `test/bar-start.html` and `#7412`, `#8747`.
function getValueAxisStart(baseAxis, valueAxis, stacked) {
return valueAxis.toGlobalCoord(valueAxis.dataToCoord(valueAxis.type === 'log' ? 1 : 0));
}
exports.getLayoutOnAxis = getLayoutOnAxis;
exports.prepareLayoutBarSeries = prepareLayoutBarSeries;
exports.makeColumnLayout = makeColumnLayout;
exports.retrieveColumnLayout = retrieveColumnLayout;
exports.layout = layout;
exports.largeLayout = largeLayout;
/***/ }),
/***/ "m5oG":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var echarts = __webpack_require__("Icdr");
var zrUtil = __webpack_require__("/gxq");
var graphic = __webpack_require__("0sHC");
var _symbol = __webpack_require__("kK7q");
var createSymbol = _symbol.createSymbol;
var _number = __webpack_require__("wWR3");
var parsePercent = _number.parsePercent;
var isNumeric = _number.isNumeric;
var _helper = __webpack_require__("dzlV");
var setLabel = _helper.setLabel;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var BAR_BORDER_WIDTH_QUERY = ['itemStyle', 'borderWidth']; // index: +isHorizontal
var LAYOUT_ATTRS = [{
xy: 'x',
wh: 'width',
index: 0,
posDesc: ['left', 'right']
}, {
xy: 'y',
wh: 'height',
index: 1,
posDesc: ['top', 'bottom']
}];
var pathForLineWidth = new graphic.Circle();
var BarView = echarts.extendChartView({
type: 'pictorialBar',
render: function (seriesModel, ecModel, api) {
var group = this.group;
var data = seriesModel.getData();
var oldData = this._data;
var cartesian = seriesModel.coordinateSystem;
var baseAxis = cartesian.getBaseAxis();
var isHorizontal = !!baseAxis.isHorizontal();
var coordSysRect = cartesian.grid.getRect();
var opt = {
ecSize: {
width: api.getWidth(),
height: api.getHeight()
},
seriesModel: seriesModel,
coordSys: cartesian,
coordSysExtent: [[coordSysRect.x, coordSysRect.x + coordSysRect.width], [coordSysRect.y, coordSysRect.y + coordSysRect.height]],
isHorizontal: isHorizontal,
valueDim: LAYOUT_ATTRS[+isHorizontal],
categoryDim: LAYOUT_ATTRS[1 - isHorizontal]
};
data.diff(oldData).add(function (dataIndex) {
if (!data.hasValue(dataIndex)) {
return;
}
var itemModel = getItemModel(data, dataIndex);
var symbolMeta = getSymbolMeta(data, dataIndex, itemModel, opt);
var bar = createBar(data, opt, symbolMeta);
data.setItemGraphicEl(dataIndex, bar);
group.add(bar);
updateCommon(bar, opt, symbolMeta);
}).update(function (newIndex, oldIndex) {
var bar = oldData.getItemGraphicEl(oldIndex);
if (!data.hasValue(newIndex)) {
group.remove(bar);
return;
}
var itemModel = getItemModel(data, newIndex);
var symbolMeta = getSymbolMeta(data, newIndex, itemModel, opt);
var pictorialShapeStr = getShapeStr(data, symbolMeta);
if (bar && pictorialShapeStr !== bar.__pictorialShapeStr) {
group.remove(bar);
data.setItemGraphicEl(newIndex, null);
bar = null;
}
if (bar) {
updateBar(bar, opt, symbolMeta);
} else {
bar = createBar(data, opt, symbolMeta, true);
}
data.setItemGraphicEl(newIndex, bar);
bar.__pictorialSymbolMeta = symbolMeta; // Add back
group.add(bar);
updateCommon(bar, opt, symbolMeta);
}).remove(function (dataIndex) {
var bar = oldData.getItemGraphicEl(dataIndex);
bar && removeBar(oldData, dataIndex, bar.__pictorialSymbolMeta.animationModel, bar);
}).execute();
this._data = data;
return this.group;
},
dispose: zrUtil.noop,
remove: function (ecModel, api) {
var group = this.group;
var data = this._data;
if (ecModel.get('animation')) {
if (data) {
data.eachItemGraphicEl(function (bar) {
removeBar(data, bar.dataIndex, ecModel, bar);
});
}
} else {
group.removeAll();
}
}
}); // Set or calculate default value about symbol, and calculate layout info.
function getSymbolMeta(data, dataIndex, itemModel, opt) {
var layout = data.getItemLayout(dataIndex);
var symbolRepeat = itemModel.get('symbolRepeat');
var symbolClip = itemModel.get('symbolClip');
var symbolPosition = itemModel.get('symbolPosition') || 'start';
var symbolRotate = itemModel.get('symbolRotate');
var rotation = (symbolRotate || 0) * Math.PI / 180 || 0;
var symbolPatternSize = itemModel.get('symbolPatternSize') || 2;
var isAnimationEnabled = itemModel.isAnimationEnabled();
var symbolMeta = {
dataIndex: dataIndex,
layout: layout,
itemModel: itemModel,
symbolType: data.getItemVisual(dataIndex, 'symbol') || 'circle',
color: data.getItemVisual(dataIndex, 'color'),
symbolClip: symbolClip,
symbolRepeat: symbolRepeat,
symbolRepeatDirection: itemModel.get('symbolRepeatDirection'),
symbolPatternSize: symbolPatternSize,
rotation: rotation,
animationModel: isAnimationEnabled ? itemModel : null,
hoverAnimation: isAnimationEnabled && itemModel.get('hoverAnimation'),
z2: itemModel.getShallow('z', true) || 0
};
prepareBarLength(itemModel, symbolRepeat, layout, opt, symbolMeta);
prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, symbolMeta.boundingLength, symbolMeta.pxSign, symbolPatternSize, opt, symbolMeta);
prepareLineWidth(itemModel, symbolMeta.symbolScale, rotation, opt, symbolMeta);
var symbolSize = symbolMeta.symbolSize;
var symbolOffset = itemModel.get('symbolOffset');
if (zrUtil.isArray(symbolOffset)) {
symbolOffset = [parsePercent(symbolOffset[0], symbolSize[0]), parsePercent(symbolOffset[1], symbolSize[1])];
}
prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, symbolMeta.valueLineWidth, symbolMeta.boundingLength, symbolMeta.repeatCutLength, opt, symbolMeta);
return symbolMeta;
} // bar length can be negative.
function prepareBarLength(itemModel, symbolRepeat, layout, opt, output) {
var valueDim = opt.valueDim;
var symbolBoundingData = itemModel.get('symbolBoundingData');
var valueAxis = opt.coordSys.getOtherAxis(opt.coordSys.getBaseAxis());
var zeroPx = valueAxis.toGlobalCoord(valueAxis.dataToCoord(0));
var pxSignIdx = 1 - +(layout[valueDim.wh] <= 0);
var boundingLength;
if (zrUtil.isArray(symbolBoundingData)) {
var symbolBoundingExtent = [convertToCoordOnAxis(valueAxis, symbolBoundingData[0]) - zeroPx, convertToCoordOnAxis(valueAxis, symbolBoundingData[1]) - zeroPx];
symbolBoundingExtent[1] < symbolBoundingExtent[0] && symbolBoundingExtent.reverse();
boundingLength = symbolBoundingExtent[pxSignIdx];
} else if (symbolBoundingData != null) {
boundingLength = convertToCoordOnAxis(valueAxis, symbolBoundingData) - zeroPx;
} else if (symbolRepeat) {
boundingLength = opt.coordSysExtent[valueDim.index][pxSignIdx] - zeroPx;
} else {
boundingLength = layout[valueDim.wh];
}
output.boundingLength = boundingLength;
if (symbolRepeat) {
output.repeatCutLength = layout[valueDim.wh];
}
output.pxSign = boundingLength > 0 ? 1 : boundingLength < 0 ? -1 : 0;
}
function convertToCoordOnAxis(axis, value) {
return axis.toGlobalCoord(axis.dataToCoord(axis.scale.parse(value)));
} // Support ['100%', '100%']
function prepareSymbolSize(data, dataIndex, layout, symbolRepeat, symbolClip, boundingLength, pxSign, symbolPatternSize, opt, output) {
var valueDim = opt.valueDim;
var categoryDim = opt.categoryDim;
var categorySize = Math.abs(layout[categoryDim.wh]);
var symbolSize = data.getItemVisual(dataIndex, 'symbolSize');
if (zrUtil.isArray(symbolSize)) {
symbolSize = symbolSize.slice();
} else {
if (symbolSize == null) {
symbolSize = '100%';
}
symbolSize = [symbolSize, symbolSize];
} // Note: percentage symbolSize (like '100%') do not consider lineWidth, because it is
// to complicated to calculate real percent value if considering scaled lineWidth.
// So the actual size will bigger than layout size if lineWidth is bigger than zero,
// which can be tolerated in pictorial chart.
symbolSize[categoryDim.index] = parsePercent(symbolSize[categoryDim.index], categorySize);
symbolSize[valueDim.index] = parsePercent(symbolSize[valueDim.index], symbolRepeat ? categorySize : Math.abs(boundingLength));
output.symbolSize = symbolSize; // If x or y is less than zero, show reversed shape.
var symbolScale = output.symbolScale = [symbolSize[0] / symbolPatternSize, symbolSize[1] / symbolPatternSize]; // Follow convention, 'right' and 'top' is the normal scale.
symbolScale[valueDim.index] *= (opt.isHorizontal ? -1 : 1) * pxSign;
}
function prepareLineWidth(itemModel, symbolScale, rotation, opt, output) {
// In symbols are drawn with scale, so do not need to care about the case that width
// or height are too small. But symbol use strokeNoScale, where acture lineWidth should
// be calculated.
var valueLineWidth = itemModel.get(BAR_BORDER_WIDTH_QUERY) || 0;
if (valueLineWidth) {
pathForLineWidth.attr({
scale: symbolScale.slice(),
rotation: rotation
});
pathForLineWidth.updateTransform();
valueLineWidth /= pathForLineWidth.getLineScale();
valueLineWidth *= symbolScale[opt.valueDim.index];
}
output.valueLineWidth = valueLineWidth;
}
function prepareLayoutInfo(itemModel, symbolSize, layout, symbolRepeat, symbolClip, symbolOffset, symbolPosition, valueLineWidth, boundingLength, repeatCutLength, opt, output) {
var categoryDim = opt.categoryDim;
var valueDim = opt.valueDim;
var pxSign = output.pxSign;
var unitLength = Math.max(symbolSize[valueDim.index] + valueLineWidth, 0);
var pathLen = unitLength; // Note: rotation will not effect the layout of symbols, because user may
// want symbols to rotate on its center, which should not be translated
// when rotating.
if (symbolRepeat) {
var absBoundingLength = Math.abs(boundingLength);
var symbolMargin = zrUtil.retrieve(itemModel.get('symbolMargin'), '15%') + '';
var hasEndGap = false;
if (symbolMargin.lastIndexOf('!') === symbolMargin.length - 1) {
hasEndGap = true;
symbolMargin = symbolMargin.slice(0, symbolMargin.length - 1);
}
symbolMargin = parsePercent(symbolMargin, symbolSize[valueDim.index]);
var uLenWithMargin = Math.max(unitLength + symbolMargin * 2, 0); // When symbol margin is less than 0, margin at both ends will be subtracted
// to ensure that all of the symbols will not be overflow the given area.
var endFix = hasEndGap ? 0 : symbolMargin * 2; // Both final repeatTimes and final symbolMargin area calculated based on
// boundingLength.
var repeatSpecified = isNumeric(symbolRepeat);
var repeatTimes = repeatSpecified ? symbolRepeat : toIntTimes((absBoundingLength + endFix) / uLenWithMargin); // Adjust calculate margin, to ensure each symbol is displayed
// entirely in the given layout area.
var mDiff = absBoundingLength - repeatTimes * unitLength;
symbolMargin = mDiff / 2 / (hasEndGap ? repeatTimes : repeatTimes - 1);
uLenWithMargin = unitLength + symbolMargin * 2;
endFix = hasEndGap ? 0 : symbolMargin * 2; // Update repeatTimes when not all symbol will be shown.
if (!repeatSpecified && symbolRepeat !== 'fixed') {
repeatTimes = repeatCutLength ? toIntTimes((Math.abs(repeatCutLength) + endFix) / uLenWithMargin) : 0;
}
pathLen = repeatTimes * uLenWithMargin - endFix;
output.repeatTimes = repeatTimes;
output.symbolMargin = symbolMargin;
}
var sizeFix = pxSign * (pathLen / 2);
var pathPosition = output.pathPosition = [];
pathPosition[categoryDim.index] = layout[categoryDim.wh] / 2;
pathPosition[valueDim.index] = symbolPosition === 'start' ? sizeFix : symbolPosition === 'end' ? boundingLength - sizeFix : boundingLength / 2; // 'center'
if (symbolOffset) {
pathPosition[0] += symbolOffset[0];
pathPosition[1] += symbolOffset[1];
}
var bundlePosition = output.bundlePosition = [];
bundlePosition[categoryDim.index] = layout[categoryDim.xy];
bundlePosition[valueDim.index] = layout[valueDim.xy];
var barRectShape = output.barRectShape = zrUtil.extend({}, layout);
barRectShape[valueDim.wh] = pxSign * Math.max(Math.abs(layout[valueDim.wh]), Math.abs(pathPosition[valueDim.index] + sizeFix));
barRectShape[categoryDim.wh] = layout[categoryDim.wh];
var clipShape = output.clipShape = {}; // Consider that symbol may be overflow layout rect.
clipShape[categoryDim.xy] = -layout[categoryDim.xy];
clipShape[categoryDim.wh] = opt.ecSize[categoryDim.wh];
clipShape[valueDim.xy] = 0;
clipShape[valueDim.wh] = layout[valueDim.wh];
}
function createPath(symbolMeta) {
var symbolPatternSize = symbolMeta.symbolPatternSize;
var path = createSymbol( // Consider texture img, make a big size.
symbolMeta.symbolType, -symbolPatternSize / 2, -symbolPatternSize / 2, symbolPatternSize, symbolPatternSize, symbolMeta.color);
path.attr({
culling: true
});
path.type !== 'image' && path.setStyle({
strokeNoScale: true
});
return path;
}
function createOrUpdateRepeatSymbols(bar, opt, symbolMeta, isUpdate) {
var bundle = bar.__pictorialBundle;
var symbolSize = symbolMeta.symbolSize;
var valueLineWidth = symbolMeta.valueLineWidth;
var pathPosition = symbolMeta.pathPosition;
var valueDim = opt.valueDim;
var repeatTimes = symbolMeta.repeatTimes || 0;
var index = 0;
var unit = symbolSize[opt.valueDim.index] + valueLineWidth + symbolMeta.symbolMargin * 2;
eachPath(bar, function (path) {
path.__pictorialAnimationIndex = index;
path.__pictorialRepeatTimes = repeatTimes;
if (index < repeatTimes) {
updateAttr(path, null, makeTarget(index), symbolMeta, isUpdate);
} else {
updateAttr(path, null, {
scale: [0, 0]
}, symbolMeta, isUpdate, function () {
bundle.remove(path);
});
}
updateHoverAnimation(path, symbolMeta);
index++;
});
for (; index < repeatTimes; index++) {
var path = createPath(symbolMeta);
path.__pictorialAnimationIndex = index;
path.__pictorialRepeatTimes = repeatTimes;
bundle.add(path);
var target = makeTarget(index);
updateAttr(path, {
position: target.position,
scale: [0, 0]
}, {
scale: target.scale,
rotation: target.rotation
}, symbolMeta, isUpdate); // FIXME
// If all emphasis/normal through action.
path.on('mouseover', onMouseOver).on('mouseout', onMouseOut);
updateHoverAnimation(path, symbolMeta);
}
function makeTarget(index) {
var position = pathPosition.slice(); // (start && pxSign > 0) || (end && pxSign < 0): i = repeatTimes - index
// Otherwise: i = index;
var pxSign = symbolMeta.pxSign;
var i = index;
if (symbolMeta.symbolRepeatDirection === 'start' ? pxSign > 0 : pxSign < 0) {
i = repeatTimes - 1 - index;
}
position[valueDim.index] = unit * (i - repeatTimes / 2 + 0.5) + pathPosition[valueDim.index];
return {
position: position,
scale: symbolMeta.symbolScale.slice(),
rotation: symbolMeta.rotation
};
}
function onMouseOver() {
eachPath(bar, function (path) {
path.trigger('emphasis');
});
}
function onMouseOut() {
eachPath(bar, function (path) {
path.trigger('normal');
});
}
}
function createOrUpdateSingleSymbol(bar, opt, symbolMeta, isUpdate) {
var bundle = bar.__pictorialBundle;
var mainPath = bar.__pictorialMainPath;
if (!mainPath) {
mainPath = bar.__pictorialMainPath = createPath(symbolMeta);
bundle.add(mainPath);
updateAttr(mainPath, {
position: symbolMeta.pathPosition.slice(),
scale: [0, 0],
rotation: symbolMeta.rotation
}, {
scale: symbolMeta.symbolScale.slice()
}, symbolMeta, isUpdate);
mainPath.on('mouseover', onMouseOver).on('mouseout', onMouseOut);
} else {
updateAttr(mainPath, null, {
position: symbolMeta.pathPosition.slice(),
scale: symbolMeta.symbolScale.slice(),
rotation: symbolMeta.rotation
}, symbolMeta, isUpdate);
}
updateHoverAnimation(mainPath, symbolMeta);
function onMouseOver() {
this.trigger('emphasis');
}
function onMouseOut() {
this.trigger('normal');
}
} // bar rect is used for label.
function createOrUpdateBarRect(bar, symbolMeta, isUpdate) {
var rectShape = zrUtil.extend({}, symbolMeta.barRectShape);
var barRect = bar.__pictorialBarRect;
if (!barRect) {
barRect = bar.__pictorialBarRect = new graphic.Rect({
z2: 2,
shape: rectShape,
silent: true,
style: {
stroke: 'transparent',
fill: 'transparent',
lineWidth: 0
}
});
bar.add(barRect);
} else {
updateAttr(barRect, null, {
shape: rectShape
}, symbolMeta, isUpdate);
}
}
function createOrUpdateClip(bar, opt, symbolMeta, isUpdate) {
// If not clip, symbol will be remove and rebuilt.
if (symbolMeta.symbolClip) {
var clipPath = bar.__pictorialClipPath;
var clipShape = zrUtil.extend({}, symbolMeta.clipShape);
var valueDim = opt.valueDim;
var animationModel = symbolMeta.animationModel;
var dataIndex = symbolMeta.dataIndex;
if (clipPath) {
graphic.updateProps(clipPath, {
shape: clipShape
}, animationModel, dataIndex);
} else {
clipShape[valueDim.wh] = 0;
clipPath = new graphic.Rect({
shape: clipShape
});
bar.__pictorialBundle.setClipPath(clipPath);
bar.__pictorialClipPath = clipPath;
var target = {};
target[valueDim.wh] = symbolMeta.clipShape[valueDim.wh];
graphic[isUpdate ? 'updateProps' : 'initProps'](clipPath, {
shape: target
}, animationModel, dataIndex);
}
}
}
function getItemModel(data, dataIndex) {
var itemModel = data.getItemModel(dataIndex);
itemModel.getAnimationDelayParams = getAnimationDelayParams;
itemModel.isAnimationEnabled = isAnimationEnabled;
return itemModel;
}
function getAnimationDelayParams(path) {
// The order is the same as the z-order, see `symbolRepeatDiretion`.
return {
index: path.__pictorialAnimationIndex,
count: path.__pictorialRepeatTimes
};
}
function isAnimationEnabled() {
// `animation` prop can be set on itemModel in pictorial bar chart.
return this.parentModel.isAnimationEnabled() && !!this.getShallow('animation');
}
function updateHoverAnimation(path, symbolMeta) {
path.off('emphasis').off('normal');
var scale = symbolMeta.symbolScale.slice();
symbolMeta.hoverAnimation && path.on('emphasis', function () {
this.animateTo({
scale: [scale[0] * 1.1, scale[1] * 1.1]
}, 400, 'elasticOut');
}).on('normal', function () {
this.animateTo({
scale: scale.slice()
}, 400, 'elasticOut');
});
}
function createBar(data, opt, symbolMeta, isUpdate) {
// bar is the main element for each data.
var bar = new graphic.Group(); // bundle is used for location and clip.
var bundle = new graphic.Group();
bar.add(bundle);
bar.__pictorialBundle = bundle;
bundle.attr('position', symbolMeta.bundlePosition.slice());
if (symbolMeta.symbolRepeat) {
createOrUpdateRepeatSymbols(bar, opt, symbolMeta);
} else {
createOrUpdateSingleSymbol(bar, opt, symbolMeta);
}
createOrUpdateBarRect(bar, symbolMeta, isUpdate);
createOrUpdateClip(bar, opt, symbolMeta, isUpdate);
bar.__pictorialShapeStr = getShapeStr(data, symbolMeta);
bar.__pictorialSymbolMeta = symbolMeta;
return bar;
}
function updateBar(bar, opt, symbolMeta) {
var animationModel = symbolMeta.animationModel;
var dataIndex = symbolMeta.dataIndex;
var bundle = bar.__pictorialBundle;
graphic.updateProps(bundle, {
position: symbolMeta.bundlePosition.slice()
}, animationModel, dataIndex);
if (symbolMeta.symbolRepeat) {
createOrUpdateRepeatSymbols(bar, opt, symbolMeta, true);
} else {
createOrUpdateSingleSymbol(bar, opt, symbolMeta, true);
}
createOrUpdateBarRect(bar, symbolMeta, true);
createOrUpdateClip(bar, opt, symbolMeta, true);
}
function removeBar(data, dataIndex, animationModel, bar) {
// Not show text when animating
var labelRect = bar.__pictorialBarRect;
labelRect && (labelRect.style.text = null);
var pathes = [];
eachPath(bar, function (path) {
pathes.push(path);
});
bar.__pictorialMainPath && pathes.push(bar.__pictorialMainPath); // I do not find proper remove animation for clip yet.
bar.__pictorialClipPath && (animationModel = null);
zrUtil.each(pathes, function (path) {
graphic.updateProps(path, {
scale: [0, 0]
}, animationModel, dataIndex, function () {
bar.parent && bar.parent.remove(bar);
});
});
data.setItemGraphicEl(dataIndex, null);
}
function getShapeStr(data, symbolMeta) {
return [data.getItemVisual(symbolMeta.dataIndex, 'symbol') || 'none', !!symbolMeta.symbolRepeat, !!symbolMeta.symbolClip].join(':');
}
function eachPath(bar, cb, context) {
// Do not use Group#eachChild, because it do not support remove.
zrUtil.each(bar.__pictorialBundle.children(), function (el) {
el !== bar.__pictorialBarRect && cb.call(context, el);
});
}
function updateAttr(el, immediateAttrs, animationAttrs, symbolMeta, isUpdate, cb) {
immediateAttrs && el.attr(immediateAttrs); // when symbolCip used, only clip path has init animation, otherwise it would be weird effect.
if (symbolMeta.symbolClip && !isUpdate) {
animationAttrs && el.attr(animationAttrs);
} else {
animationAttrs && graphic[isUpdate ? 'updateProps' : 'initProps'](el, animationAttrs, symbolMeta.animationModel, symbolMeta.dataIndex, cb);
}
}
function updateCommon(bar, opt, symbolMeta) {
var color = symbolMeta.color;
var dataIndex = symbolMeta.dataIndex;
var itemModel = symbolMeta.itemModel; // Color must be excluded.
// Because symbol provide setColor individually to set fill and stroke
var normalStyle = itemModel.getModel('itemStyle').getItemStyle(['color']);
var hoverStyle = itemModel.getModel('emphasis.itemStyle').getItemStyle();
var cursorStyle = itemModel.getShallow('cursor');
eachPath(bar, function (path) {
// PENDING setColor should be before setStyle!!!
path.setColor(color);
path.setStyle(zrUtil.defaults({
fill: color,
opacity: symbolMeta.opacity
}, normalStyle));
graphic.setHoverStyle(path, hoverStyle);
cursorStyle && (path.cursor = cursorStyle);
path.z2 = symbolMeta.z2;
});
var barRectHoverStyle = {};
var barPositionOutside = opt.valueDim.posDesc[+(symbolMeta.boundingLength > 0)];
var barRect = bar.__pictorialBarRect;
setLabel(barRect.style, barRectHoverStyle, itemModel, color, opt.seriesModel, dataIndex, barPositionOutside);
graphic.setHoverStyle(barRect, barRectHoverStyle);
}
function toIntTimes(times) {
var roundedTimes = Math.round(times); // Escapse accurate error
return Math.abs(times - roundedTimes) < 1e-4 ? roundedTimes : Math.ceil(times);
}
var _default = BarView;
module.exports = _default;
/***/ }),
/***/ "m6Yj":
/***/ (function(module, exports, __webpack_require__) {
// 20.2.2.16 Math.fround(x)
var $export = __webpack_require__("Ds5P");
$export($export.S, 'Math', { fround: __webpack_require__("g/m8") });
/***/ }),
/***/ "m7yE":
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
;(function (global, factory) {
true ? factory(__webpack_require__("PJh5")) :
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
factory(global.moment)
}(this, (function (moment) { 'use strict';
var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_');
function translateFuture(output) {
var time = output;
time = (output.indexOf('jaj') !== -1) ?
time.slice(0, -3) + 'leS' :
(output.indexOf('jar') !== -1) ?
time.slice(0, -3) + 'waQ' :
(output.indexOf('DIS') !== -1) ?
time.slice(0, -3) + 'nem' :
time + ' pIq';
return time;
}
function translatePast(output) {
var time = output;
time = (output.indexOf('jaj') !== -1) ?
time.slice(0, -3) + 'Hu’' :
(output.indexOf('jar') !== -1) ?
time.slice(0, -3) + 'wen' :
(output.indexOf('DIS') !== -1) ?
time.slice(0, -3) + 'ben' :
time + ' ret';
return time;
}
function translate(number, withoutSuffix, string, isFuture) {
var numberNoun = numberAsNoun(number);
switch (string) {
case 'ss':
return numberNoun + ' lup';
case 'mm':
return numberNoun + ' tup';
case 'hh':
return numberNoun + ' rep';
case 'dd':
return numberNoun + ' jaj';
case 'MM':
return numberNoun + ' jar';
case 'yy':
return numberNoun + ' DIS';
}
}
function numberAsNoun(number) {
var hundred = Math.floor((number % 1000) / 100),
ten = Math.floor((number % 100) / 10),
one = number % 10,
word = '';
if (hundred > 0) {
word += numbersNouns[hundred] + 'vatlh';
}
if (ten > 0) {
word += ((word !== '') ? ' ' : '') + numbersNouns[ten] + 'maH';
}
if (one > 0) {
word += ((word !== '') ? ' ' : '') + numbersNouns[one];
}
return (word === '') ? 'pagh' : word;
}
var tlh = moment.defineLocale('tlh', {
months : 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split('_'),
monthsShort : 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split('_'),
monthsParseExact : true,
weekdays : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
weekdaysShort : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
weekdaysMin : 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'HH:mm:ss',
L : 'DD.MM.YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY HH:mm',
LLLL : 'dddd, D MMMM YYYY HH:mm'
},
calendar : {
sameDay: '[DaHjaj] LT',
nextDay: '[wa’leS] LT',
nextWeek: 'LLL',
lastDay: '[wa’Hu’] LT',
lastWeek: 'LLL',
sameElse: 'L'
},
relativeTime : {
future : translateFuture,
past : translatePast,
s : 'puS lup',
ss : translate,
m : 'wa’ tup',
mm : translate,
h : 'wa’ rep',
hh : translate,
d : 'wa’ jaj',
dd : translate,
M : 'wa’ jar',
MM : translate,
y : 'wa’ DIS',
yy : translate
},
dayOfMonthOrdinalParse: /\d{1,2}\./,
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
return tlh;
})));
/***/ }),
/***/ "m8F4":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-string-pad-start-end
var $export = __webpack_require__("Ds5P");
var $pad = __webpack_require__("2VSL");
var userAgent = __webpack_require__("41xE");
// https://github.com/zloirock/core-js/issues/280
var WEBKIT_BUG = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
$export($export.P + $export.F * WEBKIT_BUG, 'String', {
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false);
}
});
/***/ }),
/***/ "mJPh":
/***/ (function(module, exports) {
/**
* When source maps are enabled, `style-loader` uses a link element with a data-uri to
* embed the css on the page. This breaks all relative urls because now they are relative to a
* bundle instead of the current page.
*
* One solution is to only use full urls, but that may be impossible.
*
* Instead, this function "fixes" the relative urls to be absolute according to the current page location.
*
* A rudimentary test suite is located at `test/fixUrls.js` and can be run via the `npm test` command.
*
*/
module.exports = function (css) {
// get current location
var location = typeof window !== "undefined" && window.location;
if (!location) {
throw new Error("fixUrls requires window.location");
}
// blank or null?
if (!css || typeof css !== "string") {
return css;
}
var baseUrl = location.protocol + "//" + location.host;
var currentDir = baseUrl + location.pathname.replace(/\/[^\/]*$/, "/");
// convert each url(...)
/*
This regular expression is just a way to recursively match brackets within
a string.
/url\s*\( = Match on the word "url" with any whitespace after it and then a parens
( = Start a capturing group
(?: = Start a non-capturing group
[^)(] = Match anything that isn't a parentheses
| = OR
\( = Match a start parentheses
(?: = Start another non-capturing groups
[^)(]+ = Match anything that isn't a parentheses
| = OR
\( = Match a start parentheses
[^)(]* = Match anything that isn't a parentheses
\) = Match a end parentheses
) = End Group
*\) = Match anything and then a close parens
) = Close non-capturing group
* = Match anything
) = Close capturing group
\) = Match a close parens
/gi = Get all matches, not the first. Be case insensitive.
*/
var fixedCss = css.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi, function(fullMatch, origUrl) {
// strip quotes (if they exist)
var unquotedOrigUrl = origUrl
.trim()
.replace(/^"(.*)"$/, function(o, $1){ return $1; })
.replace(/^'(.*)'$/, function(o, $1){ return $1; });
// already a full url? no change
if (/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(unquotedOrigUrl)) {
return fullMatch;
}
// convert the url to a full url
var newUrl;
if (unquotedOrigUrl.indexOf("//") === 0) {
//TODO: should we add protocol?
newUrl = unquotedOrigUrl;
} else if (unquotedOrigUrl.indexOf("/") === 0) {
// path should be relative to the base url
newUrl = baseUrl + unquotedOrigUrl; // already starts with '/'
} else {
// path should be relative to current directory
newUrl = currentDir + unquotedOrigUrl.replace(/^\.\//, ""); // Strip leading './'
}
// send back the fixed url(...)
return "url(" + JSON.stringify(newUrl) + ")";
});
// send back the fixed css
return fixedCss;
};
/***/ }),
/***/ "mJx5":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isRegExp = __webpack_require__("u0PK");
var anObject = __webpack_require__("DIVP");
var speciesConstructor = __webpack_require__("7O1s");
var advanceStringIndex = __webpack_require__("TwzQ");
var toLength = __webpack_require__("BbyF");
var callRegExpExec = __webpack_require__("9Dx1");
var regexpExec = __webpack_require__("32VL");
var fails = __webpack_require__("zgIt");
var $min = Math.min;
var $push = [].push;
var $SPLIT = 'split';
var LENGTH = 'length';
var LAST_INDEX = 'lastIndex';
var MAX_UINT32 = 0xffffffff;
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { RegExp(MAX_UINT32, 'y'); });
// @@split logic
__webpack_require__("Vg1y")('split', 2, function (defined, SPLIT, $split, maybeCallNative) {
var internalSplit;
if (
'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||
'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||
'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||
'.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||
'.'[$SPLIT](/()()/)[LENGTH] > 1 ||
''[$SPLIT](/.?/)[LENGTH]
) {
// based on es5-shim implementation, need to rework it
internalSplit = function (separator, limit) {
var string = String(this);
if (separator === undefined && limit === 0) return [];
// If `separator` is not a regex, use native split
if (!isRegExp(separator)) return $split.call(string, separator, limit);
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') +
(separator.sticky ? 'y' : '');
var lastLastIndex = 0;
var splitLimit = limit === undefined ? MAX_UINT32 : limit >>> 0;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp(separator.source, flags + 'g');
var match, lastIndex, lastLength;
while (match = regexpExec.call(separatorCopy, string)) {
lastIndex = separatorCopy[LAST_INDEX];
if (lastIndex > lastLastIndex) {
output.push(string.slice(lastLastIndex, match.index));
if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));
lastLength = match[0][LENGTH];
lastLastIndex = lastIndex;
if (output[LENGTH] >= splitLimit) break;
}
if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop
}
if (lastLastIndex === string[LENGTH]) {
if (lastLength || !separatorCopy.test('')) output.push('');
} else output.push(string.slice(lastLastIndex));
return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;
};
// Chakra, V8
} else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {
internalSplit = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : $split.call(this, separator, limit);
};
} else {
internalSplit = $split;
}
return [
// `String.prototype.split` method
// https://tc39.github.io/ecma262/#sec-string.prototype.split
function split(separator, limit) {
var O = defined(this);
var splitter = separator == undefined ? undefined : separator[SPLIT];
return splitter !== undefined
? splitter.call(separator, O, limit)
: internalSplit.call(String(O), separator, limit);
},
// `RegExp.prototype[@@split]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
//
// NOTE: This cannot be properly polyfilled in engines that don't support
// the 'y' flag.
function (regexp, limit) {
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== $split);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var C = speciesConstructor(rx, RegExp);
var unicodeMatching = rx.unicode;
var flags = (rx.ignoreCase ? 'i' : '') +
(rx.multiline ? 'm' : '') +
(rx.unicode ? 'u' : '') +
(SUPPORTS_Y ? 'y' : 'g');
// ^(? + rx + ) is needed, in combination with some S slicing, to
// simulate the 'y' flag.
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
var p = 0;
var q = 0;
var A = [];
while (q < S.length) {
splitter.lastIndex = SUPPORTS_Y ? q : 0;
var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
var e;
if (
z === null ||
(e = $min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
) {
q = advanceStringIndex(S, q, unicodeMatching);
} else {
A.push(S.slice(p, q));
if (A.length === lim) return A;
for (var i = 1; i <= z.length - 1; i++) {
A.push(z[i]);
if (A.length === lim) return A;
}
q = p = e;
}
}
A.push(S.slice(p));
return A;
}
];
});
/***/ }),
/***/ "mLyJ":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = __webpack_require__("/gxq");
var _number = __webpack_require__("wWR3");
var parsePercent = _number.parsePercent;
var _dataStackHelper = __webpack_require__("qVJQ");
var isDimensionStacked = _dataStackHelper.isDimensionStacked;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function getSeriesStackId(seriesModel) {
return seriesModel.get('stack') || '__ec_stack_' + seriesModel.seriesIndex;
}
function getAxisKey(polar, axis) {
return axis.dim + polar.model.componentIndex;
}
/**
* @param {string} seriesType
* @param {module:echarts/model/Global} ecModel
* @param {module:echarts/ExtensionAPI} api
*/
function barLayoutPolar(seriesType, ecModel, api) {
var lastStackCoords = {};
var barWidthAndOffset = calRadialBar(zrUtil.filter(ecModel.getSeriesByType(seriesType), function (seriesModel) {
return !ecModel.isSeriesFiltered(seriesModel) && seriesModel.coordinateSystem && seriesModel.coordinateSystem.type === 'polar';
}));
ecModel.eachSeriesByType(seriesType, function (seriesModel) {
// Check series coordinate, do layout for polar only
if (seriesModel.coordinateSystem.type !== 'polar') {
return;
}
var data = seriesModel.getData();
var polar = seriesModel.coordinateSystem;
var baseAxis = polar.getBaseAxis();
var axisKey = getAxisKey(polar, baseAxis);
var stackId = getSeriesStackId(seriesModel);
var columnLayoutInfo = barWidthAndOffset[axisKey][stackId];
var columnOffset = columnLayoutInfo.offset;
var columnWidth = columnLayoutInfo.width;
var valueAxis = polar.getOtherAxis(baseAxis);
var cx = seriesModel.coordinateSystem.cx;
var cy = seriesModel.coordinateSystem.cy;
var barMinHeight = seriesModel.get('barMinHeight') || 0;
var barMinAngle = seriesModel.get('barMinAngle') || 0;
lastStackCoords[stackId] = lastStackCoords[stackId] || [];
var valueDim = data.mapDimension(valueAxis.dim);
var baseDim = data.mapDimension(baseAxis.dim);
var stacked = isDimensionStacked(data, valueDim
/*, baseDim*/
);
var clampLayout = baseAxis.dim !== 'radius' || !seriesModel.get('roundCap', true);
var valueAxisStart = valueAxis.dim === 'radius' ? valueAxis.dataToRadius(0) : valueAxis.dataToAngle(0);
for (var idx = 0, len = data.count(); idx < len; idx++) {
var value = data.get(valueDim, idx);
var baseValue = data.get(baseDim, idx);
var sign = value >= 0 ? 'p' : 'n';
var baseCoord = valueAxisStart; // Because of the barMinHeight, we can not use the value in
// stackResultDimension directly.
// Only ordinal axis can be stacked.
if (stacked) {
if (!lastStackCoords[stackId][baseValue]) {
lastStackCoords[stackId][baseValue] = {
p: valueAxisStart,
// Positive stack
n: valueAxisStart // Negative stack
};
} // Should also consider #4243
baseCoord = lastStackCoords[stackId][baseValue][sign];
}
var r0;
var r;
var startAngle;
var endAngle; // radial sector
if (valueAxis.dim === 'radius') {
var radiusSpan = valueAxis.dataToRadius(value) - valueAxisStart;
var angle = baseAxis.dataToAngle(baseValue);
if (Math.abs(radiusSpan) < barMinHeight) {
radiusSpan = (radiusSpan < 0 ? -1 : 1) * barMinHeight;
}
r0 = baseCoord;
r = baseCoord + radiusSpan;
startAngle = angle - columnOffset;
endAngle = startAngle - columnWidth;
stacked && (lastStackCoords[stackId][baseValue][sign] = r);
} // tangential sector
else {
var angleSpan = valueAxis.dataToAngle(value, clampLayout) - valueAxisStart;
var radius = baseAxis.dataToRadius(baseValue);
if (Math.abs(angleSpan) < barMinAngle) {
angleSpan = (angleSpan < 0 ? -1 : 1) * barMinAngle;
}
r0 = radius + columnOffset;
r = r0 + columnWidth;
startAngle = baseCoord;
endAngle = baseCoord + angleSpan; // if the previous stack is at the end of the ring,
// add a round to differentiate it from origin
// var extent = angleAxis.getExtent();
// var stackCoord = angle;
// if (stackCoord === extent[0] && value > 0) {
// stackCoord = extent[1];
// }
// else if (stackCoord === extent[1] && value < 0) {
// stackCoord = extent[0];
// }
stacked && (lastStackCoords[stackId][baseValue][sign] = endAngle);
}
data.setItemLayout(idx, {
cx: cx,
cy: cy,
r0: r0,
r: r,
// Consider that positive angle is anti-clockwise,
// while positive radian of sector is clockwise
startAngle: -startAngle * Math.PI / 180,
endAngle: -endAngle * Math.PI / 180
});
}
}, this);
}
/**
* Calculate bar width and offset for radial bar charts
*/
function calRadialBar(barSeries, api) {
// Columns info on each category axis. Key is polar name
var columnsMap = {};
zrUtil.each(barSeries, function (seriesModel, idx) {
var data = seriesModel.getData();
var polar = seriesModel.coordinateSystem;
var baseAxis = polar.getBaseAxis();
var axisKey = getAxisKey(polar, baseAxis);
var axisExtent = baseAxis.getExtent();
var bandWidth = baseAxis.type === 'category' ? baseAxis.getBandWidth() : Math.abs(axisExtent[1] - axisExtent[0]) / data.count();
var columnsOnAxis = columnsMap[axisKey] || {
bandWidth: bandWidth,
remainedWidth: bandWidth,
autoWidthCount: 0,
categoryGap: '20%',
gap: '30%',
stacks: {}
};
var stacks = columnsOnAxis.stacks;
columnsMap[axisKey] = columnsOnAxis;
var stackId = getSeriesStackId(seriesModel);
if (!stacks[stackId]) {
columnsOnAxis.autoWidthCount++;
}
stacks[stackId] = stacks[stackId] || {
width: 0,
maxWidth: 0
};
var barWidth = parsePercent(seriesModel.get('barWidth'), bandWidth);
var barMaxWidth = parsePercent(seriesModel.get('barMaxWidth'), bandWidth);
var barGap = seriesModel.get('barGap');
var barCategoryGap = seriesModel.get('barCategoryGap');
if (barWidth && !stacks[stackId].width) {
barWidth = Math.min(columnsOnAxis.remainedWidth, barWidth);
stacks[stackId].width = barWidth;
columnsOnAxis.remainedWidth -= barWidth;
}
barMaxWidth && (stacks[stackId].maxWidth = barMaxWidth);
barGap != null && (columnsOnAxis.gap = barGap);
barCategoryGap != null && (columnsOnAxis.categoryGap = barCategoryGap);
});
var result = {};
zrUtil.each(columnsMap, function (columnsOnAxis, coordSysName) {
result[coordSysName] = {};
var stacks = columnsOnAxis.stacks;
var bandWidth = columnsOnAxis.bandWidth;
var categoryGap = parsePercent(columnsOnAxis.categoryGap, bandWidth);
var barGapPercent = parsePercent(columnsOnAxis.gap, 1);
var remainedWidth = columnsOnAxis.remainedWidth;
var autoWidthCount = columnsOnAxis.autoWidthCount;
var autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);
autoWidth = Math.max(autoWidth, 0); // Find if any auto calculated bar exceeded maxBarWidth
zrUtil.each(stacks, function (column, stack) {
var maxWidth = column.maxWidth;
if (maxWidth && maxWidth < autoWidth) {
maxWidth = Math.min(maxWidth, remainedWidth);
if (column.width) {
maxWidth = Math.min(maxWidth, column.width);
}
remainedWidth -= maxWidth;
column.width = maxWidth;
autoWidthCount--;
}
}); // Recalculate width again
autoWidth = (remainedWidth - categoryGap) / (autoWidthCount + (autoWidthCount - 1) * barGapPercent);
autoWidth = Math.max(autoWidth, 0);
var widthSum = 0;
var lastColumn;
zrUtil.each(stacks, function (column, idx) {
if (!column.width) {
column.width = autoWidth;
}
lastColumn = column;
widthSum += column.width * (1 + barGapPercent);
});
if (lastColumn) {
widthSum -= lastColumn.width * barGapPercent;
}
var offset = -widthSum / 2;
zrUtil.each(stacks, function (column, stackId) {
result[coordSysName][stackId] = result[coordSysName][stackId] || {
offset: offset,
width: column.width
};
offset += column.width * (1 + barGapPercent);
});
});
return result;
}
var _default = barLayoutPolar;
module.exports = _default;
/***/ }),
/***/ "mTp7":
/***/ (function(module, exports, __webpack_require__) {
// 26.1.14 Reflect.setPrototypeOf(target, proto)
var $export = __webpack_require__("Ds5P");
var setProto = __webpack_require__("gvDt");
if (setProto) $export($export.S, 'Reflect', {
setPrototypeOf: function setPrototypeOf(target, proto) {
setProto.check(target, proto);
try {
setProto.set(target, proto);
return true;
} catch (e) {
return false;
}
}
});
/***/ }),
/***/ "mZON":
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__("VWgF")('keys');
var uid = __webpack_require__("ulTY");
module.exports = function (key) {
return shared[key] || (shared[key] = uid(key));
};
/***/ }),
/***/ "mcsk":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var echarts = __webpack_require__("Icdr");
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var ATTR = '\0_ec_interaction_mutex';
function take(zr, resourceKey, userKey) {
var store = getStore(zr);
store[resourceKey] = userKey;
}
function release(zr, resourceKey, userKey) {
var store = getStore(zr);
var uKey = store[resourceKey];
if (uKey === userKey) {
store[resourceKey] = null;
}
}
function isTaken(zr, resourceKey) {
return !!getStore(zr)[resourceKey];
}
function getStore(zr) {
return zr[ATTR] || (zr[ATTR] = {});
}
/**
* payload: {
* type: 'takeGlobalCursor',
* key: 'dataZoomSelect', or 'brush', or ...,
* If no userKey, release global cursor.
* }
*/
echarts.registerAction({
type: 'takeGlobalCursor',
event: 'globalCursorTaken',
update: 'update'
}, function () {});
exports.take = take;
exports.release = release;
exports.isTaken = isTaken;
/***/ }),
/***/ "me52":
/***/ (function(module, exports, __webpack_require__) {
var Path = __webpack_require__("GxVO");
// CompoundPath to improve performance
var _default = Path.extend({
type: 'compound',
shape: {
paths: null
},
_updatePathDirty: function () {
var dirtyPath = this.__dirtyPath;
var paths = this.shape.paths;
for (var i = 0; i < paths.length; i++) {
// Mark as dirty if any subpath is dirty
dirtyPath = dirtyPath || paths[i].__dirtyPath;
}
this.__dirtyPath = dirtyPath;
this.__dirty = this.__dirty || dirtyPath;
},
beforeBrush: function () {
this._updatePathDirty();
var paths = this.shape.paths || [];
var scale = this.getGlobalScale(); // Update path scale
for (var i = 0; i < paths.length; i++) {
if (!paths[i].path) {
paths[i].createPathProxy();
}
paths[i].path.setScale(scale[0], scale[1], paths[i].segmentIgnoreThreshold);
}
},
buildPath: function (ctx, shape) {
var paths = shape.paths || [];
for (var i = 0; i < paths.length; i++) {
paths[i].buildPath(ctx, paths[i].shape, true);
}
},
afterBrush: function () {
var paths = this.shape.paths || [];
for (var i = 0; i < paths.length; i++) {
paths[i].__dirtyPath = false;
}
},
getBoundingRect: function () {
this._updatePathDirty();
return Path.prototype.getBoundingRect.call(this);
}
});
module.exports = _default;
/***/ }),
/***/ "mhn7":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// 21.1.3.25 String.prototype.trim()
__webpack_require__("Ymdd")('trim', function ($trim) {
return function trim() {
return $trim(this, 3);
};
});
/***/ }),
/***/ "miEh":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var zrUtil = __webpack_require__("/gxq");
var echarts = __webpack_require__("Icdr");
var graphic = __webpack_require__("0sHC");
var _layout = __webpack_require__("1Xuh");
var getLayoutRect = _layout.getLayoutRect;
var _format = __webpack_require__("HHfb");
var windowOpen = _format.windowOpen;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
// Model
echarts.extendComponentModel({
type: 'title',
layoutMode: {
type: 'box',
ignoreSize: true
},
defaultOption: {
// 一级层叠
zlevel: 0,
// 二级层叠
z: 6,
show: true,
text: '',
// 超链接跳转
// link: null,
// 仅支持self | blank
target: 'blank',
subtext: '',
// 超链接跳转
// sublink: null,
// 仅支持self | blank
subtarget: 'blank',
// 'center' ¦ 'left' ¦ 'right'
// ¦ {number}(x坐标,单位px)
left: 0,
// 'top' ¦ 'bottom' ¦ 'center'
// ¦ {number}(y坐标,单位px)
top: 0,
// 水平对齐
// 'auto' | 'left' | 'right' | 'center'
// 默认根据 left 的位置判断是左对齐还是右对齐
// textAlign: null
//
// 垂直对齐
// 'auto' | 'top' | 'bottom' | 'middle'
// 默认根据 top 位置判断是上对齐还是下对齐
// textVerticalAlign: null
// textBaseline: null // The same as textVerticalAlign.
backgroundColor: 'rgba(0,0,0,0)',
// 标题边框颜色
borderColor: '#ccc',
// 标题边框线宽,单位px,默认为0(无边框)
borderWidth: 0,
// 标题内边距,单位px,默认各方向内边距为5,
// 接受数组分别设定上右下左边距,同css
padding: 5,
// 主副标题纵向间隔,单位px,默认为10,
itemGap: 10,
textStyle: {
fontSize: 18,
fontWeight: 'bolder',
color: '#333'
},
subtextStyle: {
color: '#aaa'
}
}
}); // View
echarts.extendComponentView({
type: 'title',
render: function (titleModel, ecModel, api) {
this.group.removeAll();
if (!titleModel.get('show')) {
return;
}
var group = this.group;
var textStyleModel = titleModel.getModel('textStyle');
var subtextStyleModel = titleModel.getModel('subtextStyle');
var textAlign = titleModel.get('textAlign');
var textVerticalAlign = zrUtil.retrieve2(titleModel.get('textBaseline'), titleModel.get('textVerticalAlign'));
var textEl = new graphic.Text({
style: graphic.setTextStyle({}, textStyleModel, {
text: titleModel.get('text'),
textFill: textStyleModel.getTextColor()
}, {
disableBox: true
}),
z2: 10
});
var textRect = textEl.getBoundingRect();
var subText = titleModel.get('subtext');
var subTextEl = new graphic.Text({
style: graphic.setTextStyle({}, subtextStyleModel, {
text: subText,
textFill: subtextStyleModel.getTextColor(),
y: textRect.height + titleModel.get('itemGap'),
textVerticalAlign: 'top'
}, {
disableBox: true
}),
z2: 10
});
var link = titleModel.get('link');
var sublink = titleModel.get('sublink');
var triggerEvent = titleModel.get('triggerEvent', true);
textEl.silent = !link && !triggerEvent;
subTextEl.silent = !sublink && !triggerEvent;
if (link) {
textEl.on('click', function () {
windowOpen(link, '_' + titleModel.get('target'));
});
}
if (sublink) {
subTextEl.on('click', function () {
windowOpen(sublink, '_' + titleModel.get('subtarget'));
});
}
textEl.eventData = subTextEl.eventData = triggerEvent ? {
componentType: 'title',
componentIndex: titleModel.componentIndex
} : null;
group.add(textEl);
subText && group.add(subTextEl); // If no subText, but add subTextEl, there will be an empty line.
var groupRect = group.getBoundingRect();
var layoutOption = titleModel.getBoxLayoutParams();
layoutOption.width = groupRect.width;
layoutOption.height = groupRect.height;
var layoutRect = getLayoutRect(layoutOption, {
width: api.getWidth(),
height: api.getHeight()
}, titleModel.get('padding')); // Adjust text align based on position
if (!textAlign) {
// Align left if title is on the left. center and right is same
textAlign = titleModel.get('left') || titleModel.get('right');
if (textAlign === 'middle') {
textAlign = 'center';
} // Adjust layout by text align
if (textAlign === 'right') {
layoutRect.x += layoutRect.width;
} else if (textAlign === 'center') {
layoutRect.x += layoutRect.width / 2;
}
}
if (!textVerticalAlign) {
textVerticalAlign = titleModel.get('top') || titleModel.get('bottom');
if (textVerticalAlign === 'center') {
textVerticalAlign = 'middle';
}
if (textVerticalAlign === 'bottom') {
layoutRect.y += layoutRect.height;
} else if (textVerticalAlign === 'middle') {
layoutRect.y += layoutRect.height / 2;
}
textVerticalAlign = textVerticalAlign || 'top';
}
group.attr('position', [layoutRect.x, layoutRect.y]);
var alignStyle = {
textAlign: textAlign,
textVerticalAlign: textVerticalAlign
};
textEl.setStyle(alignStyle);
subTextEl.setStyle(alignStyle); // Render background
// Get groupRect again because textAlign has been changed
groupRect = group.getBoundingRect();
var padding = layoutRect.margin;
var style = titleModel.getItemStyle(['color', 'opacity']);
style.fill = titleModel.get('backgroundColor');
var rect = new graphic.Rect({
shape: {
x: groupRect.x - padding[3],
y: groupRect.y - padding[0],
width: groupRect.width + padding[1] + padding[3],
height: groupRect.height + padding[0] + padding[2],
r: titleModel.get('borderRadius')
},
style: style,
subPixelOptimize: true,
silent: true
});
group.add(rect);
}
});
/***/ }),
/***/ "mlpt":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var _config = __webpack_require__("4Nz2");
var __DEV__ = _config.__DEV__;
var zrUtil = __webpack_require__("/gxq");
var VisualMapModel = __webpack_require__("wH4Y");
var VisualMapping = __webpack_require__("HGSA");
var visualDefault = __webpack_require__("B123");
var _number = __webpack_require__("wWR3");
var reformIntervals = _number.reformIntervals;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var PiecewiseModel = VisualMapModel.extend({
type: 'visualMap.piecewise',
/**
* Order Rule:
*
* option.categories / option.pieces / option.text / option.selected:
* If !option.inverse,
* Order when vertical: ['top', ..., 'bottom'].
* Order when horizontal: ['left', ..., 'right'].
* If option.inverse, the meaning of
* the order should be reversed.
*
* this._pieceList:
* The order is always [low, ..., high].
*
* Mapping from location to low-high:
* If !option.inverse
* When vertical, top is high.
* When horizontal, right is high.
* If option.inverse, reverse.
*/
/**
* @protected
*/
defaultOption: {
selected: null,
// Object. If not specified, means selected.
// When pieces and splitNumber: {'0': true, '5': true}
// When categories: {'cate1': false, 'cate3': true}
// When selected === false, means all unselected.
minOpen: false,
// Whether include values that smaller than `min`.
maxOpen: false,
// Whether include values that bigger than `max`.
align: 'auto',
// 'auto', 'left', 'right'
itemWidth: 20,
// When put the controller vertically, it is the length of
// horizontal side of each item. Otherwise, vertical side.
itemHeight: 14,
// When put the controller vertically, it is the length of
// vertical side of each item. Otherwise, horizontal side.
itemSymbol: 'roundRect',
pieceList: null,
// Each item is Object, with some of those attrs:
// {min, max, lt, gt, lte, gte, value,
// color, colorSaturation, colorAlpha, opacity,
// symbol, symbolSize}, which customize the range or visual
// coding of the certain piece. Besides, see "Order Rule".
categories: null,
// category names, like: ['some1', 'some2', 'some3'].
// Attr min/max are ignored when categories set. See "Order Rule"
splitNumber: 5,
// If set to 5, auto split five pieces equally.
// If set to 0 and component type not set, component type will be
// determined as "continuous". (It is less reasonable but for ec2
// compatibility, see echarts/component/visualMap/typeDefaulter)
selectedMode: 'multiple',
// Can be 'multiple' or 'single'.
itemGap: 10,
// The gap between two items, in px.
hoverLink: true,
// Enable hover highlight.
showLabel: null // By default, when text is used, label will hide (the logic
// is remained for compatibility reason)
},
/**
* @override
*/
optionUpdated: function (newOption, isInit) {
PiecewiseModel.superApply(this, 'optionUpdated', arguments);
/**
* The order is always [low, ..., high].
* [{text: string, interval: Array.}, ...]
* @private
* @type {Array.}
*/
this._pieceList = [];
this.resetExtent();
/**
* 'pieces', 'categories', 'splitNumber'
* @type {string}
*/
var mode = this._mode = this._determineMode();
resetMethods[this._mode].call(this);
this._resetSelected(newOption, isInit);
var categories = this.option.categories;
this.resetVisual(function (mappingOption, state) {
if (mode === 'categories') {
mappingOption.mappingMethod = 'category';
mappingOption.categories = zrUtil.clone(categories);
} else {
mappingOption.dataExtent = this.getExtent();
mappingOption.mappingMethod = 'piecewise';
mappingOption.pieceList = zrUtil.map(this._pieceList, function (piece) {
var piece = zrUtil.clone(piece);
if (state !== 'inRange') {
// FIXME
// outOfRange do not support special visual in pieces.
piece.visual = null;
}
return piece;
});
}
});
},
/**
* @protected
* @override
*/
completeVisualOption: function () {
// Consider this case:
// visualMap: {
// pieces: [{symbol: 'circle', lt: 0}, {symbol: 'rect', gte: 0}]
// }
// where no inRange/outOfRange set but only pieces. So we should make
// default inRange/outOfRange for this case, otherwise visuals that only
// appear in `pieces` will not be taken into account in visual encoding.
var option = this.option;
var visualTypesInPieces = {};
var visualTypes = VisualMapping.listVisualTypes();
var isCategory = this.isCategory();
zrUtil.each(option.pieces, function (piece) {
zrUtil.each(visualTypes, function (visualType) {
if (piece.hasOwnProperty(visualType)) {
visualTypesInPieces[visualType] = 1;
}
});
});
zrUtil.each(visualTypesInPieces, function (v, visualType) {
var exists = 0;
zrUtil.each(this.stateList, function (state) {
exists |= has(option, state, visualType) || has(option.target, state, visualType);
}, this);
!exists && zrUtil.each(this.stateList, function (state) {
(option[state] || (option[state] = {}))[visualType] = visualDefault.get(visualType, state === 'inRange' ? 'active' : 'inactive', isCategory);
});
}, this);
function has(obj, state, visualType) {
return obj && obj[state] && (zrUtil.isObject(obj[state]) ? obj[state].hasOwnProperty(visualType) : obj[state] === visualType // e.g., inRange: 'symbol'
);
}
VisualMapModel.prototype.completeVisualOption.apply(this, arguments);
},
_resetSelected: function (newOption, isInit) {
var thisOption = this.option;
var pieceList = this._pieceList; // Selected do not merge but all override.
var selected = (isInit ? thisOption : newOption).selected || {};
thisOption.selected = selected; // Consider 'not specified' means true.
zrUtil.each(pieceList, function (piece, index) {
var key = this.getSelectedMapKey(piece);
if (!selected.hasOwnProperty(key)) {
selected[key] = true;
}
}, this);
if (thisOption.selectedMode === 'single') {
// Ensure there is only one selected.
var hasSel = false;
zrUtil.each(pieceList, function (piece, index) {
var key = this.getSelectedMapKey(piece);
if (selected[key]) {
hasSel ? selected[key] = false : hasSel = true;
}
}, this);
} // thisOption.selectedMode === 'multiple', default: all selected.
},
/**
* @public
*/
getSelectedMapKey: function (piece) {
return this._mode === 'categories' ? piece.value + '' : piece.index + '';
},
/**
* @public
*/
getPieceList: function () {
return this._pieceList;
},
/**
* @private
* @return {string}
*/
_determineMode: function () {
var option = this.option;
return option.pieces && option.pieces.length > 0 ? 'pieces' : this.option.categories ? 'categories' : 'splitNumber';
},
/**
* @public
* @override
*/
setSelected: function (selected) {
this.option.selected = zrUtil.clone(selected);
},
/**
* @public
* @override
*/
getValueState: function (value) {
var index = VisualMapping.findPieceIndex(value, this._pieceList);
return index != null ? this.option.selected[this.getSelectedMapKey(this._pieceList[index])] ? 'inRange' : 'outOfRange' : 'outOfRange';
},
/**
* @public
* @params {number} pieceIndex piece index in visualMapModel.getPieceList()
* @return {Array.} [{seriesId, dataIndex: >}, ...]
*/
findTargetDataIndices: function (pieceIndex) {
var result = [];
this.eachTargetSeries(function (seriesModel) {
var dataIndices = [];
var data = seriesModel.getData();
data.each(this.getDataDimension(data), function (value, dataIndex) {
// Should always base on model pieceList, because it is order sensitive.
var pIdx = VisualMapping.findPieceIndex(value, this._pieceList);
pIdx === pieceIndex && dataIndices.push(dataIndex);
}, this);
result.push({
seriesId: seriesModel.id,
dataIndex: dataIndices
});
}, this);
return result;
},
/**
* @private
* @param {Object} piece piece.value or piece.interval is required.
* @return {number} Can be Infinity or -Infinity
*/
getRepresentValue: function (piece) {
var representValue;
if (this.isCategory()) {
representValue = piece.value;
} else {
if (piece.value != null) {
representValue = piece.value;
} else {
var pieceInterval = piece.interval || [];
representValue = pieceInterval[0] === -Infinity && pieceInterval[1] === Infinity ? 0 : (pieceInterval[0] + pieceInterval[1]) / 2;
}
}
return representValue;
},
getVisualMeta: function (getColorVisual) {
// Do not support category. (category axis is ordinal, numerical)
if (this.isCategory()) {
return;
}
var stops = [];
var outerColors = [];
var visualMapModel = this;
function setStop(interval, valueState) {
var representValue = visualMapModel.getRepresentValue({
interval: interval
});
if (!valueState) {
valueState = visualMapModel.getValueState(representValue);
}
var color = getColorVisual(representValue, valueState);
if (interval[0] === -Infinity) {
outerColors[0] = color;
} else if (interval[1] === Infinity) {
outerColors[1] = color;
} else {
stops.push({
value: interval[0],
color: color
}, {
value: interval[1],
color: color
});
}
} // Suplement
var pieceList = this._pieceList.slice();
if (!pieceList.length) {
pieceList.push({
interval: [-Infinity, Infinity]
});
} else {
var edge = pieceList[0].interval[0];
edge !== -Infinity && pieceList.unshift({
interval: [-Infinity, edge]
});
edge = pieceList[pieceList.length - 1].interval[1];
edge !== Infinity && pieceList.push({
interval: [edge, Infinity]
});
}
var curr = -Infinity;
zrUtil.each(pieceList, function (piece) {
var interval = piece.interval;
if (interval) {
// Fulfill gap.
interval[0] > curr && setStop([curr, interval[0]], 'outOfRange');
setStop(interval.slice());
curr = interval[1];
}
}, this);
return {
stops: stops,
outerColors: outerColors
};
}
});
/**
* Key is this._mode
* @type {Object}
* @this {module:echarts/component/viusalMap/PiecewiseMode}
*/
var resetMethods = {
splitNumber: function () {
var thisOption = this.option;
var pieceList = this._pieceList;
var precision = Math.min(thisOption.precision, 20);
var dataExtent = this.getExtent();
var splitNumber = thisOption.splitNumber;
splitNumber = Math.max(parseInt(splitNumber, 10), 1);
thisOption.splitNumber = splitNumber;
var splitStep = (dataExtent[1] - dataExtent[0]) / splitNumber; // Precision auto-adaption
while (+splitStep.toFixed(precision) !== splitStep && precision < 5) {
precision++;
}
thisOption.precision = precision;
splitStep = +splitStep.toFixed(precision);
if (thisOption.minOpen) {
pieceList.push({
interval: [-Infinity, dataExtent[0]],
close: [0, 0]
});
}
for (var index = 0, curr = dataExtent[0]; index < splitNumber; curr += splitStep, index++) {
var max = index === splitNumber - 1 ? dataExtent[1] : curr + splitStep;
pieceList.push({
interval: [curr, max],
close: [1, 1]
});
}
if (thisOption.maxOpen) {
pieceList.push({
interval: [dataExtent[1], Infinity],
close: [0, 0]
});
}
reformIntervals(pieceList);
zrUtil.each(pieceList, function (piece, index) {
piece.index = index;
piece.text = this.formatValueText(piece.interval);
}, this);
},
categories: function () {
var thisOption = this.option;
zrUtil.each(thisOption.categories, function (cate) {
// FIXME category模式也使用pieceList,但在visualMapping中不是使用pieceList。
// 是否改一致。
this._pieceList.push({
text: this.formatValueText(cate, true),
value: cate
});
}, this); // See "Order Rule".
normalizeReverse(thisOption, this._pieceList);
},
pieces: function () {
var thisOption = this.option;
var pieceList = this._pieceList;
zrUtil.each(thisOption.pieces, function (pieceListItem, index) {
if (!zrUtil.isObject(pieceListItem)) {
pieceListItem = {
value: pieceListItem
};
}
var item = {
text: '',
index: index
};
if (pieceListItem.label != null) {
item.text = pieceListItem.label;
}
if (pieceListItem.hasOwnProperty('value')) {
var value = item.value = pieceListItem.value;
item.interval = [value, value];
item.close = [1, 1];
} else {
// `min` `max` is legacy option.
// `lt` `gt` `lte` `gte` is recommanded.
var interval = item.interval = [];
var close = item.close = [0, 0];
var closeList = [1, 0, 1];
var infinityList = [-Infinity, Infinity];
var useMinMax = [];
for (var lg = 0; lg < 2; lg++) {
var names = [['gte', 'gt', 'min'], ['lte', 'lt', 'max']][lg];
for (var i = 0; i < 3 && interval[lg] == null; i++) {
interval[lg] = pieceListItem[names[i]];
close[lg] = closeList[i];
useMinMax[lg] = i === 2;
}
interval[lg] == null && (interval[lg] = infinityList[lg]);
}
useMinMax[0] && interval[1] === Infinity && (close[0] = 0);
useMinMax[1] && interval[0] === -Infinity && (close[1] = 0);
if (interval[0] === interval[1] && close[0] && close[1]) {
// Consider: [{min: 5, max: 5, visual: {...}}, {min: 0, max: 5}],
// we use value to lift the priority when min === max
item.value = interval[0];
}
}
item.visual = VisualMapping.retrieveVisuals(pieceListItem);
pieceList.push(item);
}, this); // See "Order Rule".
normalizeReverse(thisOption, pieceList); // Only pieces
reformIntervals(pieceList);
zrUtil.each(pieceList, function (piece) {
var close = piece.close;
var edgeSymbols = [['<', '≤'][close[1]], ['>', '≥'][close[0]]];
piece.text = piece.text || this.formatValueText(piece.value != null ? piece.value : piece.interval, false, edgeSymbols);
}, this);
}
};
function normalizeReverse(thisOption, pieceList) {
var inverse = thisOption.inverse;
if (thisOption.orient === 'vertical' ? !inverse : inverse) {
pieceList.reverse();
}
}
var _default = PiecewiseModel;
module.exports = _default;
/***/ }),
/***/ "mmWi":
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _vuex = __webpack_require__("NYxO");
var TranscoderMixins = {
data: function data() {
return {};
},
created: function created() {},
watch: {},
mounted: function mounted() {},
computed: {},
methods: {
initTranscoder: function initTranscoder() {
var _this = this;
this.$nextTick(function () {
_this.$store.dispatch("setTranscoder", _this.$refs.easyPlayer);
});
},
wasmIsReady: function wasmIsReady(wasmReady) {
this.$store.dispatch("setWasmReady", wasmReady);
}
}
};
exports.default = TranscoderMixins;
/***/ }),
/***/ "moDv":
/***/ (function(module, exports, __webpack_require__) {
var curve = __webpack_require__("AAi1");
var vec2 = __webpack_require__("C7PF");
var bbox = __webpack_require__("wUOi");
var BoundingRect = __webpack_require__("8b51");
var _config = __webpack_require__("g+yZ");
var dpr = _config.devicePixelRatio;
/**
* Path 代理,可以在`buildPath`中用于替代`ctx`, 会保存每个path操作的命令到pathCommands属性中
* 可以用于 isInsidePath 判断以及获取boundingRect
*
* @module zrender/core/PathProxy
* @author Yi Shen (http://www.github.com/pissang)
*/
// TODO getTotalLength, getPointAtLength
/* global Float32Array */
var CMD = {
M: 1,
L: 2,
C: 3,
Q: 4,
A: 5,
Z: 6,
// Rect
R: 7
}; // var CMD_MEM_SIZE = {
// M: 3,
// L: 3,
// C: 7,
// Q: 5,
// A: 9,
// R: 5,
// Z: 1
// };
var min = [];
var max = [];
var min2 = [];
var max2 = [];
var mathMin = Math.min;
var mathMax = Math.max;
var mathCos = Math.cos;
var mathSin = Math.sin;
var mathSqrt = Math.sqrt;
var mathAbs = Math.abs;
var hasTypedArray = typeof Float32Array !== 'undefined';
/**
* @alias module:zrender/core/PathProxy
* @constructor
*/
var PathProxy = function (notSaveData) {
this._saveData = !(notSaveData || false);
if (this._saveData) {
/**
* Path data. Stored as flat array
* @type {Array.}
*/
this.data = [];
}
this._ctx = null;
};
/**
* 快速计算Path包围盒(并不是最小包围盒)
* @return {Object}
*/
PathProxy.prototype = {
constructor: PathProxy,
_xi: 0,
_yi: 0,
_x0: 0,
_y0: 0,
// Unit x, Unit y. Provide for avoiding drawing that too short line segment
_ux: 0,
_uy: 0,
_len: 0,
_lineDash: null,
_dashOffset: 0,
_dashIdx: 0,
_dashSum: 0,
/**
* @readOnly
*/
setScale: function (sx, sy, segmentIgnoreThreshold) {
// Compat. Previously there is no segmentIgnoreThreshold.
segmentIgnoreThreshold = segmentIgnoreThreshold || 0;
this._ux = mathAbs(segmentIgnoreThreshold / dpr / sx) || 0;
this._uy = mathAbs(segmentIgnoreThreshold / dpr / sy) || 0;
},
getContext: function () {
return this._ctx;
},
/**
* @param {CanvasRenderingContext2D} ctx
* @return {module:zrender/core/PathProxy}
*/
beginPath: function (ctx) {
this._ctx = ctx;
ctx && ctx.beginPath();
ctx && (this.dpr = ctx.dpr); // Reset
if (this._saveData) {
this._len = 0;
}
if (this._lineDash) {
this._lineDash = null;
this._dashOffset = 0;
}
return this;
},
/**
* @param {number} x
* @param {number} y
* @return {module:zrender/core/PathProxy}
*/
moveTo: function (x, y) {
this.addData(CMD.M, x, y);
this._ctx && this._ctx.moveTo(x, y); // x0, y0, xi, yi 是记录在 _dashedXXXXTo 方法中使用
// xi, yi 记录当前点, x0, y0 在 closePath 的时候回到起始点。
// 有可能在 beginPath 之后直接调用 lineTo,这时候 x0, y0 需要
// 在 lineTo 方法中记录,这里先不考虑这种情况,dashed line 也只在 IE10- 中不支持
this._x0 = x;
this._y0 = y;
this._xi = x;
this._yi = y;
return this;
},
/**
* @param {number} x
* @param {number} y
* @return {module:zrender/core/PathProxy}
*/
lineTo: function (x, y) {
var exceedUnit = mathAbs(x - this._xi) > this._ux || mathAbs(y - this._yi) > this._uy // Force draw the first segment
|| this._len < 5;
this.addData(CMD.L, x, y);
if (this._ctx && exceedUnit) {
this._needsDash() ? this._dashedLineTo(x, y) : this._ctx.lineTo(x, y);
}
if (exceedUnit) {
this._xi = x;
this._yi = y;
}
return this;
},
/**
* @param {number} x1
* @param {number} y1
* @param {number} x2
* @param {number} y2
* @param {number} x3
* @param {number} y3
* @return {module:zrender/core/PathProxy}
*/
bezierCurveTo: function (x1, y1, x2, y2, x3, y3) {
this.addData(CMD.C, x1, y1, x2, y2, x3, y3);
if (this._ctx) {
this._needsDash() ? this._dashedBezierTo(x1, y1, x2, y2, x3, y3) : this._ctx.bezierCurveTo(x1, y1, x2, y2, x3, y3);
}
this._xi = x3;
this._yi = y3;
return this;
},
/**
* @param {number} x1
* @param {number} y1
* @param {number} x2
* @param {number} y2
* @return {module:zrender/core/PathProxy}
*/
quadraticCurveTo: function (x1, y1, x2, y2) {
this.addData(CMD.Q, x1, y1, x2, y2);
if (this._ctx) {
this._needsDash() ? this._dashedQuadraticTo(x1, y1, x2, y2) : this._ctx.quadraticCurveTo(x1, y1, x2, y2);
}
this._xi = x2;
this._yi = y2;
return this;
},
/**
* @param {number} cx
* @param {number} cy
* @param {number} r
* @param {number} startAngle
* @param {number} endAngle
* @param {boolean} anticlockwise
* @return {module:zrender/core/PathProxy}
*/
arc: function (cx, cy, r, startAngle, endAngle, anticlockwise) {
this.addData(CMD.A, cx, cy, r, r, startAngle, endAngle - startAngle, 0, anticlockwise ? 0 : 1);
this._ctx && this._ctx.arc(cx, cy, r, startAngle, endAngle, anticlockwise);
this._xi = mathCos(endAngle) * r + cx;
this._yi = mathSin(endAngle) * r + cy;
return this;
},
// TODO
arcTo: function (x1, y1, x2, y2, radius) {
if (this._ctx) {
this._ctx.arcTo(x1, y1, x2, y2, radius);
}
return this;
},
// TODO
rect: function (x, y, w, h) {
this._ctx && this._ctx.rect(x, y, w, h);
this.addData(CMD.R, x, y, w, h);
return this;
},
/**
* @return {module:zrender/core/PathProxy}
*/
closePath: function () {
this.addData(CMD.Z);
var ctx = this._ctx;
var x0 = this._x0;
var y0 = this._y0;
if (ctx) {
this._needsDash() && this._dashedLineTo(x0, y0);
ctx.closePath();
}
this._xi = x0;
this._yi = y0;
return this;
},
/**
* Context 从外部传入,因为有可能是 rebuildPath 完之后再 fill。
* stroke 同样
* @param {CanvasRenderingContext2D} ctx
* @return {module:zrender/core/PathProxy}
*/
fill: function (ctx) {
ctx && ctx.fill();
this.toStatic();
},
/**
* @param {CanvasRenderingContext2D} ctx
* @return {module:zrender/core/PathProxy}
*/
stroke: function (ctx) {
ctx && ctx.stroke();
this.toStatic();
},
/**
* 必须在其它绘制命令前调用
* Must be invoked before all other path drawing methods
* @return {module:zrender/core/PathProxy}
*/
setLineDash: function (lineDash) {
if (lineDash instanceof Array) {
this._lineDash = lineDash;
this._dashIdx = 0;
var lineDashSum = 0;
for (var i = 0; i < lineDash.length; i++) {
lineDashSum += lineDash[i];
}
this._dashSum = lineDashSum;
}
return this;
},
/**
* 必须在其它绘制命令前调用
* Must be invoked before all other path drawing methods
* @return {module:zrender/core/PathProxy}
*/
setLineDashOffset: function (offset) {
this._dashOffset = offset;
return this;
},
/**
*
* @return {boolean}
*/
len: function () {
return this._len;
},
/**
* 直接设置 Path 数据
*/
setData: function (data) {
var len = data.length;
if (!(this.data && this.data.length === len) && hasTypedArray) {
this.data = new Float32Array(len);
}
for (var i = 0; i < len; i++) {
this.data[i] = data[i];
}
this._len = len;
},
/**
* 添加子路径
* @param {module:zrender/core/PathProxy|Array.} path
*/
appendPath: function (path) {
if (!(path instanceof Array)) {
path = [path];
}
var len = path.length;
var appendSize = 0;
var offset = this._len;
for (var i = 0; i < len; i++) {
appendSize += path[i].len();
}
if (hasTypedArray && this.data instanceof Float32Array) {
this.data = new Float32Array(offset + appendSize);
}
for (var i = 0; i < len; i++) {
var appendPathData = path[i].data;
for (var k = 0; k < appendPathData.length; k++) {
this.data[offset++] = appendPathData[k];
}
}
this._len = offset;
},
/**
* 填充 Path 数据。
* 尽量复用而不申明新的数组。大部分图形重绘的指令数据长度都是不变的。
*/
addData: function (cmd) {
if (!this._saveData) {
return;
}
var data = this.data;
if (this._len + arguments.length > data.length) {
// 因为之前的数组已经转换成静态的 Float32Array
// 所以不够用时需要扩展一个新的动态数组
this._expandData();
data = this.data;
}
for (var i = 0; i < arguments.length; i++) {
data[this._len++] = arguments[i];
}
this._prevCmd = cmd;
},
_expandData: function () {
// Only if data is Float32Array
if (!(this.data instanceof Array)) {
var newData = [];
for (var i = 0; i < this._len; i++) {
newData[i] = this.data[i];
}
this.data = newData;
}
},
/**
* If needs js implemented dashed line
* @return {boolean}
* @private
*/
_needsDash: function () {
return this._lineDash;
},
_dashedLineTo: function (x1, y1) {
var dashSum = this._dashSum;
var offset = this._dashOffset;
var lineDash = this._lineDash;
var ctx = this._ctx;
var x0 = this._xi;
var y0 = this._yi;
var dx = x1 - x0;
var dy = y1 - y0;
var dist = mathSqrt(dx * dx + dy * dy);
var x = x0;
var y = y0;
var dash;
var nDash = lineDash.length;
var idx;
dx /= dist;
dy /= dist;
if (offset < 0) {
// Convert to positive offset
offset = dashSum + offset;
}
offset %= dashSum;
x -= offset * dx;
y -= offset * dy;
while (dx > 0 && x <= x1 || dx < 0 && x >= x1 || dx === 0 && (dy > 0 && y <= y1 || dy < 0 && y >= y1)) {
idx = this._dashIdx;
dash = lineDash[idx];
x += dx * dash;
y += dy * dash;
this._dashIdx = (idx + 1) % nDash; // Skip positive offset
if (dx > 0 && x < x0 || dx < 0 && x > x0 || dy > 0 && y < y0 || dy < 0 && y > y0) {
continue;
}
ctx[idx % 2 ? 'moveTo' : 'lineTo'](dx >= 0 ? mathMin(x, x1) : mathMax(x, x1), dy >= 0 ? mathMin(y, y1) : mathMax(y, y1));
} // Offset for next lineTo
dx = x - x1;
dy = y - y1;
this._dashOffset = -mathSqrt(dx * dx + dy * dy);
},
// Not accurate dashed line to
_dashedBezierTo: function (x1, y1, x2, y2, x3, y3) {
var dashSum = this._dashSum;
var offset = this._dashOffset;
var lineDash = this._lineDash;
var ctx = this._ctx;
var x0 = this._xi;
var y0 = this._yi;
var t;
var dx;
var dy;
var cubicAt = curve.cubicAt;
var bezierLen = 0;
var idx = this._dashIdx;
var nDash = lineDash.length;
var x;
var y;
var tmpLen = 0;
if (offset < 0) {
// Convert to positive offset
offset = dashSum + offset;
}
offset %= dashSum; // Bezier approx length
for (t = 0; t < 1; t += 0.1) {
dx = cubicAt(x0, x1, x2, x3, t + 0.1) - cubicAt(x0, x1, x2, x3, t);
dy = cubicAt(y0, y1, y2, y3, t + 0.1) - cubicAt(y0, y1, y2, y3, t);
bezierLen += mathSqrt(dx * dx + dy * dy);
} // Find idx after add offset
for (; idx < nDash; idx++) {
tmpLen += lineDash[idx];
if (tmpLen > offset) {
break;
}
}
t = (tmpLen - offset) / bezierLen;
while (t <= 1) {
x = cubicAt(x0, x1, x2, x3, t);
y = cubicAt(y0, y1, y2, y3, t); // Use line to approximate dashed bezier
// Bad result if dash is long
idx % 2 ? ctx.moveTo(x, y) : ctx.lineTo(x, y);
t += lineDash[idx] / bezierLen;
idx = (idx + 1) % nDash;
} // Finish the last segment and calculate the new offset
idx % 2 !== 0 && ctx.lineTo(x3, y3);
dx = x3 - x;
dy = y3 - y;
this._dashOffset = -mathSqrt(dx * dx + dy * dy);
},
_dashedQuadraticTo: function (x1, y1, x2, y2) {
// Convert quadratic to cubic using degree elevation
var x3 = x2;
var y3 = y2;
x2 = (x2 + 2 * x1) / 3;
y2 = (y2 + 2 * y1) / 3;
x1 = (this._xi + 2 * x1) / 3;
y1 = (this._yi + 2 * y1) / 3;
this._dashedBezierTo(x1, y1, x2, y2, x3, y3);
},
/**
* 转成静态的 Float32Array 减少堆内存占用
* Convert dynamic array to static Float32Array
*/
toStatic: function () {
var data = this.data;
if (data instanceof Array) {
data.length = this._len;
if (hasTypedArray) {
this.data = new Float32Array(data);
}
}
},
/**
* @return {module:zrender/core/BoundingRect}
*/
getBoundingRect: function () {
min[0] = min[1] = min2[0] = min2[1] = Number.MAX_VALUE;
max[0] = max[1] = max2[0] = max2[1] = -Number.MAX_VALUE;
var data = this.data;
var xi = 0;
var yi = 0;
var x0 = 0;
var y0 = 0;
for (var i = 0; i < data.length;) {
var cmd = data[i++];
if (i === 1) {
// 如果第一个命令是 L, C, Q
// 则 previous point 同绘制命令的第一个 point
//
// 第一个命令为 Arc 的情况下会在后面特殊处理
xi = data[i];
yi = data[i + 1];
x0 = xi;
y0 = yi;
}
switch (cmd) {
case CMD.M:
// moveTo 命令重新创建一个新的 subpath, 并且更新新的起点
// 在 closePath 的时候使用
x0 = data[i++];
y0 = data[i++];
xi = x0;
yi = y0;
min2[0] = x0;
min2[1] = y0;
max2[0] = x0;
max2[1] = y0;
break;
case CMD.L:
bbox.fromLine(xi, yi, data[i], data[i + 1], min2, max2);
xi = data[i++];
yi = data[i++];
break;
case CMD.C:
bbox.fromCubic(xi, yi, data[i++], data[i++], data[i++], data[i++], data[i], data[i + 1], min2, max2);
xi = data[i++];
yi = data[i++];
break;
case CMD.Q:
bbox.fromQuadratic(xi, yi, data[i++], data[i++], data[i], data[i + 1], min2, max2);
xi = data[i++];
yi = data[i++];
break;
case CMD.A:
// TODO Arc 判断的开销比较大
var cx = data[i++];
var cy = data[i++];
var rx = data[i++];
var ry = data[i++];
var startAngle = data[i++];
var endAngle = data[i++] + startAngle; // TODO Arc 旋转
i += 1;
var anticlockwise = 1 - data[i++];
if (i === 1) {
// 直接使用 arc 命令
// 第一个命令起点还未定义
x0 = mathCos(startAngle) * rx + cx;
y0 = mathSin(startAngle) * ry + cy;
}
bbox.fromArc(cx, cy, rx, ry, startAngle, endAngle, anticlockwise, min2, max2);
xi = mathCos(endAngle) * rx + cx;
yi = mathSin(endAngle) * ry + cy;
break;
case CMD.R:
x0 = xi = data[i++];
y0 = yi = data[i++];
var width = data[i++];
var height = data[i++]; // Use fromLine
bbox.fromLine(x0, y0, x0 + width, y0 + height, min2, max2);
break;
case CMD.Z:
xi = x0;
yi = y0;
break;
} // Union
vec2.min(min, min, min2);
vec2.max(max, max, max2);
} // No data
if (i === 0) {
min[0] = min[1] = max[0] = max[1] = 0;
}
return new BoundingRect(min[0], min[1], max[0] - min[0], max[1] - min[1]);
},
/**
* Rebuild path from current data
* Rebuild path will not consider javascript implemented line dash.
* @param {CanvasRenderingContext2D} ctx
*/
rebuildPath: function (ctx) {
var d = this.data;
var x0;
var y0;
var xi;
var yi;
var x;
var y;
var ux = this._ux;
var uy = this._uy;
var len = this._len;
for (var i = 0; i < len;) {
var cmd = d[i++];
if (i === 1) {
// 如果第一个命令是 L, C, Q
// 则 previous point 同绘制命令的第一个 point
//
// 第一个命令为 Arc 的情况下会在后面特殊处理
xi = d[i];
yi = d[i + 1];
x0 = xi;
y0 = yi;
}
switch (cmd) {
case CMD.M:
x0 = xi = d[i++];
y0 = yi = d[i++];
ctx.moveTo(xi, yi);
break;
case CMD.L:
x = d[i++];
y = d[i++]; // Not draw too small seg between
if (mathAbs(x - xi) > ux || mathAbs(y - yi) > uy || i === len - 1) {
ctx.lineTo(x, y);
xi = x;
yi = y;
}
break;
case CMD.C:
ctx.bezierCurveTo(d[i++], d[i++], d[i++], d[i++], d[i++], d[i++]);
xi = d[i - 2];
yi = d[i - 1];
break;
case CMD.Q:
ctx.quadraticCurveTo(d[i++], d[i++], d[i++], d[i++]);
xi = d[i - 2];
yi = d[i - 1];
break;
case CMD.A:
var cx = d[i++];
var cy = d[i++];
var rx = d[i++];
var ry = d[i++];
var theta = d[i++];
var dTheta = d[i++];
var psi = d[i++];
var fs = d[i++];
var r = rx > ry ? rx : ry;
var scaleX = rx > ry ? 1 : rx / ry;
var scaleY = rx > ry ? ry / rx : 1;
var isEllipse = Math.abs(rx - ry) > 1e-3;
var endAngle = theta + dTheta;
if (isEllipse) {
ctx.translate(cx, cy);
ctx.rotate(psi);
ctx.scale(scaleX, scaleY);
ctx.arc(0, 0, r, theta, endAngle, 1 - fs);
ctx.scale(1 / scaleX, 1 / scaleY);
ctx.rotate(-psi);
ctx.translate(-cx, -cy);
} else {
ctx.arc(cx, cy, r, theta, endAngle, 1 - fs);
}
if (i === 1) {
// 直接使用 arc 命令
// 第一个命令起点还未定义
x0 = mathCos(theta) * rx + cx;
y0 = mathSin(theta) * ry + cy;
}
xi = mathCos(endAngle) * rx + cx;
yi = mathSin(endAngle) * ry + cy;
break;
case CMD.R:
x0 = xi = d[i];
y0 = yi = d[i + 1];
ctx.rect(d[i++], d[i++], d[i++], d[i++]);
break;
case CMD.Z:
ctx.closePath();
xi = x0;
yi = y0;
}
}
}
};
PathProxy.CMD = CMD;
var _default = PathProxy;
module.exports = _default;
/***/ }),
/***/ "mtrD":
/***/ (function(module, exports) {
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 97);
/******/ })
/************************************************************************/
/******/ ({
/***/ 0:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.
function normalizeComponent (
scriptExports,
render,
staticRenderFns,
functionalTemplate,
injectStyles,
scopeId,
moduleIdentifier, /* server only */
shadowMode /* vue-cli only */
) {
// Vue.extend constructor export interop
var options = typeof scriptExports === 'function'
? scriptExports.options
: scriptExports
// render functions
if (render) {
options.render = render
options.staticRenderFns = staticRenderFns
options._compiled = true
}
// functional template
if (functionalTemplate) {
options.functional = true
}
// scopedId
if (scopeId) {
options._scopeId = 'data-v-' + scopeId
}
var hook
if (moduleIdentifier) { // server build
hook = function (context) {
// 2.3 injection
context =
context || // cached call
(this.$vnode && this.$vnode.ssrContext) || // stateful
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
// 2.2 with runInNewContext: true
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
context = __VUE_SSR_CONTEXT__
}
// inject component styles
if (injectStyles) {
injectStyles.call(this, context)
}
// register component module identifier for async chunk inferrence
if (context && context._registeredComponents) {
context._registeredComponents.add(moduleIdentifier)
}
}
// used by ssr in case component is cached and beforeCreate
// never gets called
options._ssrRegister = hook
} else if (injectStyles) {
hook = shadowMode
? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
: injectStyles
}
if (hook) {
if (options.functional) {
// for template-only hot-reload because in that case the render fn doesn't
// go through the normalizer
options._injectStyles = hook
// register for functioal component in vue file
var originalRender = options.render
options.render = function renderWithStyleInjection (h, context) {
hook.call(context)
return originalRender(h, context)
}
} else {
// inject component registration as beforeCreate hook
var existing = options.beforeCreate
options.beforeCreate = existing
? [].concat(existing, hook)
: [hook]
}
}
return {
exports: scriptExports,
options: options
}
}
/***/ }),
/***/ 97:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
var render = function() {
var _vm = this
var _h = _vm.$createElement
var _c = _vm._self._c || _h
return _c(
"button",
{
staticClass: "el-button",
class: [
_vm.type ? "el-button--" + _vm.type : "",
_vm.buttonSize ? "el-button--" + _vm.buttonSize : "",
{
"is-disabled": _vm.buttonDisabled,
"is-loading": _vm.loading,
"is-plain": _vm.plain,
"is-round": _vm.round,
"is-circle": _vm.circle
}
],
attrs: {
disabled: _vm.buttonDisabled || _vm.loading,
autofocus: _vm.autofocus,
type: _vm.nativeType
},
on: { click: _vm.handleClick }
},
[
_vm.loading ? _c("i", { staticClass: "el-icon-loading" }) : _vm._e(),
_vm.icon && !_vm.loading ? _c("i", { class: _vm.icon }) : _vm._e(),
_vm.$slots.default ? _c("span", [_vm._t("default")], 2) : _vm._e()
]
)
}
var staticRenderFns = []
render._withStripped = true
// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=template&id=ca859fb4&
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/button/src/button.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
/* harmony default export */ var buttonvue_type_script_lang_js_ = ({
name: 'ElButton',
inject: {
elForm: {
default: ''
},
elFormItem: {
default: ''
}
},
props: {
type: {
type: String,
default: 'default'
},
size: String,
icon: {
type: String,
default: ''
},
nativeType: {
type: String,
default: 'button'
},
loading: Boolean,
disabled: Boolean,
plain: Boolean,
autofocus: Boolean,
round: Boolean,
circle: Boolean
},
computed: {
_elFormItemSize: function _elFormItemSize() {
return (this.elFormItem || {}).elFormItemSize;
},
buttonSize: function buttonSize() {
return this.size || this._elFormItemSize || (this.$ELEMENT || {}).size;
},
buttonDisabled: function buttonDisabled() {
return this.disabled || (this.elForm || {}).disabled;
}
},
methods: {
handleClick: function handleClick(evt) {
this.$emit('click', evt);
}
}
});
// CONCATENATED MODULE: ./packages/button/src/button.vue?vue&type=script&lang=js&
/* harmony default export */ var src_buttonvue_type_script_lang_js_ = (buttonvue_type_script_lang_js_);
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);
// CONCATENATED MODULE: ./packages/button/src/button.vue
/* normalize component */
var component = Object(componentNormalizer["a" /* default */])(
src_buttonvue_type_script_lang_js_,
render,
staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "packages/button/src/button.vue"
/* harmony default export */ var src_button = (component.exports);
// CONCATENATED MODULE: ./packages/button/index.js
/* istanbul ignore next */
src_button.install = function (Vue) {
Vue.component(src_button.name, src_button);
};
/* harmony default export */ var packages_button = __webpack_exports__["default"] = (src_button);
/***/ })
/******/ });
/***/ }),
/***/ "mvCM":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var _util = __webpack_require__("/gxq");
var each = _util.each;
var createHashMap = _util.createHashMap;
var assert = _util.assert;
var _config = __webpack_require__("4Nz2");
var __DEV__ = _config.__DEV__;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var OTHER_DIMENSIONS = createHashMap(['tooltip', 'label', 'itemName', 'itemId', 'seriesName']);
function summarizeDimensions(data) {
var summary = {};
var encode = summary.encode = {};
var notExtraCoordDimMap = createHashMap();
var defaultedLabel = [];
var defaultedTooltip = []; // See the comment of `List.js#userOutput`.
var userOutput = summary.userOutput = {
dimensionNames: data.dimensions.slice(),
encode: {}
};
each(data.dimensions, function (dimName) {
var dimItem = data.getDimensionInfo(dimName);
var coordDim = dimItem.coordDim;
if (coordDim) {
var coordDimIndex = dimItem.coordDimIndex;
getOrCreateEncodeArr(encode, coordDim)[coordDimIndex] = dimName;
if (!dimItem.isExtraCoord) {
notExtraCoordDimMap.set(coordDim, 1); // Use the last coord dim (and label friendly) as default label,
// because when dataset is used, it is hard to guess which dimension
// can be value dimension. If both show x, y on label is not look good,
// and conventionally y axis is focused more.
if (mayLabelDimType(dimItem.type)) {
defaultedLabel[0] = dimName;
} // User output encode do not contain generated coords.
// And it only has index. User can use index to retrieve value from the raw item array.
getOrCreateEncodeArr(userOutput.encode, coordDim)[coordDimIndex] = dimItem.index;
}
if (dimItem.defaultTooltip) {
defaultedTooltip.push(dimName);
}
}
OTHER_DIMENSIONS.each(function (v, otherDim) {
var encodeArr = getOrCreateEncodeArr(encode, otherDim);
var dimIndex = dimItem.otherDims[otherDim];
if (dimIndex != null && dimIndex !== false) {
encodeArr[dimIndex] = dimItem.name;
}
});
});
var dataDimsOnCoord = [];
var encodeFirstDimNotExtra = {};
notExtraCoordDimMap.each(function (v, coordDim) {
var dimArr = encode[coordDim]; // ??? FIXME extra coord should not be set in dataDimsOnCoord.
// But should fix the case that radar axes: simplify the logic
// of `completeDimension`, remove `extraPrefix`.
encodeFirstDimNotExtra[coordDim] = dimArr[0]; // Not necessary to remove duplicate, because a data
// dim canot on more than one coordDim.
dataDimsOnCoord = dataDimsOnCoord.concat(dimArr);
});
summary.dataDimsOnCoord = dataDimsOnCoord;
summary.encodeFirstDimNotExtra = encodeFirstDimNotExtra;
var encodeLabel = encode.label; // FIXME `encode.label` is not recommanded, because formatter can not be set
// in this way. Use label.formatter instead. May be remove this approach someday.
if (encodeLabel && encodeLabel.length) {
defaultedLabel = encodeLabel.slice();
}
var encodeTooltip = encode.tooltip;
if (encodeTooltip && encodeTooltip.length) {
defaultedTooltip = encodeTooltip.slice();
} else if (!defaultedTooltip.length) {
defaultedTooltip = defaultedLabel.slice();
}
encode.defaultedLabel = defaultedLabel;
encode.defaultedTooltip = defaultedTooltip;
return summary;
}
function getOrCreateEncodeArr(encode, dim) {
if (!encode.hasOwnProperty(dim)) {
encode[dim] = [];
}
return encode[dim];
}
function getDimensionTypeByAxis(axisType) {
return axisType === 'category' ? 'ordinal' : axisType === 'time' ? 'time' : 'float';
}
function mayLabelDimType(dimType) {
// In most cases, ordinal and time do not suitable for label.
// Ordinal info can be displayed on axis. Time is too long.
return !(dimType === 'ordinal' || dimType === 'time');
} // function findTheLastDimMayLabel(data) {
// // Get last value dim
// var dimensions = data.dimensions.slice();
// var valueType;
// var valueDim;
// while (dimensions.length && (
// valueDim = dimensions.pop(),
// valueType = data.getDimensionInfo(valueDim).type,
// valueType === 'ordinal' || valueType === 'time'
// )) {} // jshint ignore:line
// return valueDim;
// }
exports.OTHER_DIMENSIONS = OTHER_DIMENSIONS;
exports.summarizeDimensions = summarizeDimensions;
exports.getDimensionTypeByAxis = getDimensionTypeByAxis;
/***/ }),
/***/ "mvkK":
/***/ (function(module, exports, __webpack_require__) {
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var _parseSVG = __webpack_require__("jDhh");
var parseSVG = _parseSVG.parseSVG;
var makeViewBoxTransform = _parseSVG.makeViewBoxTransform;
var Group = __webpack_require__("AlhT");
var Rect = __webpack_require__("PD67");
var _util = __webpack_require__("/gxq");
var assert = _util.assert;
var createHashMap = _util.createHashMap;
var BoundingRect = __webpack_require__("8b51");
var _model = __webpack_require__("vXqC");
var makeInner = _model.makeInner;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var inner = makeInner();
var _default = {
/**
* @param {string} mapName
* @param {Object} mapRecord {specialAreas, geoJSON}
* @return {Object} {root, boundingRect}
*/
load: function (mapName, mapRecord) {
var originRoot = inner(mapRecord).originRoot;
if (originRoot) {
return {
root: originRoot,
boundingRect: inner(mapRecord).boundingRect
};
}
var graphic = buildGraphic(mapRecord);
inner(mapRecord).originRoot = graphic.root;
inner(mapRecord).boundingRect = graphic.boundingRect;
return graphic;
},
makeGraphic: function (mapName, mapRecord, hostKey) {
// For performance consideration (in large SVG), graphic only maked
// when necessary and reuse them according to hostKey.
var field = inner(mapRecord);
var rootMap = field.rootMap || (field.rootMap = createHashMap());
var root = rootMap.get(hostKey);
if (root) {
return root;
}
var originRoot = field.originRoot;
var boundingRect = field.boundingRect; // For performance, if originRoot is not used by a view,
// assign it to a view, but not reproduce graphic elements.
if (!field.originRootHostKey) {
field.originRootHostKey = hostKey;
root = originRoot;
} else {
root = buildGraphic(mapRecord, boundingRect).root;
}
return rootMap.set(hostKey, root);
},
removeGraphic: function (mapName, mapRecord, hostKey) {
var field = inner(mapRecord);
var rootMap = field.rootMap;
rootMap && rootMap.removeKey(hostKey);
if (hostKey === field.originRootHostKey) {
field.originRootHostKey = null;
}
}
};
function buildGraphic(mapRecord, boundingRect) {
var svgXML = mapRecord.svgXML;
var result;
var root;
try {
result = svgXML && parseSVG(svgXML, {
ignoreViewBox: true,
ignoreRootClip: true
}) || {};
root = result.root;
assert(root != null);
} catch (e) {
throw new Error('Invalid svg format\n' + e.message);
}
var svgWidth = result.width;
var svgHeight = result.height;
var viewBoxRect = result.viewBoxRect;
if (!boundingRect) {
boundingRect = svgWidth == null || svgHeight == null ? // If svg width / height not specified, calculate
// bounding rect as the width / height
root.getBoundingRect() : new BoundingRect(0, 0, 0, 0);
if (svgWidth != null) {
boundingRect.width = svgWidth;
}
if (svgHeight != null) {
boundingRect.height = svgHeight;
}
}
if (viewBoxRect) {
var viewBoxTransform = makeViewBoxTransform(viewBoxRect, boundingRect.width, boundingRect.height);
var elRoot = root;
root = new Group();
root.add(elRoot);
elRoot.scale = viewBoxTransform.scale;
elRoot.position = viewBoxTransform.position;
}
root.setClipPath(new Rect({
shape: boundingRect.plain()
}));
return {
root: root,
boundingRect: boundingRect
};
}
module.exports = _default;
/***/ }),
/***/ "mypn":
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
"use strict";
if (global.setImmediate) {
return;
}
var nextHandle = 1; // Spec says greater than zero
var tasksByHandle = {};
var currentlyRunningATask = false;
var doc = global.document;
var registerImmediate;
function setImmediate(callback) {
// Callback can either be a function or a string
if (typeof callback !== "function") {
callback = new Function("" + callback);
}
// Copy function arguments
var args = new Array(arguments.length - 1);
for (var i = 0; i < args.length; i++) {
args[i] = arguments[i + 1];
}
// Store and register the task
var task = { callback: callback, args: args };
tasksByHandle[nextHandle] = task;
registerImmediate(nextHandle);
return nextHandle++;
}
function clearImmediate(handle) {
delete tasksByHandle[handle];
}
function run(task) {
var callback = task.callback;
var args = task.args;
switch (args.length) {
case 0:
callback();
break;
case 1:
callback(args[0]);
break;
case 2:
callback(args[0], args[1]);
break;
case 3:
callback(args[0], args[1], args[2]);
break;
default:
callback.apply(undefined, args);
break;
}
}
function runIfPresent(handle) {
// From the spec: "Wait until any invocations of this algorithm started before this one have completed."
// So if we're currently running a task, we'll need to delay this invocation.
if (currentlyRunningATask) {
// Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
// "too much recursion" error.
setTimeout(runIfPresent, 0, handle);
} else {
var task = tasksByHandle[handle];
if (task) {
currentlyRunningATask = true;
try {
run(task);
} finally {
clearImmediate(handle);
currentlyRunningATask = false;
}
}
}
}
function installNextTickImplementation() {
registerImmediate = function(handle) {
process.nextTick(function () { runIfPresent(handle); });
};
}
function canUsePostMessage() {
// The test against `importScripts` prevents this implementation from being installed inside a web worker,
// where `global.postMessage` means something completely different and can't be used for this purpose.
if (global.postMessage && !global.importScripts) {
var postMessageIsAsynchronous = true;
var oldOnMessage = global.onmessage;
global.onmessage = function() {
postMessageIsAsynchronous = false;
};
global.postMessage("", "*");
global.onmessage = oldOnMessage;
return postMessageIsAsynchronous;
}
}
function installPostMessageImplementation() {
// Installs an event handler on `global` for the `message` event: see
// * https://developer.mozilla.org/en/DOM/window.postMessage
// * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
var messagePrefix = "setImmediate$" + Math.random() + "$";
var onGlobalMessage = function(event) {
if (event.source === global &&
typeof event.data === "string" &&
event.data.indexOf(messagePrefix) === 0) {
runIfPresent(+event.data.slice(messagePrefix.length));
}
};
if (global.addEventListener) {
global.addEventListener("message", onGlobalMessage, false);
} else {
global.attachEvent("onmessage", onGlobalMessage);
}
registerImmediate = function(handle) {
global.postMessage(messagePrefix + handle, "*");
};
}
function installMessageChannelImplementation() {
var channel = new MessageChannel();
channel.port1.onmessage = function(event) {
var handle = event.data;
runIfPresent(handle);
};
registerImmediate = function(handle) {
channel.port2.postMessage(handle);
};
}
function installReadyStateChangeImplementation() {
var html = doc.documentElement;
registerImmediate = function(handle) {
// Create a